[Schmitzm-commits] r2256 - trunk/schmitzm-core/src/main/java/de/schmitzm/lang

scm-commit at wald.intevation.org scm-commit at wald.intevation.org
Mon Feb 25 00:45:54 CET 2013


Author: alfonx
Date: 2013-02-25 00:45:54 +0100 (Mon, 25 Feb 2013)
New Revision: 2256

Modified:
   trunk/schmitzm-core/src/main/java/de/schmitzm/lang/LangUtil.java
Log:
REMOVE_WHITESPACES_ON_PARSE_STRING Zwischenl?\195?\182sung auskommentiert, da diese Klasse keinen Zugriff auf den RegExCache mehr hat.
Ich werde optimierte Methoden von removeWhiteSpacesToNull/Empty () in RegExUtil schreiben..

Modified: trunk/schmitzm-core/src/main/java/de/schmitzm/lang/LangUtil.java
===================================================================
--- trunk/schmitzm-core/src/main/java/de/schmitzm/lang/LangUtil.java	2013-02-24 22:23:02 UTC (rev 2255)
+++ trunk/schmitzm-core/src/main/java/de/schmitzm/lang/LangUtil.java	2013-02-24 23:45:54 UTC (rev 2256)
@@ -88,13 +88,13 @@
 public class LangUtil {
 	private static NumberFormat DEFAULT_DELAY_FORMAT = new DecimalFormat("0.00");
 
-	/**
-	 * If {@code true} {@link #removeWhitespacesToEmpty(String)} (which uses {@link RegexCache}) is called in
-	 * {@link #parseStringDefaultNull(String, boolean)}. To avoid this behavior for an application, this flag can be set
-	 * to {@code false}.<br>
-	 * Default: {@code true}
-	 */
-	public static boolean REMOVE_WHITESPACES_ON_PARSE_STRING = true;
+//	/**
+//	 * If {@code true} {@link #removeWhitespacesToEmpty(String)} (which uses {@link RegexCache}) is called in
+//	 * {@link #parseStringDefaultNull(String, boolean)}. To avoid this behavior for an application, this flag can be set
+//	 * to {@code false}.<br>
+//	 * Default: {@code true}
+//	 */
+//	public static boolean REMOVE_WHITESPACES_ON_PARSE_STRING = true;
 
 	/** Eine Sekunde in Millisekunden. */
 	public static final long SEC_MILLIS = 1000;
@@ -169,24 +169,24 @@
 		return string.trim();
 	}
 
-	/**
-	 * Checks whether {@link RegexCache} is available. In some cases the "Apache Lucene" library is excluded because of
-	 * application size issues ("FatJar"). This method checks this case and sets the
-	 * {@link #REMOVE_WHITESPACES_ON_PARSE_STRING} flag. This method can be called at the beginning of an application.
-	 */
-	public static boolean checkRegexCacheAvailable() {
-//		try {
-//			RegexCache.getInstance();
-//			REMOVE_WHITESPACES_ON_PARSE_STRING = true;
-//			return true;
-//		} catch (Throwable e) {
-//			// RegexCache can not be used
-			REMOVE_WHITESPACES_ON_PARSE_STRING = false;
-			return false;
-//		}
+//	/**
+//	 * Checks whether {@link RegexCache} is available. In some cases the "Apache Lucene" library is excluded because of
+//	 * application size issues ("FatJar"). This method checks this case and sets the
+//	 * {@link #REMOVE_WHITESPACES_ON_PARSE_STRING} flag. This method can be called at the beginning of an application.
+//	 */
+//	public static boolean checkRegexCacheAvailable() {
+////		try {
+////			RegexCache.getInstance();
+////			REMOVE_WHITESPACES_ON_PARSE_STRING = true;
+////			return true;
+////		} catch (Throwable e) {
+////			// RegexCache can not be used
+//			REMOVE_WHITESPACES_ON_PARSE_STRING = false;
+//			return false;
+////		}
+//
+//	}
 
-	}
-
 	/**
 	 * Returns "+" for positive values and "-" for negative values.
 	 * 
@@ -2363,9 +2363,9 @@
 		// String trimmedLowcase = removeWhitespacesToEmpty(str.toLowerCase())
 		// .trim();
 		String trimmedLowcase = str.toLowerCase();
-		if (REMOVE_WHITESPACES_ON_PARSE_STRING)
+//		if (REMOVE_WHITESPACES_ON_PARSE_STRING)
 			trimmedLowcase = removeWhitespacesToEmpty(trimmedLowcase);
-		trimmedLowcase = trimmedLowcase.trim();
+//		trimmedLowcase = trimmedLowcase.trim();
 
 		if (trimmedLowcase.startsWith("no"))
 			return false;



More information about the Schmitzm-commits mailing list