From 1cdee1fbf4a3cce13ee8116370686ce87a52a075 Mon Sep 17 00:00:00 2001 From: Alexey Kudravtsev Date: Wed, 23 Jan 2019 15:39:37 +0300 Subject: [PATCH] cleanup: make fields final --- .../decompiler/modules/decompiler/FinallyProcessor.java | 6 +++--- .../decompiler/deobfuscator/IrreducibleCFGDeobfuscator.java | 2 +- .../modules/decompiler/sforms/FlattenStatementsHelper.java | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/org/jetbrains/java/decompiler/modules/decompiler/FinallyProcessor.java b/src/org/jetbrains/java/decompiler/modules/decompiler/FinallyProcessor.java index 7a431d7..240ee3e 100644 --- a/src/org/jetbrains/java/decompiler/modules/decompiler/FinallyProcessor.java +++ b/src/org/jetbrains/java/decompiler/modules/decompiler/FinallyProcessor.java @@ -547,11 +547,11 @@ public class FinallyProcessor { Map mapLast, boolean skippedFirst) { class BlockStackEntry { - public BasicBlock blockCatch; - public BasicBlock blockSample; + public final BasicBlock blockCatch; + public final BasicBlock blockSample; // TODO: correct handling (merging) of multiple paths - public List lstStoreVars; + public final List lstStoreVars; BlockStackEntry(BasicBlock blockCatch, BasicBlock blockSample, List lstStoreVars) { this.blockCatch = blockCatch; diff --git a/src/org/jetbrains/java/decompiler/modules/decompiler/deobfuscator/IrreducibleCFGDeobfuscator.java b/src/org/jetbrains/java/decompiler/modules/decompiler/deobfuscator/IrreducibleCFGDeobfuscator.java index 4017b3e..7fecbd9 100644 --- a/src/org/jetbrains/java/decompiler/modules/decompiler/deobfuscator/IrreducibleCFGDeobfuscator.java +++ b/src/org/jetbrains/java/decompiler/modules/decompiler/deobfuscator/IrreducibleCFGDeobfuscator.java @@ -16,7 +16,7 @@ public class IrreducibleCFGDeobfuscator { public static boolean isStatementIrreducible(Statement statement) { class Node { - public Integer id; + public final Integer id; public final Set preds = new HashSet<>(); public final Set succs = new HashSet<>(); diff --git a/src/org/jetbrains/java/decompiler/modules/decompiler/sforms/FlattenStatementsHelper.java b/src/org/jetbrains/java/decompiler/modules/decompiler/sforms/FlattenStatementsHelper.java index 2db1e30..b9abd11 100644 --- a/src/org/jetbrains/java/decompiler/modules/decompiler/sforms/FlattenStatementsHelper.java +++ b/src/org/jetbrains/java/decompiler/modules/decompiler/sforms/FlattenStatementsHelper.java @@ -56,9 +56,9 @@ public class FlattenStatementsHelper { private void flattenStatement() { class StatementStackEntry { - public Statement statement; - public LinkedList stackFinally; - public List tailExprents; + public final Statement statement; + public final LinkedList stackFinally; + public final List tailExprents; public int statementIndex; public int edgeIndex;