Skip to content

Commit 3677d98

Browse files
committed
make some methods final where possible
1 parent 4d7900e commit 3677d98

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/nodes/statement/AbstractImportNode.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -110,17 +110,17 @@ protected PythonContext getContext() {
110110
return contextRef.get();
111111
}
112112

113-
protected Object importModule(VirtualFrame frame, String name) {
113+
protected final Object importModule(VirtualFrame frame, String name) {
114114
return importModule(frame, name, PNone.NONE, PythonUtils.EMPTY_STRING_ARRAY, 0);
115115
}
116116

117117

118-
public static Object importModule(String name) {
118+
public static final Object importModule(String name) {
119119
return importModule(name, PythonUtils.EMPTY_STRING_ARRAY);
120120
}
121121

122122
@TruffleBoundary
123-
public static Object importModule(String name, String[] fromList) {
123+
public static final Object importModule(String name, String[] fromList) {
124124
Object builtinImport = PyFrameGetBuiltins.getUncached().execute().getAttribute(__IMPORT__);
125125
if (builtinImport == PNone.NO_VALUE) {
126126
throw PConstructAndRaiseNode.getUncached().raiseImportError(null, IMPORT_NOT_FOUND);
@@ -129,7 +129,7 @@ public static Object importModule(String name, String[] fromList) {
129129
return CallNode.getUncached().execute(builtinImport, name, PNone.NONE, PNone.NONE, PythonObjectFactory.getUncached().createTuple(fromList), 0);
130130
}
131131

132-
protected Object importModule(VirtualFrame frame, String name, Object globals, String[] fromList, int level) {
132+
protected final Object importModule(VirtualFrame frame, String name, Object globals, String[] fromList, int level) {
133133
// Look up built-in modules supported by GraalPython
134134
PythonContext context = getContext();
135135
Python3Core core = getContext().getCore();

0 commit comments

Comments
 (0)