Updated Branches: refs/heads/develop ab14cf9f8 -> dcc404689
http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/dcc40468/modules/debugger/src/java/flex/tools/debugger/cli/ExtensionsDisabled.java ---------------------------------------------------------------------- diff --git a/modules/debugger/src/java/flex/tools/debugger/cli/ExtensionsDisabled.java b/modules/debugger/src/java/flex/tools/debugger/cli/ExtensionsDisabled.java index 99ecc09..ba3c52d 100644 --- a/modules/debugger/src/java/flex/tools/debugger/cli/ExtensionsDisabled.java +++ b/modules/debugger/src/java/flex/tools/debugger/cli/ExtensionsDisabled.java @@ -27,7 +27,7 @@ package flex.tools.debugger.cli; * ExtensionsDisabled emtpy stubs are provided that allow * for DebugCLI to be fully compliant with the API */ -public class ExtensionsDisabled +class ExtensionsDisabled { public static void doShowStats(DebugCLI cli) { cli.out("Command not supported."); } public static void doShowFuncs(DebugCLI cli) { cli.out("Command not supported."); } http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/dcc40468/modules/debugger/src/java/flex/tools/debugger/cli/FaultActions.java ---------------------------------------------------------------------- diff --git a/modules/debugger/src/java/flex/tools/debugger/cli/FaultActions.java b/modules/debugger/src/java/flex/tools/debugger/cli/FaultActions.java index ec4f4b9..3216c38 100644 --- a/modules/debugger/src/java/flex/tools/debugger/cli/FaultActions.java +++ b/modules/debugger/src/java/flex/tools/debugger/cli/FaultActions.java @@ -31,13 +31,13 @@ import java.util.HashMap; * * Add new actions by calling addAction("name") */ -public class FaultActions +class FaultActions { - HashMap<String, Integer> m_faults = new HashMap<String, Integer>(); - HashMap<String, String> m_description = new HashMap<String, String>(); // @todo should really use an object within the faults map for this - HashMap<String, Integer> m_actions = new HashMap<String, Integer>(); + private final HashMap<String, Integer> m_faults = new HashMap<String, Integer>(); + private final HashMap<String, String> m_description = new HashMap<String, String>(); // @todo should really use an object within the faults map for this + private final HashMap<String, Integer> m_actions = new HashMap<String, Integer>(); - int m_nextBitForAction = 0x1; // the next bit to use for the action + private int m_nextBitForAction = 0x1; // the next bit to use for the action public FaultActions() {} @@ -50,7 +50,7 @@ public class FaultActions public int size() { return m_faults.size(); } public Object[] names() { return m_faults.keySet().toArray(); } public Object[] actions() { return m_actions.keySet().toArray(); } - public boolean exists(String k) { return (get(k) == null) ? false : true; } + public boolean exists(String k) { return (get(k) != null); } public void putDescription(String k, String v) { m_description.put(k,v); } public String getDescription(String k) { return (m_description.get(k) == null) ? "" : m_description.get(k); } //$NON-NLS-1$ @@ -60,7 +60,7 @@ public class FaultActions */ public void add(String k) { - put(k, new Integer(0)); + put(k, 0); } /** @@ -68,7 +68,7 @@ public class FaultActions */ public void addAction(String k) { - Integer v = new Integer(m_nextBitForAction++); + Integer v = m_nextBitForAction++; m_actions.put(k,v); } @@ -77,11 +77,10 @@ public class FaultActions */ public boolean is(String fault, String action) { - int mask = getAction(action).intValue(); - int bits = get(fault).intValue(); + int mask = getAction(action); + int bits = get(fault); - boolean set = ( (bits & mask) == mask ) ? true : false; - return set; + return ((bits & mask) == mask); } /** @@ -106,13 +105,13 @@ public class FaultActions throw new IllegalArgumentException(action); // now do the math - int old = current.intValue(); - int mask = bit.intValue(); + int old = current; + int mask = bit; int n = (old & (~mask)); // turn it off n = (no) ? n : (n | mask); // leave it off or turn it on - put(fault, new Integer(n)); + put(fault, n); return n; } http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/dcc40468/modules/debugger/src/java/flex/tools/debugger/cli/FileInfoCache.java ---------------------------------------------------------------------- diff --git a/modules/debugger/src/java/flex/tools/debugger/cli/FileInfoCache.java b/modules/debugger/src/java/flex/tools/debugger/cli/FileInfoCache.java index 8a90988..da00445 100644 --- a/modules/debugger/src/java/flex/tools/debugger/cli/FileInfoCache.java +++ b/modules/debugger/src/java/flex/tools/debugger/cli/FileInfoCache.java @@ -38,16 +38,16 @@ import java.util.Iterator; */ public class FileInfoCache implements Comparator<SourceFile> { - Session m_session; + private Session m_session; /** * We can get at files by module id or path */ - IntMap m_byInt = new IntMap(); - SourceFile[] m_files = null; - SwfInfo m_swfFilter = null; - int m_swfsLoaded = 0; - boolean m_dirty = false; + private final IntMap m_byInt = new IntMap(); + private SourceFile[] m_files = null; + private SwfInfo m_swfFilter = null; + private int m_swfsLoaded = 0; + private boolean m_dirty = false; public FileInfoCache() {} @@ -117,7 +117,7 @@ public class FileInfoCache implements Comparator<SourceFile> for(int i=0; i<swfs.length; i++) { if (swfs[i] != null) - worked = loadSwfFiles(files, swfs[i]) ? worked : false; + worked = loadSwfFiles(files, swfs[i]) && worked; } // trim the file list @@ -445,7 +445,7 @@ public class FileInfoCache implements Comparator<SourceFile> fileList.add(sourceFile); else if (doEndsWith && name.endsWith(match)) fileList.add(sourceFile); - else if (doIndexOf && name.indexOf(match) > -1) + else if (doIndexOf && name.contains(match)) fileList.add(sourceFile); } http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/dcc40468/modules/debugger/src/java/flex/tools/debugger/cli/Help.java ---------------------------------------------------------------------- diff --git a/modules/debugger/src/java/flex/tools/debugger/cli/Help.java b/modules/debugger/src/java/flex/tools/debugger/cli/Help.java index cb2f080..5655e4c 100644 --- a/modules/debugger/src/java/flex/tools/debugger/cli/Help.java +++ b/modules/debugger/src/java/flex/tools/debugger/cli/Help.java @@ -24,7 +24,7 @@ import java.util.ArrayList; import java.util.List; import java.util.Locale; -public class Help +class Help { private Help() { http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/dcc40468/modules/debugger/src/java/flex/tools/debugger/cli/IntProperties.java ---------------------------------------------------------------------- diff --git a/modules/debugger/src/java/flex/tools/debugger/cli/IntProperties.java b/modules/debugger/src/java/flex/tools/debugger/cli/IntProperties.java index 14ed4ca..1470808 100644 --- a/modules/debugger/src/java/flex/tools/debugger/cli/IntProperties.java +++ b/modules/debugger/src/java/flex/tools/debugger/cli/IntProperties.java @@ -22,9 +22,9 @@ package flex.tools.debugger.cli; import java.util.HashMap; import java.util.Set; -public class IntProperties +class IntProperties { - HashMap<String, Integer> m_map = new HashMap<String, Integer>(); + private final HashMap<String, Integer> m_map = new HashMap<String, Integer>(); /* getters */ public Integer getInteger(String s) { return m_map.get(s); } @@ -33,6 +33,6 @@ public class IntProperties public HashMap<String, Integer> map() { return m_map; } /* setters */ - public void put(String s, int value) { m_map.put(s, new Integer(value)); } + public void put(String s, int value) { m_map.put(s, value); } } http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/dcc40468/modules/debugger/src/java/flex/tools/debugger/cli/InternalProperty.java ---------------------------------------------------------------------- diff --git a/modules/debugger/src/java/flex/tools/debugger/cli/InternalProperty.java b/modules/debugger/src/java/flex/tools/debugger/cli/InternalProperty.java index abdb2ee..057e012 100644 --- a/modules/debugger/src/java/flex/tools/debugger/cli/InternalProperty.java +++ b/modules/debugger/src/java/flex/tools/debugger/cli/InternalProperty.java @@ -21,10 +21,10 @@ package flex.tools.debugger.cli; import flash.tools.debugger.expression.NoSuchVariableException; -public class InternalProperty +class InternalProperty { - String m_key; - Object m_value; + private final String m_key; + final Object m_value; public InternalProperty(String key, Object value) { http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/dcc40468/modules/debugger/src/java/flex/tools/debugger/cli/LocationCollection.java ---------------------------------------------------------------------- diff --git a/modules/debugger/src/java/flex/tools/debugger/cli/LocationCollection.java b/modules/debugger/src/java/flex/tools/debugger/cli/LocationCollection.java index a6a8293..8fb1e2d 100644 --- a/modules/debugger/src/java/flex/tools/debugger/cli/LocationCollection.java +++ b/modules/debugger/src/java/flex/tools/debugger/cli/LocationCollection.java @@ -38,7 +38,7 @@ import flash.tools.debugger.Location; */ public class LocationCollection { - private ArrayList<Location> m_locations = new ArrayList<Location>(); + private final ArrayList<Location> m_locations = new ArrayList<Location>(); public boolean add(Location l) { return m_locations.add(l); } public boolean contains(Location l) { return m_locations.contains(l); } http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/dcc40468/modules/debugger/src/java/flex/tools/debugger/cli/StringIntArray.java ---------------------------------------------------------------------- diff --git a/modules/debugger/src/java/flex/tools/debugger/cli/StringIntArray.java b/modules/debugger/src/java/flex/tools/debugger/cli/StringIntArray.java index bb12124..70aefa1 100644 --- a/modules/debugger/src/java/flex/tools/debugger/cli/StringIntArray.java +++ b/modules/debugger/src/java/flex/tools/debugger/cli/StringIntArray.java @@ -30,11 +30,11 @@ import java.util.AbstractList; * which returns a ArrayList of index numbers for each element whose * String component matches the provided argument. */ -public class StringIntArray extends AbstractList<Object> +class StringIntArray extends AbstractList<Object> { - Object[] m_ar; - int m_size = 0; - double m_growthRatio = 1.60; + private Object[] m_ar; + private int m_size = 0; + private final double m_growthRatio = 1.60; public StringIntArray(Object[] ar) { @@ -44,7 +44,7 @@ public class StringIntArray extends AbstractList<Object> public StringIntArray() { this(10); } - public StringIntArray(int size) + private StringIntArray(int size) { m_ar = new Object[size]; m_size = 0; @@ -53,7 +53,7 @@ public class StringIntArray extends AbstractList<Object> public Object get(int at) { return m_ar[at]; } public int size() { return m_size; } - public Object[] getElement(int at) { return (Object[])get(at); } + Object[] getElement(int at) { return (Object[])get(at); } public String getString(int at) { return (String)getElement(at)[0]; } public Integer getInteger(int at) { return (Integer)getElement(at)[1]; } public int getInt(int at) { return getInteger(at).intValue(); } @@ -68,7 +68,7 @@ public class StringIntArray extends AbstractList<Object> ArrayList<Integer> alist = new ArrayList<Integer>(); for(int i=0; i<m_size; i++) if ( getString(i).startsWith(s) ) - alist.add( new Integer(i) ); + alist.add(i); return alist; } http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/dcc40468/modules/debugger/src/java/flex/tools/debugger/cli/VariableFacade.java ---------------------------------------------------------------------- diff --git a/modules/debugger/src/java/flex/tools/debugger/cli/VariableFacade.java b/modules/debugger/src/java/flex/tools/debugger/cli/VariableFacade.java index c2cdd48..db14730 100644 --- a/modules/debugger/src/java/flex/tools/debugger/cli/VariableFacade.java +++ b/modules/debugger/src/java/flex/tools/debugger/cli/VariableFacade.java @@ -37,10 +37,10 @@ import flash.tools.debugger.events.FaultEvent; */ public class VariableFacade implements Variable { - Variable m_var; - long m_context; - String m_name; - String m_path; + private Variable m_var; + private long m_context; + private String m_name; + private String m_path; public VariableFacade(Variable v, long context) { init(context, v, null); } public VariableFacade(long context, String name) { init(context, null, name); } http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/dcc40468/modules/debugger/src/java/flex/tools/debugger/cli/WatchAction.java ---------------------------------------------------------------------- diff --git a/modules/debugger/src/java/flex/tools/debugger/cli/WatchAction.java b/modules/debugger/src/java/flex/tools/debugger/cli/WatchAction.java index 74dfa6d..dac9826 100644 --- a/modules/debugger/src/java/flex/tools/debugger/cli/WatchAction.java +++ b/modules/debugger/src/java/flex/tools/debugger/cli/WatchAction.java @@ -25,10 +25,10 @@ import flash.tools.debugger.Watch; * An object that relates a CLI debugger watchpoint with the * actual Watch obtained from the Session */ -public class WatchAction +class WatchAction { - Watch m_watch; - int m_id; + private Watch m_watch; + private int m_id; public WatchAction(Watch w) { @@ -43,7 +43,7 @@ public class WatchAction /* getters */ public int getId() { return m_id; } - public long getVariableId() { return m_watch.getValueId(); } + long getVariableId() { return m_watch.getValueId(); } public int getKind() { return m_watch.getKind(); } public Watch getWatch() { return m_watch; }