You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by ji...@codehaus.org on 2004/04/08 01:00:27 UTC

[jira] Reopened: (MAVEN-1205) ClassCastException in MavenJellyContext.class

Message:

   The following issue has been reopened.

   Reopener: Brett Porter
       Date: Wed, 7 Apr 2004 6:59 PM

ok, I see it was public. I'll just return the method with the same signature and have it store a CSV list in the context :)
---------------------------------------------------------------------
View the issue:
  http://jira.codehaus.org/secure/ViewIssue.jspa?key=MAVEN-1205

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: MAVEN-1205
    Summary: ClassCastException in MavenJellyContext.class
       Type: Bug

     Status: Reopened
   Priority: Major

 Original Estimate: Unknown
 Time Spent: Unknown
  Remaining: Unknown

    Project: maven
 Components: 
             core
   Fix Fors:
             1.0-rc3
   Versions:
             1.1

   Assignee: Brett Porter
   Reporter: Kyle Adams

    Created: Mon, 22 Mar 2004 9:57 AM
    Updated: Wed, 7 Apr 2004 6:59 PM

Description:
There seems to be a type mismatch between the getter and setter for the maven.repo.remote property in MavenJellyContext.class.

    public void setMavenRepoRemotes( List mavenRepoRemote )
    {
        setVariable( MavenConstants.REPO_REMOTE, mavenRepoRemote );
    }

    public List getMavenRepoRemote()
    {
        // We might have CSV list of remote repositories.
        return convertCsvStringToList( (String) getVariable( MavenConstants.REPO_REMOTE ) );
    }

As seen in the setter, maven.repo.remote gets set to a List, but the getter attempts to cast the variable to a string, before passing it to a helper function to convert it back to a list.  I'm not sure how Maven initially populates this property when reading in a POM, but it looks like there's some consistency problems in how that data is expected to be stored.  The attached patch deals with the situation as is through reflection, but long term code will probably need to be changed elsewhere to make sure everyone is storing the same type of data (be it a CSV or a List) in that property.


---------------------------------------------------------------------
JIRA INFORMATION:
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

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org