junichi11 commented on code in PR #4955:
URL: https://github.com/apache/netbeans/pull/4955#discussion_r1019696323
##########
php/php.editor/src/org/netbeans/modules/php/editor/model/nodes/ClassDeclarationInfo.java:
##########
@@ -93,14 +94,24 @@ public Set<QualifiedName> getInterfaceNames() {
}
public PhpModifiers getAccessModifiers() {
- Modifier modifier = getOriginalNode().getModifier();
-
- if (modifier.equals(Modifier.ABSTRACT)) {
- return PhpModifiers.fromBitMask(PhpModifiers.PUBLIC,
PhpModifiers.ABSTRACT);
- } else if (modifier.equals(Modifier.FINAL)) {
- return PhpModifiers.fromBitMask(PhpModifiers.PUBLIC,
PhpModifiers.FINAL);
+ List<Integer> phpModifiers = new
ArrayList<>(getOriginalNode().getModifiers().keySet().size());
+ phpModifiers.add(PhpModifiers.PUBLIC);
+ for (Modifier modifier : getOriginalNode().getModifiers().keySet()) {
+ switch (modifier) {
+ case ABSTRACT:
+ phpModifiers.add(PhpModifiers.ABSTRACT);
+ break;
+ case FINAL:
+ phpModifiers.add(PhpModifiers.FINAL);
+ break;
+ case READONLY:
+ phpModifiers.add(PhpModifiers.READONLY);
+ break;
+ default:
+ break;
Review Comment:
Will add the following. Thanks!
```java
case NONE:
// no-op
break;
default:
assert false : "Handle " + modifier + " modifier";
break;
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists