congrats Icon
New! Announcing our next generation AI code completions
Read here
Tabnine Logo
StringUtil.emptyIfNull
Code IndexAdd Tabnine 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)

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

  • Creating JSON documents from java classes using gson
  • getContentResolver (Context)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • Container (java.awt)
    A generic Abstract Window Toolkit(AWT) container object is a component that can contain other AWT co
  • Socket (java.net)
    Provides a client-side TCP socket.
  • SQLException (java.sql)
    An exception that indicates a failed JDBC operation. It provides the following information about pro
  • Collections (java.util)
    This class consists exclusively of static methods that operate on or return collections. It contains
  • StringUtils (org.apache.commons.lang)
    Operations on java.lang.String that arenull safe. * IsEmpty/IsBlank - checks if a String contains
  • DateTimeFormat (org.joda.time.format)
    Factory that creates instances of DateTimeFormatter from patterns and styles. Datetime formatting i
  • PhpStorm for WordPress
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now