this commit cause compile to fail (after ./ant clean) with the following
message: [javac16] Compiling 177 source files to /data/jenkins/trunk/framework/base/build/classes [javac16] /data/jenkins/trunk/framework/base/src/org/ofbiz/base/util/test/StringUtilTests.java:103: cannot find symbol [javac16] symbol : method strToMap(<nulltype>,boolean) [javac16] location: class org.ofbiz.base.util.StringUtil [javac16] assertNull("null-string", StringUtil.strToMap(null, false)); [javac16] ^ [javac16] /data/jenkins/trunk/framework/base/src/org/ofbiz/base/util/test/StringUtilTests.java:105: cannot find symbol [javac16] symbol : method strToMap(java.lang.String,boolean) [javac16] location: class org.ofbiz.base.util.StringUtil [javac16] assertEquals("missing =", Collections.emptyMap(), StringUtil.strToMap("1", false)); [javac16] ^ [javac16] /data/jenkins/trunk/framework/base/src/org/ofbiz/base/util/test/StringUtilTests.java:109: cannot find symbol [javac16] symbol : method strToMap(java.lang.String,boolean) [javac16] location: class org.ofbiz.base.util.StringUtil [javac16] assertEquals("double-trim", map("2", "two", "1", "one"), StringUtil.strToMap(" 1 = one | 2 = two ", true)); [javac16] ^ [javac16] 3 errors commit reverted. On 12/10/2011 05:50 AM, [hidden email] wrote: > Author: jleroux > Date: Fri Dec 9 22:50:01 2011 > New Revision: 1212673 > > URL: http://svn.apache.org/viewvc?rev=1212673&view=rev > Log: > Improves StringUtil.strToMap() by adding a delimiter as parameter > > Modified: > ofbiz/trunk/framework/base/src/org/ofbiz/base/util/StringUtil.java > > Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/util/StringUtil.java > URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/util/StringUtil.java?rev=1212673&r1=1212672&r2=1212673&view=diff > ============================================================================== > --- ofbiz/trunk/framework/base/src/org/ofbiz/base/util/StringUtil.java (original) > +++ ofbiz/trunk/framework/base/src/org/ofbiz/base/util/StringUtil.java Fri Dec 9 22:50:01 2011 > @@ -223,13 +223,14 @@ public class StringUtil { > /** > * Creates a Map from an encoded name/value pair string > * @param str The string to decode and format > + * @param delim the delimiter character(s) to join on (null will split on whitespace) > * @param trim Trim whitespace off fields > * @return a Map of name/value pairs > */ > - public static Map<String, String> strToMap(String str, boolean trim) { > + public static Map<String, String> strToMap(String str, String delim, boolean trim) { > if (str == null) return null; > Map<String, String> decodedMap = FastMap.newInstance(); > - List<String> elements = split(str, "|"); > + List<String> elements = split(str, delim); > > for (String s: elements) { > List<String> e = split(s, "="); > @@ -263,7 +264,16 @@ public class StringUtil { > * @return a Map of name/value pairs > */ > public static Map<String, String> strToMap(String str) { > - return strToMap(str, false); > + return strToMap(str, "|", false); > + } > + > + /** > + * Creates a Map from an encoded name/value pair string > + * @param str The string to decode and format > + * @return a Map of name/value pairs > + */ > + public static Map<String, String> strToMap(String str, String delim) { > + return strToMap(str, delim, false); > } > > /** > > |
Administrator
|
Ha, sorry, indeed I compiled w/out ant clean. I will fix that Wednesday, thanks for revert.
So I guess forget my other message Jacques From: "Hans Bakker" <[hidden email]> > this commit cause compile to fail (after ./ant clean) with the following message: > > [javac16] Compiling 177 source files to /data/jenkins/trunk/framework/base/build/classes > [javac16] /data/jenkins/trunk/framework/base/src/org/ofbiz/base/util/test/StringUtilTests.java:103: cannot find symbol > [javac16] symbol : method strToMap(<nulltype>,boolean) > [javac16] location: class org.ofbiz.base.util.StringUtil > [javac16] assertNull("null-string", StringUtil.strToMap(null, false)); > [javac16] ^ > [javac16] /data/jenkins/trunk/framework/base/src/org/ofbiz/base/util/test/StringUtilTests.java:105: cannot find symbol > [javac16] symbol : method strToMap(java.lang.String,boolean) > [javac16] location: class org.ofbiz.base.util.StringUtil > [javac16] assertEquals("missing =", Collections.emptyMap(), StringUtil.strToMap("1", false)); > [javac16] ^ > [javac16] /data/jenkins/trunk/framework/base/src/org/ofbiz/base/util/test/StringUtilTests.java:109: cannot find symbol > [javac16] symbol : method strToMap(java.lang.String,boolean) > [javac16] location: class org.ofbiz.base.util.StringUtil > [javac16] assertEquals("double-trim", map("2", "two", "1", "one"), StringUtil.strToMap(" 1 = one | 2 = two ", true)); > [javac16] ^ > [javac16] 3 errors > > > commit reverted. > > > On 12/10/2011 05:50 AM, [hidden email] wrote: >> Author: jleroux >> Date: Fri Dec 9 22:50:01 2011 >> New Revision: 1212673 >> >> URL: http://svn.apache.org/viewvc?rev=1212673&view=rev >> Log: >> Improves StringUtil.strToMap() by adding a delimiter as parameter >> >> Modified: >> ofbiz/trunk/framework/base/src/org/ofbiz/base/util/StringUtil.java >> >> Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/util/StringUtil.java >> URL: >> http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/util/StringUtil.java?rev=1212673&r1=1212672&r2=1212673&view=diff >> ============================================================================== >> --- ofbiz/trunk/framework/base/src/org/ofbiz/base/util/StringUtil.java (original) >> +++ ofbiz/trunk/framework/base/src/org/ofbiz/base/util/StringUtil.java Fri Dec 9 22:50:01 2011 >> @@ -223,13 +223,14 @@ public class StringUtil { >> /** >> * Creates a Map from an encoded name/value pair string >> * @param str The string to decode and format >> + * @param delim the delimiter character(s) to join on (null will split on whitespace) >> * @param trim Trim whitespace off fields >> * @return a Map of name/value pairs >> */ >> - public static Map<String, String> strToMap(String str, boolean trim) { >> + public static Map<String, String> strToMap(String str, String delim, boolean trim) { >> if (str == null) return null; >> Map<String, String> decodedMap = FastMap.newInstance(); >> - List<String> elements = split(str, "|"); >> + List<String> elements = split(str, delim); >> >> for (String s: elements) { >> List<String> e = split(s, "="); >> @@ -263,7 +264,16 @@ public class StringUtil { >> * @return a Map of name/value pairs >> */ >> public static Map<String, String> strToMap(String str) { >> - return strToMap(str, false); >> + return strToMap(str, "|", false); >> + } >> + >> + /** >> + * Creates a Map from an encoded name/value pair string >> + * @param str The string to decode and format >> + * @return a Map of name/value pairs >> + */ >> + public static Map<String, String> strToMap(String str, String delim) { >> + return strToMap(str, delim, false); >> } >> >> /** >> >> > |
Administrator
|
Actually don't forget my other message, please see rather r1212749
Jacques From: "Jacques Le Roux" <[hidden email]> > Ha, sorry, indeed I compiled w/out ant clean. I will fix that Wednesday, thanks for revert. > So I guess forget my other message > > Jacques > > From: "Hans Bakker" <[hidden email]> >> this commit cause compile to fail (after ./ant clean) with the following message: >> >> [javac16] Compiling 177 source files to /data/jenkins/trunk/framework/base/build/classes >> [javac16] /data/jenkins/trunk/framework/base/src/org/ofbiz/base/util/test/StringUtilTests.java:103: cannot find symbol >> [javac16] symbol : method strToMap(<nulltype>,boolean) >> [javac16] location: class org.ofbiz.base.util.StringUtil >> [javac16] assertNull("null-string", StringUtil.strToMap(null, false)); >> [javac16] ^ >> [javac16] /data/jenkins/trunk/framework/base/src/org/ofbiz/base/util/test/StringUtilTests.java:105: cannot find symbol >> [javac16] symbol : method strToMap(java.lang.String,boolean) >> [javac16] location: class org.ofbiz.base.util.StringUtil >> [javac16] assertEquals("missing =", Collections.emptyMap(), StringUtil.strToMap("1", false)); >> [javac16] ^ >> [javac16] /data/jenkins/trunk/framework/base/src/org/ofbiz/base/util/test/StringUtilTests.java:109: cannot find symbol >> [javac16] symbol : method strToMap(java.lang.String,boolean) >> [javac16] location: class org.ofbiz.base.util.StringUtil >> [javac16] assertEquals("double-trim", map("2", "two", "1", "one"), StringUtil.strToMap(" 1 = one | 2 = two ", true)); >> [javac16] ^ >> [javac16] 3 errors >> >> >> commit reverted. >> >> >> On 12/10/2011 05:50 AM, [hidden email] wrote: >>> Author: jleroux >>> Date: Fri Dec 9 22:50:01 2011 >>> New Revision: 1212673 >>> >>> URL: http://svn.apache.org/viewvc?rev=1212673&view=rev >>> Log: >>> Improves StringUtil.strToMap() by adding a delimiter as parameter >>> >>> Modified: >>> ofbiz/trunk/framework/base/src/org/ofbiz/base/util/StringUtil.java >>> >>> Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/util/StringUtil.java >>> URL: >>> http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/util/StringUtil.java?rev=1212673&r1=1212672&r2=1212673&view=diff >>> ============================================================================== >>> --- ofbiz/trunk/framework/base/src/org/ofbiz/base/util/StringUtil.java (original) >>> +++ ofbiz/trunk/framework/base/src/org/ofbiz/base/util/StringUtil.java Fri Dec 9 22:50:01 2011 >>> @@ -223,13 +223,14 @@ public class StringUtil { >>> /** >>> * Creates a Map from an encoded name/value pair string >>> * @param str The string to decode and format >>> + * @param delim the delimiter character(s) to join on (null will split on whitespace) >>> * @param trim Trim whitespace off fields >>> * @return a Map of name/value pairs >>> */ >>> - public static Map<String, String> strToMap(String str, boolean trim) { >>> + public static Map<String, String> strToMap(String str, String delim, boolean trim) { >>> if (str == null) return null; >>> Map<String, String> decodedMap = FastMap.newInstance(); >>> - List<String> elements = split(str, "|"); >>> + List<String> elements = split(str, delim); >>> >>> for (String s: elements) { >>> List<String> e = split(s, "="); >>> @@ -263,7 +264,16 @@ public class StringUtil { >>> * @return a Map of name/value pairs >>> */ >>> public static Map<String, String> strToMap(String str) { >>> - return strToMap(str, false); >>> + return strToMap(str, "|", false); >>> + } >>> + >>> + /** >>> + * Creates a Map from an encoded name/value pair string >>> + * @param str The string to decode and format >>> + * @return a Map of name/value pairs >>> + */ >>> + public static Map<String, String> strToMap(String str, String delim) { >>> + return strToMap(str, delim, false); >>> } >>> >>> /** >>> >>> >> |
Free forum by Nabble | Edit this page |