maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stephen Connolly (JIRA)" <j...@codehaus.org>
Subject [jira] (MNG-5075) MavenProject.getParent throws undocumented ISE
Date Mon, 06 Jan 2014 09:41:45 GMT

    [ https://jira.codehaus.org/browse/MNG-5075?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=338105#comment-338105
] 

Stephen Connolly commented on MNG-5075:
---------------------------------------

All integration tests pass: https://builds.apache.org/job/core-integration-testing-maven-3-jdk-1.7/928/
                
> MavenProject.getParent throws undocumented ISE
> ----------------------------------------------
>
>                 Key: MNG-5075
>                 URL: https://jira.codehaus.org/browse/MNG-5075
>             Project: Maven 2 & 3
>          Issue Type: Bug
>          Components: Embedding
>    Affects Versions: 3.0.3
>            Reporter: Jesse Glick
>            Assignee: Stephen Connolly
>             Fix For: 3.2
>
>         Attachments: MavenProject-getParent-ISE.diff
>
>
> http://bugzilla-attachments-197994.netbeans.org/bugzilla/attachment.cgi?id=107899 shows
a stack trace encountered when calling {{MavenProject.getParent}} on a project with some errors
(probably POMs missing in the local repository).
> This method has no Javadoc comment, so it is hard to know exactly what it is permitted/supposed
to do, but {{hasParent}} implies that {{null}} is a valid return value, and there is no {{throws
IllegalStateException}} clause. The attached patch brings the behavior in line with that signature.
(I think I got the {{PlexusTestCase}} infrastructure working with all the required wiring
but it may be possible to simplify the test case.)
> Cleaner might be to just declare {{getParent}} (and also {{hasParent}}?) to throw {{ProjectBuildingException}},
though this would be a source-incompatible change. (Only binary-incompatible for clients which
are already catching {{IllegalStateException}}!)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message