Code review request: 8003263: redundant cast build failure after 8003120
Ulf.Zibis at CoSoCo.de
Mon Nov 12 10:49:07 UTC 2012
anyway you could use a one-liner:
Am 12.11.2012 11:22, schrieb Weijun Wang:
> In fact, it looks like the resources object here is of type InputStreamEnumeration (in
> com/sun/naming/internal/VersionHelper12.java), with an open-on-nextElement style. This means we
> can completely remove the while (resources.hasMore()) block.
> Lance and Andrew added for confirmation.
> On 11/12/2012 05:42 PM, Alan Bateman wrote:
>> On 12/11/2012 08:43, Weijun Wang wrote:
>>> A small webrev:
>>> The reason is that 8003120 added a new line
>>> InputStream istream = (InputStream)resources.next();
>>> but resources is already of type NamingEnumeration<InputStream>.
>>> Building now shows
>>> warning: [cast] redundant cast to InputStream
>>> InputStream istream =
>> Looks okay to me, just wondering if we should do a more complete fix for
>> 8003120 while you are there (meaning it should attempt to close all
>> resources even if there is an IOException is thrown during close).
More information about the core-libs-dev