@Test public void testPseudoAttachmentMissingArgument() throws Exception { PseudoAttacherNoArgument.ERROR.set(null); Attacher.main(new String[]{PseudoAttacherNoArgument.class.getName(), FOO, BAR, Boolean.FALSE.toString()}); if (PseudoAttacherNoArgument.ERROR.get() != null) { throw new AssertionError(PseudoAttacherNoArgument.ERROR.get()); } }
@SuppressFBWarnings(value = "REC_CATCH_EXCEPTION", justification = "Exception should not be rethrown but trigger a fallback") public static void main(String[] args) { try { String argument; if (args.length < 5 || args[4].length() == 0) { argument = null; } else { StringBuilder stringBuilder = new StringBuilder(args[4].substring(1)); for (int index = 5; index < args.length; index++) { stringBuilder.append(' ').append(args[index]); } argument = stringBuilder.toString(); } install(Class.forName(args[0]), args[1], args[2], Boolean.parseBoolean(args[3]), argument); } catch (Throwable ignored) { System.exit(1); } }
Attacher { @SuppressFBWarnings(value = "REC_CATCH_EXCEPTION", justification = "Exception should not be rethrown but trigger a fallback") public static void main(String[] args) { try { String argument; if (args.length < 5 || args[4].length() == 0) { argument = null; } else { StringBuilder stringBuilder = new StringBuilder(args[4].substring(1)); for (int index = 5; index < args.length; index++) { stringBuilder.append(' ').append(args[index]); } argument = stringBuilder.toString(); } install(Class.forName(args[0]), args[1], args[2], Boolean.parseBoolean(args[3]), argument); } catch (Throwable ignored) { System.exit(1); } } }
Attacher { @SuppressFBWarnings(value = "REC_CATCH_EXCEPTION", justification = "Exception should not be rethrown but trigger a fallback") public static void main(String[] args) { try { String argument; if (args.length < 5 || args[4].length() == 0) { argument = null; } else { StringBuilder stringBuilder = new StringBuilder(args[4].substring(1)); for (int index = 5; index < args.length; index++) { stringBuilder.append(' ').append(args[index]); } argument = stringBuilder.toString(); } install(Class.forName(args[0]), args[1], args[2], Boolean.parseBoolean(args[3]), argument); } catch (Throwable ignored) { System.exit(1); } } private  Attacher(); }
Attacher { @SuppressFBWarnings(value = "REC_CATCH_EXCEPTION", justification = "Exception should not be rethrown but trigger a fallback") public static void main(String[] args) { try { String argument; if (args.length < 5 || args[4].length() == 0) { argument = null; } else { StringBuilder stringBuilder = new StringBuilder(args[4].substring(1)); for (int index = 5; index < args.length; index++) { stringBuilder.append(' ').append(args[index]); } argument = stringBuilder.toString(); } install(Class.forName(args[0]), args[1], args[2], Boolean.parseBoolean(args[3]), argument); } catch (Throwable ignored) { System.exit(1); } } private  Attacher(); @SuppressFBWarnings(value = "REC_CATCH_EXCEPTION", justification = "Exception should not be rethrown but trigger a fallback") static void main(String[] args); }
Attacher { @SuppressFBWarnings(value = "REC_CATCH_EXCEPTION", justification = "Exception should not be rethrown but trigger a fallback") public static void main(String[] args) { try { String argument; if (args.length < 5 || args[4].length() == 0) { argument = null; } else { StringBuilder stringBuilder = new StringBuilder(args[4].substring(1)); for (int index = 5; index < args.length; index++) { stringBuilder.append(' ').append(args[index]); } argument = stringBuilder.toString(); } install(Class.forName(args[0]), args[1], args[2], Boolean.parseBoolean(args[3]), argument); } catch (Throwable ignored) { System.exit(1); } } private  Attacher(); @SuppressFBWarnings(value = "REC_CATCH_EXCEPTION", justification = "Exception should not be rethrown but trigger a fallback") static void main(String[] args);  }