From fda661d76d77942d46441d83f3e5351c58f30b39 Mon Sep 17 00:00:00 2001 From: Nicholas Sherlock Date: Fri, 24 Nov 2017 22:29:47 +1300 Subject: [PATCH] FernFlower: Rename classes whose filenames will exceed 255 characters --- .../java/decompiler/modules/renamer/ConverterHelper.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/org/jetbrains/java/decompiler/modules/renamer/ConverterHelper.java b/src/org/jetbrains/java/decompiler/modules/renamer/ConverterHelper.java index 2a984a7..27998cb 100644 --- a/src/org/jetbrains/java/decompiler/modules/renamer/ConverterHelper.java +++ b/src/org/jetbrains/java/decompiler/modules/renamer/ConverterHelper.java @@ -42,7 +42,7 @@ public class ConverterHelper implements IIdentifierRenamer { public boolean toBeRenamed(Type elementType, String className, String element, String descriptor) { String value = elementType == Type.ELEMENT_CLASS ? className : element; return value == null || value.length() == 0 || value.length() <= 2 || KEYWORDS.contains(value) || Character.isDigit(value.charAt(0)) - || elementType == Type.ELEMENT_CLASS && RESERVED_WINDOWS_NAMESPACE.contains(value.toLowerCase()); + || elementType == Type.ELEMENT_CLASS && (RESERVED_WINDOWS_NAMESPACE.contains(value.toLowerCase()) || value.length() > 255 - ".class".length()); } // TODO: consider possible conflicts with not renamed classes, fields and methods!