Skip to content

Commit d568eb6

Browse files
committed
Update qldoc
1 parent 450ff26 commit d568eb6

File tree

1 file changed

+2
-14
lines changed

1 file changed

+2
-14
lines changed

java/ql/src/semmle/code/java/NumberFormatException.qll

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,3 @@
1-
/**
2-
* @name Missing catch of NumberFormatException
3-
* @description Calling a string to number conversion method without handling
4-
* 'NumberFormatException' may cause unexpected runtime exceptions.
5-
* @kind problem
6-
* @problem.severity recommendation
7-
* @precision high
8-
* @id java/uncaught-number-format-exception
9-
* @tags reliability
10-
* external/cwe/cwe-248
11-
*/
12-
131
import java
142

153
/** Calls a string to number conversion */
@@ -68,7 +56,7 @@ class NumberFormatException extends RefType {
6856
NumberFormatException() { this.hasQualifiedName("java.lang", "NumberFormatException") }
6957
}
7058

71-
/** Holds if NFE is caught */
59+
/** Holds if `java.lang.NumberFormatException` is caught */
7260
predicate catchesNFE(TryStmt t) {
7361
exists(CatchClause cc, LocalVariableDeclExpr v |
7462
t.getACatchClause() = cc and
@@ -77,7 +65,7 @@ predicate catchesNFE(TryStmt t) {
7765
)
7866
}
7967

80-
/** Holds if NFE is thrown */
68+
/** Holds if `java.lang.NumberFormatException` is thrown */
8169
predicate throwsNFE(Expr e) {
8270
e.(SpecialClassInstanceExpr).throwsNFE() or e.(SpecialMethodAccess).throwsNFE()
8371
}

0 commit comments

Comments
 (0)