From ba0e24955d971ba0a50185a00958f66fd267db0a Mon Sep 17 00:00:00 2001 From: Egor Ushakov Date: Thu, 17 May 2018 19:12:39 +0300 Subject: [PATCH] inverted option for IDEA-CR-32210 --- .../java/decompiler/main/extern/IFernflowerPreferences.java | 4 ++-- .../java/decompiler/modules/decompiler/exps/ExprUtil.java | 2 +- test/org/jetbrains/java/decompiler/SingleClassesTest.java | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/org/jetbrains/java/decompiler/main/extern/IFernflowerPreferences.java b/src/org/jetbrains/java/decompiler/main/extern/IFernflowerPreferences.java index 5af0b37..7f2df24 100644 --- a/src/org/jetbrains/java/decompiler/main/extern/IFernflowerPreferences.java +++ b/src/org/jetbrains/java/decompiler/main/extern/IFernflowerPreferences.java @@ -31,7 +31,7 @@ public interface IFernflowerPreferences { String IDEA_NOT_NULL_ANNOTATION = "inn"; String LAMBDA_TO_ANONYMOUS_CLASS = "lac"; String BYTECODE_SOURCE_MAPPING = "bsm"; - String FAIL_ON_INVALID_BYTECODE = "fib"; + String IGNOIRE_INVALID_BYTECODE = "iib"; String LOG_LEVEL = "log"; String MAX_PROCESSING_METHOD = "mpm"; @@ -75,7 +75,7 @@ public interface IFernflowerPreferences { defaults.put(IDEA_NOT_NULL_ANNOTATION, "1"); defaults.put(LAMBDA_TO_ANONYMOUS_CLASS, "0"); defaults.put(BYTECODE_SOURCE_MAPPING, "0"); - defaults.put(FAIL_ON_INVALID_BYTECODE, "1"); + defaults.put(IGNOIRE_INVALID_BYTECODE, "0"); defaults.put(LOG_LEVEL, IFernflowerLogger.Severity.INFO.name()); defaults.put(MAX_PROCESSING_METHOD, "0"); diff --git a/src/org/jetbrains/java/decompiler/modules/decompiler/exps/ExprUtil.java b/src/org/jetbrains/java/decompiler/modules/decompiler/exps/ExprUtil.java index e3236c9..c2b16dd 100644 --- a/src/org/jetbrains/java/decompiler/modules/decompiler/exps/ExprUtil.java +++ b/src/org/jetbrains/java/decompiler/modules/decompiler/exps/ExprUtil.java @@ -26,7 +26,7 @@ public class ExprUtil { if (wrapper != null) { // own class MethodWrapper methodWrapper = wrapper.getMethodWrapper(CodeConstants.INIT_NAME, descriptor); - if (methodWrapper == null && !DecompilerContext.getOption(IFernflowerPreferences.FAIL_ON_INVALID_BYTECODE)) { + if (methodWrapper == null && DecompilerContext.getOption(IFernflowerPreferences.IGNOIRE_INVALID_BYTECODE)) { return null; } mask = methodWrapper.synthParameters; diff --git a/test/org/jetbrains/java/decompiler/SingleClassesTest.java b/test/org/jetbrains/java/decompiler/SingleClassesTest.java index 148945e..f2ab92b 100644 --- a/test/org/jetbrains/java/decompiler/SingleClassesTest.java +++ b/test/org/jetbrains/java/decompiler/SingleClassesTest.java @@ -24,7 +24,7 @@ public class SingleClassesTest { fixture = new DecompilerTestFixture(); fixture.setUp(IFernflowerPreferences.BYTECODE_SOURCE_MAPPING, "1", IFernflowerPreferences.DUMP_ORIGINAL_LINES, "1", - IFernflowerPreferences.FAIL_ON_INVALID_BYTECODE, "0"); + IFernflowerPreferences.IGNOIRE_INVALID_BYTECODE, "1"); } @After