List of usage examples for org.apache.commons.lang StringUtils isEmpty
public static boolean isEmpty(String str)
Checks if a String is empty ("") or null.
From source file:net.jofm.format.BooleanFormat.java
public BooleanFormat(Pad pad, char padWith, int length, String format) { super(pad, padWith, length, format); if (StringUtils.isEmpty(format)) { this.format = DEFAULT_FORMAT; }/*w ww. j a v a2s .com*/ parseFormat(this.format); }
From source file:com.jaxio.celerio.configuration.validation.WordValidator.java
@Override public boolean isValid(String value, ConstraintValidatorContext context) { return !(!allowEmpty && (value == null || StringUtils.isEmpty(value))); }
From source file:com.netscape.certsrv.util.DateAdapter.java
public Date unmarshal(String value) throws Exception { return StringUtils.isEmpty(value) ? null : new Date(Long.parseLong(value)); }
From source file:com.netscape.certsrv.request.RequestIdAdapter.java
public RequestId unmarshal(String value) throws Exception { return StringUtils.isEmpty(value) ? null : new RequestId(value); }
From source file:com.clican.pluto.cluster.base.BaseMessageDispatcher.java
public synchronized void bind(String msgName, IMessageHandler handler) { if (StringUtils.isEmpty(msgName) || handler == null) { throw new IllegalArgumentException("The message name and message handler can't be null"); }/*from w w w . j a va 2s .c om*/ if (messageHandlerMapping.get(msgName) == null) { messageHandlerMapping.put(msgName, new ConcurrentLinkedQueue<IMessageHandler>()); } messageHandlerMapping.get(msgName).add(handler); }
From source file:com.microsoft.alm.plugin.idea.tfvc.ui.workspace.WorkspaceDialog.java
public JComponent getComponent(final String componentPropName) { if (StringUtils.isEmpty(componentPropName) || workspaceForm == null) { return null; }/*w w w .j a v a2 s .c o m*/ return workspaceForm.getComponent(componentPropName); }
From source file:io.github.pflima92.plyshare.common.web.handlers.TidHandler.java
@Override public void handle(RoutingContext ctx) { String tid = ctx.request().getHeader(HttpHeaders.TID); if (StringUtils.isEmpty(tid)) { tid = TidGenerator.generate();/* w ww . j av a2 s .c om*/ ctx.put(HttpHeaders.TID, tid); ctx.request().headers().add(HttpHeaders.TID, tid); ctx.request().headers().add(HttpHeaders.GATEWAY_ORIGIN, ctx.request().absoluteURI()); ctx.response().putHeader(HttpHeaders.TID, tid); if (log.isDebugEnabled()) { log.debug("Received request to [{}] with TID [{}]", ctx.request().uri(), tid); } } final String fTid = tid; ctx.response().bodyEndHandler(v -> { if (log.isDebugEnabled()) { log.debug("Finish request for TID [{}]", fTid); } }); ctx.next(); }
From source file:net.sourceforge.fenixedu.util.date.SerializationTool.java
public static Interval intervalDeserialize(final String string) { if (!StringUtils.isEmpty(string)) { String[] parts = string.split("/"); DateTime start = new DateTime(parts[0]); DateTime end = new DateTime(parts[1]); return new Interval(start, end); }//from ww w . java2 s . c om return null; }
From source file:com.jaxio.celerio.configuration.validation.JavaPackageValidator.java
@Override public boolean isValid(String value, ConstraintValidatorContext context) { if (value == null || StringUtils.isEmpty(value)) { return allowEmpty; }/*w w w.j av a2 s. c om*/ return true; }
From source file:com.thoughtworks.go.util.ProcessFailedException.java
public ProcessFailedException(String message, String sysout, String syserr, Throwable t) { super(StringUtils.isEmpty(syserr) ? message : String.format("%s\n Error: %s", message, syserr), t); this.sysout = sysout; this.syserr = syserr; }