Declare a protected final method static

The method itself accesses only static members.  The fact that it is
final means no subclass can ever override this method and use dynamic
dispatch to choose the implementation at run time.  So declaring this
method static is (statically) safe.
This commit is contained in:
Ben Liblit 2017-05-11 18:10:20 +02:00 committed by Manu Sridharan
parent 72c754e874
commit aa39fc63d5
1 changed files with 1 additions and 1 deletions

View File

@ -3153,7 +3153,7 @@ public abstract class AstTranslator extends CAstVisitor<AstTranslator.WalkContex
return map;
}
protected final CAstType getTypeForNode(WalkContext context, CAstNode node) {
protected final static CAstType getTypeForNode(WalkContext context, CAstNode node) {
if (context.top().getNodeTypeMap() != null) {
return context.top().getNodeTypeMap().getNodeType(node);
} else {