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:com.omnigon.aem.handlebars.helpers.OrHelper.java
@Override public Object apply(Object context, Options options) throws IOException { Object returningValue = StringUtils.EMPTY; if (!options.context.model().equals(context) && isValidValue(context)) { returningValue = context;//from w w w . j a v a 2s .c o m } for (Object param : options.params) { if (isValidValue(param)) { returningValue = param; } } return returningValue; }
From source file:ch.cyberduck.core.RootProviderHelpService.java
@Override public String help(final Scheme scheme) { return this.help(StringUtils.EMPTY); }
From source file:eu.operando.operandoapp.wifi.model.WiFiUtils.java
public static String convertIpAddress(int ipAddress) { byte[] bytes = BigInteger.valueOf(ipAddress).toByteArray(); ArrayUtils.reverse(bytes);/*from w w w . ja v a 2 s . co m*/ try { return InetAddress.getByAddress(bytes).getHostAddress(); } catch (UnknownHostException e) { return StringUtils.EMPTY; } }
From source file:com.alliander.osgp.shared.usermanagement.ApiResponse.java
public void setApiResponseToError(final Exception e) { this.setFeedbackMessage(StringUtils.EMPTY); if (e.getCause() != null) { this.setErrorMessage(e.getMessage() + " | " + e.getCause()); } else {/*from w ww.j a va 2 s .c o m*/ this.setErrorMessage(e.getMessage()); } }
From source file:de.lgblaumeiser.ptm.cli.engine.handler.AddActivitiyTest.java
@Test(expected = IllegalStateException.class) public void testAddActivityTwoParamSecondEmpty() { testee.handleCommand(asList(ACTIVITY1NAME, StringUtils.EMPTY)); }
From source file:com.inkubator.hrm.web.converter.PaySalaryComponentFormulaConverter.java
@Override public String getAsString(FacesContext context, UIComponent component, Object value) { ResourceBundle resourceBundle = ResourceBundle.getBundle("Messages", new Locale(FacesUtil.getSessionAttribute(HRMConstant.BAHASA_ACTIVE).toString())); String messages = StringUtils.EMPTY; Integer data = (Integer) value; if (Objects.equals(data, 1)) { messages = resourceBundle.getString("paySalaryComponent.paySalaryComponent_tunjangan"); } else if (Objects.equals(data, -1)) { messages = resourceBundle.getString("paySalaryComponent.paySalaryComponent_potongan"); } else if (Objects.equals(data, 0)) { messages = resourceBundle.getString("paySalaryComponent.paySalaryComponent_subsidi"); }/*from w ww . j av a 2 s . c o m*/ return messages; }
From source file:com.aqnote.app.wifianalyzer.wifi.model.GroupByTest.java
@Before public void setUp() { wiFiDetail1 = new WiFiDetail("SSID1", "BSSID1", StringUtils.EMPTY, new WiFiSignal(2462, 2462, WiFiWidth.MHZ_20, -35), WiFiAdditional.EMPTY); wiFiDetail2 = new WiFiDetail("SSID2", "BSSID2", StringUtils.EMPTY, new WiFiSignal(2432, 2432, WiFiWidth.MHZ_20, -55), WiFiAdditional.EMPTY); }
From source file:com.todev.rabbitmqmanagement.ui.channel.list.ChannelListEntryPresenter.java
@Override public void bind(@NonNull Channel channel) { view.displayName(channel.getChannelDetails().getPeerHost(), channel.getChannelDetails().getPeerPort(), channel.getNumber());// w w w. j av a 2 s . co m view.displayUsername(channel.getUser()); view.displayMode(StringUtils.EMPTY); view.displayState(channel.getState()); view.displayUnconfirmed(channel.getMessagesUnconfirmed()); view.displayPrefetch(StringUtils.EMPTY); view.displayUnacked(channel.getMessagesUnacknowledged()); view.displayUncommittedMessages(channel.getMessagesUncommitted()); view.displayUncommittedAcks(channel.getAcksUncommitted()); view.displayPublish(channel.getMessageStats().getPublishDetails().getRate()); view.displayConfirm(channel.getMessageStats().getConfirmDetails().getRate()); view.displayReturnMandatory(channel.getMessageStats().getReturnUnroutableDetails().getRate()); view.displayDeliverGet(channel.getMessageStats().getDeliverGetDetails().getRate()); view.displayRedelivered(channel.getMessageStats().getRedeliverDetails().getRate()); view.displayAck(channel.getMessageStats().getAckDetails().getRate()); }
From source file:dtu.ds.warnme.app.ws.client.https.GsonHttpResponseHandler.java
@Override @Deprecated/*from w w w. ja va 2s . c om*/ public void onFailure(int statusCode, Header[] headers, byte[] responseBody, Throwable error) { try { String response = responseBody != null ? new String(responseBody, getCharset()) : StringUtils.EMPTY; onFailure(statusCode, headers, response, error); } catch (UnsupportedEncodingException e) { Log.v(TAG, "String encoding failed, calling onFailure(int, Header[], String, Throwable)"); onFailure(0, headers, (String) null, e); } }
From source file:com.thoughtworks.go.util.UrlUtil.java
public static String getQueryParamFromUrl(String url, String paramName) { try {//from w ww . j av a 2 s. co m List<NameValuePair> queryParams = new URIBuilder(url).getQueryParams(); for (NameValuePair pair : queryParams) { if (pair.getName().equals(paramName)) { return pair.getValue(); } } return StringUtils.EMPTY; } catch (URISyntaxException e) { return StringUtils.EMPTY; } }