fix (somehow many?) bugs occurring on (seemingly only) Windows
This commit is contained in:
parent
36515d09d5
commit
34285c27b4
2 changed files with 14 additions and 3 deletions
2
pom.xml
2
pom.xml
|
@ -3,7 +3,7 @@
|
|||
|
||||
<groupId>the.bytecode.club</groupId>
|
||||
<artifactId>Bytecode-Viewer</artifactId>
|
||||
<version>2.10.16</version>
|
||||
<version>2.10.17</version>
|
||||
|
||||
<properties>
|
||||
<!-- Project settings -->
|
||||
|
|
|
@ -1,9 +1,12 @@
|
|||
package the.bytecode.club.bytecodeviewer.gui.components;
|
||||
|
||||
import java.awt.Component;
|
||||
import java.util.List;
|
||||
import javax.swing.JLabel;
|
||||
import javax.swing.JList;
|
||||
import javax.swing.ListCellRenderer;
|
||||
|
||||
import the.bytecode.club.bytecodeviewer.gui.resourceviewer.BytecodeViewPanel;
|
||||
import the.bytecode.club.bytecodeviewer.gui.util.BytecodeViewPanelUpdater;
|
||||
import the.bytecode.club.bytecodeviewer.util.MethodParser;
|
||||
|
||||
|
@ -44,8 +47,16 @@ public class MethodsRenderer extends JLabel implements ListCellRenderer<Object>
|
|||
public Component getListCellRendererComponent(JList<?> list, Object value, int index, boolean isSelected,
|
||||
boolean cellHasFocus)
|
||||
{
|
||||
MethodParser methods = bytecodeViewPanelUpdater.viewer.methods.get(bytecodeViewPanelUpdater.bytecodeViewPanel.decompiler.ordinal());
|
||||
MethodParser.Method method = methods.getMethod((Integer) value);
|
||||
int methodIndex = (Integer) value;
|
||||
MethodParser methods;
|
||||
List<MethodParser> methodParsers = bytecodeViewPanelUpdater.viewer.methods;
|
||||
BytecodeViewPanel bytecodeViewPanel = bytecodeViewPanelUpdater.bytecodeViewPanel;
|
||||
try {
|
||||
methods = methodParsers.get(bytecodeViewPanel.decompiler.ordinal());
|
||||
} catch (ArrayIndexOutOfBoundsException e) {
|
||||
methods = methodParsers.get(bytecodeViewPanel.panelIndex);
|
||||
}
|
||||
MethodParser.Method method = methods.getMethod(methodIndex);
|
||||
setText(method.toString());
|
||||
return this;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue