You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by GitBox <gi...@apache.org> on 2022/05/11 14:39:28 UTC
[GitHub] [netbeans] pedro-w commented on issue #4084: NPE in Branding Panel for maven project
pedro-w commented on issue #4084:
URL: https://github.com/apache/netbeans/issues/4084#issuecomment-1123862692
I had a quick look and it seems the exception traces back to
https://github.com/apache/netbeans/blob/c07fe190473840887b0d6f7090151d17ebb0686f/apisupport/apisupport.project/src/org/netbeans/modules/apisupport/project/ui/branding/BasicBrandingPanel.java#L61-L63
which was added in #3551
I am not familiar with the code but it looks like `BrandingModel::getIconSource` could legitimately return null for some of the listed sizes, which will cause TreeMap's merge function to throw the NPE. ([ref here](https://github.com/openjdk/jdk/blob/fb469fb894ed84686f9fec5787ac99eb535fdd18/src/java.base/share/classes/java/util/TreeMap.java#L706-L708))
So I think you need to implement this a bit differently to filter out any null icons that are returned by the branding model.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists