File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
src/main/java/org/jd/core/v1/service/converter/classfiletojavasyntax/util Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 11/*
2- * Copyright (c) 2008- 2019 Emmanuel Dupuy.
2+ * Copyright (c) 2008, 2019 Emmanuel Dupuy.
33 * This project is distributed under the GPLv3 license.
44 * This is a Copyleft license that gives the user the right to use,
55 * copy and modify the code freely for non-commercial purposes.
@@ -182,9 +182,11 @@ protected void initLocalVariablesFromAttributes(Method method) {
182182 AttributeLocalVariableTable localVariableTable = code .getAttribute ("LocalVariableTable" );
183183
184184 if (localVariableTable != null ) {
185+ boolean staticFlag = (method .getAccessFlags () & FLAG_STATIC ) != 0 ;
186+
185187 for (org .jd .core .v1 .model .classfile .attribute .LocalVariable localVariable : localVariableTable .getLocalVariableTable ()) {
186188 int index = localVariable .getIndex ();
187- int startPc = (index ==0 ) ? 0 : localVariable .getStartPc ();
189+ int startPc = (! staticFlag && index ==0 ) ? 0 : localVariable .getStartPc ();
188190 String descriptor = localVariable .getDescriptor ();
189191 String name = localVariable .getName ();
190192 AbstractLocalVariable lv ;
You can’t perform that action at this time.
0 commit comments