Codota Logo
StringUtil.emptyIfNull
Code IndexAdd Codota to your IDE (free)

How to use
emptyIfNull
method
in
jetbrains.buildServer.util.StringUtil

Best Java code snippets using jetbrains.buildServer.util.StringUtil.emptyIfNull (Showing top 2 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
LocalDateTime l =
  • Codota Iconnew LocalDateTime()
  • Codota IconLocalDateTime.now()
  • Codota IconDateTimeFormatter formatter;String text;formatter.parseLocalDateTime(text)
  • Smart code suggestions by Codota
}
origin: tcplugins/tcWebHooks

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;
}
origin: JetBrains/teamcity-s3-artifact-storage-plugin

@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));
}
jetbrains.buildServer.utilStringUtilemptyIfNull

Popular methods of StringUtil

  • isEmpty
  • isNotEmpty
  • isEmptyOrSpaces
  • join
  • notEmpty
  • nullIfEmpty
  • pluralize

Popular in Java

  • Reading from database using SQL prepared statement
  • scheduleAtFixedRate (Timer)
  • getExternalFilesDir (Context)
  • addToBackStack (FragmentTransaction)
  • Timestamp (java.sql)
    A Java representation of the SQL TIMESTAMP type. It provides the capability of representing the SQL
  • TimeZone (java.util)
    TimeZone represents a time zone offset, and also figures out daylight savings. Typically, you get a
  • ConcurrentHashMap (java.util.concurrent)
    A hash table supporting full concurrency of retrievals and adjustable expected concurrency for updat
  • ThreadPoolExecutor (java.util.concurrent)
    An ExecutorService that executes each submitted task using one of possibly several pooled threads, n
  • AtomicInteger (java.util.concurrent.atomic)
    An int value that may be updated atomically. See the java.util.concurrent.atomic package specificati
  • JList (javax.swing)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now