MCPcopy Create free account
hub / github.com/spotbugs/spotbugs / parseInt

Method parseInt

spotbugsTestCases/src/java/tigerTraps/Parsing.java:10–12  ·  view source on GitHub ↗

Returns Integer corresponding to s, or null if s is null. @throws NumberFormatException if s is nonnull and doesn't represent a valid integer.

(String s)

Source from the content-addressed store, hash-verified

8 * if s is nonnull and doesn't represent a valid integer.
9 */
10 public static Integer parseInt(String s) {
11 return (s == null) ? (Integer) null : Integer.parseInt(s);
12 }
13
14 public static void main(String[] args) {
15 System.out.println(parseInt("-1") + " " + parseInt(null) + " " + parseInt("1"));

Callers 15

mainMethod · 0.95
testParsingGood1Method · 0.80
mainMethod · 0.80
modify_base_class_varMethod · 0.80
fooMethod · 0.80
Bug1487083Class · 0.80
getIntMinus1Method · 0.80
getIntMinus1BadMethod · 0.80
Bug1678228Method · 0.80
mainMethod · 0.80
getInt5Method · 0.80
getInt6Method · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected