Skip to content

Commit 4f3cd17

Browse files
committed
Removed comment
The NPE is not specific to this method and should be (and was) detected by unit test.
1 parent 8ea5773 commit 4f3cd17

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

src/main/java/org/apache/ibatis/parsing/XNode.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,8 +215,6 @@ public Boolean getBooleanAttribute(String name) {
215215

216216
public Boolean getBooleanAttribute(String name, Boolean def) {
217217
String value = attributes.getProperty(name);
218-
// Note that ternary operator will throw NPE in some scenarios, just be careful.
219-
// see this explanation[https://stackoverflow.com/questions/5246776/java-weird-nullpointerexception-in-ternary-operator/5246820#5246820]
220218
return value == null ? def : Boolean.valueOf(value);
221219
}
222220

0 commit comments

Comments
 (0)