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 "Adam Winer (JIRA)" <ad...@incubator.apache.org> on 2006/08/17 05:04:14 UTC
[jira] Commented: (ADFFACES-137) error in custom skinning:
org\apache\myfaces\adfinternal\skin\SkinStyleSheetParserUtils.java method
_getBaseURI()
[ 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