-
Notifications
You must be signed in to change notification settings - Fork 874
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix NPE during project group creation caused by ergonomics #8171
Conversation
something isn't working correctly. tabs close now when a pg is created for a project loaded by ergonomics. i swear this worked when i tested it :( edit: updated the impl to unbox the Project earlier. Might have hit a hash collision which caused the Set to delegate to equals? |
2811b50
to
8ef6439
Compare
ide/projectui/src/org/netbeans/modules/project/ui/OpenProjectList.java
Outdated
Show resolved
Hide resolved
ide/projectui/src/org/netbeans/modules/project/ui/groups/Group.java
Outdated
Show resolved
Hide resolved
ide/projectui/src/org/netbeans/modules/project/ui/ProjectUtilities.java
Outdated
Show resolved
Hide resolved
ide/projectui/src/org/netbeans/modules/project/ui/ProjectUtilities.java
Outdated
Show resolved
Hide resolved
8ef6439
to
8cff047
Compare
ide/projectui/src/org/netbeans/modules/project/ui/ProjectUtilities.java
Outdated
Show resolved
Hide resolved
ide/projectui/src/org/netbeans/modules/project/ui/OpenProjectList.java
Outdated
Show resolved
Hide resolved
Projects can change class type due to ergonomics. Hashcode/equals matching problems make storage in sets/maps problematic. - try to unbox the project before use. - simplify code paths affected by this
8cff047
to
99ea64d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thank you! (Would be good to do just a final manual test with the latest version of the code before merging.)
planning to merge this today (tomorrow is freeze) |
Projects can change class type due to ergonomics. Hashcode/equals matching problems make storage in sets/maps problematic.
Unbox "FeatureNonProject" since
netbeans/ergonomics/ide.ergonomics/src/org/netbeans/modules/ide/ergonomics/fod/FeatureProjectFactory.java
Lines 383 to 393 in 235b99a
isn't compatible with
netbeans/java/maven/src/org/netbeans/modules/maven/NbMavenProjectImpl.java
Lines 1336 to 1355 in 235b99a
discovered while implementing #8164
fixes #6011, https://issues.apache.org/jira/browse/NETBEANS-2167 and https://bz.apache.org/netbeans/show_bug.cgi?id=235897
reproducer: