-
Notifications
You must be signed in to change notification settings - Fork 2.7k
refine ImmutableCollections class implementations #2484
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
base: master
Are you sure you want to change the base?
refine ImmutableCollections class implementations #2484
Conversation
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.
Chesterton's Fence. Do we know why this was here? Maybe it's just old pre Java 1.5 code that we don;t need at all any more. Are there performance impacts?
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.
Test are failing
Error: Tests run: 22, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.183 s <<< FAILURE! -- in org.apache.maven.internal.xml.XmlNodeImplTest
Error: org.apache.maven.internal.xml.XmlNodeImplTest.testEqualsIsNullSafe -- Time elapsed: 0.008 s <<< ERROR!
java.lang.NullPointerException
at java.base/java.util.Objects.requireNonNull(Objects.java:209)
at java.base/java.util.ImmutableCollections$MapN.(ImmutableCollections.java:1184)
at java.base/java.util.Map.ofEntries(Map.java:1668)
at java.base/java.util.Map.copyOf(Map.java:1734)
at org.apache.maven.api.xml.ImmutableCollections.copy(ImmutableCollections.java:41)
at org.apache.maven.api.xml.XmlNode$Builder$Impl.(XmlNode.java:471)
at org.apache.maven.api.xml.XmlNode$Builder.build(XmlNode.java:453)
at org.apache.maven.api.xml.XmlNode.newInstance(XmlNode.java:332)
at org.apache.maven.internal.xml.XmlNodeImplTest.testEqualsIsNullSafe(XmlNodeImplTest.java:494)
at java.base/java.lang.reflect.Method.invoke(Method.java:569)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
I know the reason now. closing this pr. |
The other reason is that |
Btw, this duplicates #2363 |
Following this checklist to help us incorporate your
contribution quickly and easily:
Note that commits might be squashed by a maintainer on merge.
This may not always be possible but is a best-practice.
mvn verify
to make sure basic checks pass.A more thorough check will be performed on your pull request automatically.
If your pull request is about ~20 lines of code you don't need to sign an
Individual Contributor License Agreement if you are unsure
please ask on the developers list.
To make clear that you license your contribution under
the Apache License Version 2.0, January 2004
you have to acknowledge this by using the following check-box.