Path: csiph.com!aioe.org!.POSTED!not-for-mail From: =?UTF-8?Q?Arne_Vajh=c3=b8j?= Newsgroups: comp.lang.java.programmer Subject: Re: Java 9 issues Date: Tue, 3 Oct 2017 11:33:37 -0400 Organization: Aioe.org NNTP Server Lines: 33 Message-ID: References: <3932fb50-27ec-475c-9e74-45387ba59ac1@googlegroups.com> NNTP-Posting-Host: PBuS014lhzVyHjLbXmo/ZQ.user.gioia.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 Content-Language: en-US X-Notice: Filtered by postfilter v. 0.8.2 Xref: csiph.com comp.lang.java.programmer:37529 On 10/3/2017 11:12 AM, Eric Douglas wrote: > So I tested my application which works perfectly in Java 8, some issues in 9. > Then there's the next trivial issue of all the now deprecated methods I'm referencing. You should plan to get those changed. > I load images from a jar using MyClass.class.getResourceAsStream() on > one and MyClass.class.getClassLoader().getResourceAsStream() on > another (which is in a separate jar). I pass these streams into a new > MemoryCacheImageInputStream, then I pass that into ImageIO.read(). > The images both display fine, but my console log is full of these > stack traces. > Caught and handled this exception : > java.lang.NumberFormatException: For input string: "" > at java.base/java.lang.NumberFormatException.forInputString(NumberFormatException.java:65) > at java.base/java.lang.Integer.parseInt(Integer.java:662) > at java.base/java.lang.Integer.parseInt(Integer.java:770) > at com.sun.media.imageioimpl.common.ImageUtil.processOnRegistration(ImageUtil.java:1406) > at com.sun.media.imageioimpl.plugins.wbmp.WBMPImageReaderSpi.onRegistration(WBMPImageReaderSpi.java:95) > at java.desktop/javax.imageio.spi.SubRegistry.registerServiceProvider(ServiceRegistry.java:788) > at java.desktop/javax.imageio.spi.ServiceRegistry.registerServiceProvider(ServiceRegistry.java:330) > at java.desktop/javax.imageio.spi.IIORegistry.registerApplicationClasspathSpis(IIORegistry.java:212) > at java.desktop/javax.imageio.spi.IIORegistry.(IIORegistry.java:136) > at java.desktop/javax.imageio.spi.IIORegistry.getDefaultInstance(IIORegistry.java:157) > at java.desktop/javax.imageio.ImageIO.(ImageIO.java:66) Some code is calling Integer.parseInt on an empty string "" in ImageIO. Can you read the images from a disk file? Arne