Details
-
Enhancement
-
Resolution: Fixed
-
P4
-
17
-
b22
-
generic
-
generic
Description
The code, which is listed below, has two repetitive checks and needs to be cleaned up.
location: com.sun.tools.javac.util.UnsharedNameTable#fromUtf
```
while (element != null) {
if (element == null) {
break;
}
```
we can see the `while (element != null)` have already checked the `element`. So the `if (element == null)` is redundant and unnecessary.
location: com.sun.tools.javac.util.UnsharedNameTable#fromUtf
```
while (element != null) {
if (element == null) {
break;
}
```
we can see the `while (element != null)` have already checked the `element`. So the `if (element == null)` is redundant and unnecessary.