incubator-adffaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jwald...@apache.org
Subject svn commit: r441699 - /incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/skin/SkinStyleSheetParserUtils.java
Date Sat, 09 Sep 2006 00:09:18 GMT
Author: jwaldman
Date: Fri Sep  8 17:09:17 2006
New Revision: 441699

URL: http://svn.apache.org/viewvc?view=rev&rev=441699
Log:
ADFFACES-137 error in custom skinning: org\apache\myfaces\adfinternal\skin\SkinStyleSheetParserUtils.java
method _getBaseURI()
Fixed. Thanks Kenneth Dougan for reporting this.

Modified:
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/skin/SkinStyleSheetParserUtils.java

Modified: incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/skin/SkinStyleSheetParserUtils.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/skin/SkinStyleSheetParserUtils.java?view=diff&rev=441699&r1=441698&r2=441699
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/skin/SkinStyleSheetParserUtils.java
(original)
+++ incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/skin/SkinStyleSheetParserUtils.java
Fri Sep  8 17:09:17 2006
@@ -934,13 +934,18 @@
     // Find the start of the file name part of the source name - we don't
     // need this as part of the base URI
     int lastSepIndex = sourceName.lastIndexOf('/');
-
-    StringBuilder buffer = new StringBuilder(contextPathLength + lastSepIndex + 1);
-    buffer.append(contextPath);
-    buffer.append("/");
-    buffer.append(sourceName.substring(0, lastSepIndex));
-
-    return buffer.toString();
+    
+    if (lastSepIndex == -1)
+      return contextPath;
+    else
+    {
+      StringBuilder buffer = new StringBuilder(
+                                    contextPathLength + lastSepIndex + 1);
+      buffer.append(contextPath);
+      buffer.append("/");
+      buffer.append(sourceName.substring(0, lastSepIndex));
+      return buffer.toString();
+    }
   }
 
   // Tests whether the specified property value is an "url" property.



Mime
View raw message