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:com.shigengyu.hyperion.server.ControllerMethod.java
public String getUrl() { String url = StringUtils.EMPTY; if (!StringUtils.equals(controller, "/")) { url += controller;//from w w w. j a v a 2 s . c o m } if (!StringUtils.equals(method, "/")) { url += method; } return url + "/"; }
From source file:com.mmj.app.common.authority.AuthorityHelper.java
/** * @param role??, 0101001001000000000// www . j a v a 2s. co m * @return ??, 1,3,6,11,20 */ public static String createRightStr(String role) { if (StringUtils.isEmpty(role)) { return StringUtils.EMPTY; } StringBuffer sb = new StringBuffer(); List<Right> rightList = (List<Right>) createRightList(role); if (rightList == null || rightList.size() == 0) { return StringUtils.EMPTY; } if (rightList.size() == 1) { sb.append(rightList.get(0).getIndex()); return sb.toString(); } if (rightList.size() == 2) { sb.append(rightList.get(0).getIndex()); sb.append(","); sb.append(rightList.get(1).getIndex()); return sb.toString(); } for (Right right : rightList.subList(0, rightList.size() - 2)) { sb.append(right.getIndex()); sb.append(","); } sb.append(rightList.get(rightList.size() - 1).getIndex()); return sb.toString(); }
From source file:com.fun.util.PatternUtil.java
public static String getMatchString(String perl5RegExp, String content, int groupIndex) { List<String> matchGroups = PatternUtil.listMatchGroups(perl5RegExp, content); if (groupIndex > 0 && groupIndex < matchGroups.size()) { return matchGroups.get(groupIndex); }/*from ww w. j a v a 2s . co m*/ return StringUtils.EMPTY; }
From source file:info.magnolia.module.admininterface.AdminTreeMVCServlet.java
/** * @see info.magnolia.cms.servlets.MVCServlet#getHandler(javax.servlet.http.HttpServletRequest) */// ww w.ja v a2 s. c om protected MVCServletHandler getHandler(HttpServletRequest request, HttpServletResponse response) { String handlerName = request.getRequestURI(); handlerName = StringUtils.replaceOnce(StringUtils.substringAfterLast(handlerName, "/trees/"), ".html", StringUtils.EMPTY); return TreeHandlerManager.getInstance().getTreeHandler(handlerName, request, response); }
From source file:com.microsoft.alm.common.artifact.ArtifactIDTest.java
@Test(expected = MalformedURIException.class) public void testConstructorDecoding_MissingPrefix() { new ArtifactID(ENCODED_URI.replaceFirst(ArtifactID.VSTFS_PREFIX, StringUtils.EMPTY)); }
From source file:jenkins.plugins.coverity.CoverityTool.CovBuildScriptCommandTest.java
@Test public void commandForScriptSourcesTest() throws IOException, InterruptedException { InvocationAssistance invocationAssistance = new InvocationAssistanceBuilder().withIsScriptSrc(true).build(); CoverityPublisher publisher = new CoverityPublisherBuilder().withInvocationAssistance(invocationAssistance) .build();/*from w w w . java 2s . c o m*/ Command covBuildScriptCommand = new CovBuildScriptCommand(build, launcher, listener, publisher, StringUtils.EMPTY, envVars); setExpectedArguments(new String[] { "cov-build", "--dir", "TestDir", "--no-command", "--fs-capture-search", "$WORKSPACE" }); covBuildScriptCommand.runCommand(); consoleLogger.verifyLastMessage( "[Coverity] cov-build command line arguments for script sources: " + actualArguments.toString()); }
From source file:jenkins.plugins.coverity.CoverityTool.CovImportScmCommandTest.java
@Test public void prepareCommandTest() throws IOException, InterruptedException { ScmOptionBlock scmOptionBlock = new ScmOptionBlockBuilder().withScmSystem("git").build(); CoverityPublisher publisher = new CoverityPublisherBuilder().withScmOptionBlock(scmOptionBlock).build(); Command covImportScmCommand = new CovImportScmCommand(build, launcher, listener, publisher, StringUtils.EMPTY, envVars); setExpectedArguments(new String[] { "cov-import-scm", "--dir", "TestDir", "--scm", "git" }); covImportScmCommand.runCommand();// www . j a v a2s . com consoleLogger.verifyLastMessage( "[Coverity] cov-import-scm command line arguments: " + actualArguments.toString()); }
From source file:com.chadekin.jadys.commons.formatters.SqlValueFormatterFactory.java
@Override public String build() { if (value == null) return StringUtils.EMPTY; String result = null;//w ww. jav a 2 s . c o m Class type = FormatterTypeFactory.resolveClass(value); SqlValueFormatter formatter = formatters.get(type); result = formatter.format(value); return result; }
From source file:com.idisplay.base.IDisplayApp.java
private void dumpMainLooper(String str) { try {/*from w w w . j ava 2s . c om*/ Looper mainLooper = getMainLooper(); if (mainLooper != null) { Logger.d("Main Thread " + str + " Looper:"); try { mainLooper.dump(new Printer() { public void println(String str) { Logger.d(str); } }, StringUtils.EMPTY); return; } catch (Throwable th) { Logger.d("Main Thread " + str + " Looper error", th); } } Logger.e("Main Thread " + str + " Looper is NULL"); } catch (Throwable th2) { Logger.d("Main Thread " + str + " get Looper error", th2); } }
From source file:com.careerly.utils.TextUtils.java
/** * xssHtml?/*w ww. j av a2 s . com*/ * * @param text ?? * @return ?? */ public static String escapeHtml(String text) { return StringUtils.isBlank(text) ? StringUtils.EMPTY : StringEscapeUtils.escapeHtml(text); }