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.careerly.utils.TextUtils.java
/** * ???//from www.ja va 2s. com * * @param text * @return */ public static String escapeNotNormalString(String text) { if (StringUtils.isBlank(text)) { return StringUtils.EMPTY; } return StringUtils.replaceEach(text, new String[] { "&", "<", ">", "\"", "\\", "\'" }, new String[] { "&", "<", ">", """, "\\\\", """ }); }
From source file:com.qatickets.service.SpamService.java
public String clean(String dirtyInput) { if (StringUtils.isBlank(dirtyInput)) { return StringUtils.EMPTY; }// ww w . j a v a 2 s . c o m dirtyInput = dirtyInput.trim(); try { final CleanResults cr = antiSamy.scan(dirtyInput, policy); return cr.getCleanHTML(); } catch (Exception e) { log.error("Error: ", e); } return StringUtils.EMPTY; }
From source file:com.scottwoodward.chestmail.commands.RemoveMailBoxCommand.java
@Override public List<String> tabComplete(Command command, String[] args) { String arg = StringUtils.EMPTY; if (ArrayUtils.getLength(args) > 0) { arg = args[0];//w w w. j a va2 s . c o m } return ChestMailManager.getSimilarMailBoxes(arg); }
From source file:fr.paris.lutece.plugins.extend.util.ExtendUtils.java
/** * Validate.// w w w .j a v a2 s . co m * * @param <A> the generic type * @param request the request * @param bean the resource type * @return the JSP error */ public static <A> String validate(HttpServletRequest request, A bean) { // Check mandatory fields Set<ConstraintViolation<A>> constraintViolations = BeanValidationUtil.validate(bean); if (constraintViolations.size() > 0) { Object[] params = { buildStopMessage(constraintViolations) }; return AdminMessageService.getMessageUrl(request, MESSAGE_STOP_GENERIC_MESSAGE, params, AdminMessage.TYPE_STOP); } return StringUtils.EMPTY; }
From source file:com.parasoft.xtest.reports.jenkins.parser.ParasoftParser.java
/** * Creates a new instance of {@link ParasoftParser}. */ public ParasoftParser() { this(StringUtils.EMPTY, new Properties()); }
From source file:com.neatresults.mgnltweaks.ui.column.NTColumnFormatter.java
@Override public Object generateCell(Table source, Object itemId, Object columnId) { final Item jcrItem = getJcrItem(source, itemId); try {/*from w ww . ja va2 s.co m*/ if (jcrItem == null) { return StringUtils.EMPTY; } else if (jcrItem.isNode()) { Node node = (Node) jcrItem; return "[" + node.getPrimaryNodeType().getName() + "]"; } else { javax.jcr.Property property = (javax.jcr.Property) jcrItem; return PropertyType.nameFromValue(property.getType()); } } catch (RepositoryException e) { log.warn("Unable to get the displayed node type for the {}", itemId, e); return StringUtils.EMPTY; } }
From source file:com.alibaba.otter.shared.common.utils.extension.DefaultExtensionFactory.java
private Object getExtensionInternal(ExtensionData extensionData) { Class<?> clazz = null;//from ww w. j a v a 2s . c o m String fullname = StringUtils.EMPTY; if (extensionData.getExtensionDataType().isClazz() && StringUtils.isNotBlank(extensionData.getClazzPath())) { clazz = scan(extensionData.getClazzPath()); fullname = "[" + extensionData.getClazzPath() + "]ClassPath"; } else if (extensionData.getExtensionDataType().isSource() && StringUtils.isNotBlank(extensionData.getSourceText())) { JavaSource javaSource = new JavaSource(extensionData.getSourceText()); clazz = jdkCompiler.compile(javaSource); fullname = "[" + javaSource.toString() + "]SourceText"; } if (clazz == null) { throw new ExtensionLoadException("ERROR ## classload this fileresolver=" + fullname + " has an error"); } try { return clazz.newInstance(); } catch (Exception e) { throw new ExtensionLoadException("ERROR ## classload this fileresolver=" + fullname + " has an error", e); } }
From source file:com.rapidminer.gui.actions.ShowHelpTextInBrowserAction.java
@Override public void actionPerformed(ActionEvent e) { OperatorDescription operatorDescription = this.operatorDocViewer.getDisplayedOperator() .getOperatorDescription();/*from w w w. j ava 2s. c om*/ Plugin provider = operatorDescription.getProvider(); String prefix = StringUtils.EMPTY; if (provider != null) { prefix = provider.getPrefix(); prefix = Character.toUpperCase(prefix.charAt(0)) + prefix.substring(1) + DOUBLE_POINT; } String url = WIKI_URL_FOR_OPERATORS + prefix + this.operatorDocViewer.getDisplayedOperatorDescName().replaceAll(" ", "_"); try { RMUrlHandler.browse(java.net.URI.create(url)); } catch (IOException e2) { SwingTools.showSimpleErrorMessage("cannot_open_browser", e2); } }
From source file:fr.paris.lutece.plugins.extend.web.component.NoConfigResourceExtenderComponent.java
/** * {@inheritDoc}/* w w w .j a v a 2 s . com*/ */ @Override public String getConfigHtml(ResourceExtenderDTO resourceExtender, Locale locale, HttpServletRequest request) { return StringUtils.EMPTY; }
From source file:com.microsoft.alm.common.artifact.ArtifactIDTest.java
@Test(expected = MalformedURIException.class) public void testCheckUriIsWellFormed_Bad() { ArtifactID.checkURIIsWellFormed(StringUtils.EMPTY); }