From: Ray K. <ra...@ga...> - 2009-09-08 14:50:09
|
The booleanValue method in ERXProperties would have trimmed the space and does other things, like cache values. Any reason not to use that? - ray On Sep 8, 2009, at 1:10 AM, an...@us... wrote: > Revision: 9840 > http://wonder.svn.sourceforge.net/wonder/?rev=9840&view=rev > Author: anjo > Date: 2009-09-08 08:10:45 +0000 (Tue, 08 Sep 2009) > > Log Message: > ----------- > ever had a space in your properties from copy/pasting from the web? > > Modified Paths: > -------------- > trunk/Wonder/Frameworks/Core/WOOgnl/Sources/ognl/webobjects/ > WOOgnl.java > > Modified: trunk/Wonder/Frameworks/Core/WOOgnl/Sources/ognl/ > webobjects/WOOgnl.java > =================================================================== > --- trunk/Wonder/Frameworks/Core/WOOgnl/Sources/ognl/webobjects/ > WOOgnl.java 2009-09-08 08:06:17 UTC (rev 9839) > +++ trunk/Wonder/Frameworks/Core/WOOgnl/Sources/ognl/webobjects/ > WOOgnl.java 2009-09-08 08:10:45 UTC (rev 9840) > @@ -134,7 +134,7 @@ > OgnlRuntime.setElementsAccessor(NSDictionary.class, e); > OgnlRuntime.setElementsAccessor(NSSet.class, e); > // Register template parser > - if (!"false".equals(System.getProperty("ognl.active"))) { > + if (hasProperty("ognl.active", "true")) { > String parserClassName; > if (isWO54()) { > parserClassName = System.getProperty("ognl.parserClassName", > "ognl.helperfunction.WOHelperFunctionParser54"); > @@ -154,17 +154,22 @@ > throw new RuntimeException("Failed to set the template parser > to WOHelperFunctionParser53.", e1); > } > } > - if > ("true".equalsIgnoreCase(System.getProperty("ognl.inlineBindings"))) { > + if (hasProperty("ognl.inlineBindings", "false")) { > WOHelperFunctionTagRegistry.setAllowInlineBindings(true); > } > - if > ("true > ".equalsIgnoreCase(System.getProperty("ognl.parseStandardTags"))) { > + if (hasProperty("ognl.parseStandardTags", "false")) { > WOHelperFunctionHTMLParser.setParseStandardTags(true); > } > - if > ("true".equalsIgnoreCase(System.getProperty("ognl.debugSupport"))) { > + if (hasProperty("ognl.debugSupport", "false")) { > WOHelperFunctionParser._debugSupport = true; > } > } > } > + > + private boolean hasProperty(String prop, String def) { > + String property = System.getProperty(prop, def).trim(); > + return "true".equalsIgnoreCase(property) || > "yes".equalsIgnoreCase(property); > + } > > public void convertOgnlConstantAssociations(NSMutableDictionary > associations) { > for (Enumeration e = associations.keyEnumerator(); > e.hasMoreElements();) { > > > This was sent by the SourceForge.net collaborative development > platform, the world's largest Open Source development site. > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 > 30-Day > trial. Simplify your report design, integration and deployment - and > focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > Wonder-cvs mailing list > Won...@li... > https://lists.sourceforge.net/lists/listinfo/wonder-cvs > |