Fix NPE during project group creation caused by ergonomics#8171
Merged
mbien merged 1 commit intoapache:masterfrom Jan 23, 2025
Merged
Fix NPE during project group creation caused by ergonomics#8171mbien merged 1 commit intoapache:masterfrom
mbien merged 1 commit intoapache:masterfrom
Conversation
Member
Author
|
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
mbien
commented
Jan 20, 2025
ide/projectui/src/org/netbeans/modules/project/ui/OpenProjectList.java
Outdated
Show resolved
Hide resolved
mbien
commented
Jan 20, 2025
eirikbakke
reviewed
Jan 20, 2025
ide/projectui/src/org/netbeans/modules/project/ui/ProjectUtilities.java
Outdated
Show resolved
Hide resolved
eirikbakke
reviewed
Jan 20, 2025
eirikbakke
reviewed
Jan 20, 2025
ide/projectui/src/org/netbeans/modules/project/ui/ProjectUtilities.java
Outdated
Show resolved
Hide resolved
eirikbakke
reviewed
Jan 20, 2025
8ef6439 to
8cff047
Compare
eirikbakke
reviewed
Jan 20, 2025
ide/projectui/src/org/netbeans/modules/project/ui/ProjectUtilities.java
Outdated
Show resolved
Hide resolved
eirikbakke
reviewed
Jan 20, 2025
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
eirikbakke
approved these changes
Jan 20, 2025
Contributor
eirikbakke
left a comment
There was a problem hiding this comment.
Looks good, thank you! (Would be good to do just a final manual test with the latest version of the code before merging.)
Member
Author
|
planning to merge this today (tomorrow is freeze) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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: