Skip to content

Commit d765c7b

Browse files
committed
Update qldoc
1 parent d568eb6 commit d765c7b

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

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

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1+
/** Provides classes and predicates for reasoning about `java.lang.NumberFormatException`. */
2+
13
import java
24

3-
/** Calls a string to number conversion */
5+
/** A call to a string to number conversion. */
46
private class SpecialMethodAccess extends MethodAccess {
57
predicate isValueOfMethod(string klass) {
68
this.getMethod().getName() = "valueOf" and
@@ -33,7 +35,7 @@ private class SpecialMethodAccess extends MethodAccess {
3335
}
3436
}
3537

36-
/** Constructs a number from its string representation */
38+
/** A `ClassInstanceExpr` that constructs a number from its string representation. */
3739
private class SpecialClassInstanceExpr extends ClassInstanceExpr {
3840
predicate isStringConstructor(string klass) {
3941
this.getType().(RefType).hasQualifiedName("java.lang", klass) and
@@ -51,12 +53,12 @@ private class SpecialClassInstanceExpr extends ClassInstanceExpr {
5153
}
5254
}
5355

54-
/** The class `java.lang.NumberFormatException` */
56+
/** The class `java.lang.NumberFormatException`. */
5557
class NumberFormatException extends RefType {
5658
NumberFormatException() { this.hasQualifiedName("java.lang", "NumberFormatException") }
5759
}
5860

59-
/** Holds if `java.lang.NumberFormatException` is caught */
61+
/** Holds if `java.lang.NumberFormatException` is caught. */
6062
predicate catchesNFE(TryStmt t) {
6163
exists(CatchClause cc, LocalVariableDeclExpr v |
6264
t.getACatchClause() = cc and
@@ -65,7 +67,7 @@ predicate catchesNFE(TryStmt t) {
6567
)
6668
}
6769

68-
/** Holds if `java.lang.NumberFormatException` is thrown */
70+
/** Holds if `java.lang.NumberFormatException` can be thrown. */
6971
predicate throwsNFE(Expr e) {
7072
e.(SpecialClassInstanceExpr).throwsNFE() or e.(SpecialMethodAccess).throwsNFE()
7173
}

0 commit comments

Comments
 (0)