maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hartmut Obendorf (JIRA)" <j...@codehaus.org>
Subject [jira] Commented: (MPMD-121) Download of PMD ruleset from URL fails if URL contains characters not valid in file name
Date Thu, 22 Apr 2010 12:05:19 GMT

    [ http://jira.codehaus.org/browse/MPMD-121?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=218591#action_218591
] 

Hartmut Obendorf commented on MPMD-121:
---------------------------------------

error occurs in class

org.apache.maven.plugin.pmd.PMDReport

> Download of PMD ruleset from URL fails if URL contains characters not valid in file name
> ----------------------------------------------------------------------------------------
>
>                 Key: MPMD-121
>                 URL: http://jira.codehaus.org/browse/MPMD-121
>             Project: Maven 2.x PMD Plugin
>          Issue Type: Bug
>          Components: PMD
>    Affects Versions: 2.4
>         Environment: win32
>            Reporter: Hartmut Obendorf
>
>     private String getLocationTemp( String name )
>     {
>         String loc = name;
>         if ( loc.indexOf( '/' ) != -1 )
>         {
>             loc = loc.substring( loc.lastIndexOf( '/' ) + 1 );
>         }
>         if ( loc.indexOf( '\\' ) != -1 )
>         {
>             loc = loc.substring( loc.lastIndexOf( '\\' ) + 1 );
>         }
>         getLog().debug( "Before: " + name + " After: " + loc );
>         return loc;
>     }
> should encode the URL, so that characters such as ? or & do not prevent creating
a local file
> Fix suggestion: add following code line before log output:
> loc = URLEncoder.encode(loc, "UTF-8");

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

        

Mime
View raw message