[hg] main-silver: Unused imports deleted, some warnings eliminated.

  • From:
  • To:
  • Subject: [hg] main-silver: Unused imports deleted, some warnings eliminated.
  • Date: Wed, 21 Nov 2012 16:55:57 -0800

changeset 8a6b20b27975 in main-silver ((none))
details: http://hg.netbeans.org/main-silver/rev/8a6b20b27975
description:
        Unused imports deleted, some warnings eliminated.

diffstat:

 
debugger.jpda.visual/src/org/netbeans/modules/debugger/jpda/visual/RemoteAWTScreenshot.java
    |  11 +-
 
debugger.jpda.visual/src/org/netbeans/modules/debugger/jpda/visual/RemoteServices.java
         |  37 +++++----
 
debugger.jpda.visual/src/org/netbeans/modules/debugger/jpda/visual/VisualDebuggerListener.java
 |  10 --
 3 files changed, 26 insertions(+), 32 deletions(-)

diffs (200 lines):

diff --git 
a/debugger.jpda.visual/src/org/netbeans/modules/debugger/jpda/visual/RemoteAWTScreenshot.java
 
b/debugger.jpda.visual/src/org/netbeans/modules/debugger/jpda/visual/RemoteAWTScreenshot.java
--- 
a/debugger.jpda.visual/src/org/netbeans/modules/debugger/jpda/visual/RemoteAWTScreenshot.java
+++ 
b/debugger.jpda.visual/src/org/netbeans/modules/debugger/jpda/visual/RemoteAWTScreenshot.java
@@ -62,7 +62,6 @@
 import java.awt.image.BufferedImage;
 import java.awt.image.WritableRaster;
 import java.beans.PropertyVetoException;
-import java.lang.reflect.InvocationTargetException;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Collections;
@@ -96,15 +95,11 @@
 import org.netbeans.modules.debugger.jpda.visual.actions.GoToSourceAction;
 import org.netbeans.modules.debugger.jpda.visual.actions.ShowListenersAction;
 import 
org.netbeans.modules.debugger.jpda.visual.actions.ToggleComponentBreakpointAction;
-import 
org.netbeans.modules.debugger.jpda.visual.breakpoints.AWTComponentBreakpoint;
 import 
org.netbeans.modules.debugger.jpda.visual.breakpoints.ComponentBreakpoint;
 import 
org.netbeans.modules.debugger.jpda.visual.models.ComponentBreakpointsActionsProvider;
 import org.netbeans.modules.debugger.jpda.visual.spi.ComponentInfo;
 import org.netbeans.modules.debugger.jpda.visual.spi.RemoteScreenshot;
 import org.openide.nodes.Node;
-import org.openide.nodes.Node.Property;
-import org.openide.nodes.Node.PropertySet;
-import org.openide.nodes.PropertySupport.ReadOnly;
 import org.openide.util.Exceptions;
 import org.openide.util.HelpCtx;
 import org.openide.util.NbBundle;
@@ -826,7 +821,9 @@
 
         @Override
         protected void retrieve() throws RetrievalException {
-            if (componentClass == null) return ;
+            if (componentClass == null) {
+                return ;
+            }
             try {
                 retrieveComponents(this, getThread(), vm, componentClass, 
containerClass, getComponent(), getComponents, getBounds,
                         shiftX, shiftY);
@@ -845,7 +842,7 @@
 
             @Override
             public String getName() {
-                return 
NbBundle.getBundle(RemoteAWTScreenshot.class).getString("CTL_Component_Breakpoint_Customize_Label");
+                return NbBundle.getMessage(RemoteAWTScreenshot.class, 
"CTL_Component_Breakpoint_Customize_Label");
             }
 
             @Override
diff --git 
a/debugger.jpda.visual/src/org/netbeans/modules/debugger/jpda/visual/RemoteServices.java
 
b/debugger.jpda.visual/src/org/netbeans/modules/debugger/jpda/visual/RemoteServices.java
--- 
a/debugger.jpda.visual/src/org/netbeans/modules/debugger/jpda/visual/RemoteServices.java
+++ 
b/debugger.jpda.visual/src/org/netbeans/modules/debugger/jpda/visual/RemoteServices.java
@@ -52,7 +52,6 @@
 import com.sun.jdi.InvalidTypeException;
 import com.sun.jdi.InvocationException;
 import com.sun.jdi.Method;
-import com.sun.jdi.ObjectCollectedException;
 import com.sun.jdi.ObjectReference;
 import com.sun.jdi.ReferenceType;
 import com.sun.jdi.StackFrame;
@@ -68,7 +67,6 @@
 import java.io.InputStream;
 import java.util.ArrayList;
 import java.util.Arrays;
-import java.util.Collection;
 import java.util.Collections;
 import java.util.HashMap;
 import java.util.HashSet;
@@ -83,7 +81,6 @@
 import java.util.zip.ZipEntry;
 import java.util.zip.ZipInputStream;
 import org.netbeans.api.debugger.DebuggerManager;
-import org.netbeans.api.debugger.jpda.JPDAClassType;
 import org.netbeans.api.debugger.jpda.JPDADebugger;
 import org.netbeans.api.debugger.jpda.JPDAThread;
 import org.netbeans.api.debugger.jpda.MethodBreakpoint;
@@ -196,7 +193,7 @@
                         String className = rc.name;
                         if ((sType == ServiceType.AWT && 
className.contains("AWT")) ||
                             (sType == ServiceType.FX && 
className.contains("FX"))) {
-                            ClassObjectReference theUploadedClass = null;
+                            ClassObjectReference theUploadedClass;
                             ArrayReference byteArray = createTargetBytes(vm, 
rc.bytes);
                             StringReference nameMirror = null;
                             try {
@@ -333,13 +330,12 @@
      */
     public static void runOnStoppedThread(JPDAThread thread, final Runnable 
run, ServiceType sType) throws PropertyVetoException {
         final JPDAThreadImpl t = (JPDAThreadImpl) thread;
-        boolean wasSuspended = true;
         
         Lock lock = t.accessLock.writeLock();
         lock.lock();
         try {
             ThreadReference threadReference = t.getThreadReference();
-            wasSuspended = t.isSuspended();
+            boolean wasSuspended = t.isSuspended();
             if (t.isSuspended() && !threadReference.isAtBreakpoint()) {
                 // TODO: Suspended, but will not be able to invoke methods
                 
@@ -458,7 +454,7 @@
     private static void retrieveAttachedListeners(JPDAThreadImpl thread,
                                                   ObjectReference component,
                                                   List<RemoteListener> 
rlisteners,
-                                                  boolean combineAllTypes) {
+                                                  final boolean 
combineAllTypes) {
         ThreadReference t = thread.getThreadReference();
         try {
             ReferenceType clazz = 
ObjectReferenceWrapper.referenceType(component);
@@ -613,10 +609,15 @@
                 ReferenceType rt = (ReferenceType) t;
                 String lname = ReferenceTypeWrapper.name(rt);
                 int i = lname.lastIndexOf('.');
-                if (i < 0) i = 0;
-                else i++;
+                if (i < 0) {
+                    i = 0;
+                } else {
+                    i++;
+                }
                 int ii = lname.lastIndexOf('$', i);
-                if (ii > i) i = ii + 1;
+                if (ii > i) {
+                    i = ii + 1;
+                }
                 //System.err.println("  getAttachableListeners() 
'"+name.substring(3)+"' should equal to '"+lname.substring(i)+"', lname = 
"+lname+", i = "+i);
                 if (!name.substring(3).equals(lname.substring(i))) {
                     // addXXXListener() method name does not match 
XXXListener simple class name.
@@ -1005,15 +1006,19 @@
             List<RemoteClass> rcl = new ArrayList<RemoteClass>();
             while((ze = zin.getNextEntry()) != null) {
                 String fileName = ze.getName();
-                if (!fileName.endsWith(".class")) continue;
+                if (!fileName.endsWith(".class")) {
+                    continue;
+                }
                 String name = fileName.substring(0, fileName.length() - 
".class".length());
                 int baseStart = name.lastIndexOf('/');
-                if (baseStart < 0) continue;
-                baseStart++;
+                if (baseStart < 0) {
+                    continue;
+                }
+                /*baseStart++;
                 int baseEnd = name.indexOf('$', baseStart);
                 if (baseEnd < 0) {
                     baseEnd = name.length();
-                }
+                }*/
                 RemoteClass rc = new RemoteClass();
                 rc.name = name.replace('/', '.');
                 int l = (int) ze.getSize();
@@ -1154,7 +1159,9 @@
         @Override
         public void propertyChange(PropertyChangeEvent evt) {
             JPDAThreadImpl thread = this.t;
-            if (thread == null) return ;
+            if (thread == null) {
+                return ;
+            }
             if (JPDAThread.PROP_SUSPENDED.equals(evt.getPropertyName()) &&
                 !"methodInvoke".equals(evt.getPropagationId())) {            
   // NOI18N
                 
diff --git 
a/debugger.jpda.visual/src/org/netbeans/modules/debugger/jpda/visual/VisualDebuggerListener.java
 
b/debugger.jpda.visual/src/org/netbeans/modules/debugger/jpda/visual/VisualDebuggerListener.java
--- 
a/debugger.jpda.visual/src/org/netbeans/modules/debugger/jpda/visual/VisualDebuggerListener.java
+++ 
b/debugger.jpda.visual/src/org/netbeans/modules/debugger/jpda/visual/VisualDebuggerListener.java
@@ -57,15 +57,11 @@
 import com.sun.jdi.VMDisconnectedException;
 import com.sun.jdi.Value;
 import com.sun.jdi.VirtualMachine;
-import com.sun.jdi.event.Event;
-import com.sun.jdi.event.MethodEntryEvent;
-import com.sun.jdi.event.WatchpointEvent;
 import java.beans.PropertyChangeEvent;
 import java.beans.PropertyChangeListener;
 import java.beans.PropertyVetoException;
 import java.io.IOException;
 import java.util.ArrayList;
-import java.util.Arrays;
 import java.util.Collection;
 import java.util.Collections;
 import java.util.HashMap;
@@ -81,19 +77,13 @@
 import org.netbeans.api.debugger.DebuggerEngine;
 import org.netbeans.api.debugger.DebuggerManager;
 import org.netbeans.api.debugger.DebuggerManagerAdapter;
-import org.netbeans.api.debugger.DebuggerManagerListener;
 import org.netbeans.api.debugger.LazyDebuggerManagerListener;
 import org.netbeans.api.debugger.Properties;
-import org.netbeans.api.debugger.jpda.CallStackFrame;
-import org.netbeans.api.debugger.jpda.FieldBreakpoint;
-import org.netbeans.api.debugger.jpda.JPDAClassType;
 import org.netbeans.api.debugger.jpda.JPDADebugger;
 import org.netbeans.api.debugger.jpda.JPDAThread;
 import org.netbeans.api.debugger.jpda.MethodBreakpoint;
-import org.netbeans.api.debugger.jpda.Variable;
 import org.netbeans.api.debugger.jpda.event.JPDABreakpointEvent;
 import org.netbeans.api.debugger.jpda.event.JPDABreakpointListener;
-import org.netbeans.modules.debugger.jpda.JPDADebuggerImpl;
 import org.netbeans.modules.debugger.jpda.expr.InvocationExceptionTranslated;
 import org.netbeans.modules.debugger.jpda.expr.JDIVariable;
 import 
org.netbeans.modules.debugger.jpda.jdi.ClassNotPreparedExceptionWrapper;

[hg] main-silver: Unused imports deleted, some warnings eliminated.

mentlicher 11/22/2012

Project Features

About this Project

Debugger was started in November 2009, is owned by tpavek, and has 29 members.
By use of this website, you agree to the NetBeans Policies and Terms of Use (revision 20140418.2d69abc). © 2013, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo
 
 
Close
loading
Please Confirm
Close