List of usage examples for java.util List toString
public String toString()
From source file:com.zimbra.cs.index.ElasticSearchIndexTest.java
public void listIndexes() { Factory factory = IndexStore.getFactory(); ZimbraLog.test.debug("--->TEST listIndexes %s", factory.getClass().getName()); if (factory instanceof ElasticSearchIndex.Factory) { ElasticSearchIndex.Factory esiFactory = (ElasticSearchIndex.Factory) factory; List<String> indexNames = esiFactory.getIndexes(); ZimbraLog.test.debug("indexNames %s", indexNames.toString()); } else {// w ww. ja v a 2s.co m ZimbraLog.test.debug("NOT ESI factory!"); } }
From source file:org.hdiv.web.servlet.view.DummyMacroRequestContext.java
/** * @see org.springframework.web.servlet.support.RequestContext#getThemeMessage(String, List) *//*from ww w. ja v a 2 s .c om*/ public String getThemeMessage(String code, List args) { return ((String) this.themeMessageMap.get(code)) + args.toString(); }
From source file:gov.nih.nci.firebird.selenium2.pages.sponsor.representative.export.AbstractExportCurationDataTabHelper.java
void assertLineIsPresent(String expectedLine, List<String> fileContents) { assertTrue("Expected line (" + expectedLine + ") not found in contents: " + fileContents.toString(), fileContents.contains(expectedLine)); }
From source file:net.shopxx.service.impl.SensitivityServiceImpl.java
@SuppressWarnings("static-access") @Override//ww w .ja va 2s. c om public String replaceSensitivity(String source, String to) { if (StringUtils.isNotBlank(source)) { List<Sensitivity> list = sensitivityDao.findList(null, null, null, null); List<String> strList = new ArrayList<String>(); if (list != null && list.size() > 0) { for (Sensitivity si : list) { strList.add(si.getSearch()); } KeywordFilter filter = new KeywordFilter(); filter.addKeywords(strList); List<String> set = filter.getTxtKeyWords(source); if (set.size() > 0) { source = filter.str_replace1(set.toString(), to, source); } } } return source; }
From source file:com.sonoport.MyUI.java
@Override protected void init(VaadinRequest request) { if (sessionState == null) { // This initialises the Spring Context from ContextConfiguration.java ApplicationContextLocator.getApplicationContext().getAutowireCapableBeanFactory().autowireBean(this); }//from w w w.j a v a2 s . co m if (sessionState.isReplaceSession()) { // We've just been redirected back on session expiry sessionState.setVaadinSession(VaadinSession.getCurrent()); sessionState.setReplaceSession(false); } if (sessionState.staleSessionCheck(VaadinSession.getCurrent(), request)) { return; } getPage().setTitle("My UI"); this.setContent(layout); layout.setSizeFull(); Label testLabel = new Label("I'm a label"); layout.addComponent(testLabel); List<User> userList = this.userService.listAll(); LOG.info("ALL USERS : " + userList.toString()); }
From source file:us.polygon4.izzymongo.service.MongoServiceTest.java
@Test public void getIndexInfo() { DBQuery query = createDBQuery();//from w w w .ja va 2s .c o m List<DBObject> list = dataService.getIndexInfo(query); log.debug(list.toString()); assertThat(new Integer(list.size()), greaterThan((0))); }
From source file:org.apache.streams.pig.StreamsProcessDocumentExec.java
public String call(String document) throws IOException { Preconditions.checkNotNull(streamsProcessor); Preconditions.checkNotNull(document); LOGGER.debug(document);// w ww.jav a 2s. c o m StreamsDatum entry = new StreamsDatum(document); Preconditions.checkNotNull(entry); LOGGER.debug(entry.toString()); List<StreamsDatum> resultSet = streamsProcessor.process(entry); LOGGER.debug(resultSet.toString()); Object resultDoc = null; for (StreamsDatum resultDatum : resultSet) { resultDoc = resultDatum.getDocument(); } Preconditions.checkNotNull(resultDoc); if (resultDoc instanceof String) return (String) resultDoc; else return mapper.writeValueAsString(resultDoc); }
From source file:com.thoughtworks.go.server.functional.helpers.CSVResponse.java
public boolean containsColumn(String... columns) { List<String> targetColumn = null; for (List column : this.allColumns) { targetColumn = Arrays.asList(columns); if (StringUtils.contains(column.toString(), targetColumn.toString())) { return true; }/*from www. ja v a 2s. c o m*/ } return false; }
From source file:com.legstar.cobol.RecognizerErrorHandler.java
/** * Format an error message as expected by ANTLR. It is basically the * same error message that ANTL BaseRecognizer generates with some * additional data./*from w w w. j a v a2 s. com*/ * Also used to log debugging information. * @param log the logger to use at debug time * @param recognizer the lexer or parser who generated the error * @param e the exception that occured * @param superMessage the error message that the super class generated * @param tokenNames list of token names * @return a formatted error message */ public static String getErrorMessage(final Log log, final BaseRecognizer recognizer, final RecognitionException e, final String superMessage, final String[] tokenNames) { if (log.isDebugEnabled()) { List<?> stack = BaseRecognizer.getRuleInvocationStack(e, recognizer.getClass().getSuperclass().getName()); String debugMsg = recognizer.getErrorHeader(e) + " " + e.getClass().getSimpleName() + ": " + superMessage + ":"; if (e instanceof NoViableAltException) { NoViableAltException nvae = (NoViableAltException) e; debugMsg += " (decision=" + nvae.decisionNumber + " state=" + nvae.stateNumber + ")" + " decision=<<" + nvae.grammarDecisionDescription + ">>"; } else if (e instanceof UnwantedTokenException) { UnwantedTokenException ute = (UnwantedTokenException) e; debugMsg += " (unexpected token=" + toString(ute.getUnexpectedToken(), tokenNames) + ")"; } else if (e instanceof EarlyExitException) { EarlyExitException eea = (EarlyExitException) e; debugMsg += " (decision=" + eea.decisionNumber + ")"; } debugMsg += " ruleStack=" + stack.toString(); log.debug(debugMsg); } return makeUserMsg(e, superMessage); }
From source file:android.hawkencompanionapp.asynctasks.LoginUserTask.java
private void getUserSession(UserLoginSession userLoginSession) { final HttpPost httpPost = new HttpPost(mLoginUrl); final List<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>(2); final DefaultHttpClient httpClient = new DefaultHttpClient(); HttpResponse httpResponse;//from w w w . ja va2s .c om try { Logger.debug(this, "Logging in user: " + userLoginSession.getEmailAddress()); nameValuePairs.add(new BasicNameValuePair("EmailAddress", userLoginSession.getEmailAddress())); nameValuePairs.add(new BasicNameValuePair("Password", userLoginSession.getUserPassword())); httpPost.setEntity(new UrlEncodedFormEntity(nameValuePairs)); httpResponse = httpClient.execute(httpPost); if (isUserLoginValid(httpResponse)) { final List<Cookie> cookies = httpClient.getCookieStore().getCookies(); Logger.debug(this, cookies.toString()); userLoginSession.setUserSession(cookies); userLoginSession.setUserIsValid(); } } catch (IOException e) { Logger.error(this, e.getMessage()); } }