List of usage examples for org.apache.commons.lang StringUtils EMPTY
String EMPTY
To view the source code for org.apache.commons.lang StringUtils EMPTY.
Click Source Link
""
. From source file:fr.paris.lutece.plugins.calendar.web.HtmlUtils.java
/** * Convert CR into HTML <br />// ww w. j a v a 2 s . c om * @param strSource The string to convert * @return The converted string */ public static String convertCR(String strSource) { String strReturn = StringUtils.EMPTY; if (StringUtils.isNotBlank(strSource)) { strReturn = strSource.replaceAll(LINEFEED, HTML_BR); } return strReturn; }
From source file:jenkins.plugins.coverity.CoverityTool.CovCommitDefectsCommandTest.java
@Test public void prepareCommandTest() throws IOException, InterruptedException { CIMStream cimStream = new CIMStream("TestInstance", "TestProject", "TestStream", null); CIMInstance cimInstance = new CIMInstance("TestInstance", "Localhost", 8080, "TestUser", "TestPassword", false, 0);/*from www. j a v a2 s . co m*/ InvocationAssistance invocationAssistance = new InvocationAssistanceBuilder().build(); CoverityPublisher publisher = new CoverityPublisherBuilder().withCimStream(cimStream) .withInvocationAssistance(invocationAssistance).build(); Command covCommitDefectsCommand = new CovCommitDefectsCommand(build, launcher, listener, publisher, StringUtils.EMPTY, envVars, cimStream, cimInstance, CoverityVersion.VERSION_JASPER); setExpectedArguments(new String[] { "cov-commit-defects", "--dir", "TestDir", "--host", "Localhost", "--port", "8080", "--stream", "TestStream", "--user", "TestUser" }); covCommitDefectsCommand.runCommand(); assertEquals("TestPassword", envVars.get("COVERITY_PASSPHRASE")); consoleLogger.verifyLastMessage( "[Coverity] cov-commit-defects command line arguments: " + actualArguments.toString()); }
From source file:com.apexxs.neonblack.setup.TMBorderLoader.java
public int load(SolrServer server) { int count = 0; try {//from ww w. j a v a2s . c o m URL url = TMBorderLoader.class.getResource("/TM_WORLD_BORDERS-0.3.csv"); File file = new File(url.toURI()); BufferedReader r = new BufferedReader(new InputStreamReader(new FileInputStream(file), "UTF-8")); String line; r.readLine(); while ((line = r.readLine()) != null) { BorderData bd = new BorderData(); String[] tokens = line.split(";"); bd.fips = tokens[1]; bd.iso2 = tokens[2]; bd.iso3 = tokens[3]; bd.name = tokens[5]; bd.wkt = tokens[0].replace("\"", StringUtils.EMPTY); bd.id = MD5Utilities.getMD5Hash(bd.wkt); bd.shapeType = "adm0"; server.addBean(bd); System.out.println("Added " + bd.name); count++; } r.close(); } catch (Exception ex) { System.out.println("Error in TMBorderLoader.load()"); ex.printStackTrace(); } return count; }
From source file:com.amalto.core.history.EmptyDocument.java
@Override public String getDataModel() { return StringUtils.EMPTY; }
From source file:hudson.plugins.ccm.parser.CcmParser.java
/** * Creates a new instance of {@link PmdParser}. */ public CcmParser() { super(StringUtils.EMPTY); }
From source file:com.chadekin.jadys.syntax.OrderByClauseBuilderImplTest.java
@Test public void shouldThrowIaeWhenOrderStatementIsEmptyForString() { // Act/*from w w w . j a va2s .c o m*/ String sql = builder.orderBy(null, StringUtils.EMPTY).build(); // Assert assertThat(sql, is(emptyString())); }
From source file:com.cyclopsgroup.waterview.spi.BaseI18N.java
/** * Overwrite or implement method getText() * @see com.cyclopsgroup.waterview.I18N#getText(java.lang.String) *//*w w w . java2 s . c om*/ public String getText(String key) { return getText(key, StringUtils.EMPTY); }
From source file:com.envision.envservice.rest.CommentTopResource.java
@POST @Consumes(MediaType.APPLICATION_JSON)/* www. j av a 2s . c om*/ @Produces(MediaType.APPLICATION_JSON) public Response commentTop(CommentTopVo commentTopVo) throws ServiceException { HttpStatus status = HttpStatus.CREATED; String response = StringUtils.EMPTY; commentTopService.commentTop(commentTopVo.getComment_id()); return Response.status(status.value()).entity(response).build(); }
From source file:com.amalto.core.history.accessor.record.TypeValue.java
@Override public void set(MetadataRepository repository, DataRecord record, PathElement element, String value) { if (value == null) { return;//from w w w. j a v a 2 s.com } if (record != null) { if (element.field instanceof ReferenceFieldMetadata) { DataRecord dataRecord = (DataRecord) record.get(element.field); if (dataRecord == null) { dataRecord = new DataRecord(((ReferenceFieldMetadata) element.field).getReferencedType(), UnsupportedDataRecordMetadata.INSTANCE); record.set(element.field, dataRecord); record = dataRecord; } else { record = (DataRecord) record.get(element.field); } } if (!value.isEmpty()) { ComplexTypeMetadata type = record.getType(); if (!value.equals(type.getName())) { ComplexTypeMetadata newType = repository.getComplexType(value); if (newType == null) { newType = (ComplexTypeMetadata) repository.getNonInstantiableType(StringUtils.EMPTY, value); } record.setType(newType); } } } }
From source file:com.microsoft.alm.plugin.idea.git.ui.pullrequest.PullRequestHelperTest.java
@Test public void noCommitsShouldReturnEmptyTitle() throws Exception { final List<GitCommit> commits = new ArrayList<GitCommit>(); final String title = underTest.createDefaultTitle(commits, "source", "target"); assertEquals(StringUtils.EMPTY, title); final String title2 = underTest.createDefaultTitle(null, "source", "target"); assertEquals(StringUtils.EMPTY, title2); }