- Add the Codota plugin to your IDE and get smart completions
private void myMethod () {LocalDateTime l =
new LocalDateTime()
LocalDateTime.now()
DateTimeFormatter formatter;String text;formatter.parseLocalDateTime(text)
- Smart code suggestions by Codota
}
public static boolean isCommonExternalError(@Nullable Throwable e) { if (e == null) return false; final String message = jetbrains.buildServer.util.StringUtil.emptyIfNull(e.getMessage()); if (e.getClass().getName().endsWith(".IllegalStateException") && message.equals("Cannot call sendError() after the response has been committed")){ //Jersey 1.19 (as opposed to Jersey 1.16) reports this error in case of ClientAbortException return true; } if (e.getClass().getName().endsWith(".IllegalStateException") && message.equals("getOutputStream() has already been called for this response")){ //this is thrown on attempt to report error in already written response in APIController.reportRestErrorResponse() return true; } while (true) { if (e.getClass().getName().endsWith(".ClientAbortException")) return true; final Throwable cause = e.getCause(); if (cause == null || cause == e) break; e = cause; } return false; }
@NotNull private String getPatternsForBuild(@NotNull final BuildCleanupContext cleanupContext, @NotNull final SBuild build) { if (cleanupContext.getCleanupLevel().isCleanHistoryEntry()) return StringUtil.EMPTY; final CleanupPolicy policy = cleanupContext.getCleanupPolicyForBuild(build.getBuildId()); return StringUtil.emptyIfNull(policy.getParameters().get(HistoryRetentionPolicy.ARTIFACT_PATTERNS_PARAM)); }