You are viewing a plain text version of this content. The canonical link for it is here.
Posted to adffaces-issues@incubator.apache.org by "Kenneth Dougan (JIRA)" <ad...@incubator.apache.org> on 2006/08/16 20:54:13 UTC

[jira] Created: (ADFFACES-137) error in custom skinning: org\apache\myfaces\adfinternal\skin\SkinStyleSheetParserUtils.java method _getBaseURI()

error in custom skinning: org\apache\myfaces\adfinternal\skin\SkinStyleSheetParserUtils.java method _getBaseURI()
-----------------------------------------------------------------------------------------------------------------

                 Key: ADFFACES-137
                 URL: http://issues.apache.org/jira/browse/ADFFACES-137
             Project: MyFaces ADF-Faces
          Issue Type: Bug
          Components: Skinning
         Environment: XP, Tomcat Java 1.5
            Reporter: Kenneth Dougan
            Priority: Blocker


When attempting to parse a custom skin .css file, there is an OutOfBoundsException.  If there is a contextPath = "/iApp/an" and sourceName = "custom.css" and lastSepIndex resolves to -1.  The code does not handle the case where lastSepIndex == 1.

The method _getBaseURI() is currently:

    StringBuffer buffer = new StringBuffer(contextPathLength + lastSepIndex + 1);
    buffer.append(contextPath);
    buffer.append("/");
    buffer.append(sourceName.substring(0, lastSepIndex));

but should be:

    StringBuffer buffer = new StringBuffer(contextPathLength + lastSepIndex + 1);
    buffer.append(contextPath);
    buffer.append("/");
    if (lastSepIndex > -1) {
      buffer.append(sourceName.substring(0, lastSepIndex));
    } else {
      buffer.append(sourceName);
    }


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (ADFFACES-137) error in custom skinning: org\apache\myfaces\adfinternal\skin\SkinStyleSheetParserUtils.java method _getBaseURI()

Posted by "Adam Winer (JIRA)" <ad...@incubator.apache.org>.
    [ http://issues.apache.org/jira/browse/ADFFACES-137?page=comments#action_12428572 ] 
            
Adam Winer commented on ADFFACES-137:
-------------------------------------

I believe the proper fix is:

    StringBuffer buffer = new StringBuffer(contextPathLength + lastSepIndex + 1); 
    buffer.append(contextPath); 
    if (lastSepIndex >= 0) { 
      buffer.append("/"); 
      buffer.append(sourceName.substring(0, lastSepIndex)); 
    }

... but need confirmation (_getBaseURI() is not supposed to include the file name, just the directories).
 


> error in custom skinning: org\apache\myfaces\adfinternal\skin\SkinStyleSheetParserUtils.java method _getBaseURI()
> -----------------------------------------------------------------------------------------------------------------
>
>                 Key: ADFFACES-137
>                 URL: http://issues.apache.org/jira/browse/ADFFACES-137
>             Project: MyFaces ADF-Faces
>          Issue Type: Bug
>          Components: Skinning
>         Environment: XP, Tomcat Java 1.5
>            Reporter: Kenneth Dougan
>            Priority: Blocker
>
> When attempting to parse a custom skin .css file, there is an OutOfBoundsException.  If there is a contextPath = "/iApp/an" and sourceName = "custom.css" and lastSepIndex resolves to -1.  The code does not handle the case where lastSepIndex == 1.
> The method _getBaseURI() is currently:
>     StringBuffer buffer = new StringBuffer(contextPathLength + lastSepIndex + 1);
>     buffer.append(contextPath);
>     buffer.append("/");
>     buffer.append(sourceName.substring(0, lastSepIndex));
> but should be:
>     StringBuffer buffer = new StringBuffer(contextPathLength + lastSepIndex + 1);
>     buffer.append(contextPath);
>     buffer.append("/");
>     if (lastSepIndex > -1) {
>       buffer.append(sourceName.substring(0, lastSepIndex));
>     } else {
>       buffer.append(sourceName);
>     }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Resolved: (ADFFACES-137) error in custom skinning: org\apache\myfaces\adfinternal\skin\SkinStyleSheetParserUtils.java method _getBaseURI()

Posted by "Jeanne Waldman (JIRA)" <ad...@incubator.apache.org>.
     [ http://issues.apache.org/jira/browse/ADFFACES-137?page=all ]

Jeanne Waldman resolved ADFFACES-137.
-------------------------------------

    Resolution: Fixed

checked in a fix. Thanks for reporting it!

> error in custom skinning: org\apache\myfaces\adfinternal\skin\SkinStyleSheetParserUtils.java method _getBaseURI()
> -----------------------------------------------------------------------------------------------------------------
>
>                 Key: ADFFACES-137
>                 URL: http://issues.apache.org/jira/browse/ADFFACES-137
>             Project: MyFaces ADF-Faces
>          Issue Type: Bug
>          Components: Skinning
>         Environment: XP, Tomcat Java 1.5
>            Reporter: Kenneth Dougan
>         Assigned To: Jeanne Waldman
>            Priority: Blocker
>
> When attempting to parse a custom skin .css file, there is an OutOfBoundsException.  If there is a contextPath = "/iApp/an" and sourceName = "custom.css" and lastSepIndex resolves to -1.  The code does not handle the case where lastSepIndex == 1.
> The method _getBaseURI() is currently:
>     StringBuffer buffer = new StringBuffer(contextPathLength + lastSepIndex + 1);
>     buffer.append(contextPath);
>     buffer.append("/");
>     buffer.append(sourceName.substring(0, lastSepIndex));
> but should be:
>     StringBuffer buffer = new StringBuffer(contextPathLength + lastSepIndex + 1);
>     buffer.append(contextPath);
>     buffer.append("/");
>     if (lastSepIndex > -1) {
>       buffer.append(sourceName.substring(0, lastSepIndex));
>     } else {
>       buffer.append(sourceName);
>     }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (ADFFACES-137) error in custom skinning: org\apache\myfaces\adfinternal\skin\SkinStyleSheetParserUtils.java method _getBaseURI()

Posted by "Jeanne Waldman (JIRA)" <ad...@incubator.apache.org>.
    [ http://issues.apache.org/jira/browse/ADFFACES-137?page=comments#action_12433531 ] 
            
Jeanne Waldman commented on ADFFACES-137:
-----------------------------------------

I double checked this code, and Adam is correct that _getBaseURI returns directories, and does not include the file name.
I'll make this change:
    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();
    }

> error in custom skinning: org\apache\myfaces\adfinternal\skin\SkinStyleSheetParserUtils.java method _getBaseURI()
> -----------------------------------------------------------------------------------------------------------------
>
>                 Key: ADFFACES-137
>                 URL: http://issues.apache.org/jira/browse/ADFFACES-137
>             Project: MyFaces ADF-Faces
>          Issue Type: Bug
>          Components: Skinning
>         Environment: XP, Tomcat Java 1.5
>            Reporter: Kenneth Dougan
>            Priority: Blocker
>
> When attempting to parse a custom skin .css file, there is an OutOfBoundsException.  If there is a contextPath = "/iApp/an" and sourceName = "custom.css" and lastSepIndex resolves to -1.  The code does not handle the case where lastSepIndex == 1.
> The method _getBaseURI() is currently:
>     StringBuffer buffer = new StringBuffer(contextPathLength + lastSepIndex + 1);
>     buffer.append(contextPath);
>     buffer.append("/");
>     buffer.append(sourceName.substring(0, lastSepIndex));
> but should be:
>     StringBuffer buffer = new StringBuffer(contextPathLength + lastSepIndex + 1);
>     buffer.append(contextPath);
>     buffer.append("/");
>     if (lastSepIndex > -1) {
>       buffer.append(sourceName.substring(0, lastSepIndex));
>     } else {
>       buffer.append(sourceName);
>     }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Assigned: (ADFFACES-137) error in custom skinning: org\apache\myfaces\adfinternal\skin\SkinStyleSheetParserUtils.java method _getBaseURI()

Posted by "Jeanne Waldman (JIRA)" <ad...@incubator.apache.org>.
     [ http://issues.apache.org/jira/browse/ADFFACES-137?page=all ]

Jeanne Waldman reassigned ADFFACES-137:
---------------------------------------

    Assignee: Jeanne Waldman

> error in custom skinning: org\apache\myfaces\adfinternal\skin\SkinStyleSheetParserUtils.java method _getBaseURI()
> -----------------------------------------------------------------------------------------------------------------
>
>                 Key: ADFFACES-137
>                 URL: http://issues.apache.org/jira/browse/ADFFACES-137
>             Project: MyFaces ADF-Faces
>          Issue Type: Bug
>          Components: Skinning
>         Environment: XP, Tomcat Java 1.5
>            Reporter: Kenneth Dougan
>         Assigned To: Jeanne Waldman
>            Priority: Blocker
>
> When attempting to parse a custom skin .css file, there is an OutOfBoundsException.  If there is a contextPath = "/iApp/an" and sourceName = "custom.css" and lastSepIndex resolves to -1.  The code does not handle the case where lastSepIndex == 1.
> The method _getBaseURI() is currently:
>     StringBuffer buffer = new StringBuffer(contextPathLength + lastSepIndex + 1);
>     buffer.append(contextPath);
>     buffer.append("/");
>     buffer.append(sourceName.substring(0, lastSepIndex));
> but should be:
>     StringBuffer buffer = new StringBuffer(contextPathLength + lastSepIndex + 1);
>     buffer.append(contextPath);
>     buffer.append("/");
>     if (lastSepIndex > -1) {
>       buffer.append(sourceName.substring(0, lastSepIndex));
>     } else {
>       buffer.append(sourceName);
>     }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira