On 28/04/2011, at 8:18 AM, [email protected] wrote: > Modified: > incubator/npanday/trunk/components/dotnet-core/src/main/java/npanday/PathUtil.java > URL: > http://svn.apache.org/viewvc/incubator/npanday/trunk/components/dotnet-core/src/main/java/npanday/PathUtil.java?rev=1097262&r1=1097261&r2=1097262&view=diff > ============================================================================== > --- > incubator/npanday/trunk/components/dotnet-core/src/main/java/npanday/PathUtil.java > (original) > +++ > incubator/npanday/trunk/components/dotnet-core/src/main/java/npanday/PathUtil.java > Wed Apr 27 22:18:34 2011 > @@ -316,4 +316,17 @@ public final class PathUtil > > return false; > } > + > + public static File buildSettingsFilePath( String settingsPathOrFile ) > + { > + if (settingsPathOrFile.endsWith( "xml" )) > + return new File(settingsPathOrFile); > + > + return new File( settingsPathOrFile, "npanday-settings.xml" ); > + }
This is better as settingsPathOrFile.isFile(), IMO. Though I still think this is all a bit magic, I don't know why I'd ever give it a path. Probably don't need to do any more revisions now though... - Brett -- Brett Porter [email protected] http://brettporter.wordpress.com/ http://au.linkedin.com/in/brettporter
