Covariant overrides on the Buffer Hierarchy redux
paul.sandoz at oracle.com
Fri Oct 17 09:37:08 UTC 2014
[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:
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
/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
/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
/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
/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
error: warnings found and -Werror specified
So Richard has a patch for that too:
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.
More information about the core-libs-dev