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.zb.app.common.cookie.manager.WebSocketCookieManager.java
protected void doInit() { logger.debug("WebSocketCookieManager init():init httpHeaders cookies!"); List<String> list = httpHeaders.get("cookie"); String cookieStr = StringUtils.EMPTY; if (list != null && list.size() > 0) { cookieStr = list.get(0);/*from w w w . jav a 2 s . co m*/ } if (StringUtils.isNotEmpty(cookieStr)) { cookieArray = str2Cookie(cookieStr); Map<CookieNameEnum, CookieNameHelper> newValues = CookieParser.loadCookie(cookieArray); for (CookieNameEnum cookieNameEnum : newValues.keySet()) { super.currentCookieValue.put(cookieNameEnum, newValues.get(cookieNameEnum)); } } }
From source file:com.zb.app.external.wechat.service.WeixinService.java
private String getAccessToken() { if (weixinToken == null) { weixinToken = initAccessToken(); }//www .j a va 2 s .com if (weixinToken != null && !weixinToken.isEffect()) { weixinToken = initAccessToken(); } if (weixinToken == null) { return StringUtils.EMPTY; } return weixinToken.getAccessToken(); }
From source file:com.aionemu.gameserver.model.gameobjects.player.PlayerScripts.java
public boolean addScript(int position, String scriptXML) { PlayerScript script = scripts.get(position); if (scriptXML == null) { script.setData(null, -1);//from www . j a va2s. com } else if (StringUtils.EMPTY.equals(scriptXML)) { script.setData(new byte[0], 0); } try { byte[] bytes = CompressUtil.Compress(scriptXML); int oldLength = bytes.length; bytes = Arrays.copyOf(bytes, bytes.length + 8); for (int i = oldLength; i < bytes.length; i++) { bytes[i] = -51; // Add NC shit bytes, without which fails to load :) } script.setData(bytes, scriptXML.length() * 2); } catch (Exception ex) { logger.error("Script compression failed: " + ex); return false; } return script == null; }
From source file:com.sugaronrest.SugarRestRequest.java
/** * Initializes a new instance of the SugarRestRequest class. * * @param moduleName The SugarCRM module name. *///from w ww .j a v a 2s .c o m public SugarRestRequest(String moduleName) throws Exception { this.setModuleName(moduleName); this.setOptions(new Options()); this.validationMessage = StringUtils.EMPTY; }
From source file:fr.paris.lutece.plugins.mylutece.service.MyLuteceUserAttributesService.java
/** * {@inheritDoc}/* w w w . j a v a 2 s . c om*/ */ public String getAttribute(String strUserId, String strAttribute) { String strAttributeValue = StringUtils.EMPTY; LuteceUser user = SecurityService.getInstance().getUser(strUserId); if (user != null) { strAttributeValue = user.getUserInfo(strAttribute); } return strAttributeValue; }
From source file:fr.paris.lutece.plugins.workflow.web.task.NoConfigTaskComponent.java
/** * {@inheritDoc} */ @Override public String validateConfig(ITaskConfig config, HttpServletRequest request) { return StringUtils.EMPTY; }
From source file:com.amalto.core.server.routing.NoOpService.java
@Override public String getConfiguration(String optionalParameter) throws XtentisException { return StringUtils.EMPTY; }
From source file:com.googlesource.gerrit.plugins.xdocs.formatter.AsciidoctorFormatterTest.java
@Test public void emptyInputRendersNothing() throws IOException { assertEquals(StringUtils.EMPTY, formatter.format(null, null, null, null, cfg, StringUtils.EMPTY)); }
From source file:com.microsoft.alm.plugin.idea.git.starters.SimpleCheckoutStarter.java
/** * Creates a SimpleCheckoutStarter object after processing the commandline args given for checkout command * * @param args command line args//from www . ja va 2 s . com * @return SimpleCheckoutStarter with associated Git Url passed in args * @throws RuntimeException */ public static SimpleCheckoutStarter createWithCommandLineArgs(final List<String> args) throws RuntimeException { if (args.size() < 1) { throw new RuntimeException( TfPluginBundle.message(TfPluginBundle.STARTER_ERRORS_SIMPLECHECKOUT_INVALID_COMMAND_LINE_ARGS)); } return createWithGitUrl(args.get(0), args.size() < 2 ? StringUtils.EMPTY : args.get(1)); }
From source file:com.microsoft.alm.plugin.idea.git.ui.branch.CreateBranchForm.java
private void ensureInitialized() { if (!this.initialized) { // override the renderer so it doesn't show the object toString but instead shows the branch name remoteBranchComboBox.setRenderer(new DefaultListCellRenderer() { @Override// ww w . j a va 2 s. co m public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { return super.getListCellRendererComponent(list, value != null ? ((GitRemoteBranch) value).getName() : StringUtils.EMPTY, index, isSelected, cellHasFocus); } }); this.initialized = true; } }