Skip to content

Commit

Permalink
ignore "one letter" classes
Browse files Browse the repository at this point in the history
  • Loading branch information
GraxCode committed Jul 21, 2019
1 parent 987cc94 commit 061a743
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/me/nov/cafebabe/utils/asm/LibClassWriter.java
Expand Up @@ -37,6 +37,9 @@ protected String getCommonSuperClass(String type1, String type2) {
if (knownCommons.containsKey(type1 + ":" + type2)) {
return knownCommons.get(type1 + ":" + type2);
}
if (type1.length() <= 1 || type2.length() <= 1) {
return "java/lang/Object";
}
if (type1.equals("java/lang/Object") || type2.equals("java/lang/Object")) {
return "java/lang/Object";
}
Expand Down Expand Up @@ -70,8 +73,9 @@ protected String getCommonSuperClass(String type1, String type2) {
Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
dummy.setLocation(screenSize.width / 2, screenSize.height / 2);
dummy.setAlwaysOnTop(true);
String superclass = JOptionPane.showInputDialog(dummy, Translations.get("What is the common super class of") + " "
+ type1 + " " + Translations.get("and") + " " + type2, "java/lang/Object");
String superclass = JOptionPane.showInputDialog(dummy,
Translations.get("Please enter a common super class of those classes:") + " " + type1 + " " + type2,
"java/lang/Object");
dummy.dispose();
if (superclass == null || superclass.isEmpty()) {
return "java/lang/Object";
Expand Down

0 comments on commit 061a743

Please sign in to comment.