Author: doogie
Date: Wed Oct 17 10:12:17 2007
New Revision: 585578
URL:
http://svn.apache.org/viewvc?rev=585578&view=revLog:
Add internString(), which protects against NPE. Closes
https://issues.apache.org/jira/browse/OFBIZ-1307.
Modified:
ofbiz/trunk/framework/base/src/base/org/ofbiz/base/util/StringUtil.java
Modified: ofbiz/trunk/framework/base/src/base/org/ofbiz/base/util/StringUtil.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/base/org/ofbiz/base/util/StringUtil.java?rev=585578&r1=585577&r2=585578&view=diff==============================================================================
--- ofbiz/trunk/framework/base/src/base/org/ofbiz/base/util/StringUtil.java (original)
+++ ofbiz/trunk/framework/base/src/base/org/ofbiz/base/util/StringUtil.java Wed Oct 17 10:12:17 2007
@@ -41,6 +41,10 @@
public static final String module = StringUtil.class.getName();
+ public static String internString(String value) {
+ return value != null ? value.intern() : null;
+ }
+
/**
* Replaces all occurances of oldString in mainString with newString
* @param mainString The original string