This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Product Version: NetBeans IDE Dev (Build 201402190001) Java: 1.8.0-ea; Java HotSpot(TM) 64-Bit Server VM 25.0-b66 Runtime: Java(TM) SE Runtime Environment 1.8.0-ea-b124 System: Windows 7 version 6.1 running on amd64; Cp1252; en_CA (nb) User directory: C:\Users\Gili\AppData\Roaming\NetBeans\dev Cache directory: C:\Users\Gili\AppData\Local\NetBeans\Cache\dev 1. Given: /** * @param value the parameter value * @param name the parameter name * @return the BigInteger representation of the parameter * @throws NumberFormatException if value is not a valid representation of BigInteger */ private static BigInteger requireBigInteger(String value, String name) throws NumberFormatException { try { return new BigInteger(value); } catch (NumberFormatException e) { throw (NumberFormatException) new NumberFormatException("Invalid " + name + ": " + value). initCause(e); } } 2. Netbeans annotates the line containing the throw statement with: "Type cast to NumberFormatException is too strong. RuntimeException should be used instead" which is incorrect.
Worksforme in Dev version; most likely works in 8.0.1RC as well - there were some changes to the "Too strong cast" hint, although I cannot pinpoint the exact version changing the behaviour for this case.