> There's also wicket.util.string.Strings#isEmpty > (http://wicket.sourceforge.net/apidocs/wicket/util/string/Strings.html#isEmpty(java.lang.CharSequence) > to consider...
Just FYI, what people from Apache does (matching Erik's optimization proposal ;)... I guess wicket does the same. [org.apache.commons.lang.StringUtils] // Empty checks //----------------------------------------------------------------------- /** * <p>Checks if a String is empty ("") or null.</p> * * <pre> * StringUtils.isEmpty(null) = true * StringUtils.isEmpty("") = true * StringUtils.isEmpty(" ") = false * StringUtils.isEmpty("bob") = false * StringUtils.isEmpty(" bob ") = false * </pre> * * <p>NOTE: This method changed in Lang version 2.0. * It no longer trims the String. * That functionality is available in isBlank().</p> * * @param str the String to check, may be null * @return <code>true</code> if the String is empty or null */ public static boolean isEmpty(String str) { return (str == null || str.length() == 0); } (http://www.koders.com/java/fidB29436EC634995BA0A41C5DC97C3F97F549D54B9.aspx?s=apache+%22StringUtils%22) ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user