From d568eb635fff6197ffdb462bfb690c32786c1c50 Mon Sep 17 00:00:00 2001 From: luchua-bc Date: Fri, 6 Nov 2020 15:33:26 +0000 Subject: [PATCH] Update qldoc --- .../semmle/code/java/NumberFormatException.qll | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/java/ql/src/semmle/code/java/NumberFormatException.qll b/java/ql/src/semmle/code/java/NumberFormatException.qll index 1d3fbce63dd..8d51862023d 100644 --- a/java/ql/src/semmle/code/java/NumberFormatException.qll +++ b/java/ql/src/semmle/code/java/NumberFormatException.qll @@ -1,15 +1,3 @@ -/** - * @name Missing catch of NumberFormatException - * @description Calling a string to number conversion method without handling - * 'NumberFormatException' may cause unexpected runtime exceptions. - * @kind problem - * @problem.severity recommendation - * @precision high - * @id java/uncaught-number-format-exception - * @tags reliability - * external/cwe/cwe-248 - */ - import java /** Calls a string to number conversion */ @@ -68,7 +56,7 @@ class NumberFormatException extends RefType { NumberFormatException() { this.hasQualifiedName("java.lang", "NumberFormatException") } } -/** Holds if NFE is caught */ +/** Holds if `java.lang.NumberFormatException` is caught */ predicate catchesNFE(TryStmt t) { exists(CatchClause cc, LocalVariableDeclExpr v | t.getACatchClause() = cc and @@ -77,7 +65,7 @@ predicate catchesNFE(TryStmt t) { ) } -/** Holds if NFE is thrown */ +/** Holds if `java.lang.NumberFormatException` is thrown */ predicate throwsNFE(Expr e) { e.(SpecialClassInstanceExpr).throwsNFE() or e.(SpecialMethodAccess).throwsNFE() }