-
Notifications
You must be signed in to change notification settings - Fork 115
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
Generics and Java 7 syntax in osgi and plugins packages #48
Conversation
@@ -161,7 +159,7 @@ private PGPSecretKey readSecretKey(InputStream in) throws IOException, PGPExcept | |||
key = k; | |||
} | |||
if ((keyId != null) | |||
&& (Long.valueOf(keyId, 16).longValue() == (k.getKeyID() & MASK))) { | |||
&& (Long.valueOf(keyId, 16) == (k.getKeyID() & MASK))) { |
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.
I'm not 100% sure how Java autoboxing/unboxing deals in this case. Does it autobox the primitive to a wrapper Long
and do a ==
check or does it do a unboxing of the Long
to a primitive and do a ==
check?
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.
I haven't yet found an answer to this in some of the docs I quickly checked. I plan to check the Java specification later tonight. But if you can revert this one line from the rest of the PR, then I will go ahead and merge it since the rest of the PR is fine. I can read up about this a bit more without you having to wait for this PR to be merged.
Gintautas Grigelionis on dev@ant.apache.org replies: Gintas 2017-07-01 15:56 GMT+02:00 jaikiran git@git.apache.org: |
This closes github.com/apache/ant-ivy PR #48
Thanks - the JLS sections[1][2] mentioned in there answers my questions. I have now merged this PR. Unfortunately, my attempt at triggering the auto closure of the PR by adding a trigger message to the commit hasn't succeeded this time. So please go ahead and manually close this PR for now. [1] https://docs.oracle.com/javase/specs/jls/se8/html/jls-15.html#jls-15.21.1 |
Thank you! |
These changes leave only core untouched. Generics are not applied where Java compiler is unhappy (arrays of generics).