/** * Checks if {@code value} is blank. * * @param name the name of the argument of error reporting. Not used if no * exception is thrown. May be <code>null</code>, although not * recommended. * @param value the value of the argument to check to be not blank. * @throws BlankArgumentException if {@code value} is blank. */ public static void checkNotBlank(final String name, final String value) throws BlankArgumentException { checkNotBlank(name, value, null); }
/** * Default constructor. * * @param id the identifier of the job configuration. * @param configXml the Hudson job configuration file as an XML string. * @throws BlankArgumentException if either {@code id} or {@code configXml} is * blank. */ public HudsonJobConfig(final String id, final String configXml) throws BlankArgumentException { Arguments.checkNotBlank("id", id); Arguments.checkNotBlank("configXml", configXml); this.id = id; this.configXml = configXml; }
/** * Adds a configuration name to the loader plan. * * @param configurationName the name to add. * @throws BlankArgumentException if {@code configurationName} is blank. */ public void addConfigurationName(final String configurationName) throws BlankArgumentException { Arguments.checkNotBlank("configurationName", configurationName); configurationNames.add(configurationName); }
/** * Default constructor. * * @param id the identifier of the loader plan. * @param mavenConfig the information from the Maven project configuration. * @throws BlankArgumentException if {@code id} is blank. * @throws NullArgumentException if {@code mavenConfig} is <code>null</code>. */ public LoaderPlan(final String id, final MavenConfig mavenConfig) throws BlankArgumentException, NullArgumentException { Arguments.checkNotBlank("id", id); Arguments.checkNotNull("mavenConfig", mavenConfig); this.id = id; this.mavenConfig = mavenConfig; }
throws BlankArgumentException, IllegalArgumentException Arguments.checkNotBlank("connectionString", connectionString); if (!connectionString.startsWith("scm:"))