List of usage examples for org.apache.commons.lang3 StringUtils EMPTY
String EMPTY
To view the source code for org.apache.commons.lang3 StringUtils EMPTY.
Click Source Link
From source file:de.jcup.egradle.codeassist.AbstractProposalImpl.java
@Override public String getLabel() { if (name == null) { return StringUtils.EMPTY; } return name; }
From source file:com.amalto.core.save.context.PartialDeleteSimulator.java
public PartialDeleteSimulator(MutableDocument originalDocument, MutableDocument toDeleteDocument, String pivot, String key) {//from www . j av a 2 s .c o m this.originalDocument = originalDocument; this.toDeleteDocument = toDeleteDocument; if (pivot.endsWith("/")) { //$NON-NLS-1$ this.toDeletePivot = pivot.substring(0, pivot.length() - 1); } else { this.toDeletePivot = pivot; } if (!".".equals(key) && !StringUtils.isEmpty(key)) { //$NON-NLS-1$ this.toDeleteKey = key.startsWith("/") ? key : "/" + key; //$NON-NLS-1$ //$NON-NLS-2$ } else { this.toDeleteKey = StringUtils.EMPTY; } }
From source file:com.vrem.wifianalyzer.wifi.model.WiFiConnectionTest.java
@Test public void testWiFiConnectionEmpty() throws Exception { // validate//from www. j a v a 2 s . c om assertEquals(StringUtils.EMPTY, WiFiConnection.EMPTY.getSSID()); assertEquals(StringUtils.EMPTY, WiFiConnection.EMPTY.getBSSID()); assertEquals(StringUtils.EMPTY, WiFiConnection.EMPTY.getIpAddress()); assertEquals(WiFiConnection.LINK_SPEED_INVALID, WiFiConnection.EMPTY.getLinkSpeed()); assertFalse(WiFiConnection.EMPTY.isConnected()); }
From source file:com.googlecode.jsendnsca.MessagePayloadTest.java
@Test public void shouldThrowIllegalArgumentExceptionOnEmptyServiceName() throws Exception { expectedException.expect(IllegalArgumentException.class); expectedException.expectMessage("serviceName cannot be null or an empty String"); final MessagePayload payload = new MessagePayload(); payload.setHostname("localhost"); payload.setLevel(Level.CRITICAL); payload.setServiceName(StringUtils.EMPTY); }
From source file:com.inkubator.hrm.web.converter.ModelReferensiConverter.java
@Override public String getAsString(FacesContext context, UIComponent component, Object value) { String message = StringUtils.EMPTY; // Pay Salary Component id String paySalaryComponentId = component.getAttributes().get("paySalaryComponentId").toString(); try {/*from www. j a va 2 s .c om*/ //get specifik from paysalaryComponent->modelComponent->specifik PaySalaryComponentService paySalaryComponentService = (PaySalaryComponentService) ServiceWebUtil .getService("paySalaryComponentService"); PaySalaryComponent paySalaryComponent = paySalaryComponentService .getEntityByPkWithDetail(Long.valueOf(paySalaryComponentId)); //if specific == loan schema if (Objects.equals(paySalaryComponent.getModelComponent().getSpesific(), HRMConstant.MODEL_COMP_LOAN)) { LoanSchemaService loanSchemaService = (LoanSchemaService) ServiceWebUtil .getService("loanSchemaService"); message = loanSchemaService .getLoanSchemaNameByPk(Long.valueOf(paySalaryComponent.getModelReffernsil())); } //if specific == reimbursment schema if (Objects.equals(paySalaryComponent.getModelComponent().getSpesific(), HRMConstant.MODEL_COMP_REIMBURSEMENT)) { ReimbursmentSchemaService reimbursmentSchemaService = (ReimbursmentSchemaService) ServiceWebUtil .getService("reimbursmentSchemaService"); message = reimbursmentSchemaService .getReimbursmentSchemaNameByPk(Long.valueOf(paySalaryComponent.getModelReffernsil())); } //if specific ==benefit group if (Objects.equals(paySalaryComponent.getModelComponent().getSpesific(), HRMConstant.MODEL_COMP_BENEFIT_TABLE)) { BenefitGroupService benefitGroupService = (BenefitGroupService) ServiceWebUtil .getService("benefitGroupService"); message = benefitGroupService .getBenefitGroupNameByPk(Long.valueOf(paySalaryComponent.getModelReffernsil())); } } catch (Exception ex) { Logger.getLogger(ModelReferensiConverter.class.getName()).log(Level.SEVERE, null, ex); } return message; }
From source file:com.googlecode.jsendnsca.NagiosSettingsTest.java
@Test public void shouldThrowIllegalArgumentExceptionWhenSettingHostnameToEmptyString() throws Exception { expectedException.expect(IllegalArgumentException.class); expectedException.expectMessage("nagiosHost cannot be null or empty"); nagiosSettings.setNagiosHost(StringUtils.EMPTY); }
From source file:com.chessoft.LoginBean.java
public LoginBean() { // in future Dependency Injection for "loginDao" field may be used this.loginDao = new LoginDaoImpl(); this.login = StringUtils.EMPTY; this.password = StringUtils.EMPTY; }
From source file:com.nridge.core.crypt.Password.java
/** * Default constructor. */ public Password() { mSecret = StringUtils.EMPTY; }
From source file:com.norconex.commons.wicket.markup.html.chart.jqplot.options.Tick.java
@Override public String toString() { if (value == null) { return StringUtils.EMPTY; }//ww w .j a v a2 s.c o m if (label == null) { return "'" + PlotToStringBuilder.esc(value) + "'"; } return "['" + PlotToStringBuilder.esc(value) + "', '" + PlotToStringBuilder.esc(label) + "']"; }
From source file:me.j360.dubbo.modules.util.concurrent.ThreadUtil.java
/** * StackTrace??./*ww w . j ava 2 s . c o m*/ */ public static String getCurrentClass() { StackTraceElement[] stacktrace = Thread.currentThread().getStackTrace(); if (stacktrace.length >= 3) { StackTraceElement element = stacktrace[2]; return element.getClassName(); } else { return StringUtils.EMPTY; } }