Hi Johnny,
It seems that fix:
8003120: ResourceManager.getApplicationResources() does not close InputStreams
introduced the redunant cast failure that you are seeing.
It has been fixed in TL forest by the following change (will be integrated into
the Master with the next b67 integration).
Changeset: 51c695958712
Author: weijun
Date: 2012-11-16 10:34 +0800
URL:http://hg.openjdk.java.net/jdk8/tl/jdk/rev/51c695958712
8003263: redundant cast build failure after 8003120
Reviewed-by: alanb
! src/share/classes/com/sun/naming/internal/ResourceManager.java
Regards,
Lana
On 11/16/2012 02:59 PM, Johnny Chen wrote:
The (InputStream) cast is not needed, is it?
I've got:
# Java sources to be compiled: (listed in file
/Volumes/data/projects/java/jdk/jdk8/jdk8/build/macosx-x86_64/tmp/.classes.list)
../../../src/share/classes/com/sun/naming/internal/ResourceManager.java
# Running javac: 1 files; in
/Volumes/data/projects/java/jdk/jdk8/jdk8/jdk/make/javax/others
/Library/Java/JavaVirtualMachines/jdk1.7.0_10.jdk/Contents/Home/bin/java
-XX:-PrintVMOptions -XX:+UnlockDiagnosticVMOptions -XX:-LogVMOutput
-Djava.awt.headless=true -Xmx512m -Xms512m -XX:PermSize=32m
-XX:MaxPermSize=160m
-Xbootclasspath/p:/Volumes/data/projects/java/jdk/jdk8/jdk8/build/macosx-x86_64/langtools/dist/bootstrap/lib/javac.jar
-jar
/Volumes/data/projects/java/jdk/jdk8/jdk8/build/macosx-x86_64/langtools/dist/bootstrap/lib/javac.jar
-Werror -Xlint:all -Xlint:-path -source 8 -target 8 -encoding ascii
-Xbootclasspath:/Volumes/data/projects/java/jdk/jdk8/jdk8/build/macosx-x86_64/classes
-sourcepath
../../../src/closed/solaris/classes:../../../src/closed/share/classes:/Volumes/data/projects/java/jdk/jdk8/jdk8/build/macosx-x86_64/gensrc:::/Volumes/data/projects/java/jdk/jdk8/jdk8/jdk/src/macosx/classes:/Volumes/data/projects/java/jdk/jdk8/jdk8/jdk/src/solaris/classes:/Volumes/data/projects/java/jdk/jdk8/jdk8/jdk/src/share/classes
-d
/Volumes/data/projects/java/jdk/jdk8/jdk8/build/macosx-x86_64/classes
@/Volumes/data/projects/java/jdk/jdk8/jdk8/build/macosx-x86_64/tmp/.classes.list.filtered
../../../src/share/classes/com/sun/naming/internal/ResourceManager.java:563:
warning: [cast] redundant cast to InputStream
InputStream istream =
(InputStream)resources.next();
^
error: warnings found and -Werror specified
1 error
1 warning
make[4]: *** [.compile.classlist] Error 1
make[3]: *** [all] Error 1
make[2]: *** [all] Error 1
make[1]: *** [jdk-build] Error 2
make: *** [build_product_image] Error 2
Thanks,
Johnny Chen
On Nov 13, 2012, at 11:04 AM, lana.ste...@oracle.com
<mailto:lana.ste...@oracle.com> wrote:
Changeset: f51943263267
Author: andrew
Date: 2012-11-07 16:07 -0500
URL: http://hg.openjdk.java.net/jdk8/jdk8/jdk/rev/f51943263267
8003120: ResourceManager.getApplicationResources() does not close
InputStreams
Summary: Add finally blocks to close the InputStream instances
Reviewed-by: lancea
! src/share/classes/com/sun/naming/internal/ResourceManager.java