cleanup: make fields final

master
Alexey Kudravtsev 6 years ago
parent eda6ab8d84
commit 1cdee1fbf4
  1. 6
      src/org/jetbrains/java/decompiler/modules/decompiler/FinallyProcessor.java
  2. 2
      src/org/jetbrains/java/decompiler/modules/decompiler/deobfuscator/IrreducibleCFGDeobfuscator.java
  3. 6
      src/org/jetbrains/java/decompiler/modules/decompiler/sforms/FlattenStatementsHelper.java

@ -547,11 +547,11 @@ public class FinallyProcessor {
Map<BasicBlock, Boolean> mapLast, Map<BasicBlock, Boolean> mapLast,
boolean skippedFirst) { boolean skippedFirst) {
class BlockStackEntry { class BlockStackEntry {
public BasicBlock blockCatch; public final BasicBlock blockCatch;
public BasicBlock blockSample; public final BasicBlock blockSample;
// TODO: correct handling (merging) of multiple paths // TODO: correct handling (merging) of multiple paths
public List<int[]> lstStoreVars; public final List<int[]> lstStoreVars;
BlockStackEntry(BasicBlock blockCatch, BasicBlock blockSample, List<int[]> lstStoreVars) { BlockStackEntry(BasicBlock blockCatch, BasicBlock blockSample, List<int[]> lstStoreVars) {
this.blockCatch = blockCatch; this.blockCatch = blockCatch;

@ -16,7 +16,7 @@ public class IrreducibleCFGDeobfuscator {
public static boolean isStatementIrreducible(Statement statement) { public static boolean isStatementIrreducible(Statement statement) {
class Node { class Node {
public Integer id; public final Integer id;
public final Set<Node> preds = new HashSet<>(); public final Set<Node> preds = new HashSet<>();
public final Set<Node> succs = new HashSet<>(); public final Set<Node> succs = new HashSet<>();

@ -56,9 +56,9 @@ public class FlattenStatementsHelper {
private void flattenStatement() { private void flattenStatement() {
class StatementStackEntry { class StatementStackEntry {
public Statement statement; public final Statement statement;
public LinkedList<StackEntry> stackFinally; public final LinkedList<StackEntry> stackFinally;
public List<Exprent> tailExprents; public final List<Exprent> tailExprents;
public int statementIndex; public int statementIndex;
public int edgeIndex; public int edgeIndex;

Loading…
Cancel
Save