Author: bentmann
Date: Thu May 15 10:45:22 2008
New Revision: 656754

URL: http://svn.apache.org/viewvc?rev=656754&view=rev
Log:
o Fixed case-insensitive string handling

Modified:
    
maven/doxia/doxia-sitetools/trunk/doxia-decoration-model/src/test/java/org/apache/maven/doxia/site/decoration/inheritance/PathDescriptorTest.java
    
maven/doxia/doxia-sitetools/trunk/doxia-site-renderer/src/main/java/org/apache/maven/doxia/siterenderer/DefaultSiteRenderer.java

Modified: 
maven/doxia/doxia-sitetools/trunk/doxia-decoration-model/src/test/java/org/apache/maven/doxia/site/decoration/inheritance/PathDescriptorTest.java
URL: 
http://svn.apache.org/viewvc/maven/doxia/doxia-sitetools/trunk/doxia-decoration-model/src/test/java/org/apache/maven/doxia/site/decoration/inheritance/PathDescriptorTest.java?rev=656754&r1=656753&r2=656754&view=diff
==============================================================================
--- 
maven/doxia/doxia-sitetools/trunk/doxia-decoration-model/src/test/java/org/apache/maven/doxia/site/decoration/inheritance/PathDescriptorTest.java
 (original)
+++ 
maven/doxia/doxia-sitetools/trunk/doxia-decoration-model/src/test/java/org/apache/maven/doxia/site/decoration/inheritance/PathDescriptorTest.java
 Thu May 15 10:45:22 2008
@@ -21,6 +21,7 @@
 
 import java.io.File;
 
+import org.codehaus.plexus.util.Os;
 import org.codehaus.plexus.util.StringUtils;
 
 import junit.framework.TestCase;
@@ -295,7 +296,7 @@
         assertNotNull( desc.getPathUrl() );
         assertNotNull( desc.getPath() );
         assertNotNull( desc.getLocation() );
-        if ( System.getProperty( "os.name" ).toLowerCase().indexOf( "windows" 
) != -1 )
+        if ( Os.isFamily( Os.FAMILY_WINDOWS ) )
         {
             String s = StringUtils.replace( new File( base + "/" + path 
).toURL().toString(), "file:", "" );
             assertEquals( "wrong path", s, desc.getPath() );
@@ -321,7 +322,7 @@
         assertNotNull( desc.getPathUrl() );
         assertNotNull( desc.getPath() );
         assertNotNull( desc.getLocation() );
-        if ( System.getProperty( "os.name" ).toLowerCase().indexOf( "windows" 
) != -1 )
+        if ( Os.isFamily( Os.FAMILY_WINDOWS ) )
         {
             String s = StringUtils.replace( new File( base + "/" + path 
).toURL().toString(), "file:", "" );
             assertEquals( "wrong path", s, desc.getPath() );
@@ -347,7 +348,7 @@
         assertNotNull( desc.getPathUrl() );
         assertNotNull( desc.getPath() );
         assertNotNull( desc.getLocation() );
-        if ( System.getProperty( "os.name" ).toLowerCase().indexOf( "windows" 
) != -1 )
+        if ( Os.isFamily( Os.FAMILY_WINDOWS ) )
         {
             String s = StringUtils.replace( new File( base 
).toURL().toString(), "file:", "" );
             assertEquals( "wrong path", s, desc.getPath() );
@@ -373,7 +374,7 @@
         assertNotNull( desc.getPathUrl() );
         assertNotNull( desc.getPath() );
         assertNotNull( desc.getLocation() );
-        if ( System.getProperty( "os.name" ).toLowerCase().indexOf( "windows" 
) != -1 )
+        if ( Os.isFamily( Os.FAMILY_WINDOWS ) )
         {
             String s = StringUtils.replace( new File( base 
).toURL().toString(), "file:", "" );
             assertEquals( "wrong path", s, desc.getPath() );
@@ -416,7 +417,7 @@
         assertNotNull( desc.getPathUrl() );
         assertNotNull( desc.getPath() );
         assertNotNull( desc.getLocation() );
-        if ( System.getProperty( "os.name" ).toLowerCase().indexOf( "windows" 
) != -1 )
+        if ( Os.isFamily( Os.FAMILY_WINDOWS ) )
         {
             String s = StringUtils.replace( new File( base + "/" + path 
).toURL().toString(), "file:", "" );
             assertEquals( "wrong path", s, desc.getPath() );
@@ -442,7 +443,7 @@
         assertNotNull( desc.getPathUrl() );
         assertNotNull( desc.getPath() );
         assertNotNull( desc.getLocation() );
-        if ( System.getProperty( "os.name" ).toLowerCase().indexOf( "windows" 
) != -1 )
+        if ( Os.isFamily( Os.FAMILY_WINDOWS ) )
         {
             String s = StringUtils.replace( new File( base + "/" + path 
).toURL().toString(), "file:", "" );
             assertEquals( "wrong path", s, desc.getPath() );
@@ -468,7 +469,7 @@
         assertNotNull( desc.getPathUrl() );
         assertNotNull( desc.getPath() );
         assertNotNull( desc.getLocation() );
-        if ( System.getProperty( "os.name" ).toLowerCase().indexOf( "windows" 
) != -1 )
+        if ( Os.isFamily( Os.FAMILY_WINDOWS ) )
         {
             String s = StringUtils.replace( new File( base 
).toURL().toString(), "file:", "" );
             assertEquals( "wrong path", s, desc.getPath() );
@@ -494,7 +495,7 @@
         assertNotNull( desc.getPathUrl() );
         assertNotNull( desc.getPath() );
         assertNotNull( desc.getLocation() );
-        if ( System.getProperty( "os.name" ).toLowerCase().indexOf( "windows" 
) != -1 )
+        if ( Os.isFamily( Os.FAMILY_WINDOWS ) )
         {
             String s = StringUtils.replace( new File( base 
).toURL().toString(), "file:", "" );
             assertEquals( "wrong path", s, desc.getPath() );
@@ -520,7 +521,7 @@
         assertNotNull( desc.getPathUrl() );
         assertNotNull( desc.getPath() );
         assertNotNull( desc.getLocation() );
-        if ( System.getProperty( "os.name" ).toLowerCase().indexOf( "windows" 
) != -1 )
+        if ( Os.isFamily( Os.FAMILY_WINDOWS ) )
         {
             String s = StringUtils.replace( new File( base 
).toURL().toString(), "file:", "" );
             assertEquals( "wrong path", s, desc.getPath() );

Modified: 
maven/doxia/doxia-sitetools/trunk/doxia-site-renderer/src/main/java/org/apache/maven/doxia/siterenderer/DefaultSiteRenderer.java
URL: 
http://svn.apache.org/viewvc/maven/doxia/doxia-sitetools/trunk/doxia-site-renderer/src/main/java/org/apache/maven/doxia/siterenderer/DefaultSiteRenderer.java?rev=656754&r1=656753&r2=656754&view=diff
==============================================================================
--- 
maven/doxia/doxia-sitetools/trunk/doxia-site-renderer/src/main/java/org/apache/maven/doxia/siterenderer/DefaultSiteRenderer.java
 (original)
+++ 
maven/doxia/doxia-sitetools/trunk/doxia-site-renderer/src/main/java/org/apache/maven/doxia/siterenderer/DefaultSiteRenderer.java
 Thu May 15 10:45:22 2008
@@ -209,7 +209,7 @@
                 for ( Iterator iter = files.entrySet().iterator(); 
iter.hasNext(); )
                 {
                     Map.Entry entry = (Map.Entry) iter.next();
-                    if ( entry.getKey().toString().toLowerCase().equals( 
key.toLowerCase() ) )
+                    if ( entry.getKey().toString().equalsIgnoreCase( key ) )
                     {
                         DocumentRenderer renderer = (DocumentRenderer) 
files.get( entry.getKey() );
 


Reply via email to