cleanup (final)

GitOrigin-RevId: 93607e195763f2acf29ee0d7a280d7e07e8d2f14
master
Vladimir Krivosheev 5 years ago committed by intellij-monorepo-bot
parent 5f94a0d0d5
commit 1d63f7d447
  1. 4
      src/org/jetbrains/java/decompiler/code/cfg/ControlFlowGraph.java
  2. 6
      src/org/jetbrains/java/decompiler/modules/decompiler/FinallyProcessor.java
  3. 6
      src/org/jetbrains/java/decompiler/modules/decompiler/deobfuscator/ExceptionDeobfuscator.java
  4. 4
      src/org/jetbrains/java/decompiler/modules/decompiler/sforms/FlattenStatementsHelper.java
  5. 4
      src/org/jetbrains/java/decompiler/modules/decompiler/stats/CatchAllStatement.java
  6. 4
      src/org/jetbrains/java/decompiler/modules/decompiler/stats/CatchStatement.java
  7. 4
      src/org/jetbrains/java/decompiler/modules/decompiler/stats/DoStatement.java
  8. 4
      src/org/jetbrains/java/decompiler/modules/decompiler/stats/IfStatement.java
  9. 4
      src/org/jetbrains/java/decompiler/modules/decompiler/stats/SwitchStatement.java
  10. 4
      src/org/jetbrains/java/decompiler/struct/attr/StructInnerClassesAttribute.java
  11. 4
      src/org/jetbrains/java/decompiler/struct/attr/StructLocalVariableTableAttribute.java
  12. 4
      src/org/jetbrains/java/decompiler/struct/gen/FieldDescriptor.java
  13. 4
      src/org/jetbrains/java/decompiler/struct/gen/MethodDescriptor.java
  14. 6
      src/org/jetbrains/java/decompiler/util/FastFixedSetFactory.java
  15. 6
      src/org/jetbrains/java/decompiler/util/FastSparseSetFactory.java

@ -1,4 +1,4 @@
// Copyright 2000-2017 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package org.jetbrains.java.decompiler.code.cfg;
import org.jetbrains.java.decompiler.code.*;
@ -432,7 +432,7 @@ public class ControlFlowGraph implements CodeConstants {
}
}
private static class JsrRecord {
private static final class JsrRecord {
private final BasicBlock jsr;
private final Set<BasicBlock> range;
private final BasicBlock ret;

@ -1,4 +1,4 @@
// Copyright 2000-2017 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package org.jetbrains.java.decompiler.modules.decompiler;
import org.jetbrains.java.decompiler.code.CodeConstants;
@ -110,7 +110,7 @@ public class FinallyProcessor {
return false;
}
private static class Record {
private static final class Record {
private final int firstCode;
private final Map<BasicBlock, Boolean> mapLast;
@ -527,7 +527,7 @@ public class FinallyProcessor {
return true;
}
private static class Area {
private static final class Area {
private final BasicBlock start;
private final Set<BasicBlock> sample;
private final BasicBlock next;

@ -1,4 +1,4 @@
// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package org.jetbrains.java.decompiler.modules.decompiler.deobfuscator;
import org.jetbrains.java.decompiler.code.CodeConstants;
@ -20,7 +20,7 @@ import java.util.Map.Entry;
public class ExceptionDeobfuscator {
private static class Range {
private static final class Range {
private final BasicBlock handler;
private final String uniqueStr;
private final Set<BasicBlock> protectedRange;
@ -407,7 +407,7 @@ public class ExceptionDeobfuscator {
for (ExceptionRangeCFG range : ranges) {
// add some dummy instructions to prevent optimizing away the empty block
// add some dummy instructions to prevent optimizing away the empty block
SimpleInstructionSequence seq = new SimpleInstructionSequence();
seq.addInstruction(Instruction.create(CodeConstants.opc_bipush, false, CodeConstants.GROUP_GENERAL, bytecode_version, new int[]{0}), -1);
seq.addInstruction(Instruction.create(CodeConstants.opc_pop, false, CodeConstants.GROUP_GENERAL, bytecode_version, null), -1);

@ -1,4 +1,4 @@
// Copyright 2000-2017 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package org.jetbrains.java.decompiler.modules.decompiler.sforms;
import org.jetbrains.java.decompiler.modules.decompiler.StatEdge;
@ -472,7 +472,7 @@ public class FlattenStatementsHelper {
return mapDestinationNodes;
}
public static class FinallyPathWrapper {
public static final class FinallyPathWrapper {
public final String source;
public final String destination;
public final String entry;

@ -1,4 +1,4 @@
// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package org.jetbrains.java.decompiler.modules.decompiler.stats;
import org.jetbrains.java.decompiler.code.CodeConstants;
@ -17,7 +17,7 @@ import java.util.Arrays;
import java.util.List;
import java.util.Set;
public class CatchAllStatement extends Statement {
public final class CatchAllStatement extends Statement {
private Statement handler;

@ -1,4 +1,4 @@
// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package org.jetbrains.java.decompiler.modules.decompiler.stats;
import org.jetbrains.java.decompiler.code.CodeConstants;
@ -17,7 +17,7 @@ import java.util.ArrayList;
import java.util.List;
import java.util.Set;
public class CatchStatement extends Statement {
public final class CatchStatement extends Statement {
private final List<List<String>> exctstrings = new ArrayList<>();
private final List<VarExprent> vars = new ArrayList<>();

@ -1,4 +1,4 @@
// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package org.jetbrains.java.decompiler.modules.decompiler.stats;
import org.jetbrains.java.decompiler.main.collectors.BytecodeMappingTracer;
@ -11,7 +11,7 @@ import java.util.ArrayList;
import java.util.List;
public class DoStatement extends Statement {
public final class DoStatement extends Statement {
public static final int LOOP_DO = 0;
public static final int LOOP_DOWHILE = 1;

@ -1,4 +1,4 @@
// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package org.jetbrains.java.decompiler.modules.decompiler.stats;
import org.jetbrains.java.decompiler.main.collectors.BytecodeMappingTracer;
@ -17,7 +17,7 @@ import java.util.ArrayList;
import java.util.List;
public class IfStatement extends Statement {
public final class IfStatement extends Statement {
public static final int IFTYPE_IF = 0;
public static final int IFTYPE_IFELSE = 1;

@ -1,4 +1,4 @@
// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package org.jetbrains.java.decompiler.modules.decompiler.stats;
import org.jetbrains.java.decompiler.code.SwitchInstruction;
@ -19,7 +19,7 @@ import org.jetbrains.java.decompiler.util.TextBuffer;
import java.util.*;
public class SwitchStatement extends Statement {
public final class SwitchStatement extends Statement {
// *****************************************************************************
// private fields

@ -1,4 +1,4 @@
// Copyright 2000-2017 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package org.jetbrains.java.decompiler.struct.attr;
import org.jetbrains.java.decompiler.struct.consts.ConstantPool;
@ -10,7 +10,7 @@ import java.util.Collections;
import java.util.List;
public class StructInnerClassesAttribute extends StructGeneralAttribute {
public static class Entry {
public static final class Entry {
public final int outerNameIdx;
public final int simpleNameIdx;
public final int accessFlags;

@ -1,4 +1,4 @@
// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package org.jetbrains.java.decompiler.struct.attr;
import org.jetbrains.java.decompiler.struct.consts.ConstantPool;
@ -71,7 +71,7 @@ public class StructLocalVariableTableAttribute extends StructGeneralAttribute {
return localVariables.stream().filter(v -> v.start_pc == 0).collect(Collectors.toMap(v -> v.index, v -> v.name, (n1, n2) -> n2));
}
private static class LocalVariable {
private static final class LocalVariable {
final int start_pc;
final int length;
final String name;

@ -1,9 +1,9 @@
// Copyright 2000-2017 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package org.jetbrains.java.decompiler.struct.gen;
import org.jetbrains.java.decompiler.code.CodeConstants;
public class FieldDescriptor {
public final class FieldDescriptor {
public static final FieldDescriptor INTEGER_DESCRIPTOR = parseDescriptor("Ljava/lang/Integer;");
public static final FieldDescriptor LONG_DESCRIPTOR = parseDescriptor("Ljava/lang/Long;");

@ -1,4 +1,4 @@
// Copyright 2000-2017 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package org.jetbrains.java.decompiler.struct.gen;
import org.jetbrains.java.decompiler.code.CodeConstants;
@ -7,7 +7,7 @@ import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
public class MethodDescriptor {
public final class MethodDescriptor {
public final VarType[] params;
public final VarType ret;

@ -1,4 +1,4 @@
// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package org.jetbrains.java.decompiler.util;
import java.util.Collection;
@ -46,7 +46,7 @@ public class FastFixedSetFactory<E> {
return colValuesInternal;
}
public static class FastFixedSet<E> implements Iterable<E> {
public static final class FastFixedSet<E> implements Iterable<E> {
private final FastFixedSetFactory<E> factory;
@ -242,7 +242,7 @@ public class FastFixedSetFactory<E> {
}
}
public static class FastFixedSetIterator<E> implements Iterator<E> {
public static final class FastFixedSetIterator<E> implements Iterator<E> {
private final VBStyleCollection<int[], E> colValuesInternal;
private final int[] data;

@ -1,4 +1,4 @@
// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package org.jetbrains.java.decompiler.util;
import java.util.Collection;
@ -69,7 +69,7 @@ public class FastSparseSetFactory<E> {
}
public static class FastSparseSet<E> implements Iterable<E> {
public static final class FastSparseSet<E> implements Iterable<E> {
public static final FastSparseSet[] EMPTY_ARRAY = new FastSparseSet[0];
private final FastSparseSetFactory<E> factory;
@ -360,7 +360,7 @@ public class FastSparseSetFactory<E> {
}
}
public static class FastSparseSetIterator<E> implements Iterator<E> {
public static final class FastSparseSetIterator<E> implements Iterator<E> {
private final VBStyleCollection<int[], E> colValuesInternal;
private final int[] data;

Loading…
Cancel
Save