Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

11
LINES

< > BotCompany Repo | #1022099 // assertNullVerbose

JavaX fragment (include)

static <A> A assertNullVerbose(A y) {
  assertNullVerbose((S) null, y);
  ret y;
}

static <A> A assertNullVerbose(S msg, A y) {
  if (y != null)
    fail((msg != null ? msg + ": " : "expected null: ") + y;
  print("OK: null");
  ret y;
}

Author comment

Began life as a copy of #1002936

download  show line numbers  debug dex  old transpilations   

Travelled to 7 computer(s): bhatertpkbcr, cfunsshuasjs, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1022099
Snippet name: assertNullVerbose
Eternal ID of this version: #1022099/3
Text MD5: 2e3612528af4a7d9ea33c00c386e5399
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-03-07 20:25:18
Source code size: 248 bytes / 11 lines
Pitched / IR pitched: No / No
Views / Downloads: 163 / 188
Version history: 2 change(s)
Referenced in: [show references]