maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ol (JIRA)" <j...@codehaus.org>
Subject [jira] Created: (CONTINUUM-1590) updateBuildDefinitionForProjectGroup leads to a StackOverflowError
Date Wed, 05 Dec 2007 08:38:57 GMT
updateBuildDefinitionForProjectGroup leads to a StackOverflowError
------------------------------------------------------------------

                 Key: CONTINUUM-1590
                 URL: http://jira.codehaus.org/browse/CONTINUUM-1590
             Project: Continuum
          Issue Type: Bug
          Components: XMLRPC Interface
    Affects Versions: 1.1
            Reporter: ol
            Priority: Blocker


This problem is due to a recursive call when testing the authorizations :

At line 221 of ContinuumServiceImpl.java

    protected String getProjectGroupName( int projectGroupId )
        throws ContinuumException
    {
        ProjectGroupSummary pgs = getPGSummary( projectGroupId );
        return pgs.getName();
    }

    private ProjectGroupSummary getPGSummary( int projectGroupId )
        throws ContinuumException
    {
        checkViewProjectGroupAuthorization( getProjectGroupName( projectGroupId ) );

        org.apache.maven.continuum.model.project.ProjectGroup projectGroup =
            continuum.getProjectGroup( projectGroupId );
        return populateProjectGroupSummary( projectGroup );
    }


getProjectGroupName makes a call to getPGSummary that makes a call to getProjectGroupName
that makes a call to getPGSummary  ......

I think the getPGSummary should be implemented like this :

    private ProjectGroupSummary getPGSummary( int projectGroupId )
        throws ContinuumException
    {
        org.apache.maven.continuum.model.project.ProjectGroup projectGroup =
            continuum.getProjectGroup( projectGroupId );
        
        checkViewProjectGroupAuthorization( projectGroup.getName() );

        return populateProjectGroupSummary( projectGroup );
    }

This problem also occurs in all these methods:
- getProjectGroupSummary (line 242)
- getProjectGroupWithProjects (line 253)
- removeProjectGroup (line 264)
- getProjects (line 91)

-- 
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