You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Stephen Connolly (JIRA)" <ji...@codehaus.org> on 2014/05/22 15:08:10 UTC
[jira] (MPIR-293) On the team list report the "picUrl" property
appears in the table, although no other properties are set for that team
member
[ https://jira.codehaus.org/browse/MPIR-293?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Stephen Connolly closed MPIR-293.
---------------------------------
Resolution: Fixed
Fix Version/s: 2.8
r1596852
> On the team list report the "picUrl" property appears in the table, although no other properties are set for that team member
> -----------------------------------------------------------------------------------------------------------------------------
>
> Key: MPIR-293
> URL: https://jira.codehaus.org/browse/MPIR-293
> Project: Maven Project Info Reports Plugin
> Issue Type: Bug
> Affects Versions: 2.7
> Reporter: Anghel Botos
> Priority: Minor
> Fix For: 2.8
>
> Attachments: HasPicUrlFix.patch
>
>
> On the team list report the "picUrl" property appears in the table, although no other properties are set for that team member.
> Given the following team list in the pom.xml:
> {code:xml}
> <developers>
> <developer>
> <id>abotos</id>
> <name>Anghel Botos</name>
> <email>anghel.botos@someemailprovider.com</email>
> <properties>
> <picUrl>images/avatars/abotos.png</picUrl>
> </properties>
> </developer>
> </developers>
> {code}
> Due to the following lines of code in TeamListReport.java:
> {code:title=TeamListReport.java|borderStyle=solid}
> Properties properties = unit.getProperties();
> boolean hasPicUrl = properties.contains( "picUrl" );
> if ( hasPicUrl )
> {
> requiredHeaders.put( IMAGE, Boolean.TRUE );
> }
> boolean isJustAnImageProperty = properties.size() == 1 && hasPicUrl;
> if ( !isJustAnImageProperty && !properties.isEmpty() )
> {
> requiredHeaders.put( PROPERTIES, Boolean.TRUE );
> }
> {code}
> {{hasPicUrl}} evaluates to {{false}} because the check is done using {{contains}} not {{containsKey}}, and thus {{isJustAnImageProperty}} evaluates also to {{false}} leading to the Properties column being added to the team members table and the {{picUrl}} property being displayed in that column in the table, although the Properties column should not be present for this case.
--
This message was sent by Atlassian JIRA
(v6.1.6#6162)