From 0da9d423a0e62bfa154a38c2882a6726ebb1cc0a Mon Sep 17 00:00:00 2001 From: Honfika Date: Sun, 19 Jan 2014 22:33:23 +0100 Subject: [PATCH] final fields --- .../browsers/cache/ChunkedInputStream.java | 2 +- .../jpexs/browsers/cache/RafInputStream.java | 2 +- .../browsers/cache/chrome/CacheAddr.java | 4 +- .../jpexs/browsers/cache/chrome/Index.java | 4 +- .../cache/chrome/IndexInputStream.java | 2 +- .../cache/firefox/CacheInputStream.java | 2 +- .../browsers/cache/firefox/Location.java | 4 +- .../decompiler/flash/BinarySWFBundle.java | 2 +- .../com/jpexs/decompiler/flash/RetryTask.java | 4 +- trunk/src/com/jpexs/decompiler/flash/SWC.java | 2 - trunk/src/com/jpexs/decompiler/flash/SWF.java | 16 +++---- .../decompiler/flash/SWFInputStream.java | 12 ++--- .../decompiler/flash/SWFOutputStream.java | 4 +- .../com/jpexs/decompiler/flash/SWFSearch.java | 6 +-- .../jpexs/decompiler/flash/SWFSourceInfo.java | 6 +-- .../decompiler/flash/ZippedSWFBundle.java | 4 +- .../com/jpexs/decompiler/flash/abc/ABC.java | 2 +- .../decompiler/flash/abc/ABCInputStream.java | 2 +- .../decompiler/flash/abc/ABCOutputStream.java | 2 +- .../flash/abc/CopyOutputStream.java | 8 ++-- .../decompiler/flash/abc/ScriptPack.java | 2 +- .../flash/abc/avm2/AVM2Deobfuscation.java | 6 +-- .../flash/abc/avm2/graph/AVM2Graph.java | 6 +-- .../flash/abc/avm2/graph/AVM2GraphSource.java | 2 +- .../abc/avm2/model/AlchemyLoadAVM2Item.java | 4 +- .../avm2/model/AlchemySignExtendAVM2Item.java | 2 +- .../abc/avm2/model/AlchemyStoreAVM2Item.java | 4 +- .../abc/avm2/model/DefaultXMLNamespace.java | 2 +- .../abc/avm2/model/LocalRegAVM2Item.java | 2 +- .../flash/abc/avm2/parser/Flasm3Lexer.java | 2 +- .../flash/action/ActionDeobfuscation.java | 4 +- .../flash/action/ActionGraphSource.java | 8 ++-- .../model/DefineRegisterActionItem.java | 4 +- .../action/model/FSCommandActionItem.java | 2 +- .../action/model/LoadMovieActionItem.java | 6 +-- .../action/model/LoadMovieNumActionItem.java | 6 +-- .../action/model/LoadVariablesActionItem.java | 6 +-- .../model/LoadVariablesNumActionItem.java | 6 +-- .../flash/action/model/PrintActionItem.java | 4 +- .../action/model/PrintAsBitmapActionItem.java | 4 +- .../model/PrintAsBitmapNumActionItem.java | 4 +- .../action/model/PrintNumActionItem.java | 4 +- .../flash/action/model/TemporaryRegister.java | 2 +- .../action/model/UnLoadMovieActionItem.java | 2 +- .../model/UnLoadMovieNumActionItem.java | 2 +- .../clauses/IfFrameLoadedActionItem.java | 4 +- .../parser/script/ActionScriptLexer.java | 4 +- .../parser/script/ActionScriptParser.java | 2 +- .../parser/script/ActionSourceGenerator.java | 2 +- .../action/parser/script/LexBufferer.java | 2 +- .../flash/action/swf7/ActionTry.java | 2 +- .../configuration/ConfigurationItem.java | 2 +- .../console/CommandLineArgumentParser.java | 2 +- .../decompiler/flash/flv/FLVOutputStream.java | 2 +- .../decompiler/flash/gui/AppRibbonFrame.java | 2 +- .../decompiler/flash/gui/ErrorLogFrame.java | 8 ++-- .../decompiler/flash/gui/ExportDialog.java | 2 +- .../decompiler/flash/gui/FontEmbedDialog.java | 12 ++--- .../jpexs/decompiler/flash/gui/FontPanel.java | 2 +- .../decompiler/flash/gui/GraphFrame.java | 6 +-- .../flash/gui/LoadFromCacheFrame.java | 6 +-- .../flash/gui/LoadFromMemoryFrame.java | 6 +-- .../decompiler/flash/gui/LoadingDialog.java | 2 +- .../decompiler/flash/gui/LoadingPanel.java | 6 +-- .../com/jpexs/decompiler/flash/gui/Main.java | 2 +- .../flash/gui/MainFrameClassicMenu.java | 2 +- .../flash/gui/MainFrameRibbonMenu.java | 2 +- .../flash/gui/MainFrameStatusPanel.java | 8 ++-- .../jpexs/decompiler/flash/gui/MainPanel.java | 48 +++++++++---------- .../jpexs/decompiler/flash/gui/ModeFrame.java | 6 +-- .../decompiler/flash/gui/RenameDialog.java | 8 ++-- .../flash/gui/SelectLanguageDialog.java | 2 +- .../decompiler/flash/gui/SwfInMemory.java | 2 +- .../decompiler/flash/gui/TagTreeModel.java | 8 ++-- .../flash/gui/abc/ASMSourceEditorPane.java | 2 +- .../flash/gui/abc/ClassesListTreeModel.java | 2 +- .../flash/gui/abc/ConstantsListModel.java | 2 +- .../flash/gui/abc/DecompiledEditorPane.java | 4 +- .../decompiler/flash/gui/abc/DetailPanel.java | 12 ++--- .../flash/gui/abc/IconListRenderer.java | 6 +-- .../flash/gui/abc/MethodCodePanel.java | 6 +-- .../flash/gui/abc/NewTraitDialog.java | 12 ++--- .../decompiler/flash/gui/abc/TraitsList.java | 2 +- .../flash/gui/abc/TraitsListItem.java | 14 +++--- .../flash/gui/abc/TraitsListModel.java | 8 ++-- .../decompiler/flash/gui/abc/UsageFrame.java | 12 ++--- .../flash/gui/abc/UsageListModel.java | 4 +- .../abc/tablemodels/DecimalTableModel.java | 2 +- .../gui/abc/tablemodels/DoubleTableModel.java | 2 +- .../gui/abc/tablemodels/IntTableModel.java | 2 +- .../abc/tablemodels/MultinameTableModel.java | 2 +- .../tablemodels/NamespaceSetTableModel.java | 2 +- .../abc/tablemodels/NamespaceTableModel.java | 2 +- .../gui/abc/tablemodels/StringTableModel.java | 2 +- .../gui/abc/tablemodels/UIntTableModel.java | 2 +- .../flash/gui/abc/treenodes/TreeElement.java | 10 ++-- .../flash/gui/player/FlashPlayerPanel.java | 4 +- .../flash/gui/player/PlayerControls.java | 10 ++-- .../flash/gui/proxy/SWFListModel.java | 4 +- .../flash/gui/treenodes/SWFRoot.java | 2 +- .../flash/helpers/FileTextWriter.java | 2 +- .../flash/helpers/HilightedTextWriter.java | 8 ++-- .../decompiler/flash/helpers/NulWriter.java | 4 +- .../flash/helpers/hilight/Highlighting.java | 2 +- .../flash/tags/DefineButton2Tag.java | 2 +- .../flash/tags/DefineButtonTag.java | 4 +- .../flash/tags/DefineScalingGridTag.java | 4 +- .../flash/tags/DefineSpriteTag.java | 2 +- .../decompiler/flash/tags/DoABCDefineTag.java | 2 +- .../jpexs/decompiler/flash/tags/DoABCTag.java | 2 +- .../decompiler/flash/tags/FrameLabelTag.java | 2 +- .../flash/tags/PlaceObject3Tag.java | 2 +- .../flash/tags/PlaceObject4Tag.java | 2 +- .../com/jpexs/decompiler/flash/tags/Tag.java | 2 +- .../flash/tags/gfx/DefineCompactedFont.java | 2 +- .../flash/treeitems/AS2PackageNodeItem.java | 2 +- .../flash/treeitems/AS3PackageNodeItem.java | 2 +- .../flash/treeitems/FrameNodeItem.java | 8 ++-- .../flash/treeitems/StringItem.java | 2 +- .../flash/types/BUTTONCONDACTION.java | 4 +- .../flash/types/CLIPACTIONRECORD.java | 2 +- .../flash/types/gfx/GFxInputStream.java | 2 +- .../flash/types/gfx/GFxOutputStream.java | 2 +- .../flash/types/shaperecords/SHAPERECORD.java | 2 +- .../decompiler/flash/xfl/XFLConverter.java | 2 +- .../jpexs/decompiler/graph/ExportMode.java | 2 +- .../src/com/jpexs/decompiler/graph/Graph.java | 2 +- .../com/jpexs/decompiler/graph/GraphPath.java | 4 +- .../com/jpexs/decompiler/graph/MarkItem.java | 2 +- .../decompiler/graph/model/CommentItem.java | 2 +- .../graph/model/IntegerValueItem.java | 2 +- trunk/src/com/jpexs/helpers/Cache.java | 6 +-- .../com/jpexs/helpers/FoundInputStream.java | 2 +- trunk/src/com/jpexs/helpers/Helper.java | 2 +- .../com/jpexs/helpers/LimitedInputStream.java | 4 +- .../jpexs/helpers/PosMarkedInputStream.java | 2 +- trunk/src/com/jpexs/helpers/StreamSearch.java | 2 +- .../process/win32/Win32ProcessTools.java | 8 ++-- 138 files changed, 294 insertions(+), 296 deletions(-) diff --git a/trunk/src/com/jpexs/browsers/cache/ChunkedInputStream.java b/trunk/src/com/jpexs/browsers/cache/ChunkedInputStream.java index 608b0ffb5..d43428f98 100644 --- a/trunk/src/com/jpexs/browsers/cache/ChunkedInputStream.java +++ b/trunk/src/com/jpexs/browsers/cache/ChunkedInputStream.java @@ -25,7 +25,7 @@ import java.io.InputStream; */ public class ChunkedInputStream extends InputStream { - private InputStream is; + private final InputStream is; private int chunkPos = 0; private int chunkLen = 0; private boolean end = false; diff --git a/trunk/src/com/jpexs/browsers/cache/RafInputStream.java b/trunk/src/com/jpexs/browsers/cache/RafInputStream.java index 625c52d86..c4076e4f4 100644 --- a/trunk/src/com/jpexs/browsers/cache/RafInputStream.java +++ b/trunk/src/com/jpexs/browsers/cache/RafInputStream.java @@ -28,7 +28,7 @@ import java.util.logging.Logger; */ public class RafInputStream extends InputStream { - private RandomAccessFile raf; + private final RandomAccessFile raf; private long pos = 0; public RafInputStream(RandomAccessFile raf) { diff --git a/trunk/src/com/jpexs/browsers/cache/chrome/CacheAddr.java b/trunk/src/com/jpexs/browsers/cache/chrome/CacheAddr.java index d04a1efa6..0725fd084 100644 --- a/trunk/src/com/jpexs/browsers/cache/chrome/CacheAddr.java +++ b/trunk/src/com/jpexs/browsers/cache/chrome/CacheAddr.java @@ -57,8 +57,8 @@ public class CacheAddr { public int fileName; public long val; public File rootPath; - private Map dataFiles; - private File externalFilesDir; + private final Map dataFiles; + private final File externalFilesDir; public CacheAddr(InputStream is, File rootPath, Map dataFiles, File externalFilesDir) throws IOException { this.dataFiles = dataFiles; diff --git a/trunk/src/com/jpexs/browsers/cache/chrome/Index.java b/trunk/src/com/jpexs/browsers/cache/chrome/Index.java index 833e009ee..03c5f8348 100644 --- a/trunk/src/com/jpexs/browsers/cache/chrome/Index.java +++ b/trunk/src/com/jpexs/browsers/cache/chrome/Index.java @@ -36,8 +36,8 @@ public class Index { CacheAddr table[]; public static final int kIndexTablesize = 0x10000; public File rootDir; - private Map dataFiles; - private File externalFilesDir; + private final Map dataFiles; + private final File externalFilesDir; public void free() { for (RandomAccessFile r : dataFiles.values()) { diff --git a/trunk/src/com/jpexs/browsers/cache/chrome/IndexInputStream.java b/trunk/src/com/jpexs/browsers/cache/chrome/IndexInputStream.java index ddcd008b6..7fcab1b11 100644 --- a/trunk/src/com/jpexs/browsers/cache/chrome/IndexInputStream.java +++ b/trunk/src/com/jpexs/browsers/cache/chrome/IndexInputStream.java @@ -25,7 +25,7 @@ import java.io.InputStream; */ public class IndexInputStream extends InputStream { - private InputStream is; + private final InputStream is; public long pos = 0; public long getPos() { diff --git a/trunk/src/com/jpexs/browsers/cache/firefox/CacheInputStream.java b/trunk/src/com/jpexs/browsers/cache/firefox/CacheInputStream.java index 3a8906e2d..0393ed733 100644 --- a/trunk/src/com/jpexs/browsers/cache/firefox/CacheInputStream.java +++ b/trunk/src/com/jpexs/browsers/cache/firefox/CacheInputStream.java @@ -25,7 +25,7 @@ import java.io.InputStream; */ public class CacheInputStream extends InputStream { - private InputStream is; + private final InputStream is; @Override public int available() throws IOException { diff --git a/trunk/src/com/jpexs/browsers/cache/firefox/Location.java b/trunk/src/com/jpexs/browsers/cache/firefox/Location.java index 132ee34a2..445bca459 100644 --- a/trunk/src/com/jpexs/browsers/cache/firefox/Location.java +++ b/trunk/src/com/jpexs/browsers/cache/firefox/Location.java @@ -37,7 +37,7 @@ public class Location { public int fileSize; public boolean isMetadata; public long hash; - private File rootDir; + private final File rootDir; public static final long eReservedMask = 0x4C000000L; public static final long eLocationSelectorMask = 0x30000000L; public static final int eLocationSelectorOffset = 28; @@ -64,7 +64,7 @@ public class Location { #define BLOCK_SIZE_FOR_INDEX(idx) ((idx) ? (256 << SIZE_SHIFT(idx)) : 0) #define BITMAP_SIZE_FOR_INDEX(idx) ((idx) ? (131072 >> SIZE_SHIFT(idx)) : 0) */ - private Map dataFiles; + private final Map dataFiles; public InputStream getInputStream() throws IOException { String fileName = getFileName(); diff --git a/trunk/src/com/jpexs/decompiler/flash/BinarySWFBundle.java b/trunk/src/com/jpexs/decompiler/flash/BinarySWFBundle.java index 71592e209..4f671e268 100644 --- a/trunk/src/com/jpexs/decompiler/flash/BinarySWFBundle.java +++ b/trunk/src/com/jpexs/decompiler/flash/BinarySWFBundle.java @@ -30,7 +30,7 @@ import java.util.Set; * @author JPEXS */ public class BinarySWFBundle implements SWFBundle { - private SWFSearch search; + private final SWFSearch search; public BinarySWFBundle(InputStream is){ search=new SWFSearch(new StreamSearch(is)); } diff --git a/trunk/src/com/jpexs/decompiler/flash/RetryTask.java b/trunk/src/com/jpexs/decompiler/flash/RetryTask.java index efda150c8..b726ca45d 100644 --- a/trunk/src/com/jpexs/decompiler/flash/RetryTask.java +++ b/trunk/src/com/jpexs/decompiler/flash/RetryTask.java @@ -24,8 +24,8 @@ import java.io.IOException; */ public class RetryTask { - private RunnableIOEx r; - private AbortRetryIgnoreHandler handler; + private final RunnableIOEx r; + private final AbortRetryIgnoreHandler handler; public Object result; public RetryTask(RunnableIOEx r, AbortRetryIgnoreHandler handler) { diff --git a/trunk/src/com/jpexs/decompiler/flash/SWC.java b/trunk/src/com/jpexs/decompiler/flash/SWC.java index 004b9b272..5a132edd8 100644 --- a/trunk/src/com/jpexs/decompiler/flash/SWC.java +++ b/trunk/src/com/jpexs/decompiler/flash/SWC.java @@ -18,8 +18,6 @@ package com.jpexs.decompiler.flash; import java.io.IOException; import java.io.InputStream; -import java.util.Map; -import java.util.Set; import java.util.logging.Level; import java.util.logging.Logger; import java.util.zip.ZipEntry; diff --git a/trunk/src/com/jpexs/decompiler/flash/SWF.java b/trunk/src/com/jpexs/decompiler/flash/SWF.java index c4bfd0dd9..4ae4195cc 100644 --- a/trunk/src/com/jpexs/decompiler/flash/SWF.java +++ b/trunk/src/com/jpexs/decompiler/flash/SWF.java @@ -973,7 +973,7 @@ public final class SWF implements TreeItem { } return ret; } - private HashSet listeners = new HashSet<>(); + private final HashSet listeners = new HashSet<>(); public final void addEventListener(EventListener listener) { listeners.add(listener); @@ -1547,12 +1547,12 @@ public final class SWF implements TreeItem { public void exportBinaryData(AbortRetryIgnoreHandler handler, String outdir) throws IOException { exportBinaryData(handler, outdir, tags); } - private HashMap deobfuscated = new HashMap<>(); + private final HashMap deobfuscated = new HashMap<>(); private List> allVariableNames = new ArrayList<>(); private List allFunctions = new ArrayList<>(); private HashMap allStrings = new HashMap<>(); - private HashMap usageTypes = new HashMap<>(); - private ActionDeobfuscation deobfuscation = new ActionDeobfuscation(); + private final HashMap usageTypes = new HashMap<>(); + private final ActionDeobfuscation deobfuscation = new ActionDeobfuscation(); private static void getVariables(ConstantPool constantPool, BaseLocalData localData, Stack stack, List output, ActionGraphSource code, int ip, List> variables, List functions, HashMap strings, List visited, HashMap usageTypes, String path) throws InterruptedException { boolean debugMode = false; @@ -2055,10 +2055,10 @@ public final class SWF implements TreeItem { private static class CachedImage implements Serializable { - private int[] data; - private int width; - private int height; - private int type; + private final int[] data; + private final int width; + private final int height; + private final int type; public static final long serialVersionUID = 1L; public CachedImage(BufferedImage img) { diff --git a/trunk/src/com/jpexs/decompiler/flash/SWFInputStream.java b/trunk/src/com/jpexs/decompiler/flash/SWFInputStream.java index 14ad23509..90c1523de 100644 --- a/trunk/src/com/jpexs/decompiler/flash/SWFInputStream.java +++ b/trunk/src/com/jpexs/decompiler/flash/SWFInputStream.java @@ -82,13 +82,13 @@ import java.util.zip.InflaterInputStream; public class SWFInputStream extends InputStream { private InputStream is; - private Stack margedPos = new Stack<>(); + private final Stack margedPos = new Stack<>(); private long pos; private int version; private static final Logger logger = Logger.getLogger(SWFInputStream.class.getName()); - private List listeners = new ArrayList<>(); + private final List listeners = new ArrayList<>(); private long percentMax; - private List buffered = new ArrayList<>(); + private final List buffered = new ArrayList<>(); private ByteArrayOutputStream buffer; private static boolean DEOBFUSCATION_ALL_CODE_IN_PREVIOUS_TAG = Configuration.deobfuscateUsePrevTagOnly.get(); @@ -598,9 +598,9 @@ public class SWFInputStream extends InputStream { private final Tag tag; private final int version; private final int level; - private boolean parallel; - private boolean skipUnusualTags; - private SWF swf; + private final boolean parallel; + private final boolean skipUnusualTags; + private final SWF swf; public TagResolutionTask(SWF swf, Tag tag, int version, int level, boolean parallel, boolean skipUnusualTags) { this.tag = tag; diff --git a/trunk/src/com/jpexs/decompiler/flash/SWFOutputStream.java b/trunk/src/com/jpexs/decompiler/flash/SWFOutputStream.java index a660c6d18..fd2073b05 100644 --- a/trunk/src/com/jpexs/decompiler/flash/SWFOutputStream.java +++ b/trunk/src/com/jpexs/decompiler/flash/SWFOutputStream.java @@ -48,8 +48,8 @@ import java.util.zip.DeflaterOutputStream; */ public class SWFOutputStream extends OutputStream { - private OutputStream os; - private int version; + private final OutputStream os; + private final int version; private long pos = 0; private int bitPos = 0; private int tempByte = 0; diff --git a/trunk/src/com/jpexs/decompiler/flash/SWFSearch.java b/trunk/src/com/jpexs/decompiler/flash/SWFSearch.java index 623172146..39cf26798 100644 --- a/trunk/src/com/jpexs/decompiler/flash/SWFSearch.java +++ b/trunk/src/com/jpexs/decompiler/flash/SWFSearch.java @@ -40,9 +40,9 @@ public class SWFSearch { protected Searchable s; private boolean processed = false; - private Set listeners = new HashSet<>(); - private List swfStreams = new ArrayList<>(); - private Map cachedSWFs = new HashMap(); + private final Set listeners = new HashSet<>(); + private final List swfStreams = new ArrayList<>(); + private final Map cachedSWFs = new HashMap<>(); public SWFSearch(Searchable s) { this.s = s; diff --git a/trunk/src/com/jpexs/decompiler/flash/SWFSourceInfo.java b/trunk/src/com/jpexs/decompiler/flash/SWFSourceInfo.java index a0ca7436a..56b48a3bf 100644 --- a/trunk/src/com/jpexs/decompiler/flash/SWFSourceInfo.java +++ b/trunk/src/com/jpexs/decompiler/flash/SWFSourceInfo.java @@ -24,9 +24,9 @@ import java.io.InputStream; */ public class SWFSourceInfo { - private InputStream inputStream; - private String file; - private String fileTitle; + private final InputStream inputStream; + private final String file; + private final String fileTitle; public SWFSourceInfo(InputStream inputStream, String file, String fileTitle) { this.inputStream = inputStream; diff --git a/trunk/src/com/jpexs/decompiler/flash/ZippedSWFBundle.java b/trunk/src/com/jpexs/decompiler/flash/ZippedSWFBundle.java index ac693b436..2a99dad27 100644 --- a/trunk/src/com/jpexs/decompiler/flash/ZippedSWFBundle.java +++ b/trunk/src/com/jpexs/decompiler/flash/ZippedSWFBundle.java @@ -34,8 +34,8 @@ import java.util.zip.ZipInputStream; * @author JPEXS */ public class ZippedSWFBundle implements SWFBundle { - protected Set keySet=new HashSet(); - private Map cachedSWFs=new HashMap<>(); + protected Set keySet=new HashSet<>(); + private final Map cachedSWFs=new HashMap<>(); protected ReReadableInputStream is; diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/ABC.java b/trunk/src/com/jpexs/decompiler/flash/abc/ABC.java index b30d6601d..d4a362341 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/ABC.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/ABC.java @@ -66,7 +66,7 @@ public class ABC { public static final int MINORwithDECIMAL = 17; protected HashSet listeners = new HashSet<>(); private static final Logger logger = Logger.getLogger(ABC.class.getName()); - private AVM2Deobfuscation deobfuscation; + private final AVM2Deobfuscation deobfuscation; public SWF swf; public int addMethodBody(MethodBody body) { diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/ABCInputStream.java b/trunk/src/com/jpexs/decompiler/flash/abc/ABCInputStream.java index 192a926d0..36d4952c8 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/ABCInputStream.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/ABCInputStream.java @@ -29,7 +29,7 @@ public class ABCInputStream extends InputStream { private static final int CLASS_PROTECTED_NS = 8; private static final int ATTR_METADATA = 4; - private InputStream is; + private final InputStream is; private long bytesRead = 0; private ByteArrayOutputStream bufferOs = null; public static final boolean DEBUG_READ = false; diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/ABCOutputStream.java b/trunk/src/com/jpexs/decompiler/flash/abc/ABCOutputStream.java index 5e60e1d6a..820a21cdf 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/ABCOutputStream.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/ABCOutputStream.java @@ -24,7 +24,7 @@ import java.io.OutputStream; public class ABCOutputStream extends OutputStream { - private OutputStream os; + private final OutputStream os; public ABCOutputStream(OutputStream os) { this.os = os; diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/CopyOutputStream.java b/trunk/src/com/jpexs/decompiler/flash/abc/CopyOutputStream.java index b7f81814e..e45649b48 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/CopyOutputStream.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/CopyOutputStream.java @@ -22,11 +22,11 @@ import java.io.OutputStream; public class CopyOutputStream extends OutputStream { - private OutputStream os; - private InputStream is; + private final OutputStream os; + private final InputStream is; private long pos = 0; - private int TEMPSIZE = 5; - private int[] temp = new int[TEMPSIZE]; + private final int TEMPSIZE = 5; + private final int[] temp = new int[TEMPSIZE]; private int tempPos = 0; public int ignoreFirst = 0; diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/ScriptPack.java b/trunk/src/com/jpexs/decompiler/flash/abc/ScriptPack.java index d8abd9e3b..d323c41c2 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/ScriptPack.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/ScriptPack.java @@ -51,7 +51,7 @@ public class ScriptPack implements TreeElementItem { public ABC abc; public int scriptIndex; public List traitIndices; - private ClassPath path; + private final ClassPath path; @Override public SWF getSwf() { diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/AVM2Deobfuscation.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/AVM2Deobfuscation.java index 8f525148f..9211720fd 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/AVM2Deobfuscation.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/AVM2Deobfuscation.java @@ -30,7 +30,7 @@ import java.util.regex.Pattern; */ public class AVM2Deobfuscation { - private static Random rnd = new Random(); + private static final Random rnd = new Random(); private static final int DEFAULT_FOO_SIZE = 10; public static final String[] reservedWords = { @@ -45,8 +45,8 @@ public class AVM2Deobfuscation { public static final String FOO_CHARACTERS = "bcdfghjklmnpqrstvwz"; public static final String FOO_JOIN_CHARACTERS = "aeiouy"; - private ConstantPool constants; - private Map usageTypesCount = new HashMap<>(); + private final ConstantPool constants; + private final Map usageTypesCount = new HashMap<>(); public AVM2Deobfuscation(ConstantPool constants) { this.constants = constants; diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/graph/AVM2Graph.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/graph/AVM2Graph.java index 4f7fe8782..dd23e4aef 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/graph/AVM2Graph.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/graph/AVM2Graph.java @@ -79,9 +79,9 @@ import java.util.Stack; */ public class AVM2Graph extends Graph { - private AVM2Code avm2code; - private ABC abc; - private MethodBody body; + private final AVM2Code avm2code; + private final ABC abc; + private final MethodBody body; public AVM2Code getCode() { return avm2code; diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/graph/AVM2GraphSource.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/graph/AVM2GraphSource.java index c1e2de79b..260021531 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/graph/AVM2GraphSource.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/graph/AVM2GraphSource.java @@ -37,7 +37,7 @@ import java.util.Stack; */ public class AVM2GraphSource extends GraphSource { - private AVM2Code code; + private final AVM2Code code; boolean isStatic; int classIndex; int scriptIndex; diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/model/AlchemyLoadAVM2Item.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/model/AlchemyLoadAVM2Item.java index ab800a448..a98a3bbdd 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/model/AlchemyLoadAVM2Item.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/model/AlchemyLoadAVM2Item.java @@ -27,8 +27,8 @@ import com.jpexs.decompiler.graph.model.LocalData; */ public class AlchemyLoadAVM2Item extends AVM2Item { - private String name; - private GraphTargetItem ofs; + private final String name; + private final GraphTargetItem ofs; public AlchemyLoadAVM2Item(GraphSourceItem instruction, GraphTargetItem ofs, String name) { super(instruction, PRECEDENCE_PRIMARY); diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/model/AlchemySignExtendAVM2Item.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/model/AlchemySignExtendAVM2Item.java index 1d3b503ca..d3bef5c86 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/model/AlchemySignExtendAVM2Item.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/model/AlchemySignExtendAVM2Item.java @@ -27,7 +27,7 @@ import com.jpexs.decompiler.graph.model.LocalData; */ public class AlchemySignExtendAVM2Item extends AVM2Item { - private String name; + private final String name; public AlchemySignExtendAVM2Item(GraphSourceItem instruction, GraphTargetItem value, String name) { super(instruction, PRECEDENCE_PRIMARY); diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/model/AlchemyStoreAVM2Item.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/model/AlchemyStoreAVM2Item.java index 57760299c..ff83537bf 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/model/AlchemyStoreAVM2Item.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/model/AlchemyStoreAVM2Item.java @@ -27,8 +27,8 @@ import com.jpexs.decompiler.graph.model.LocalData; */ public class AlchemyStoreAVM2Item extends AVM2Item { - private String name; - private GraphTargetItem ofs; + private final String name; + private final GraphTargetItem ofs; public AlchemyStoreAVM2Item(GraphSourceItem instruction, GraphTargetItem value, GraphTargetItem ofs, String name) { super(instruction, PRECEDENCE_PRIMARY); diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/model/DefaultXMLNamespace.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/model/DefaultXMLNamespace.java index c1f65bbe7..2b20d3bc9 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/model/DefaultXMLNamespace.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/model/DefaultXMLNamespace.java @@ -27,7 +27,7 @@ import com.jpexs.decompiler.graph.model.LocalData; */ public class DefaultXMLNamespace extends AVM2Item { - private GraphTargetItem ns; + private final GraphTargetItem ns; public DefaultXMLNamespace(AVM2Instruction instruction, GraphTargetItem ns) { super(instruction, NOPRECEDENCE); diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/model/LocalRegAVM2Item.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/model/LocalRegAVM2Item.java index 2163febd7..cdee9f6d3 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/model/LocalRegAVM2Item.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/model/LocalRegAVM2Item.java @@ -28,7 +28,7 @@ public class LocalRegAVM2Item extends AVM2Item { public int regIndex; public GraphTargetItem computedValue; - private Object computedResult; + private final Object computedResult; private boolean isCT = false; public LocalRegAVM2Item(AVM2Instruction instruction, int regIndex, GraphTargetItem computedValue) { diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/parser/Flasm3Lexer.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/parser/Flasm3Lexer.java index 96d25283c..d7f785607 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/parser/Flasm3Lexer.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/parser/Flasm3Lexer.java @@ -2589,7 +2589,7 @@ public final class Flasm3Lexer { - private Stack pushedBack=new Stack<>(); + private final Stack pushedBack=new Stack<>(); public void pushback(ParsedSymbol symb) { diff --git a/trunk/src/com/jpexs/decompiler/flash/action/ActionDeobfuscation.java b/trunk/src/com/jpexs/decompiler/flash/action/ActionDeobfuscation.java index 94c8d0ebd..18f0aced7 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/ActionDeobfuscation.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/ActionDeobfuscation.java @@ -34,10 +34,10 @@ import java.util.regex.Pattern; */ public class ActionDeobfuscation { - private Random rnd = new Random(); + private final Random rnd = new Random(); private final int DEFAULT_FOO_SIZE = 10; public HashSet allVariableNamesStr = new HashSet<>(); - private HashMap typeCounts = new HashMap<>(); + private final HashMap typeCounts = new HashMap<>(); public static final String[] reservedWords = { "as", "break", "case", "catch", "class", "const", "continue", "default", "delete", "do", "each", "else", diff --git a/trunk/src/com/jpexs/decompiler/flash/action/ActionGraphSource.java b/trunk/src/com/jpexs/decompiler/flash/action/ActionGraphSource.java index ce0627438..5fce06f9b 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/ActionGraphSource.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/ActionGraphSource.java @@ -35,11 +35,11 @@ import java.util.logging.Logger; */ public class ActionGraphSource extends GraphSource { - private List actions; + private final List actions; public int version; - private HashMap registerNames; - private HashMap variables; - private HashMap functions; + private final HashMap registerNames; + private final HashMap variables; + private final HashMap functions; public List getActions() { return actions; diff --git a/trunk/src/com/jpexs/decompiler/flash/action/model/DefineRegisterActionItem.java b/trunk/src/com/jpexs/decompiler/flash/action/model/DefineRegisterActionItem.java index ac4676d7e..66ea1f3b1 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/model/DefineRegisterActionItem.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/model/DefineRegisterActionItem.java @@ -25,8 +25,8 @@ import com.jpexs.decompiler.graph.model.LocalData; */ public class DefineRegisterActionItem extends ActionItem { - private String identifier; - private int register; + private final String identifier; + private final int register; public DefineRegisterActionItem(String identifier, int register) { super(null, PRECEDENCE_PRIMARY); diff --git a/trunk/src/com/jpexs/decompiler/flash/action/model/FSCommandActionItem.java b/trunk/src/com/jpexs/decompiler/flash/action/model/FSCommandActionItem.java index 6b2a4e367..7e80f3357 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/model/FSCommandActionItem.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/model/FSCommandActionItem.java @@ -31,7 +31,7 @@ import java.util.List; */ public class FSCommandActionItem extends ActionItem { - private String command; + private final String command; public FSCommandActionItem(GraphSourceItem instruction, String command) { super(instruction, PRECEDENCE_PRIMARY); diff --git a/trunk/src/com/jpexs/decompiler/flash/action/model/LoadMovieActionItem.java b/trunk/src/com/jpexs/decompiler/flash/action/model/LoadMovieActionItem.java index 3aac4b06b..f1fd14559 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/model/LoadMovieActionItem.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/model/LoadMovieActionItem.java @@ -32,9 +32,9 @@ import java.util.List; */ public class LoadMovieActionItem extends ActionItem { - private GraphTargetItem urlString; - private GraphTargetItem targetString; - private int method; + private final GraphTargetItem urlString; + private final GraphTargetItem targetString; + private final int method; @Override public List getAllSubItems() { diff --git a/trunk/src/com/jpexs/decompiler/flash/action/model/LoadMovieNumActionItem.java b/trunk/src/com/jpexs/decompiler/flash/action/model/LoadMovieNumActionItem.java index c500b4ed1..75620916f 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/model/LoadMovieNumActionItem.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/model/LoadMovieNumActionItem.java @@ -34,9 +34,9 @@ import java.util.List; */ public class LoadMovieNumActionItem extends ActionItem { - private GraphTargetItem urlString; - private GraphTargetItem num; - private int method; + private final GraphTargetItem urlString; + private final GraphTargetItem num; + private final int method; @Override public List getAllSubItems() { diff --git a/trunk/src/com/jpexs/decompiler/flash/action/model/LoadVariablesActionItem.java b/trunk/src/com/jpexs/decompiler/flash/action/model/LoadVariablesActionItem.java index 65303621c..53f503027 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/model/LoadVariablesActionItem.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/model/LoadVariablesActionItem.java @@ -32,9 +32,9 @@ import java.util.List; */ public class LoadVariablesActionItem extends ActionItem { - private GraphTargetItem urlString; - private GraphTargetItem targetString; - private int method; + private final GraphTargetItem urlString; + private final GraphTargetItem targetString; + private final int method; @Override public List getAllSubItems() { diff --git a/trunk/src/com/jpexs/decompiler/flash/action/model/LoadVariablesNumActionItem.java b/trunk/src/com/jpexs/decompiler/flash/action/model/LoadVariablesNumActionItem.java index a2431ec5f..ae1feb559 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/model/LoadVariablesNumActionItem.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/model/LoadVariablesNumActionItem.java @@ -34,9 +34,9 @@ import java.util.List; */ public class LoadVariablesNumActionItem extends ActionItem { - private GraphTargetItem urlString; - private GraphTargetItem num; - private int method; + private final GraphTargetItem urlString; + private final GraphTargetItem num; + private final int method; @Override public List getAllSubItems() { diff --git a/trunk/src/com/jpexs/decompiler/flash/action/model/PrintActionItem.java b/trunk/src/com/jpexs/decompiler/flash/action/model/PrintActionItem.java index 13c60909e..d50f950bb 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/model/PrintActionItem.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/model/PrintActionItem.java @@ -34,8 +34,8 @@ import java.util.List; */ public class PrintActionItem extends ActionItem { - private GraphTargetItem target; - private GraphTargetItem boundingBox; + private final GraphTargetItem target; + private final GraphTargetItem boundingBox; @Override public List getAllSubItems() { diff --git a/trunk/src/com/jpexs/decompiler/flash/action/model/PrintAsBitmapActionItem.java b/trunk/src/com/jpexs/decompiler/flash/action/model/PrintAsBitmapActionItem.java index 67d0a9a1c..1e544e87f 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/model/PrintAsBitmapActionItem.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/model/PrintAsBitmapActionItem.java @@ -34,8 +34,8 @@ import java.util.List; */ public class PrintAsBitmapActionItem extends ActionItem { - private GraphTargetItem target; - private GraphTargetItem boundingBox; + private final GraphTargetItem target; + private final GraphTargetItem boundingBox; @Override public List getAllSubItems() { diff --git a/trunk/src/com/jpexs/decompiler/flash/action/model/PrintAsBitmapNumActionItem.java b/trunk/src/com/jpexs/decompiler/flash/action/model/PrintAsBitmapNumActionItem.java index 6165ec77e..9edf08e7f 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/model/PrintAsBitmapNumActionItem.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/model/PrintAsBitmapNumActionItem.java @@ -34,8 +34,8 @@ import java.util.List; */ public class PrintAsBitmapNumActionItem extends ActionItem { - private GraphTargetItem num; - private GraphTargetItem boundingBox; + private final GraphTargetItem num; + private final GraphTargetItem boundingBox; @Override public List getAllSubItems() { diff --git a/trunk/src/com/jpexs/decompiler/flash/action/model/PrintNumActionItem.java b/trunk/src/com/jpexs/decompiler/flash/action/model/PrintNumActionItem.java index b596a65da..da894ac46 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/model/PrintNumActionItem.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/model/PrintNumActionItem.java @@ -34,8 +34,8 @@ import java.util.List; */ public class PrintNumActionItem extends ActionItem { - private GraphTargetItem num; - private GraphTargetItem boundingBox; + private final GraphTargetItem num; + private final GraphTargetItem boundingBox; @Override public List getAllSubItems() { diff --git a/trunk/src/com/jpexs/decompiler/flash/action/model/TemporaryRegister.java b/trunk/src/com/jpexs/decompiler/flash/action/model/TemporaryRegister.java index b7959b940..5189fddb7 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/model/TemporaryRegister.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/model/TemporaryRegister.java @@ -28,7 +28,7 @@ import java.util.List; */ public class TemporaryRegister extends GraphTargetItem { - private int regId; + private final int regId; public TemporaryRegister(int regId, GraphTargetItem value) { super(value.src, value.getPrecedence()); diff --git a/trunk/src/com/jpexs/decompiler/flash/action/model/UnLoadMovieActionItem.java b/trunk/src/com/jpexs/decompiler/flash/action/model/UnLoadMovieActionItem.java index d5b74aad9..aac7c7981 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/model/UnLoadMovieActionItem.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/model/UnLoadMovieActionItem.java @@ -33,7 +33,7 @@ import java.util.List; */ public class UnLoadMovieActionItem extends ActionItem { - private GraphTargetItem targetString; + private final GraphTargetItem targetString; @Override public List getAllSubItems() { diff --git a/trunk/src/com/jpexs/decompiler/flash/action/model/UnLoadMovieNumActionItem.java b/trunk/src/com/jpexs/decompiler/flash/action/model/UnLoadMovieNumActionItem.java index a39d7ecb0..b5b0fc4da 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/model/UnLoadMovieNumActionItem.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/model/UnLoadMovieNumActionItem.java @@ -35,7 +35,7 @@ import java.util.List; */ public class UnLoadMovieNumActionItem extends ActionItem { - private GraphTargetItem num; + private final GraphTargetItem num; @Override public List getAllSubItems() { diff --git a/trunk/src/com/jpexs/decompiler/flash/action/model/clauses/IfFrameLoadedActionItem.java b/trunk/src/com/jpexs/decompiler/flash/action/model/clauses/IfFrameLoadedActionItem.java index 77abe226d..66b3f7054 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/model/clauses/IfFrameLoadedActionItem.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/model/clauses/IfFrameLoadedActionItem.java @@ -36,8 +36,8 @@ import java.util.List; */ public class IfFrameLoadedActionItem extends ActionItem implements Block { - private List actions; - private GraphTargetItem frame; + private final List actions; + private final GraphTargetItem frame; public IfFrameLoadedActionItem(GraphTargetItem frame, List actions, GraphSourceItem instruction) { super(instruction, NOPRECEDENCE); diff --git a/trunk/src/com/jpexs/decompiler/flash/action/parser/script/ActionScriptLexer.java b/trunk/src/com/jpexs/decompiler/flash/action/parser/script/ActionScriptLexer.java index 7fa23bd66..9d52fae07 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/parser/script/ActionScriptLexer.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/parser/script/ActionScriptLexer.java @@ -1045,12 +1045,12 @@ public final class ActionScriptLexer { public int yychar() { return yychar; } - private Stack pushedBack = new Stack<>(); + private final Stack pushedBack = new Stack<>(); public int yyline() { return yyline + 1; } - private List listeners = new ArrayList<>(); + private final List listeners = new ArrayList<>(); public void addListener(LexListener listener) { listeners.add(listener); diff --git a/trunk/src/com/jpexs/decompiler/flash/action/parser/script/ActionScriptParser.java b/trunk/src/com/jpexs/decompiler/flash/action/parser/script/ActionScriptParser.java index 79826180a..b37bcb1b8 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/parser/script/ActionScriptParser.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/parser/script/ActionScriptParser.java @@ -148,7 +148,7 @@ public class ActionScriptParser { public static final int REGISTER_PARENT = 5; public static final int REGISTER_GLOBAL = 6; private long uniqLast = 0; - private boolean debugMode = false; + private final boolean debugMode = false; private String uniqId() { uniqLast++; diff --git a/trunk/src/com/jpexs/decompiler/flash/action/parser/script/ActionSourceGenerator.java b/trunk/src/com/jpexs/decompiler/flash/action/parser/script/ActionSourceGenerator.java index 0eab7171c..5e54013ff 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/parser/script/ActionSourceGenerator.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/parser/script/ActionSourceGenerator.java @@ -591,7 +591,7 @@ public class ActionSourceGenerator implements SourceGenerator { } return ret; } - private List constantPool; + private final List constantPool; public ActionSourceGenerator(List constantPool) { this.constantPool = constantPool; diff --git a/trunk/src/com/jpexs/decompiler/flash/action/parser/script/LexBufferer.java b/trunk/src/com/jpexs/decompiler/flash/action/parser/script/LexBufferer.java index eb4fb99fe..3e21a1e83 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/parser/script/LexBufferer.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/parser/script/LexBufferer.java @@ -25,7 +25,7 @@ import java.util.List; */ public class LexBufferer implements LexListener { - private List items = new ArrayList<>(); + private final List items = new ArrayList<>(); @Override public void onLex(ParsedSymbol s) { diff --git a/trunk/src/com/jpexs/decompiler/flash/action/swf7/ActionTry.java b/trunk/src/com/jpexs/decompiler/flash/action/swf7/ActionTry.java index e1bcae5db..979b2350a 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/swf7/ActionTry.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/swf7/ActionTry.java @@ -48,7 +48,7 @@ public class ActionTry extends Action implements GraphSourceItemContainer { long trySize; long catchSize; long finallySize; - private int version; + private final int version; public ActionTry(boolean catchInRegisterFlag, boolean finallyBlockFlag, boolean catchBlockFlag, String catchName, int catchRegister, long trySize, long catchSize, long finallySize, int version) { super(0x8F, 0); diff --git a/trunk/src/com/jpexs/decompiler/flash/configuration/ConfigurationItem.java b/trunk/src/com/jpexs/decompiler/flash/configuration/ConfigurationItem.java index 2f9bb546c..15a87a7bb 100644 --- a/trunk/src/com/jpexs/decompiler/flash/configuration/ConfigurationItem.java +++ b/trunk/src/com/jpexs/decompiler/flash/configuration/ConfigurationItem.java @@ -22,7 +22,7 @@ package com.jpexs.decompiler.flash.configuration; */ public class ConfigurationItem { - private String name; + private final String name; protected boolean hasValue; private T value; diff --git a/trunk/src/com/jpexs/decompiler/flash/console/CommandLineArgumentParser.java b/trunk/src/com/jpexs/decompiler/flash/console/CommandLineArgumentParser.java index bc1209914..bdfec8212 100644 --- a/trunk/src/com/jpexs/decompiler/flash/console/CommandLineArgumentParser.java +++ b/trunk/src/com/jpexs/decompiler/flash/console/CommandLineArgumentParser.java @@ -50,7 +50,7 @@ public class CommandLineArgumentParser { private static boolean commandLineMode = false; @SuppressWarnings("unchecked") - private static ConfigurationItem[] commandlineConfigBoolean = new ConfigurationItem[]{ + private static final ConfigurationItem[] commandlineConfigBoolean = new ConfigurationItem[]{ Configuration.decompile, Configuration.parallelSpeedUp, Configuration.internalFlashViewer, diff --git a/trunk/src/com/jpexs/decompiler/flash/flv/FLVOutputStream.java b/trunk/src/com/jpexs/decompiler/flash/flv/FLVOutputStream.java index 7a72b86f9..e31581a83 100644 --- a/trunk/src/com/jpexs/decompiler/flash/flv/FLVOutputStream.java +++ b/trunk/src/com/jpexs/decompiler/flash/flv/FLVOutputStream.java @@ -27,7 +27,7 @@ import java.util.List; */ public class FLVOutputStream extends OutputStream { - private OutputStream os; + private final OutputStream os; private int bitPos = 0; private int tempByte = 0; private long pos = 0; diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/AppRibbonFrame.java b/trunk/src/com/jpexs/decompiler/flash/gui/AppRibbonFrame.java index d421ab343..924532d39 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/AppRibbonFrame.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/AppRibbonFrame.java @@ -26,7 +26,7 @@ import org.pushingpixels.flamingo.api.ribbon.JRibbonFrame; */ public abstract class AppRibbonFrame extends JRibbonFrame { - private ResourceBundle resourceBundle; + private final ResourceBundle resourceBundle; public AppRibbonFrame() { if (getClass().equals(MainFrameRibbon.class)) { diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/ErrorLogFrame.java b/trunk/src/com/jpexs/decompiler/flash/gui/ErrorLogFrame.java index 0745b8158..0d2c3edc2 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/ErrorLogFrame.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/ErrorLogFrame.java @@ -58,11 +58,11 @@ public class ErrorLogFrame extends AppFrame { private static ErrorLogFrame instance; - private JPanel logView = new JPanel(); + private final JPanel logView = new JPanel(); private JPanel logViewInner = new JPanel(); - private Handler handler; - private ImageIcon expandIcon; - private ImageIcon collapseIcon; + private final Handler handler; + private final ImageIcon expandIcon; + private final ImageIcon collapseIcon; private ErrorState errorState = ErrorState.NO_ERROR; public Handler getHandler() { diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/ExportDialog.java b/trunk/src/com/jpexs/decompiler/flash/gui/ExportDialog.java index 1511fb672..e4e70d89b 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/ExportDialog.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/ExportDialog.java @@ -58,7 +58,7 @@ public class ExportDialog extends AppDialog { public static final int OPTION_MOVIES = 3; public static final int OPTION_SOUNDS = 4; public static final int OPTION_ACTIONSCRIPT = 5; - private JComboBox[] combos; + private final JComboBox[] combos; public int getOption(int index) { return combos[index].getSelectedIndex(); diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/FontEmbedDialog.java b/trunk/src/com/jpexs/decompiler/flash/gui/FontEmbedDialog.java index 219ac958b..6d3e17354 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/FontEmbedDialog.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/FontEmbedDialog.java @@ -53,14 +53,14 @@ public class FontEmbedDialog extends AppDialog implements ActionListener { private static final int SAMPLE_MAX_LENGTH = 50; - private JComboBox sourceFont; - private JCheckBox[] rangeCheckboxes; - private String rangeNames[]; - private JLabel[] rangeSamples; - private JTextField individualCharsField; + private final JComboBox sourceFont; + private final JCheckBox[] rangeCheckboxes; + private final String rangeNames[]; + private final JLabel[] rangeSamples; + private final JTextField individualCharsField; private boolean result = false; private JLabel individialSample; - private int style; + private final int style; public String getSelectedFont() { return sourceFont.getSelectedItem().toString(); diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/FontPanel.java b/trunk/src/com/jpexs/decompiler/flash/gui/FontPanel.java index b4407ff30..bf78d3154 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/FontPanel.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/FontPanel.java @@ -36,7 +36,7 @@ import javax.swing.JOptionPane; */ public class FontPanel extends javax.swing.JPanel { - private MainPanel mainPanel; + private final MainPanel mainPanel; private FontTag fontTag; /** diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/GraphFrame.java b/trunk/src/com/jpexs/decompiler/flash/gui/GraphFrame.java index 68f35a190..19be60152 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/GraphFrame.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/GraphFrame.java @@ -40,11 +40,11 @@ public class GraphFrame extends AppFrame { private static final int SPACE_BACKLINKS = 5; private static final int BLOCK_WIDTH = 200; private static final int BLOCK_HEIGHT = 20; - private HashMap partPos = new HashMap<>(); - private Point size; + private final HashMap partPos = new HashMap<>(); + private final Point size; private int backLinksLeft = 0; private int backLinksRight = 0; - private GraphPart head; + private final GraphPart head; public GraphPanel(Graph graph) throws InterruptedException { graph.init(null); diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/LoadFromCacheFrame.java b/trunk/src/com/jpexs/decompiler/flash/gui/LoadFromCacheFrame.java index dda5765f8..d30ba1158 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/LoadFromCacheFrame.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/LoadFromCacheFrame.java @@ -60,11 +60,11 @@ public class LoadFromCacheFrame extends AppFrame implements ActionListener { static final String ACTION_SAVE = "SAVE"; static final String ACTION_REFRESH = "REFRESH"; - private JList list; - private JTextField searchField; + private final JList list; + private final JTextField searchField; private List caches; private List entries; - private JProgressBar progressBar; + private final JProgressBar progressBar; JButton saveButton; JButton refreshButton; JButton openButton; diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/LoadFromMemoryFrame.java b/trunk/src/com/jpexs/decompiler/flash/gui/LoadFromMemoryFrame.java index cbd903945..165367c9b 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/LoadFromMemoryFrame.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/LoadFromMemoryFrame.java @@ -90,13 +90,13 @@ public class LoadFromMemoryFrame extends AppFrame implements ActionListener { private DefaultListModel model; private DefaultTableModel resTableModel; private final JTable tableRes; - private JLabel stateLabel; + private final JLabel stateLabel; private boolean processing = false; - private JProgressBar progress; + private final JProgressBar progress; private class SelectProcessWorker extends SwingWorker, Object> { - private List procs; + private final List procs; public SelectProcessWorker(List procs) { this.procs = procs; diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/LoadingDialog.java b/trunk/src/com/jpexs/decompiler/flash/gui/LoadingDialog.java index ea0b0bb95..aa08174ea 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/LoadingDialog.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/LoadingDialog.java @@ -36,7 +36,7 @@ import javax.swing.SwingConstants; */ public class LoadingDialog extends AppDialog implements ImageObserver { - private JLabel detailLabel; + private final JLabel detailLabel; private LoadingPanel loadingPanel; JProgressBar progressBar = new JProgressBar(0, 100); diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/LoadingPanel.java b/trunk/src/com/jpexs/decompiler/flash/gui/LoadingPanel.java index 81a8e976f..0aa9a128d 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/LoadingPanel.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/LoadingPanel.java @@ -29,9 +29,9 @@ import javax.swing.JPanel; public class LoadingPanel extends JPanel { private int pos = 0; - private Image animationImage; - private int iconWidth; - private int iconHeight; + private final Image animationImage; + private final int iconWidth; + private final int iconHeight; /** * Constructor diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/Main.java b/trunk/src/com/jpexs/decompiler/flash/gui/Main.java index f929b22b4..ec7c274d5 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/Main.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/Main.java @@ -329,7 +329,7 @@ public class Main { private static class OpenFileWorker extends SwingWorker { - private SWFSourceInfo[] sourceInfos; + private final SWFSourceInfo[] sourceInfos; public OpenFileWorker(SWFSourceInfo sourceInfo) { this.sourceInfos = new SWFSourceInfo[] { sourceInfo }; diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/MainFrameClassicMenu.java b/trunk/src/com/jpexs/decompiler/flash/gui/MainFrameClassicMenu.java index 6926bc93f..262077385 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/MainFrameClassicMenu.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/MainFrameClassicMenu.java @@ -83,7 +83,7 @@ public class MainFrameClassicMenu implements MainFrameMenu, ActionListener { static final String ACTION_REMOVE_NON_SCRIPTS = "REMOVENONSCRIPTS"; static final String ACTION_REFRESH_DECOMPILED = "REFRESHDECOMPILED"; - private MainFrameClassic mainFrame; + private final MainFrameClassic mainFrame; private JCheckBoxMenuItem miAutoDeobfuscation; private JCheckBoxMenuItem miInternalViewer; diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/MainFrameRibbonMenu.java b/trunk/src/com/jpexs/decompiler/flash/gui/MainFrameRibbonMenu.java index b9f1f6a7f..8cc8da28e 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/MainFrameRibbonMenu.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/MainFrameRibbonMenu.java @@ -105,7 +105,7 @@ public class MainFrameRibbonMenu implements MainFrameMenu, ActionListener { static final String ACTION_REFRESH_DECOMPILED = "REFRESHDECOMPILED"; static final String ACTION_CLEAR_RECENT_FILES = "CLEARRECENTFILES"; - private MainFrameRibbon mainFrame; + private final MainFrameRibbon mainFrame; private JCheckBox miAutoDeobfuscation; private JCheckBox miInternalViewer; diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/MainFrameStatusPanel.java b/trunk/src/com/jpexs/decompiler/flash/gui/MainFrameStatusPanel.java index e212960a5..c9e5f1362 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/MainFrameStatusPanel.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/MainFrameStatusPanel.java @@ -41,11 +41,11 @@ public class MainFrameStatusPanel extends JPanel implements ActionListener { static final String ACTION_SHOW_ERROR_LOG = "SHOWERRORLOG"; - private MainPanel mainPanel; + private final MainPanel mainPanel; - private LoadingPanel loadingPanel = new LoadingPanel(20, 20); - private JLabel statusLabel = new JLabel(""); - private JButton cancelButton = new JButton(); + private final LoadingPanel loadingPanel = new LoadingPanel(20, 20); + private final JLabel statusLabel = new JLabel(""); + private final JButton cancelButton = new JButton(); private JButton errorNotificationButton; private Icon currentIcon; diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/MainPanel.java b/trunk/src/com/jpexs/decompiler/flash/gui/MainPanel.java index b48ca52f9..623ecd24e 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/MainPanel.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/MainPanel.java @@ -189,24 +189,24 @@ import javax.swing.tree.TreeSelectionModel; */ public final class MainPanel extends JPanel implements ActionListener, TreeSelectionListener, Freed { - private MainFrame mainFrame; - private List swfs; + private final MainFrame mainFrame; + private final List swfs; private ABCPanel abcPanel; private ActionPanel actionPanel; - private JPanel welcomePanel; - private MainFrameStatusPanel statusPanel; - private MainFrameMenu mainMenu; - private FontPanel fontPanel; - private JProgressBar progressBar = new JProgressBar(0, 100); + private final JPanel welcomePanel; + private final MainFrameStatusPanel statusPanel; + private final MainFrameMenu mainMenu; + private final FontPanel fontPanel; + private final JProgressBar progressBar = new JProgressBar(0, 100); private DeobfuscationDialog deobfuscationDialog; public TagTree tagTree; - private FlashPlayerPanel flashPanel; - private JPanel contentPanel; - private JPanel displayPanel; + private final FlashPlayerPanel flashPanel; + private final JPanel contentPanel; + private final JPanel displayPanel; private ImagePanel imagePanel; private BinaryPanel binaryPanel; - private ImagePanel previewImagePanel; - private SWFPreviwPanel swfPreviewPanel; + private final ImagePanel previewImagePanel; + private final SWFPreviwPanel swfPreviewPanel; private boolean isWelcomeScreen = true; private static final String CARDFLASHPANEL = "Flash card"; private static final String CARDSWFPREVIEWPANEL = "SWF card"; @@ -224,26 +224,26 @@ public final class MainPanel extends JPanel implements ActionListener, TreeSelec private static final String INTERNAL_VIEWER_CARD = "INTERNALVIEWER"; private static final String SPLIT_PANE1 = "SPLITPANE1"; private static final String WELCOME_PANEL = "WELCOMEPANEL"; - private LineMarkedEditorPane textValue; - private JSplitPane splitPane1; - private JSplitPane splitPane2; + private final LineMarkedEditorPane textValue; + private final JSplitPane splitPane1; + private final JSplitPane splitPane2; private boolean splitsInited = false; private JPanel detailPanel; private JTextField filterField = new MyTextField(""); private JPanel searchPanel; - private JPanel displayWithPreview; - private JButton textSaveButton; - private JButton textEditButton; - private JButton textCancelButton; - private JPanel parametersPanel; + private final JPanel displayWithPreview; + private final JButton textSaveButton; + private final JButton textEditButton; + private final JButton textCancelButton; + private final JPanel parametersPanel; private JSplitPane previewSplitPane; private JButton imageReplaceButton; private JPanel imageButtonsPanel; private JButton binaryReplaceButton; private JPanel binaryButtonsPanel; private PlayerControls flashControls; - private ImagePanel internelViewerPanel; - private JPanel viewerCards; + private final ImagePanel internelViewerPanel; + private final JPanel viewerCards; private AbortRetryIgnoreHandler errorHandler = new GuiAbortRetryIgnoreHandler(); private CancellableWorker setSourceWorker; public TreeNode oldNode; @@ -541,7 +541,7 @@ public final class MainPanel extends JPanel implements ActionListener, TreeSelec @Override public Object getTransferData(DataFlavor flavor) throws UnsupportedFlavorException, IOException { if (flavor.equals(DataFlavor.javaFileListFlavor)) { - List files = new ArrayList<>(); + List files; String tempDir = System.getProperty("java.io.tmpdir"); if (!tempDir.endsWith(File.separator)) { tempDir += File.separator; @@ -2152,7 +2152,7 @@ public final class MainPanel extends JPanel implements ActionListener, TreeSelec if (tagObj instanceof ScriptPack) { final ScriptPack scriptLeaf = (ScriptPack) tagObj; final List abcList = scriptLeaf.abc.swf.abcList; - if (setSourceWorker != null && !setSourceWorker.isDone()) { + if (setSourceWorker != null) { setSourceWorker.cancel(true); setSourceWorker = null; } diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/ModeFrame.java b/trunk/src/com/jpexs/decompiler/flash/gui/ModeFrame.java index 20cf196bd..938361496 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/ModeFrame.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/ModeFrame.java @@ -37,9 +37,9 @@ public class ModeFrame extends AppFrame implements ActionListener { static final String ACTION_PROXY = "PROXY"; static final String ACTION_EXIT = "EXIT"; - private JButton openButton = new JButton(translate("button.open")); - private JButton proxyButton = new JButton(translate("button.proxy")); - private JButton exitButton = new JButton(translate("button.exit")); + private final JButton openButton = new JButton(translate("button.open")); + private final JButton proxyButton = new JButton(translate("button.proxy")); + private final JButton exitButton = new JButton(translate("button.exit")); /** * Constructor diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/RenameDialog.java b/trunk/src/com/jpexs/decompiler/flash/gui/RenameDialog.java index b6611464b..3803ca865 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/RenameDialog.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/RenameDialog.java @@ -39,10 +39,10 @@ public class RenameDialog extends AppDialog implements ActionListener { static final String ACTION_OK = "OK"; static final String ACTION_CANCEL = "CANCEL"; - private JRadioButton typeNumberRadioButton = new JRadioButton(translate("rename.type.typenumber")); - private JRadioButton randomWordRadioButton = new JRadioButton(translate("rename.type.randomword")); - private JButton okButton = new JButton(translate("button.ok")); - private JButton cancelButton = new JButton(translate("button.cancel")); + private final JRadioButton typeNumberRadioButton = new JRadioButton(translate("rename.type.typenumber")); + private final JRadioButton randomWordRadioButton = new JRadioButton(translate("rename.type.randomword")); + private final JButton okButton = new JButton(translate("button.ok")); + private final JButton cancelButton = new JButton(translate("button.cancel")); private boolean confirmed = false; public RenameType getRenameType() { diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/SelectLanguageDialog.java b/trunk/src/com/jpexs/decompiler/flash/gui/SelectLanguageDialog.java index aadc7b576..f8069552c 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/SelectLanguageDialog.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/SelectLanguageDialog.java @@ -44,7 +44,7 @@ public class SelectLanguageDialog extends AppDialog implements ActionListener { JComboBox languageCombobox = new JComboBox<>(); public String languageCode = null; - private static String[] languages = new String[]{"en", "cs", "zh", "de", "es", "fr", "hu", "nl", "pt", "ru", "sv", "uk"}; + private static final String[] languages = new String[]{"en", "cs", "zh", "de", "es", "fr", "hu", "nl", "pt", "ru", "sv", "uk"}; public SelectLanguageDialog() { setSize(350, 130); diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/SwfInMemory.java b/trunk/src/com/jpexs/decompiler/flash/gui/SwfInMemory.java index add9f96a6..31a2dca6a 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/SwfInMemory.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/SwfInMemory.java @@ -38,7 +38,7 @@ public class SwfInMemory { this.process = process; } - private static ResourceBundle resourceBundle = ResourceBundle.getBundle(AppStrings.getResourcePath(LoadFromMemoryFrame.class)); + private static final ResourceBundle resourceBundle = ResourceBundle.getBundle(AppStrings.getResourcePath(LoadFromMemoryFrame.class)); public String translate(String key) { return resourceBundle.getString(key); diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/TagTreeModel.java b/trunk/src/com/jpexs/decompiler/flash/gui/TagTreeModel.java index 1fa0e6fdf..68078a35f 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/TagTreeModel.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/TagTreeModel.java @@ -47,10 +47,10 @@ import javax.swing.tree.TreePath; public class TagTreeModel implements TreeModel { - private TagTreeRoot root = new TagTreeRoot(); - private List swfs; - private Map swfToSwfRoot; - private MainFrame mainFrame; + private final TagTreeRoot root = new TagTreeRoot(); + private final List swfs; + private final Map swfToSwfRoot; + private final MainFrame mainFrame; public TagTreeModel(MainFrame mainFrame, List swfs) { this.mainFrame = mainFrame; diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/abc/ASMSourceEditorPane.java b/trunk/src/com/jpexs/decompiler/flash/gui/abc/ASMSourceEditorPane.java index 55d837f9a..69e768ec7 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/abc/ASMSourceEditorPane.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/abc/ASMSourceEditorPane.java @@ -52,7 +52,7 @@ public class ASMSourceEditorPane extends LineMarkedEditorPane implements CaretLi public int bodyIndex = -1; private List disassembledHilights = new ArrayList<>(); private List specialHilights = new ArrayList<>(); - private DecompiledEditorPane decompiledEditor; + private final DecompiledEditorPane decompiledEditor; private boolean ignoreCarret = false; private String name; private HilightedText textWithHex; diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/abc/ClassesListTreeModel.java b/trunk/src/com/jpexs/decompiler/flash/gui/abc/ClassesListTreeModel.java index e6d1d9c96..8fa248e89 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/abc/ClassesListTreeModel.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/abc/ClassesListTreeModel.java @@ -86,7 +86,7 @@ public class ClassesListTreeModel implements TreeModel, TreeElementItem { private SWF swf; private Tree classTree; private List> list; - private List listeners = new ArrayList<>(); + private final List listeners = new ArrayList<>(); public List> getList() { return list; diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/abc/ConstantsListModel.java b/trunk/src/com/jpexs/decompiler/flash/gui/abc/ConstantsListModel.java index 93a08563b..05f5e71c8 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/abc/ConstantsListModel.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/abc/ConstantsListModel.java @@ -24,7 +24,7 @@ import javax.swing.event.ListDataListener; public class ConstantsListModel implements ListModel { - private ConstantPool constants; + private final ConstantPool constants; public static final int TYPE_UINT = 0; public static final int TYPE_INT = 1; public static final int TYPE_DOUBLE = 2; diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/abc/DecompiledEditorPane.java b/trunk/src/com/jpexs/decompiler/flash/gui/abc/DecompiledEditorPane.java index d21bf6aa4..2363a8d2d 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/abc/DecompiledEditorPane.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/abc/DecompiledEditorPane.java @@ -56,10 +56,10 @@ public class DecompiledEditorPane extends LineMarkedEditorPane implements CaretL public int lastTraitIndex = 0; private boolean ignoreCarret = false; private boolean reset = false; - private ABCPanel abcPanel; + private final ABCPanel abcPanel; private int classIndex = -1; private boolean isStatic = false; - private Cache cache = Cache.getInstance(true); + private final Cache cache = Cache.getInstance(true); private Trait currentTrait = null; public Trait getCurrentTrait() { diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/abc/DetailPanel.java b/trunk/src/com/jpexs/decompiler/flash/gui/abc/DetailPanel.java index 59482b369..3798cbd46 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/abc/DetailPanel.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/abc/DetailPanel.java @@ -48,17 +48,17 @@ public class DetailPanel extends JPanel implements ActionListener { public static final String METHOD_TRAIT_CARD = AppStrings.translate("abc.detail.methodtrait"); public static final String UNSUPPORTED_TRAIT_CARD = AppStrings.translate("abc.detail.unsupported"); public static final String SLOT_CONST_TRAIT_CARD = AppStrings.translate("abc.detail.slotconsttrait"); - private JPanel innerPanel; + private final JPanel innerPanel; public JButton saveButton = new JButton(AppStrings.translate("button.save"), View.getIcon("save16")); public JButton editButton = new JButton(AppStrings.translate("button.edit"), View.getIcon("edit16")); public JButton cancelButton = new JButton(AppStrings.translate("button.cancel"), View.getIcon("cancel16")); - private HashMap cardMap = new HashMap<>(); + private final HashMap cardMap = new HashMap<>(); private String selectedCard; - private JLabel selectedLabel; + private final JLabel selectedLabel; private boolean editMode = false; - private JPanel buttonsPanel; - private ABCPanel abcPanel; - private JLabel traitNameLabel; + private final JPanel buttonsPanel; + private final ABCPanel abcPanel; + private final JLabel traitNameLabel; public DetailPanel(ABCPanel abcPanel) { this.abcPanel = abcPanel; diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/abc/IconListRenderer.java b/trunk/src/com/jpexs/decompiler/flash/gui/abc/IconListRenderer.java index f5b0db1d7..1ac9ad524 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/abc/IconListRenderer.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/abc/IconListRenderer.java @@ -22,9 +22,9 @@ import javax.swing.*; public class IconListRenderer extends DefaultListCellRenderer { - private Icon constIcon; - private Icon functionIcon; - private Icon variableIcon; + private final Icon constIcon; + private final Icon functionIcon; + private final Icon variableIcon; private Icon loadIcon(String path) { ClassLoader cldr = this.getClass().getClassLoader(); diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/abc/MethodCodePanel.java b/trunk/src/com/jpexs/decompiler/flash/gui/abc/MethodCodePanel.java index 51178a7f0..03baeb3fd 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/abc/MethodCodePanel.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/abc/MethodCodePanel.java @@ -45,10 +45,10 @@ public class MethodCodePanel extends JPanel implements ActionListener { static final String ACTION_HEX = "HEX"; static final String ACTION_HEX_ONLY = "HEXONLY"; - private ASMSourceEditorPane sourceTextArea; + private final ASMSourceEditorPane sourceTextArea; public JPanel buttonsPanel; - private JToggleButton hexButton; - private JToggleButton hexOnlyButton; + private final JToggleButton hexButton; + private final JToggleButton hexOnlyButton; public void focusEditor() { sourceTextArea.requestFocusInWindow(); diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/abc/NewTraitDialog.java b/trunk/src/com/jpexs/decompiler/flash/gui/abc/NewTraitDialog.java index 33efadea0..c8e44fe17 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/abc/NewTraitDialog.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/abc/NewTraitDialog.java @@ -46,7 +46,7 @@ public class NewTraitDialog extends AppDialog implements ActionListener { static final String ACTION_OK = "OK"; static final String ACTION_CANCEL = "CANCEL"; - private static int modifiers[] = new int[]{ + private static final int modifiers[] = new int[]{ Namespace.KIND_PACKAGE, Namespace.KIND_PRIVATE, Namespace.KIND_PROTECTED, @@ -55,17 +55,17 @@ public class NewTraitDialog extends AppDialog implements ActionListener { Namespace.KIND_EXPLICIT, Namespace.KIND_STATIC_PROTECTED }; - private static int types[] = new int[]{ + private static final int types[] = new int[]{ Trait.TRAIT_METHOD, Trait.TRAIT_GETTER, Trait.TRAIT_SETTER, Trait.TRAIT_CONST, Trait.TRAIT_SLOT }; - private JComboBox accessComboBox; - private JComboBox typeComboBox; - private JCheckBox staticCheckbox; - private JTextField nameField; + private final JComboBox accessComboBox; + private final JComboBox typeComboBox; + private final JCheckBox staticCheckbox; + private final JTextField nameField; public boolean getStatic() { return staticCheckbox.isSelected(); diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/abc/TraitsList.java b/trunk/src/com/jpexs/decompiler/flash/gui/abc/TraitsList.java index f3d4d73d8..e2ad21581 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/abc/TraitsList.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/abc/TraitsList.java @@ -33,7 +33,7 @@ public class TraitsList extends JList implements ListSelectionListener { ABC abc; List abcTags; int classIndex = -1; - private ABCPanel abcPanel; + private final ABCPanel abcPanel; private boolean sorted = false; public void setSorted(boolean sorted) { diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/abc/TraitsListItem.java b/trunk/src/com/jpexs/decompiler/flash/gui/abc/TraitsListItem.java index 7c0d7d944..d3cad859f 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/abc/TraitsListItem.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/abc/TraitsListItem.java @@ -36,13 +36,13 @@ import java.util.logging.Logger; */ public class TraitsListItem { - private Type type; - private boolean isStatic; - private List abcTags; - private ABC abc; - private int classIndex; - private int index; - private int scriptIndex; + private final Type type; + private final boolean isStatic; + private final List abcTags; + private final ABC abc; + private final int classIndex; + private final int index; + private final int scriptIndex; public String STR_INSTANCE_INITIALIZER = AppStrings.translate("abc.traitslist.instanceinitializer"); public String STR_CLASS_INITIALIZER = AppStrings.translate("abc.traitslist.classinitializer"); diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/abc/TraitsListModel.java b/trunk/src/com/jpexs/decompiler/flash/gui/abc/TraitsListModel.java index b87df9386..0c66aa579 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/abc/TraitsListModel.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/abc/TraitsListModel.java @@ -28,10 +28,10 @@ import javax.swing.event.ListDataListener; public final class TraitsListModel implements ListModel { private List items; - private List abcTags; - private ABC abc; - private int classIndex; - private int scriptIndex; + private final List abcTags; + private final ABC abc; + private final int classIndex; + private final int scriptIndex; public void setSorted(boolean sorted) { if (sorted) { diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/abc/UsageFrame.java b/trunk/src/com/jpexs/decompiler/flash/gui/abc/UsageFrame.java index 46cf50ce0..87b64e7b5 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/abc/UsageFrame.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/abc/UsageFrame.java @@ -44,12 +44,12 @@ public class UsageFrame extends AppFrame implements ActionListener, MouseListene static final String ACTION_GOTO = "GOTO"; static final String ACTION_CANCEL = "CANCEL"; - private JButton gotoButton = new JButton(translate("button.goto")); - private JButton cancelButton = new JButton(translate("button.cancel")); - private JList usageList; - private UsageListModel usageListModel; - private ABC abc; - private ABCPanel abcPanel; + private final JButton gotoButton = new JButton(translate("button.goto")); + private final JButton cancelButton = new JButton(translate("button.cancel")); + private final JList usageList; + private final UsageListModel usageListModel; + private final ABC abc; + private final ABCPanel abcPanel; public UsageFrame(List abcTags, ABC abc, int multinameIndex, ABCPanel abcPanel) { this.abcPanel = abcPanel; diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/abc/UsageListModel.java b/trunk/src/com/jpexs/decompiler/flash/gui/abc/UsageListModel.java index ec36e874a..f3d0b9af3 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/abc/UsageListModel.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/abc/UsageListModel.java @@ -30,8 +30,8 @@ import javax.swing.DefaultListModel; */ public class UsageListModel extends DefaultListModel { - private ABC abc; - private List abcTags; + private final ABC abc; + private final List abcTags; public UsageListModel(List abcTags, ABC abc) { this.abc = abc; diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/abc/tablemodels/DecimalTableModel.java b/trunk/src/com/jpexs/decompiler/flash/gui/abc/tablemodels/DecimalTableModel.java index 47a3a07b4..f420f3158 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/abc/tablemodels/DecimalTableModel.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/abc/tablemodels/DecimalTableModel.java @@ -22,7 +22,7 @@ import javax.swing.table.TableModel; public class DecimalTableModel implements TableModel { - private ABC abc; + private final ABC abc; private static final String[] columnNames = new String[]{"Index", "Value"}; private static final Class[] classes = new Class[]{Long.class, String.class}; diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/abc/tablemodels/DoubleTableModel.java b/trunk/src/com/jpexs/decompiler/flash/gui/abc/tablemodels/DoubleTableModel.java index f96149de0..50cc6117a 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/abc/tablemodels/DoubleTableModel.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/abc/tablemodels/DoubleTableModel.java @@ -22,7 +22,7 @@ import javax.swing.table.TableModel; public class DoubleTableModel implements TableModel { - private ABC abc; + private final ABC abc; private static final String[] columnNames = new String[]{"Index", "Value"}; private static final Class[] classes = new Class[]{Long.class, String.class}; diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/abc/tablemodels/IntTableModel.java b/trunk/src/com/jpexs/decompiler/flash/gui/abc/tablemodels/IntTableModel.java index effcb5933..07856709e 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/abc/tablemodels/IntTableModel.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/abc/tablemodels/IntTableModel.java @@ -22,7 +22,7 @@ import javax.swing.table.TableModel; public class IntTableModel implements TableModel { - private ABC abc; + private final ABC abc; private static final String[] columnNames = new String[]{"Index", "Value"}; private static final Class[] classes = new Class[]{Long.class, Long.class}; diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/abc/tablemodels/MultinameTableModel.java b/trunk/src/com/jpexs/decompiler/flash/gui/abc/tablemodels/MultinameTableModel.java index 180300ff3..a1d8d4a12 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/abc/tablemodels/MultinameTableModel.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/abc/tablemodels/MultinameTableModel.java @@ -23,7 +23,7 @@ import javax.swing.table.TableModel; public class MultinameTableModel implements TableModel { - private ABC abc; + private final ABC abc; private static final String[] columnNames = new String[]{"Index", "Kind", "Name", "Namespace", "NamespaceSet"}; private static final Class[] classes = new Class[]{Long.class, String.class, String.class, String.class, String.class}; diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/abc/tablemodels/NamespaceSetTableModel.java b/trunk/src/com/jpexs/decompiler/flash/gui/abc/tablemodels/NamespaceSetTableModel.java index d45919260..aa6ad6860 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/abc/tablemodels/NamespaceSetTableModel.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/abc/tablemodels/NamespaceSetTableModel.java @@ -22,7 +22,7 @@ import javax.swing.table.TableModel; public class NamespaceSetTableModel implements TableModel { - private ABC abc; + private final ABC abc; private static final String[] columnNames = new String[]{"Index", "NameSpaces"}; private static final Class[] classes = new Class[]{Long.class, String.class, String.class}; diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/abc/tablemodels/NamespaceTableModel.java b/trunk/src/com/jpexs/decompiler/flash/gui/abc/tablemodels/NamespaceTableModel.java index a044fb335..9315bf786 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/abc/tablemodels/NamespaceTableModel.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/abc/tablemodels/NamespaceTableModel.java @@ -22,7 +22,7 @@ import javax.swing.table.TableModel; public class NamespaceTableModel implements TableModel { - private ABC abc; + private final ABC abc; private static final String[] columnNames = new String[]{"Index", "Kind", "Name"}; private static final Class[] classes = new Class[]{Long.class, String.class, String.class}; diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/abc/tablemodels/StringTableModel.java b/trunk/src/com/jpexs/decompiler/flash/gui/abc/tablemodels/StringTableModel.java index 2e0c09dfb..5103448fc 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/abc/tablemodels/StringTableModel.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/abc/tablemodels/StringTableModel.java @@ -22,7 +22,7 @@ import javax.swing.table.TableModel; public class StringTableModel implements TableModel { - private ABC abc; + private final ABC abc; private static final String[] columnNames = new String[]{"Index", "Value"}; private static final Class[] classes = new Class[]{Long.class, String.class}; diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/abc/tablemodels/UIntTableModel.java b/trunk/src/com/jpexs/decompiler/flash/gui/abc/tablemodels/UIntTableModel.java index eea85a947..5350d474d 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/abc/tablemodels/UIntTableModel.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/abc/tablemodels/UIntTableModel.java @@ -22,7 +22,7 @@ import javax.swing.table.TableModel; public class UIntTableModel implements TableModel { - private ABC abc; + private final ABC abc; private static final String[] columnNames = new String[]{"Index", "Value"}; private static final Class[] classes = new Class[]{Long.class, Long.class}; diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/abc/treenodes/TreeElement.java b/trunk/src/com/jpexs/decompiler/flash/gui/abc/treenodes/TreeElement.java index 55b644f44..d15452e27 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/abc/treenodes/TreeElement.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/abc/treenodes/TreeElement.java @@ -27,11 +27,11 @@ import javax.swing.tree.TreePath; public abstract class TreeElement extends TreeNode { - private SortedMap branches; - private SortedMap leafs; - private String name; - private String path; - private TreeElement parent; + private final SortedMap branches; + private final SortedMap leafs; + private final String name; + private final String path; + private final TreeElement parent; public TreeElement(String name, String path, TreeElementItem item, TreeElement parent) { super(item); diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/player/FlashPlayerPanel.java b/trunk/src/com/jpexs/decompiler/flash/gui/player/FlashPlayerPanel.java index 0576c5ac9..842c0ea36 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/player/FlashPlayerPanel.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/player/FlashPlayerPanel.java @@ -47,8 +47,8 @@ public class FlashPlayerPanel extends Panel implements FlashDisplay { private boolean executed = false; private String flash; private HANDLE pipe; - private static List processes = new ArrayList<>(); - private static List pipes = new ArrayList<>(); + private static final List processes = new ArrayList<>(); + private static final List pipes = new ArrayList<>(); private Component frame; private boolean stopped = true; private static final int CMD_PLAY = 1; diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/player/PlayerControls.java b/trunk/src/com/jpexs/decompiler/flash/gui/player/PlayerControls.java index b7f90fb04..e203561cc 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/player/PlayerControls.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/player/PlayerControls.java @@ -44,13 +44,13 @@ public class PlayerControls extends JPanel implements ActionListener { static final String ACTION_PAUSE = "PAUSE"; static final String ACTION_STOP = "STOP"; - private JButton pauseButton; + private final JButton pauseButton; private boolean paused = false; - private FlashDisplay display; + private final FlashDisplay display; private JProgressBar progress; - private Timer timer; - private JLabel timeLabel; - private JLabel totalTimeLabel; + private final Timer timer; + private final JLabel timeLabel; + private final JLabel totalTimeLabel; private static final Icon pauseIcon = View.getIcon("pause16"); private static final Icon playIcon = View.getIcon("play16"); diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/proxy/SWFListModel.java b/trunk/src/com/jpexs/decompiler/flash/gui/proxy/SWFListModel.java index ee472378e..f94e20582 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/proxy/SWFListModel.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/proxy/SWFListModel.java @@ -30,8 +30,8 @@ import javax.swing.event.ListDataListener; */ public class SWFListModel implements ListModel { - private List listeners = new ArrayList<>(); - private List replacements; + private final List listeners = new ArrayList<>(); + private final List replacements; /** * Constructor diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/treenodes/SWFRoot.java b/trunk/src/com/jpexs/decompiler/flash/gui/treenodes/SWFRoot.java index fe96fb8a5..e0c3a398c 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/treenodes/SWFRoot.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/treenodes/SWFRoot.java @@ -26,7 +26,7 @@ import java.util.List; */ public class SWFRoot extends TreeNode { - private String name; + private final String name; public List list; public TreeNode scriptsNode; diff --git a/trunk/src/com/jpexs/decompiler/flash/helpers/FileTextWriter.java b/trunk/src/com/jpexs/decompiler/flash/helpers/FileTextWriter.java index 411f55f6b..3bdd597b3 100644 --- a/trunk/src/com/jpexs/decompiler/flash/helpers/FileTextWriter.java +++ b/trunk/src/com/jpexs/decompiler/flash/helpers/FileTextWriter.java @@ -31,7 +31,7 @@ import java.util.logging.Logger; */ public class FileTextWriter extends GraphTextWriter implements AutoCloseable { - private Writer writer; + private final Writer writer; private boolean newLine = true; private int indent; private int writtenBytes; diff --git a/trunk/src/com/jpexs/decompiler/flash/helpers/HilightedTextWriter.java b/trunk/src/com/jpexs/decompiler/flash/helpers/HilightedTextWriter.java index b4bb2b778..ec4797e85 100644 --- a/trunk/src/com/jpexs/decompiler/flash/helpers/HilightedTextWriter.java +++ b/trunk/src/com/jpexs/decompiler/flash/helpers/HilightedTextWriter.java @@ -33,15 +33,15 @@ import java.util.Stack; */ public class HilightedTextWriter extends GraphTextWriter { - private StringBuilder sb = new StringBuilder(); - private boolean hilight; + private final StringBuilder sb = new StringBuilder(); + private final boolean hilight; private boolean newLine = true; private int indent = 0; - private Stack offsets = new Stack<>(); + private final Stack offsets = new Stack<>(); private boolean toStringCalled = false; private int newLineCount = 0; - private Stack hilightStack = new Stack<>(); + private final Stack hilightStack = new Stack<>(); public List traitHilights = new ArrayList<>(); public List classHilights = new ArrayList<>(); public List methodHilights = new ArrayList<>(); diff --git a/trunk/src/com/jpexs/decompiler/flash/helpers/NulWriter.java b/trunk/src/com/jpexs/decompiler/flash/helpers/NulWriter.java index 89090ccc4..e550449f6 100644 --- a/trunk/src/com/jpexs/decompiler/flash/helpers/NulWriter.java +++ b/trunk/src/com/jpexs/decompiler/flash/helpers/NulWriter.java @@ -25,8 +25,8 @@ import java.util.Stack; */ public class NulWriter extends GraphTextWriter { - private Stack loopStack = new Stack<>(); - private Stack stringAddedStack = new Stack<>(); + private final Stack loopStack = new Stack<>(); + private final Stack stringAddedStack = new Stack<>(); private boolean stringAdded = false; public NulWriter() { diff --git a/trunk/src/com/jpexs/decompiler/flash/helpers/hilight/Highlighting.java b/trunk/src/com/jpexs/decompiler/flash/helpers/hilight/Highlighting.java index 32872e5e9..1e5a00766 100644 --- a/trunk/src/com/jpexs/decompiler/flash/helpers/hilight/Highlighting.java +++ b/trunk/src/com/jpexs/decompiler/flash/helpers/hilight/Highlighting.java @@ -39,7 +39,7 @@ public class Highlighting implements Serializable { * Length of highlighted text */ public int len; - private Map properties; + private final Map properties; public Long getPropertyLong(String key) { String dataStr = getPropertyString(key); diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/DefineButton2Tag.java b/trunk/src/com/jpexs/decompiler/flash/tags/DefineButton2Tag.java index 22fb8e7c3..144aee603 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/DefineButton2Tag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/DefineButton2Tag.java @@ -202,7 +202,7 @@ public class DefineButton2Tag extends CharacterTag implements Container, Bounded } return needed; } - private static Cache rectCache = Cache.getInstance(true); + private static final Cache rectCache = Cache.getInstance(true); @Override public RECT getRect(HashMap allCharacters, Stack visited) { diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/DefineButtonTag.java b/trunk/src/com/jpexs/decompiler/flash/tags/DefineButtonTag.java index 918158df5..d53fc1ddf 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/DefineButtonTag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/DefineButtonTag.java @@ -79,7 +79,7 @@ public class DefineButtonTag extends CharacterTag implements ASMSource, BoundedT public int getCharacterId() { return buttonId; } - private long hdrSize; + private final long hdrSize; @Override public List getRecords() { @@ -214,7 +214,7 @@ public class DefineButtonTag extends CharacterTag implements ASMSource, BoundedT } return needed; } - private static Cache rectCache = Cache.getInstance(true); + private static final Cache rectCache = Cache.getInstance(true); @Override public RECT getRect(HashMap allCharacters, Stack visited) { diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/DefineScalingGridTag.java b/trunk/src/com/jpexs/decompiler/flash/tags/DefineScalingGridTag.java index 23f4090a6..32cf1c1b1 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/DefineScalingGridTag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/DefineScalingGridTag.java @@ -30,8 +30,8 @@ import java.io.OutputStream; */ public class DefineScalingGridTag extends Tag { - private int characterId; - private RECT splitter; + private final int characterId; + private final RECT splitter; public static final int ID = 78; public DefineScalingGridTag(SWF swf, byte[] data, int version, long pos) throws IOException { diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/DefineSpriteTag.java b/trunk/src/com/jpexs/decompiler/flash/tags/DefineSpriteTag.java index cd2e48ae4..0d45e8773 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/DefineSpriteTag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/DefineSpriteTag.java @@ -101,7 +101,7 @@ public class DefineSpriteTag extends CharacterTag implements Container, BoundedT } return ret; } - private static Cache rectCache = Cache.getInstance(true); + private static final Cache rectCache = Cache.getInstance(true); @Override public RECT getRect(HashMap characters, Stack visited) { diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/DoABCDefineTag.java b/trunk/src/com/jpexs/decompiler/flash/tags/DoABCDefineTag.java index 9fd50d386..49f50b662 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/DoABCDefineTag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/DoABCDefineTag.java @@ -40,7 +40,7 @@ public class DoABCDefineTag extends Tag implements ABCContainerTag { /** * ActionScript 3 bytecodes */ - private ABC abc; + private final ABC abc; /** * A 32-bit flags value, which may contain the following bits set: * kDoAbcLazyInitializeFlag = 1: Indicates that the ABC block should not be diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/DoABCTag.java b/trunk/src/com/jpexs/decompiler/flash/tags/DoABCTag.java index 8ece588a3..237a4dca6 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/DoABCTag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/DoABCTag.java @@ -35,7 +35,7 @@ public class DoABCTag extends Tag implements ABCContainerTag { /** * ActionScript 3 bytecodes */ - private ABC abc; + private final ABC abc; public static final int ID = 72; @Override diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/FrameLabelTag.java b/trunk/src/com/jpexs/decompiler/flash/tags/FrameLabelTag.java index be397decf..a5562f130 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/FrameLabelTag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/FrameLabelTag.java @@ -26,7 +26,7 @@ import java.io.OutputStream; public class FrameLabelTag extends Tag { - private String name; + private final String name; private boolean namedAnchor = false; public static final int ID = 43; diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/PlaceObject3Tag.java b/trunk/src/com/jpexs/decompiler/flash/tags/PlaceObject3Tag.java index 52e7db539..252be5cdd 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/PlaceObject3Tag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/PlaceObject3Tag.java @@ -170,7 +170,7 @@ public class PlaceObject3Tag extends CharacterIdTag implements Container, PlaceO public RGBA backgroundColor; // FIXME bug found in ecoDrive.swf, private boolean bitmapCacheBug; - private int reserved; + private final int reserved; public static final int ID = 70; @Override diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/PlaceObject4Tag.java b/trunk/src/com/jpexs/decompiler/flash/tags/PlaceObject4Tag.java index 4d4efe23f..31c534264 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/PlaceObject4Tag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/PlaceObject4Tag.java @@ -170,7 +170,7 @@ public class PlaceObject4Tag extends CharacterIdTag implements Container, PlaceO public RGBA backgroundColor; // FIXME bug found in ecoDrive.swf, private boolean bitmapCacheBug; - private int reserved; + private final int reserved; public static final int ID = 94; public byte[] amfData; //TODO: Parse AMF data? diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/Tag.java b/trunk/src/com/jpexs/decompiler/flash/tags/Tag.java index f8809a8d3..d5c499f56 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/Tag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/Tag.java @@ -96,7 +96,7 @@ public class Tag implements NeedsCharacters, Exportable, ContainerItem { this.swf = swf; } - private static Object lockObject = new Object(); + private static final Object lockObject = new Object(); private static List knownTagIds; private static List requiredTagIds; diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/gfx/DefineCompactedFont.java b/trunk/src/com/jpexs/decompiler/flash/tags/gfx/DefineCompactedFont.java index 405e28e52..481ad435c 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/gfx/DefineCompactedFont.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/gfx/DefineCompactedFont.java @@ -71,7 +71,7 @@ public final class DefineCompactedFont extends FontTag implements DrawableTag { public int fontId; public List fonts; private List shapeCache; - private static Cache imageCache = Cache.getInstance(false); + private static final Cache imageCache = Cache.getInstance(false); private static class SerializableImage implements Serializable { diff --git a/trunk/src/com/jpexs/decompiler/flash/treeitems/AS2PackageNodeItem.java b/trunk/src/com/jpexs/decompiler/flash/treeitems/AS2PackageNodeItem.java index 6d20b24fe..5948b2660 100644 --- a/trunk/src/com/jpexs/decompiler/flash/treeitems/AS2PackageNodeItem.java +++ b/trunk/src/com/jpexs/decompiler/flash/treeitems/AS2PackageNodeItem.java @@ -24,7 +24,7 @@ import com.jpexs.decompiler.flash.SWF; */ public class AS2PackageNodeItem implements TreeItem { - private SWF swf; + private final SWF swf; public String packageName; public AS2PackageNodeItem(String packageName, SWF swf) { diff --git a/trunk/src/com/jpexs/decompiler/flash/treeitems/AS3PackageNodeItem.java b/trunk/src/com/jpexs/decompiler/flash/treeitems/AS3PackageNodeItem.java index 64f98108a..8d6072ace 100644 --- a/trunk/src/com/jpexs/decompiler/flash/treeitems/AS3PackageNodeItem.java +++ b/trunk/src/com/jpexs/decompiler/flash/treeitems/AS3PackageNodeItem.java @@ -24,7 +24,7 @@ import com.jpexs.decompiler.flash.SWF; */ public class AS3PackageNodeItem implements TreeElementItem { - private SWF swf; + private final SWF swf; public String packageName; public AS3PackageNodeItem(String packageName, SWF swf) { diff --git a/trunk/src/com/jpexs/decompiler/flash/treeitems/FrameNodeItem.java b/trunk/src/com/jpexs/decompiler/flash/treeitems/FrameNodeItem.java index e182be0f6..a8c4eab3b 100644 --- a/trunk/src/com/jpexs/decompiler/flash/treeitems/FrameNodeItem.java +++ b/trunk/src/com/jpexs/decompiler/flash/treeitems/FrameNodeItem.java @@ -25,10 +25,10 @@ import com.jpexs.decompiler.flash.tags.Tag; */ public class FrameNodeItem implements TreeItem { - private SWF swf; - private int frame; - private Tag parent; - private boolean display; + private final SWF swf; + private final int frame; + private final Tag parent; + private final boolean display; public FrameNodeItem(SWF swf, int frame, Tag parent, boolean display) { this.swf = swf; diff --git a/trunk/src/com/jpexs/decompiler/flash/treeitems/StringItem.java b/trunk/src/com/jpexs/decompiler/flash/treeitems/StringItem.java index d6cbd38e3..5a5b67f67 100644 --- a/trunk/src/com/jpexs/decompiler/flash/treeitems/StringItem.java +++ b/trunk/src/com/jpexs/decompiler/flash/treeitems/StringItem.java @@ -25,7 +25,7 @@ import com.jpexs.decompiler.flash.SWF; public class StringItem implements TreeItem { public SWF swf; - private String str; + private final String str; public StringItem(String str, SWF swf) { this.swf = swf; diff --git a/trunk/src/com/jpexs/decompiler/flash/types/BUTTONCONDACTION.java b/trunk/src/com/jpexs/decompiler/flash/types/BUTTONCONDACTION.java index ac7a75e69..8dbcd4fcf 100644 --- a/trunk/src/com/jpexs/decompiler/flash/types/BUTTONCONDACTION.java +++ b/trunk/src/com/jpexs/decompiler/flash/types/BUTTONCONDACTION.java @@ -42,8 +42,8 @@ import java.util.logging.Logger; */ public class BUTTONCONDACTION implements ASMSource, Exportable, ContainerItem { - private SWF swf; - private long pos; + private final SWF swf; + private final long pos; @Override public SWF getSwf() { diff --git a/trunk/src/com/jpexs/decompiler/flash/types/CLIPACTIONRECORD.java b/trunk/src/com/jpexs/decompiler/flash/types/CLIPACTIONRECORD.java index d1c702ea1..e704533fc 100644 --- a/trunk/src/com/jpexs/decompiler/flash/types/CLIPACTIONRECORD.java +++ b/trunk/src/com/jpexs/decompiler/flash/types/CLIPACTIONRECORD.java @@ -85,7 +85,7 @@ public class CLIPACTIONRECORD implements ASMSource, Exportable, ContainerItem { "" }; - private SWF swf; + private final SWF swf; private long pos; private long hdrPos; diff --git a/trunk/src/com/jpexs/decompiler/flash/types/gfx/GFxInputStream.java b/trunk/src/com/jpexs/decompiler/flash/types/gfx/GFxInputStream.java index 11c250bee..dae89599b 100644 --- a/trunk/src/com/jpexs/decompiler/flash/types/gfx/GFxInputStream.java +++ b/trunk/src/com/jpexs/decompiler/flash/types/gfx/GFxInputStream.java @@ -26,7 +26,7 @@ import java.io.InputStream; */ public class GFxInputStream extends InputStream { - private ReReadableInputStream is; + private final ReReadableInputStream is; private static final int MaxUInt7 = (1 << 7) - 1; public GFxInputStream(InputStream is) { diff --git a/trunk/src/com/jpexs/decompiler/flash/types/gfx/GFxOutputStream.java b/trunk/src/com/jpexs/decompiler/flash/types/gfx/GFxOutputStream.java index 5721c7e09..44f500b64 100644 --- a/trunk/src/com/jpexs/decompiler/flash/types/gfx/GFxOutputStream.java +++ b/trunk/src/com/jpexs/decompiler/flash/types/gfx/GFxOutputStream.java @@ -62,7 +62,7 @@ public class GFxOutputStream extends OutputStream { public static final int MaxSInt20 = (1 << 19) - 1; public static final int MinSInt22 = -(1 << 21); public static final int MaxSInt22 = (1 << 21) - 1; - private OutputStream os; + private final OutputStream os; private long pos = 0; public GFxOutputStream(OutputStream os) { diff --git a/trunk/src/com/jpexs/decompiler/flash/types/shaperecords/SHAPERECORD.java b/trunk/src/com/jpexs/decompiler/flash/types/shaperecords/SHAPERECORD.java index 6e79d475d..d5c62d29c 100644 --- a/trunk/src/com/jpexs/decompiler/flash/types/shaperecords/SHAPERECORD.java +++ b/trunk/src/com/jpexs/decompiler/flash/types/shaperecords/SHAPERECORD.java @@ -821,7 +821,7 @@ public abstract class SHAPERECORD implements Cloneable, NeedsCharacters, Seriali + ""; return ret; } - private static Cache cache = Cache.getInstance(false); + private static final Cache cache = Cache.getInstance(false); public static void clearShapeCache() { cache.clear(); diff --git a/trunk/src/com/jpexs/decompiler/flash/xfl/XFLConverter.java b/trunk/src/com/jpexs/decompiler/flash/xfl/XFLConverter.java index ac37e861a..edf4e0581 100644 --- a/trunk/src/com/jpexs/decompiler/flash/xfl/XFLConverter.java +++ b/trunk/src/com/jpexs/decompiler/flash/xfl/XFLConverter.java @@ -3041,7 +3041,7 @@ public class XFLConverter { private int lineSpacing = -1; private double letterSpacing = -1; private String alignment = null; - private List tags; + private final List tags; private boolean bold = false; private boolean italic = false; private boolean underline = false; diff --git a/trunk/src/com/jpexs/decompiler/graph/ExportMode.java b/trunk/src/com/jpexs/decompiler/graph/ExportMode.java index a85cf4611..2a0e51426 100644 --- a/trunk/src/com/jpexs/decompiler/graph/ExportMode.java +++ b/trunk/src/com/jpexs/decompiler/graph/ExportMode.java @@ -37,7 +37,7 @@ public enum ExportMode { } } - private int code; + private final int code; private ExportMode(int code) { this.code = code; diff --git a/trunk/src/com/jpexs/decompiler/graph/Graph.java b/trunk/src/com/jpexs/decompiler/graph/Graph.java index 2dbdcf6f8..f0991e1c6 100644 --- a/trunk/src/com/jpexs/decompiler/graph/Graph.java +++ b/trunk/src/com/jpexs/decompiler/graph/Graph.java @@ -55,7 +55,7 @@ public class Graph { public List heads; protected GraphSource code; - private List alternateEntries; + private final List alternateEntries; public static final int SOP_USE_STATIC = 0; public static final int SOP_SKIP_STATIC = 1; public static final int SOP_REMOVE_STATIC = 2; diff --git a/trunk/src/com/jpexs/decompiler/graph/GraphPath.java b/trunk/src/com/jpexs/decompiler/graph/GraphPath.java index 843c832fb..beb643cce 100644 --- a/trunk/src/com/jpexs/decompiler/graph/GraphPath.java +++ b/trunk/src/com/jpexs/decompiler/graph/GraphPath.java @@ -26,8 +26,8 @@ import java.util.List; */ public class GraphPath implements Serializable { - private List keys = new ArrayList<>(); - private List vals = new ArrayList<>(); + private final List keys = new ArrayList<>(); + private final List vals = new ArrayList<>(); public String rootName = ""; public GraphPath(String rootName, List keys, List vals) { diff --git a/trunk/src/com/jpexs/decompiler/graph/MarkItem.java b/trunk/src/com/jpexs/decompiler/graph/MarkItem.java index 374775bf1..461e6e224 100644 --- a/trunk/src/com/jpexs/decompiler/graph/MarkItem.java +++ b/trunk/src/com/jpexs/decompiler/graph/MarkItem.java @@ -26,7 +26,7 @@ import com.jpexs.decompiler.graph.model.LocalData; */ public class MarkItem extends GraphTargetItem { - private String mark; + private final String mark; public MarkItem(String mark) { super(null, NOPRECEDENCE); diff --git a/trunk/src/com/jpexs/decompiler/graph/model/CommentItem.java b/trunk/src/com/jpexs/decompiler/graph/model/CommentItem.java index 00540a441..022f27266 100644 --- a/trunk/src/com/jpexs/decompiler/graph/model/CommentItem.java +++ b/trunk/src/com/jpexs/decompiler/graph/model/CommentItem.java @@ -25,7 +25,7 @@ import com.jpexs.decompiler.graph.GraphTargetItem; */ public class CommentItem extends GraphTargetItem { - private String[] commentLines; + private final String[] commentLines; public CommentItem(String comment) { super(null, NOPRECEDENCE); diff --git a/trunk/src/com/jpexs/decompiler/graph/model/IntegerValueItem.java b/trunk/src/com/jpexs/decompiler/graph/model/IntegerValueItem.java index 3b0462fb1..331db05cd 100644 --- a/trunk/src/com/jpexs/decompiler/graph/model/IntegerValueItem.java +++ b/trunk/src/com/jpexs/decompiler/graph/model/IntegerValueItem.java @@ -27,7 +27,7 @@ import java.util.Set; */ public class IntegerValueItem extends GraphTargetItem { - private int intValue; + private final int intValue; public IntegerValueItem(GraphSourceItem src, int value) { super(src, PRECEDENCE_PRIMARY); diff --git a/trunk/src/com/jpexs/helpers/Cache.java b/trunk/src/com/jpexs/helpers/Cache.java index 83b890c00..dba10a00b 100644 --- a/trunk/src/com/jpexs/helpers/Cache.java +++ b/trunk/src/com/jpexs/helpers/Cache.java @@ -36,9 +36,9 @@ import java.util.logging.Logger; */ public class Cache { - private Map cacheFiles; - private Map cacheMemory; - private static List instances = new ArrayList<>(); + private final Map cacheFiles; + private final Map cacheMemory; + private static final List instances = new ArrayList<>(); public static final int STORAGE_FILES = 1; public static final int STORAGE_MEMORY = 2; diff --git a/trunk/src/com/jpexs/helpers/FoundInputStream.java b/trunk/src/com/jpexs/helpers/FoundInputStream.java index f47e8c9b5..1c1565db2 100644 --- a/trunk/src/com/jpexs/helpers/FoundInputStream.java +++ b/trunk/src/com/jpexs/helpers/FoundInputStream.java @@ -26,7 +26,7 @@ import java.io.InputStream; */ public class FoundInputStream extends ReReadableInputStream{ - private long startPos; + private final long startPos; private boolean started=false; public FoundInputStream(long startPos,InputStream is) { diff --git a/trunk/src/com/jpexs/helpers/Helper.java b/trunk/src/com/jpexs/helpers/Helper.java index f56ef1883..4ba9fc50c 100644 --- a/trunk/src/com/jpexs/helpers/Helper.java +++ b/trunk/src/com/jpexs/helpers/Helper.java @@ -421,7 +421,7 @@ public class Helper { } return f; } - private static BitSet fileNameInvalidChars; + private static final BitSet fileNameInvalidChars; private static final List invalidFilenamesParts; static { diff --git a/trunk/src/com/jpexs/helpers/LimitedInputStream.java b/trunk/src/com/jpexs/helpers/LimitedInputStream.java index 4c7d3c1d3..2bf74864c 100644 --- a/trunk/src/com/jpexs/helpers/LimitedInputStream.java +++ b/trunk/src/com/jpexs/helpers/LimitedInputStream.java @@ -25,9 +25,9 @@ import java.io.InputStream; */ public class LimitedInputStream extends InputStream { - private InputStream is; + private final InputStream is; private long pos = 0; - private long limit; + private final long limit; public LimitedInputStream(InputStream is, long limit) { this.is = is; diff --git a/trunk/src/com/jpexs/helpers/PosMarkedInputStream.java b/trunk/src/com/jpexs/helpers/PosMarkedInputStream.java index ab4dad46e..a33516979 100644 --- a/trunk/src/com/jpexs/helpers/PosMarkedInputStream.java +++ b/trunk/src/com/jpexs/helpers/PosMarkedInputStream.java @@ -26,7 +26,7 @@ import java.io.InputStream; public class PosMarkedInputStream extends InputStream { private long pos = 0; - private InputStream is; + private final InputStream is; public PosMarkedInputStream(InputStream is) { this.is = is; diff --git a/trunk/src/com/jpexs/helpers/StreamSearch.java b/trunk/src/com/jpexs/helpers/StreamSearch.java index 89ccd6cd4..43483dca1 100644 --- a/trunk/src/com/jpexs/helpers/StreamSearch.java +++ b/trunk/src/com/jpexs/helpers/StreamSearch.java @@ -29,7 +29,7 @@ import java.util.logging.Logger; */ public class StreamSearch implements Searchable { - private ReReadableInputStream is; + private final ReReadableInputStream is; public StreamSearch(InputStream is) { this.is = new ReReadableInputStream(is); diff --git a/trunk/src/com/jpexs/process/win32/Win32ProcessTools.java b/trunk/src/com/jpexs/process/win32/Win32ProcessTools.java index 5360843e3..dffd0d542 100644 --- a/trunk/src/com/jpexs/process/win32/Win32ProcessTools.java +++ b/trunk/src/com/jpexs/process/win32/Win32ProcessTools.java @@ -165,7 +165,7 @@ public class Win32ProcessTools extends ProcessTools { } return path; } - private static Map driveMappings = getDriveMappings(); + private static final Map driveMappings = getDriveMappings(); public static boolean drawIcon(BufferedImage ret, WinDef.HICON hIcon, int diFlags) { @@ -534,13 +534,13 @@ public class Win32ProcessTools extends ProcessTools { private static class ProcessMemoryInputStream extends InputStream { - private List pages; + private final List pages; private int currentPage = 0; private int pagePos = 0; - private static int BUFFER_SIZE = 1024; + private static final int BUFFER_SIZE = 1024; private byte[] buf; private int bufPos; - private HANDLE hOtherProcess; + private final HANDLE hOtherProcess; public ProcessMemoryInputStream(List pages, HANDLE hOtherProcess, int currentPage, int pagePos) { this.pages = pages;