Skip to content

Commit 061a743

Browse files
author
GraxCode
committed
ignore "one letter" classes
1 parent 987cc94 commit 061a743

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/me/nov/cafebabe/utils/asm/LibClassWriter.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ protected String getCommonSuperClass(String type1, String type2) {
3737
if (knownCommons.containsKey(type1 + ":" + type2)) {
3838
return knownCommons.get(type1 + ":" + type2);
3939
}
40+
if (type1.length() <= 1 || type2.length() <= 1) {
41+
return "java/lang/Object";
42+
}
4043
if (type1.equals("java/lang/Object") || type2.equals("java/lang/Object")) {
4144
return "java/lang/Object";
4245
}
@@ -70,8 +73,9 @@ protected String getCommonSuperClass(String type1, String type2) {
7073
Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
7174
dummy.setLocation(screenSize.width / 2, screenSize.height / 2);
7275
dummy.setAlwaysOnTop(true);
73-
String superclass = JOptionPane.showInputDialog(dummy, Translations.get("What is the common super class of") + " "
74-
+ type1 + " " + Translations.get("and") + " " + type2, "java/lang/Object");
76+
String superclass = JOptionPane.showInputDialog(dummy,
77+
Translations.get("Please enter a common super class of those classes:") + " " + type1 + " " + type2,
78+
"java/lang/Object");
7579
dummy.dispose();
7680
if (superclass == null || superclass.isEmpty()) {
7781
return "java/lang/Object";

0 commit comments

Comments
 (0)