Covariant overrides on the Buffer Hierarchy redux
Hi, There was discussion here: http://mail.openjdk.java.net/pipermail/core-libs-dev/2014-April/026458.html https://bugs.openjdk.java.net/browse/JDK-4774077 http://cr.openjdk.java.net/~rwarburton/buffer-overrides-1/ The patch looks good. I have just one comment: can you check the tests to see if there are any redundant casts? After that i will run a JPRT test and then will push for you. Thanks, Paul.
On 16/07/2014 13:58, Paul Sandoz wrote:
Hi,
There was discussion here:
http://mail.openjdk.java.net/pipermail/core-libs-dev/2014-April/026458.html
https://bugs.openjdk.java.net/browse/JDK-4774077
http://cr.openjdk.java.net/~rwarburton/buffer-overrides-1/ <http://cr.openjdk.java.net/%7Erwarburton/buffer-overrides-1/>
The patch looks good.
Looks good okay to me too except that @inheritDoc doesn't inherit the runtime exceptions so I assume that @throws will need to be added to ensure that the javadoc is complete. -Alan.
2014/7/15 22:58 -0700, paul.sandoz@oracle.com:
There was discussion here:
http://mail.openjdk.java.net/pipermail/core-libs-dev/2014-April/026458.html
https://bugs.openjdk.java.net/browse/JDK-4774077
http://cr.openjdk.java.net/~rwarburton/buffer-overrides-1/
The patch looks good.
Agreed! Glad to see this (finally) get done. - Mark
Hi, [Including compiler-dev, i am not on that list so please CC me if replying to just that list] I dropped this, then JVMLS got in the way... then J1 got in the way.... so i better get to this before Devoxx gets in the way... Richard, thanks for your continued patience. In the interim Richard made a slight tweak to the patch and some tests were updated to avoid casts: http://cr.openjdk.java.net/~rwarburton/buffer-overrides-3/ This looks good. Reviewed! BUT in the interim some warnings were enabled and now javac fails to compile: /Users/sandoz/Projects/jdk9/dev/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/util/BaseFileManager.java:245: warning: [cast] redundant cast to CharBuffer return (CharBuffer)CharBuffer.allocate(1).flip(); ^ /Users/sandoz/Projects/jdk9/dev/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/util/BaseFileManager.java:329: warning: [cast] redundant cast to ByteBuffer put((ByteBuffer)result.flip()); ^ /Users/sandoz/Projects/jdk9/dev/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/util/BaseFileManager.java:336: warning: [cast] redundant cast to ByteBuffer return (ByteBuffer)result.flip(); ^ /Users/sandoz/Projects/jdk9/dev/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/util/BaseFileManager.java:352: warning: [cast] redundant cast to ByteBuffer ? (ByteBuffer)cached.clear() ^ /Users/sandoz/Projects/jdk9/dev/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/file/JavacFileManager.java:81: warning: [cast] redundant cast to CharBuffer return ((CharBuffer)buffer.compact().flip()).array(); ^ error: warnings found and -Werror specified So Richard has a patch for that too: http://cr.openjdk.java.net/~rwarburton/buffer-overrides-langtools-0/langtool... This is required because in the bootstrap compilation phase a JDK without the co-variant overrides can be used. So the current solution is to suppress the warnings. Reviews from langtools gurus are very much appreciated. Ideally it would be nice to push all this under one issue, is that possible? If not i will have to create another issue and of course push to langtools before jdk. A internal CCC is also underway. Paul.
On 17/10/2014 10:37, Paul Sandoz wrote:
Hi,
[Including compiler-dev, i am not on that list so please CC me if replying to just that list]
I dropped this, then JVMLS got in the way... then J1 got in the way.... so i better get to this before Devoxx gets in the way... Richard, thanks for your continued patience.
In the interim Richard made a slight tweak to the patch and some tests were updated to avoid casts:
http://cr.openjdk.java.net/~rwarburton/buffer-overrides-3/
This looks good. Reviewed! I've previously reviewed the changes the buffer changes and it looked good. The additional updates to drop casts in usages and tests also looks good.
-Alan
Hi, Can someone from langtools kindly chime in with how to move this forward? https://bugs.openjdk.java.net/browse/JDK-4774077 http://cr.openjdk.java.net/~rwarburton/buffer-overrides-3/ http://cr.openjdk.java.net/~rwarburton/buffer-overrides-langtools-0/langtool... On Oct 17, 2014, at 11:37 AM, Paul Sandoz <Paul.Sandoz@oracle.com> wrote:
Hi,
[Including compiler-dev, i am not on that list so please CC me if replying to just that list]
...
So Richard has a patch for that too:
http://cr.openjdk.java.net/~rwarburton/buffer-overrides-langtools-0/langtool...
This is required because in the bootstrap compilation phase a JDK without the co-variant overrides can be used. So the current solution is to suppress the warnings. Reviews from langtools gurus are very much appreciated.
?
Ideally it would be nice to push all this under one issue, is that possible? If not i will have to create another issue and of course push to langtools before jdk.
A internal CCC is also underway.
This has be approved, with the comment that "@since 1.9" should be added to the doc of the new methods, which i have done in my copy of the patch. Thanks, Paul.
Hi Paul, Sorry for the delay. So if I understand this correctly, we get 4 warnings (and because of -Werror a build failure) in langtools when compiling vs Jdk 9, but need the casts because we bootstrap with Jdk 8. Looks good to me but I would prefer if you filed a bug on me for Jdk 10 for removing the SuppressWarnings and added comments pointing to the bug after the @SuppressWarnings annotations. That way I will remember to clean this up when we bootstrap with Jdk 9. cheers /Joel On 27 okt 2014, at 10:12, Paul Sandoz <paul.sandoz@oracle.com> wrote:
Hi,
Can someone from langtools kindly chime in with how to move this forward?
https://bugs.openjdk.java.net/browse/JDK-4774077
http://cr.openjdk.java.net/~rwarburton/buffer-overrides-3/
http://cr.openjdk.java.net/~rwarburton/buffer-overrides-langtools-0/langtool...
On Oct 17, 2014, at 11:37 AM, Paul Sandoz <Paul.Sandoz@oracle.com> wrote:
Hi,
[Including compiler-dev, i am not on that list so please CC me if replying to just that list]
...
So Richard has a patch for that too:
http://cr.openjdk.java.net/~rwarburton/buffer-overrides-langtools-0/langtool...
This is required because in the bootstrap compilation phase a JDK without the co-variant overrides can be used. So the current solution is to suppress the warnings. Reviews from langtools gurus are very much appreciated.
?
Ideally it would be nice to push all this under one issue, is that possible? If not i will have to create another issue and of course push to langtools before jdk.
A internal CCC is also underway.
This has be approved, with the comment that "@since 1.9" should be added to the doc of the new methods, which i have done in my copy of the patch.
Thanks, Paul.
On Oct 28, 2014, at 1:59 PM, Joel Borggrén-Franck <joel.franck@oracle.com> wrote:
Hi Paul,
Sorry for the delay.
So if I understand this correctly, we get 4 warnings (and because of -Werror a build failure) in langtools when compiling vs Jdk 9, but need the casts because we bootstrap with Jdk 8.
Yes.
Looks good to me but I would prefer if you filed a bug on me for Jdk 10 for removing the SuppressWarnings and added comments pointing to the bug after the @SuppressWarnings annotations. That way I will remember to clean this up when we bootstrap with Jdk 9.
Ok, after i push i will log a new P4 bug and assign it to you. Thanks, Paul.
participants (4)
-
Alan Bateman
-
Joel Borggrén-Franck
-
mark.reinhold@oracle.com
-
Paul Sandoz