From 5e3eace003cacee8d6814419097e74844fae521c Mon Sep 17 00:00:00 2001 From: Roman Shevchenko Date: Thu, 7 Dec 2017 11:34:24 +0100 Subject: [PATCH] [java decompiler] disabled "synthetic not set" option by default The option may cause valid constructor parameters to be mislabeled "synthetic" and removed from resulting code. --- README.md | 2 +- .../java/decompiler/main/extern/IFernflowerPreferences.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index abc4871..fb41717 100644 --- a/README.md +++ b/README.md @@ -52,7 +52,7 @@ The rest of options can be left as they are: they are aimed at professional reve - lit (0): output numeric literals "as-is" - asc (0): encode non-ASCII characters in string and character literals as Unicode escapes - bto (1): interpret int 1 as boolean true (workaround to a compiler bug) -- nns (1): allow for not set synthetic attribute (workaround to a compiler bug) +- nns (0): allow for not set synthetic attribute (workaround to a compiler bug) - uto (1): consider nameless types as java.lang.Object (workaround to a compiler architecture flaw) - udv (1): reconstruct variable names from debug information, if present - rer (1): remove empty exception ranges diff --git a/src/org/jetbrains/java/decompiler/main/extern/IFernflowerPreferences.java b/src/org/jetbrains/java/decompiler/main/extern/IFernflowerPreferences.java index c8d927a..cda288b 100644 --- a/src/org/jetbrains/java/decompiler/main/extern/IFernflowerPreferences.java +++ b/src/org/jetbrains/java/decompiler/main/extern/IFernflowerPreferences.java @@ -64,7 +64,7 @@ public interface IFernflowerPreferences { defaults.put(LITERALS_AS_IS, "0"); defaults.put(BOOLEAN_TRUE_ONE, "1"); defaults.put(ASCII_STRING_CHARACTERS, "0"); - defaults.put(SYNTHETIC_NOT_SET, "1"); + defaults.put(SYNTHETIC_NOT_SET, "0"); defaults.put(UNDEFINED_PARAM_TYPE_OBJECT, "1"); defaults.put(USE_DEBUG_VAR_NAMES, "1"); defaults.put(REMOVE_EMPTY_RANGES, "1");