8183012: Code cleanup in com.sun.tools.jdi
authorclanger
Thu, 29 Jun 2017 12:59:55 +0200
changeset 45714 1820d351198d
parent 45713 ee3f2cbfe23a
child 45715 5770e935238b
child 47142 c6ba533f5977
8183012: Code cleanup in com.sun.tools.jdi Reviewed-by: sspitsyn, stuefe
jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/AbstractLauncher.java
jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/ArrayReferenceImpl.java
jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/ArrayTypeImpl.java
jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/BaseLineInfo.java
jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/BooleanTypeImpl.java
jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/BooleanValueImpl.java
jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/ByteTypeImpl.java
jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/ByteValueImpl.java
jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/CharTypeImpl.java
jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/CharValueImpl.java
jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/ClassLoaderReferenceImpl.java
jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/ClassObjectReferenceImpl.java
jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/ClassTypeImpl.java
jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/CommandSender.java
jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/ConcreteMethodImpl.java
jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/ConnectorImpl.java
jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/DoubleTypeImpl.java
jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/DoubleValueImpl.java
jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/EventQueueImpl.java
jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/EventRequestManagerImpl.java
jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/EventSetImpl.java
jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/FieldImpl.java
jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/FloatTypeImpl.java
jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/FloatValueImpl.java
jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/GenericAttachingConnector.java
jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/GenericListeningConnector.java
jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/IntegerTypeImpl.java
jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/IntegerValueImpl.java
jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/InterfaceTypeImpl.java
jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/InternalEventHandler.java
jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/InvokableTypeImpl.java
jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/JDWPException.java
jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/JNITypeParser.java
jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/LineInfo.java
jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/LocalVariableImpl.java
jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/LocationImpl.java
jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/LockObject.java
jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/LongTypeImpl.java
jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/LongValueImpl.java
jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/MethodImpl.java
jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/MirrorImpl.java
jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/ModuleReferenceImpl.java
jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/MonitorInfoImpl.java
jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/NonConcreteMethodImpl.java
jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/ObjectReferenceImpl.java
jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/ObsoleteMethodImpl.java
jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/Packet.java
jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/PacketStream.java
jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/PrimitiveTypeImpl.java
jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/PrimitiveValueImpl.java
jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/ProcessAttachingConnector.java
jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/RawCommandLineLauncher.java
jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/ReferenceTypeImpl.java
jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/SDE.java
jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/ShortTypeImpl.java
jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/ShortValueImpl.java
jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/SocketAttachingConnector.java
jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/SocketConnection.java
jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/SocketListeningConnector.java
jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/SocketTransportService.java
jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/StackFrameImpl.java
jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/StratumLineInfo.java
jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/StringReferenceImpl.java
jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/SunCommandLineLauncher.java
jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/TargetVM.java
jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/ThreadAction.java
jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/ThreadGroupReferenceImpl.java
jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/ThreadReferenceImpl.java
jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/TypeComponentImpl.java
jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/TypeImpl.java
jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/VMAction.java
jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/VMListener.java
jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/VMModifiers.java
jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/VMState.java
jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/ValueContainer.java
jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/ValueImpl.java
jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/VirtualMachineImpl.java
jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/VirtualMachineManagerImpl.java
jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/VirtualMachineManagerService.java
jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/VoidTypeImpl.java
jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/VoidValueImpl.java
--- a/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/AbstractLauncher.java	Thu Jun 29 11:10:30 2017 +0100
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/AbstractLauncher.java	Thu Jun 29 12:59:55 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,26 +25,34 @@
 
 package com.sun.tools.jdi;
 
-import com.sun.tools.jdi.*;
-import com.sun.jdi.connect.*;
-import com.sun.jdi.connect.spi.*;
-import com.sun.jdi.*;
-
+import java.io.IOException;
+import java.io.InterruptedIOException;
+import java.util.ArrayList;
+import java.util.List;
 import java.util.Map;
 import java.util.StringTokenizer;
-import java.util.List;
-import java.util.ArrayList;
-import java.io.IOException;
-import java.io.InterruptedIOException;
-
-abstract class AbstractLauncher extends ConnectorImpl implements LaunchingConnector {
 
+import com.sun.jdi.Bootstrap;
+import com.sun.jdi.InternalException;
+import com.sun.jdi.VirtualMachine;
+import com.sun.jdi.VirtualMachineManager;
+import com.sun.jdi.connect.Connector;
+import com.sun.jdi.connect.IllegalConnectorArgumentsException;
+import com.sun.jdi.connect.LaunchingConnector;
+import com.sun.jdi.connect.VMStartException;
+import com.sun.jdi.connect.spi.Connection;
+import com.sun.jdi.connect.spi.TransportService;
+
+abstract class AbstractLauncher extends ConnectorImpl
+                                implements LaunchingConnector
+{
     abstract public VirtualMachine
-        launch(Map<String,? extends Connector.Argument> arguments)
-                                 throws IOException,
-                                        IllegalConnectorArgumentsException,
-                                        VMStartException;
+        launch(Map<String, ? extends Connector.Argument> arguments)
+        throws IOException, IllegalConnectorArgumentsException,
+               VMStartException;
+
     abstract public String name();
+
     abstract public String description();
 
     ThreadGroup grp;
@@ -70,7 +78,7 @@
                                                         true);
         String quoted = null;
         String pending = null;
-        List<String> tokenList = new ArrayList<String>();
+        List<String> tokenList = new ArrayList<>();
         while (tokenizer.hasMoreTokens()) {
             String token = tokenizer.nextToken();
             if (quoted != null) {
@@ -146,6 +154,7 @@
      * one launch.
      */
     private class Helper {
+        @SuppressWarnings("unused")
         private final String address;
         private TransportService.ListenKey listenKey;
         private TransportService ts;
@@ -228,8 +237,7 @@
         }
 
         Thread monitorTarget() {
-            Thread thread = new Thread(grp,
-                                       "launched target monitor") {
+            Thread thread = new Thread(grp, "launched target monitor") {
                 public void run() {
                     try {
                         process.waitFor();
@@ -248,8 +256,7 @@
         }
 
         Thread acceptConnection() {
-            Thread thread = new Thread(grp,
-                                       "connection acceptor") {
+            Thread thread = new Thread(grp, "connection acceptor") {
                 public void run() {
                     try {
                         Connection connection = ts.accept(listenKey, 0, 0);
--- a/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/ArrayReferenceImpl.java	Thu Jun 29 11:10:30 2017 +0100
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/ArrayReferenceImpl.java	Thu Jun 29 12:59:55 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,20 +25,24 @@
 
 package com.sun.tools.jdi;
 
-import com.sun.jdi.*;
-
+import java.util.ArrayList;
 import java.util.List;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Iterator;
+
+import com.sun.jdi.ArrayReference;
+import com.sun.jdi.ClassNotLoadedException;
+import com.sun.jdi.InvalidTypeException;
+import com.sun.jdi.Method;
+import com.sun.jdi.Type;
+import com.sun.jdi.Value;
+import com.sun.jdi.VirtualMachine;
 
 public class ArrayReferenceImpl extends ObjectReferenceImpl
     implements ArrayReference
 {
     int length = -1;
 
-    ArrayReferenceImpl(VirtualMachine aVm,long aRef) {
-        super(aVm,aRef);
+    ArrayReferenceImpl(VirtualMachine aVm, long aRef) {
+        super(aVm, aRef);
     }
 
     protected ClassTypeImpl invokableReferenceType(Method method) {
--- a/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/ArrayTypeImpl.java	Thu Jun 29 11:10:30 2017 +0100
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/ArrayTypeImpl.java	Thu Jun 29 12:59:55 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,14 +25,23 @@
 
 package com.sun.tools.jdi;
 
-import com.sun.jdi.*;
-
-import java.util.List;
 import java.util.ArrayList;
 import java.util.Iterator;
+import java.util.List;
 import java.util.Map;
 import java.util.Set;
 
+import com.sun.jdi.ArrayReference;
+import com.sun.jdi.ArrayType;
+import com.sun.jdi.ClassLoaderReference;
+import com.sun.jdi.ClassNotLoadedException;
+import com.sun.jdi.InterfaceType;
+import com.sun.jdi.Method;
+import com.sun.jdi.PrimitiveType;
+import com.sun.jdi.ReferenceType;
+import com.sun.jdi.Type;
+import com.sun.jdi.VirtualMachine;
+
 public class ArrayTypeImpl extends ReferenceTypeImpl
     implements ArrayType
 {
@@ -68,7 +77,7 @@
     }
 
     public List<Method> allMethods() {
-        return new ArrayList<Method>(0);   // arrays don't have methods
+        return new ArrayList<>(0);   // arrays don't have methods
     }
 
     /*
--- a/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/BaseLineInfo.java	Thu Jun 29 11:10:30 2017 +0100
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/BaseLineInfo.java	Thu Jun 29 12:59:55 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,10 +25,12 @@
 
 package com.sun.tools.jdi;
 
-import com.sun.jdi.*;
+import com.sun.jdi.AbsentInformationException;
 
 class BaseLineInfo implements LineInfo {
+
     private final int lineNumber;
+
     private final ReferenceTypeImpl declaringType;
 
     BaseLineInfo(int lineNumber,
--- a/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/BooleanTypeImpl.java	Thu Jun 29 11:10:30 2017 +0100
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/BooleanTypeImpl.java	Thu Jun 29 12:59:55 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 1999, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,9 +25,13 @@
 
 package com.sun.tools.jdi;
 
-import com.sun.jdi.*;
+import com.sun.jdi.BooleanType;
+import com.sun.jdi.InvalidTypeException;
+import com.sun.jdi.PrimitiveValue;
+import com.sun.jdi.VirtualMachine;
 
 public class BooleanTypeImpl extends PrimitiveTypeImpl implements BooleanType {
+
     BooleanTypeImpl(VirtualMachine vm) {
         super(vm);
     }
--- a/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/BooleanValueImpl.java	Thu Jun 29 11:10:30 2017 +0100
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/BooleanValueImpl.java	Thu Jun 29 12:59:55 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,22 +25,24 @@
 
 package com.sun.tools.jdi;
 
-import com.sun.jdi.*;
+import com.sun.jdi.BooleanValue;
+import com.sun.jdi.Type;
+import com.sun.jdi.VirtualMachine;
 
 public class BooleanValueImpl extends PrimitiveValueImpl
-                              implements BooleanValue {
+                              implements BooleanValue
+{
     private boolean value;
 
-    BooleanValueImpl(VirtualMachine aVm,boolean aValue) {
+    BooleanValueImpl(VirtualMachine aVm, boolean aValue) {
         super(aVm);
-
         value = aValue;
     }
 
     public boolean equals(Object obj) {
         if ((obj != null) && (obj instanceof BooleanValue)) {
-            return (value == ((BooleanValue)obj).value())
-                   && super.equals(obj);
+            return (value == ((BooleanValue)obj).value()) &&
+                   super.equals(obj);
         } else {
             return false;
         }
@@ -66,31 +68,31 @@
     }
 
     public byte byteValue() {
-        return(byte)((value)?1:0);
+        return (byte)(value ? 1 : 0);
     }
 
     public char charValue() {
-        return(char)((value)?1:0);
+        return (char)(value ? 1 : 0);
     }
 
     public short shortValue() {
-        return(short)((value)?1:0);
+        return (short)(value ? 1 : 0);
     }
 
     public int intValue() {
-        return (value)?1:0;
+        return (value ? 1 : 0);
     }
 
     public long longValue() {
-        return(long)((value)?1:0);
+        return (value ? 1 : 0);
     }
 
     public float floatValue() {
-        return(float)((value)?1.0:0.0);
+        return (float)(value ? 1.0 : 0.0);
     }
 
     public double doubleValue() {
-        return (value)?1.0:0.0;
+        return (value ? 1.0 : 0.0);
     }
 
     public String toString() {
--- a/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/ByteTypeImpl.java	Thu Jun 29 11:10:30 2017 +0100
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/ByteTypeImpl.java	Thu Jun 29 12:59:55 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 1999, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,14 +25,17 @@
 
 package com.sun.tools.jdi;
 
-import com.sun.jdi.*;
+import com.sun.jdi.ByteType;
+import com.sun.jdi.InvalidTypeException;
+import com.sun.jdi.PrimitiveValue;
+import com.sun.jdi.VirtualMachine;
 
 public class ByteTypeImpl extends PrimitiveTypeImpl implements ByteType {
+
     ByteTypeImpl(VirtualMachine vm) {
         super(vm);
     }
 
-
     public String signature() {
         return String.valueOf((char)JDWP.Tag.BYTE);
     }
--- a/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/ByteValueImpl.java	Thu Jun 29 11:10:30 2017 +0100
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/ByteValueImpl.java	Thu Jun 29 12:59:55 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,15 +25,18 @@
 
 package com.sun.tools.jdi;
 
-import com.sun.jdi.*;
+import com.sun.jdi.ByteValue;
+import com.sun.jdi.InvalidTypeException;
+import com.sun.jdi.Type;
+import com.sun.jdi.VirtualMachine;
 
 public class ByteValueImpl extends PrimitiveValueImpl
-                           implements ByteValue {
+                           implements ByteValue
+{
     private byte value;
 
-    ByteValueImpl(VirtualMachine aVm,byte aValue) {
+    ByteValueImpl(VirtualMachine aVm, byte aValue) {
         super(aVm);
-
         value = aValue;
     }
 
@@ -58,7 +61,6 @@
         return value() - other;
     }
 
-
     public Type type() {
         return vm.theByteType();
     }
@@ -68,7 +70,7 @@
     }
 
     public boolean booleanValue() {
-        return(value == 0)?false:true;
+        return (value == 0 ? false : true);
     }
 
     public byte byteValue() {
@@ -76,27 +78,27 @@
     }
 
     public char charValue() {
-        return(char)value;
+        return (char)value;
     }
 
     public short shortValue() {
-        return(short)value;
+        return value;
     }
 
     public int intValue() {
-        return(int)value;
+        return value;
     }
 
     public long longValue() {
-        return(long)value;
+        return value;
     }
 
     public float floatValue() {
-        return(float)value;
+        return value;
     }
 
     public double doubleValue() {
-        return(double)value;
+        return value;
     }
 
     char checkedCharValue() throws InvalidTypeException {
--- a/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/CharTypeImpl.java	Thu Jun 29 11:10:30 2017 +0100
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/CharTypeImpl.java	Thu Jun 29 12:59:55 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 1999, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,14 +25,17 @@
 
 package com.sun.tools.jdi;
 
-import com.sun.jdi.*;
+import com.sun.jdi.CharType;
+import com.sun.jdi.InvalidTypeException;
+import com.sun.jdi.PrimitiveValue;
+import com.sun.jdi.VirtualMachine;
 
 public class CharTypeImpl extends PrimitiveTypeImpl implements CharType {
+
     CharTypeImpl(VirtualMachine vm) {
         super(vm);
     }
 
-
     public String signature() {
         return String.valueOf((char)JDWP.Tag.CHAR);
     }
@@ -40,5 +43,4 @@
     PrimitiveValue convert(PrimitiveValue value) throws InvalidTypeException {
         return vm.mirrorOf(((PrimitiveValueImpl)value).checkedCharValue());
     }
-
 }
--- a/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/CharValueImpl.java	Thu Jun 29 11:10:30 2017 +0100
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/CharValueImpl.java	Thu Jun 29 12:59:55 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,15 +25,18 @@
 
 package com.sun.tools.jdi;
 
-import com.sun.jdi.*;
+import com.sun.jdi.CharValue;
+import com.sun.jdi.InvalidTypeException;
+import com.sun.jdi.Type;
+import com.sun.jdi.VirtualMachine;
 
 public class CharValueImpl extends PrimitiveValueImpl
-                           implements CharValue {
+                           implements CharValue
+{
     private char value;
 
-    CharValueImpl(VirtualMachine aVm,char aValue) {
+    CharValueImpl(VirtualMachine aVm, char aValue) {
         super(aVm);
-
         value = aValue;
     }
 
@@ -67,11 +70,11 @@
     }
 
     public boolean booleanValue() {
-        return(value == 0)?false:true;
+        return (value == 0 ? false : true);
     }
 
     public byte byteValue() {
-        return(byte)value;
+        return (byte)value;
     }
 
     public char charValue() {
@@ -79,23 +82,23 @@
     }
 
     public short shortValue() {
-        return(short)value;
+        return (short)value;
     }
 
     public int intValue() {
-        return(int)value;
+        return value;
     }
 
     public long longValue() {
-        return(long)value;
+        return value;
     }
 
     public float floatValue() {
-        return(float)value;
+        return value;
     }
 
     public double doubleValue() {
-        return(double)value;
+        return value;
     }
 
     public String toString() {
--- a/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/ClassLoaderReferenceImpl.java	Thu Jun 29 11:10:30 2017 +0100
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/ClassLoaderReferenceImpl.java	Thu Jun 29 12:59:55 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,12 +25,20 @@
 
 package com.sun.tools.jdi;
 
-import com.sun.jdi.*;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+
+import com.sun.jdi.ClassLoaderReference;
+import com.sun.jdi.ClassNotLoadedException;
+import com.sun.jdi.ReferenceType;
+import com.sun.jdi.Type;
+import com.sun.jdi.VirtualMachine;
 
 public class ClassLoaderReferenceImpl extends ObjectReferenceImpl
-                  implements ClassLoaderReference, VMListener  {
-
+                                      implements ClassLoaderReference
+{
     // This is cached only while the VM is suspended
     private static class Cache extends ObjectReferenceImpl.Cache {
         List<ReferenceType> visibleClasses = null;
@@ -50,7 +58,7 @@
     }
 
     public List<ReferenceType> definedClasses() {
-        ArrayList<ReferenceType> definedClasses = new ArrayList<ReferenceType>();
+        ArrayList<ReferenceType> definedClasses = new ArrayList<>();
         for (ReferenceType type :  vm.allClasses()) {
             if (type.isPrepared() &&
                 equals(type.classLoader())) {
@@ -72,7 +80,7 @@
                 JDWP.ClassLoaderReference.VisibleClasses.ClassInfo[]
                   jdwpClasses = JDWP.ClassLoaderReference.VisibleClasses.
                                             process(vm, this).classes;
-                classes = new ArrayList<ReferenceType>(jdwpClasses.length);
+                classes = new ArrayList<>(jdwpClasses.length);
                 for (int i = 0; i < jdwpClasses.length; ++i) {
                     classes.add(vm.referenceType(jdwpClasses[i].typeID,
                                                  jdwpClasses[i].refTypeTag));
--- a/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/ClassObjectReferenceImpl.java	Thu Jun 29 11:10:30 2017 +0100
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/ClassObjectReferenceImpl.java	Thu Jun 29 12:59:55 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2000, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,11 +25,13 @@
 
 package com.sun.tools.jdi;
 
-import com.sun.jdi.*;
-import java.util.*;
+import com.sun.jdi.ClassObjectReference;
+import com.sun.jdi.ReferenceType;
+import com.sun.jdi.VirtualMachine;
 
 public class ClassObjectReferenceImpl extends ObjectReferenceImpl
-                                      implements ClassObjectReference {
+                                      implements ClassObjectReference
+{
     private ReferenceType reflectedType;
 
     ClassObjectReferenceImpl(VirtualMachine vm, long ref) {
--- a/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/ClassTypeImpl.java	Thu Jun 29 11:10:30 2017 +0100
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/ClassTypeImpl.java	Thu Jun 29 12:59:55 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,12 +25,25 @@
 
 package com.sun.tools.jdi;
 
-import com.sun.jdi.*;
+import java.util.ArrayList;
+import java.util.List;
 
-import java.util.*;
+import com.sun.jdi.ClassNotLoadedException;
+import com.sun.jdi.ClassType;
+import com.sun.jdi.Field;
+import com.sun.jdi.IncompatibleThreadStateException;
+import com.sun.jdi.InterfaceType;
+import com.sun.jdi.InvalidTypeException;
+import com.sun.jdi.InvocationException;
+import com.sun.jdi.Method;
+import com.sun.jdi.ObjectReference;
+import com.sun.jdi.ReferenceType;
+import com.sun.jdi.ThreadReference;
+import com.sun.jdi.Value;
+import com.sun.jdi.VirtualMachine;
 
 final public class ClassTypeImpl extends InvokableTypeImpl
-    implements ClassType
+                                 implements ClassType
 {
     private static class IResult implements InvocationResult {
         final private JDWP.ClassType.InvokeMethod rslt;
@@ -52,15 +65,14 @@
 
     private boolean cachedSuperclass = false;
     private ClassType superclass = null;
-    private int lastLine = -1;
     private List<InterfaceType> interfaces = null;
 
-    protected ClassTypeImpl(VirtualMachine aVm,long aRef) {
+    protected ClassTypeImpl(VirtualMachine aVm, long aRef) {
         super(aVm, aRef);
     }
 
     public ClassType superclass() {
-        if(!cachedSuperclass)  {
+        if (!cachedSuperclass)  {
             ClassTypeImpl sup = null;
             try {
                 sup = JDWP.ClassType.Superclass.
@@ -97,7 +109,7 @@
     }
 
     public List<ClassType> subclasses() {
-        List<ClassType> subs = new ArrayList<ClassType>();
+        List<ClassType> subs = new ArrayList<>();
         for (ReferenceType refType : vm.allClasses()) {
             if (refType instanceof ClassType) {
                 ClassType clazz = (ClassType)refType;
@@ -162,9 +174,9 @@
     }
 
     PacketStream sendNewInstanceCommand(final ThreadReferenceImpl thread,
-                                   final MethodImpl method,
-                                   final ValueImpl[] args,
-                                   final int options) {
+                                        final MethodImpl method,
+                                        final ValueImpl[] args,
+                                        final int options) {
         CommandSender sender =
             new CommandSender() {
                 public PacketStream send() {
@@ -232,18 +244,18 @@
     }
 
     public Method concreteMethodByName(String name, String signature)  {
-       Method method = null;
-       for (Method candidate : visibleMethods()) {
-           if (candidate.name().equals(name) &&
-               candidate.signature().equals(signature) &&
-               !candidate.isAbstract()) {
+        Method method = null;
+        for (Method candidate : visibleMethods()) {
+            if (candidate.name().equals(name) &&
+                candidate.signature().equals(signature) &&
+                !candidate.isAbstract()) {
 
-               method = candidate;
-               break;
-           }
-       }
-       return method;
-   }
+                method = candidate;
+                break;
+            }
+        }
+        return method;
+    }
 
     void validateConstructorInvocation(Method method)
                                    throws InvalidTypeException,
@@ -264,7 +276,6 @@
         }
     }
 
-
     public String toString() {
        return "class " + name() + " (" + loaderString() + ")";
     }
--- a/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/CommandSender.java	Thu Jun 29 11:10:30 2017 +0100
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/CommandSender.java	Thu Jun 29 12:59:55 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,9 +25,6 @@
 
 package com.sun.tools.jdi;
 
-import com.sun.jdi.*;
-import java.util.EventListener;
-
 interface CommandSender {
     PacketStream send();
 }
--- a/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/ConcreteMethodImpl.java	Thu Jun 29 11:10:30 2017 +0100
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/ConcreteMethodImpl.java	Thu Jun 29 12:59:55 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,16 +25,20 @@
 
 package com.sun.tools.jdi;
 
-import com.sun.jdi.*;
-
+import java.lang.ref.SoftReference;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
-import java.util.Iterator;
-import java.util.ListIterator;
-import java.util.HashMap;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.lang.ref.SoftReference;
+
+import com.sun.jdi.AbsentInformationException;
+import com.sun.jdi.LocalVariable;
+import com.sun.jdi.Location;
+import com.sun.jdi.VirtualMachine;
+import com.sun.tools.jdi.JDWP.Method.VariableTable;
+import com.sun.tools.jdi.JDWP.Method.VariableTableWithGeneric;
 
 /**
  * Represents methods with method bodies.
@@ -47,9 +51,9 @@
      * A subset of the line number info that is softly cached
      */
     static private class SoftLocationXRefs {
-        final String stratumID;   // The stratum of this information
-        final Map<Integer, List<Location>> lineMapper;     // Maps line number to location(s)
-        final List<Location> lineLocations; // List of locations ordered by code index
+        final String stratumID;                        // The stratum of this information
+        final Map<Integer, List<Location>> lineMapper; // Maps line number to location(s)
+        final List<Location> lineLocations;            // List of locations ordered by code index
 
         /*
          * Note: these do not necessarily correspond to
@@ -57,15 +61,16 @@
          * in the lineLocations list. Use these only for bounds
          * checking and with lineMapper.
          */
+        @SuppressWarnings("unused")
         final int lowestLine;
+        @SuppressWarnings("unused")
         final int highestLine;
 
-        SoftLocationXRefs(String stratumID, Map<Integer, List<Location>> lineMapper, List<Location> lineLocations,
-                     int lowestLine, int highestLine) {
+        SoftLocationXRefs(String stratumID, Map<Integer, List<Location>> lineMapper,
+                          List<Location> lineLocations, int lowestLine, int highestLine) {
             this.stratumID = stratumID;
             this.lineMapper = Collections.unmodifiableMap(lineMapper);
-            this.lineLocations =
-                Collections.unmodifiableList(lineLocations);
+            this.lineLocations = Collections.unmodifiableList(lineLocations);
             this.lowestLine = lowestLine;
             this.highestLine = highestLine;
         }
@@ -82,13 +87,11 @@
     private int argSlotCount = -1;
 
     ConcreteMethodImpl(VirtualMachine vm, ReferenceTypeImpl declaringType,
-                       long ref,
-                       String name, String signature,
-                       String genericSignature, int modifiers) {
-
+                       long ref, String name, String signature,
+                       String genericSignature, int modifiers)
+    {
         // The generic signature is set when this is created
-        super(vm, declaringType, ref, name, signature,
-              genericSignature, modifiers);
+        super(vm, declaringType, ref, name, signature, genericSignature, modifiers);
     }
 
     public Location location() {
@@ -99,14 +102,14 @@
     }
 
     List<Location> sourceNameFilter(List<Location> list,
-                          SDE.Stratum stratum,
-                          String sourceName)
+                                    SDE.Stratum stratum,
+                                    String sourceName)
                             throws AbsentInformationException {
         if (sourceName == null) {
             return list;
         } else {
             /* needs sourceName filteration */
-            List<Location> locs = new ArrayList<Location>();
+            List<Location> locs = new ArrayList<>();
             for (Location loc : list) {
                 if (((LocationImpl)loc).sourceName(stratum).equals(sourceName)) {
                     locs.add(loc);
@@ -117,7 +120,7 @@
     }
 
     List<Location> allLineLocations(SDE.Stratum stratum,
-                          String sourceName)
+                                    String sourceName)
                             throws AbsentInformationException {
         List<Location> lineLocations = getLocations(stratum).lineLocations;
 
@@ -126,12 +129,12 @@
         }
 
         return Collections.unmodifiableList(
-          sourceNameFilter(lineLocations, stratum, sourceName));
+            sourceNameFilter(lineLocations, stratum, sourceName));
     }
 
     List<Location> locationsOfLine(SDE.Stratum stratum,
-                         String sourceName,
-                         int lineNumber)
+                                   String sourceName,
+                                   int lineNumber)
                             throws AbsentInformationException {
         SoftLocationXRefs info = getLocations(stratum);
 
@@ -146,13 +149,12 @@
         List<Location> list = info.lineMapper.get(lineNumber);
 
         if (list == null) {
-            list = new ArrayList<Location>(0);
+            list = new ArrayList<>(0);
         }
         return Collections.unmodifiableList(
-          sourceNameFilter(list, stratum, sourceName));
+            sourceNameFilter(list, stratum, sourceName));
     }
 
-
     public Location locationOfCodeIndex(long codeIndex) {
         if (firstIndex == -1) {
             getBaseLocations();
@@ -168,7 +170,6 @@
         return new LocationImpl(virtualMachine(), this, codeIndex);
     }
 
-
     LineInfo codeIndexToLineInfo(SDE.Stratum stratum,
                                  long codeIndex) {
         if (firstIndex == -1) {
@@ -179,8 +180,7 @@
          * Check for invalid code index.
          */
         if (codeIndex < firstIndex || codeIndex > lastIndex) {
-            throw new InternalError(
-                    "Location with invalid code index");
+            throw new InternalError("Location with invalid code index");
         }
 
         List<Location> lineLocations = getLocations(stratum).lineLocations;
@@ -212,7 +212,6 @@
         return bestMatch.getLineInfo(stratum);
     }
 
-
     public List<LocalVariable> variables() throws AbsentInformationException {
         return getVariables();
     }
@@ -220,7 +219,7 @@
     public List<LocalVariable> variablesByName(String name) throws AbsentInformationException {
         List<LocalVariable> variables = getVariables();
 
-        List<LocalVariable> retList = new ArrayList<LocalVariable>(2);
+        List<LocalVariable> retList = new ArrayList<>(2);
         Iterator<LocalVariable> iter = variables.iterator();
         while(iter.hasNext()) {
             LocalVariable variable = iter.next();
@@ -234,7 +233,7 @@
     public List<LocalVariable> arguments() throws AbsentInformationException {
         List<LocalVariable> variables = getVariables();
 
-        List<LocalVariable> retList = new ArrayList<LocalVariable>(variables.size());
+        List<LocalVariable> retList = new ArrayList<>(variables.size());
         Iterator<LocalVariable> iter = variables.iterator();
         while(iter.hasNext()) {
             LocalVariable variable = iter.next();
@@ -255,7 +254,7 @@
             } catch (JDWPException exc) {
                 throw exc.toJDIException();
             }
-            bytecodesRef = new SoftReference<byte[]>(bytecodes);
+            bytecodesRef = new SoftReference<>(bytecodes);
         }
         /*
          * Arrays are always modifiable, so it is a little unsafe
@@ -285,19 +284,17 @@
         }
 
         List<Location> lineLocations = new ArrayList<Location>();
-        Map<Integer, List<Location>> lineMapper = new HashMap<Integer, List<Location>>();
+        Map<Integer, List<Location>> lineMapper = new HashMap<>();
         int lowestLine = -1;
         int highestLine = -1;
         SDE.LineStratum lastLineStratum = null;
-        SDE.Stratum baseStratum =
-            declaringType.stratum(SDE.BASE_STRATUM_NAME);
+        SDE.Stratum baseStratum = declaringType.stratum(SDE.BASE_STRATUM_NAME);
         Iterator<Location> it = getBaseLocations().lineLocations.iterator();
         while(it.hasNext()) {
             LocationImpl loc = (LocationImpl)it.next();
             int baseLineNumber = loc.lineNumber(baseStratum);
             SDE.LineStratum lineStratum =
-                  stratum.lineStratum(declaringType,
-                                      baseLineNumber);
+                  stratum.lineStratum(declaringType, baseLineNumber);
 
             if (lineStratum == null) {
                 // location not mapped in this stratum
@@ -320,10 +317,10 @@
                 }
 
                 loc.addStratumLineInfo(
-                  new StratumLineInfo(stratumID,
-                                      lineNumber,
-                                      lineStratum.sourceName(),
-                                      lineStratum.sourcePath()));
+                    new StratumLineInfo(stratumID,
+                                        lineNumber,
+                                        lineStratum.sourceName(),
+                                        lineStratum.sourcePath()));
 
                 // Add to the location list
                 lineLocations.add(loc);
@@ -339,10 +336,9 @@
             }
         }
 
-        info = new SoftLocationXRefs(stratumID,
-                                lineMapper, lineLocations,
-                                lowestLine, highestLine);
-        softOtherLocationXRefsRef = new SoftReference<SoftLocationXRefs>(info);
+        info = new SoftLocationXRefs(stratumID, lineMapper, lineLocations,
+                                     lowestLine, highestLine);
+        softOtherLocationXRefsRef = new SoftReference<>(info);
         return info;
     }
 
@@ -366,8 +362,8 @@
 
         int count  = lntab.lines.length;
 
-        List<Location> lineLocations = new ArrayList<Location>(count);
-        Map<Integer, List<Location>>lineMapper = new HashMap<Integer, List<Location>>();
+        List<Location> lineLocations = new ArrayList<>(count);
+        Map<Integer, List<Location>>lineMapper = new HashMap<>();
         int lowestLine = -1;
         int highestLine = -1;
         for (int i = 0; i < count; i++) {
@@ -402,7 +398,7 @@
                 Integer key = lineNumber;
                 List<Location> mappedLocs = lineMapper.get(key);
                 if (mappedLocs == null) {
-                    mappedLocs = new ArrayList<Location>(1);
+                    mappedLocs = new ArrayList<>(1);
                     lineMapper.put(key, mappedLocs);
                 }
                 mappedLocs.add(loc);
@@ -431,8 +427,8 @@
         }
 
         info = new SoftLocationXRefs(SDE.BASE_STRATUM_NAME,
-                                lineMapper, lineLocations,
-                                lowestLine, highestLine);
+                                     lineMapper, lineLocations,
+                                     lowestLine, highestLine);
         softBaseLocationXRefsRef = new SoftReference<SoftLocationXRefs>(info);
         return info;
     }
@@ -454,7 +450,7 @@
         // Get the number of slots used by argument variables
         argSlotCount = vartab.argCnt;
         int count = vartab.slots.length;
-        List<LocalVariable> variables = new ArrayList<LocalVariable>(count);
+        List<LocalVariable> variables = new ArrayList<>(count);
         for (int i=0; i<count; i++) {
             JDWP.Method.VariableTable.SlotInfo si = vartab.slots[i];
 
@@ -533,13 +529,13 @@
         }
 
         List<LocalVariable> variables = (variablesRef == null) ? null :
-                                        variablesRef.get();
+                                         variablesRef.get();
         if (variables != null) {
             return variables;
         }
         variables = getVariables1();
         variables = Collections.unmodifiableList(variables);
-        variablesRef = new SoftReference<List<LocalVariable>>(variables);
+        variablesRef = new SoftReference<>(variables);
         return variables;
     }
 }
--- a/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/ConnectorImpl.java	Thu Jun 29 11:10:30 2017 +0100
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/ConnectorImpl.java	Thu Jun 29 12:59:55 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,28 +25,30 @@
 
 package com.sun.tools.jdi;
 
-import com.sun.tools.jdi.*;
-import com.sun.jdi.*;
-import com.sun.jdi.connect.*;
-import com.sun.jdi.InternalException;
-import java.util.Collections;
+import java.util.ArrayList;
 import java.util.Collection;
-import java.util.Map;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.LinkedHashMap;
 import java.util.List;
-import java.util.ArrayList;
-import java.util.Iterator;
+import java.util.Map;
 import java.util.ResourceBundle;
-import java.io.Serializable;
+
+import com.sun.jdi.InternalException;
+import com.sun.jdi.connect.Connector;
+import com.sun.jdi.connect.IllegalConnectorArgumentsException;
+import com.sun.jdi.connect.LaunchingConnector;
 
 abstract class ConnectorImpl implements Connector {
-    Map<String,Argument> defaultArguments = new java.util.LinkedHashMap<String,Argument>();
+
+    Map<String, Argument> defaultArguments = new LinkedHashMap<>();
 
     // Used by BooleanArgument
     static String trueString = null;
     static String falseString;
 
     public Map<String,Argument> defaultArguments() {
-        Map<String,Argument> defaults = new java.util.LinkedHashMap<String,Argument>();
+        Map<String,Argument> defaults = new LinkedHashMap<>();
         Collection<Argument> values = defaultArguments.values();
 
         Iterator<Argument> iter = values.iterator();
@@ -145,7 +147,7 @@
     }
 
     @SuppressWarnings("serial") // JDK implementation class
-    abstract class ArgumentImpl implements Connector.Argument, Cloneable, Serializable {
+    abstract class ArgumentImpl implements Connector.Argument, Cloneable {
         private String name;
         private String label;
         private String description;
@@ -153,8 +155,7 @@
         private boolean mustSpecify;
 
         ArgumentImpl(String name, String label, String description,
-                     String value,
-                     boolean mustSpecify) {
+                     String value, boolean mustSpecify) {
             this.name = name;
             this.label = label;
             this.description = description;
@@ -312,7 +313,7 @@
             }
             try {
                 return isValid(Integer.decode(value).intValue());
-            } catch(NumberFormatException exc) {
+            } catch (NumberFormatException exc) {
                 return false;
             }
         }
@@ -378,11 +379,10 @@
     }
 
     class StringArgumentImpl extends ConnectorImpl.ArgumentImpl
-                              implements Connector.StringArgument {
+                             implements Connector.StringArgument {
         private static final long serialVersionUID = 7500484902692107464L;
         StringArgumentImpl(String name, String label, String description,
-                           String value,
-                           boolean mustSpecify) {
+                           String value, boolean mustSpecify) {
             super(name, label, description, value, mustSpecify);
         }
 
@@ -404,7 +404,7 @@
                              String value,
                              boolean mustSpecify, List<String> choices) {
             super(name, label, description, value, mustSpecify);
-            this.choices = Collections.unmodifiableList(new ArrayList<String>(choices));
+            this.choices = Collections.unmodifiableList(new ArrayList<>(choices));
         }
 
         /**
--- a/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/DoubleTypeImpl.java	Thu Jun 29 11:10:30 2017 +0100
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/DoubleTypeImpl.java	Thu Jun 29 12:59:55 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 1999, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,14 +25,17 @@
 
 package com.sun.tools.jdi;
 
-import com.sun.jdi.*;
+import com.sun.jdi.DoubleType;
+import com.sun.jdi.InvalidTypeException;
+import com.sun.jdi.PrimitiveValue;
+import com.sun.jdi.VirtualMachine;
 
 public class DoubleTypeImpl extends PrimitiveTypeImpl implements DoubleType {
+
     DoubleTypeImpl(VirtualMachine vm) {
         super(vm);
     }
 
-
     public String signature() {
         return String.valueOf((char)JDWP.Tag.DOUBLE);
     }
@@ -40,5 +43,4 @@
     PrimitiveValue convert(PrimitiveValue value) throws InvalidTypeException {
         return vm.mirrorOf(((PrimitiveValueImpl)value).checkedDoubleValue());
     }
-
 }
--- a/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/DoubleValueImpl.java	Thu Jun 29 11:10:30 2017 +0100
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/DoubleValueImpl.java	Thu Jun 29 12:59:55 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,15 +25,17 @@
 
 package com.sun.tools.jdi;
 
-import com.sun.jdi.*;
+import com.sun.jdi.DoubleValue;
+import com.sun.jdi.InvalidTypeException;
+import com.sun.jdi.Type;
+import com.sun.jdi.VirtualMachine;
 
 public class DoubleValueImpl extends PrimitiveValueImpl
                              implements DoubleValue {
     private double value;
 
-    DoubleValueImpl(VirtualMachine aVm,double aValue) {
+    DoubleValueImpl(VirtualMachine aVm, double aValue) {
         super(aVm);
-
         value = aValue;
     }
 
@@ -73,31 +75,31 @@
     }
 
     public boolean booleanValue() {
-        return(value == 0.0)?false:true;
+        return (value == 0.0 ? false : true);
     }
 
     public byte byteValue() {
-        return(byte)value;
+        return (byte)value;
     }
 
     public char charValue() {
-        return(char)value;
+        return (char)value;
     }
 
     public short shortValue() {
-        return(short)value;
+        return (short)value;
     }
 
     public int intValue() {
-        return(int)value;
+        return (int)value;
     }
 
     public long longValue() {
-        return(long)value;
+        return (long)value;
     }
 
     public float floatValue() {
-        return(float)value;
+        return (float)value;
     }
 
     public double doubleValue() {
--- a/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/EventQueueImpl.java	Thu Jun 29 11:10:30 2017 +0100
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/EventQueueImpl.java	Thu Jun 29 12:59:55 2017 +0200
@@ -25,19 +25,20 @@
 
 package com.sun.tools.jdi;
 
-import com.sun.jdi.*;
+import java.util.LinkedList;
+
+import com.sun.jdi.VMDisconnectedException;
+import com.sun.jdi.VirtualMachine;
 import com.sun.jdi.event.EventQueue;
 import com.sun.jdi.event.EventSet;
 
-import java.util.*;
-
 public class EventQueueImpl extends MirrorImpl implements EventQueue {
 
     /*
      * Note this is not a synchronized list. Iteration/update should be
      * protected through the 'this' monitor.
      */
-    LinkedList<EventSet> eventSets = new LinkedList<EventSet>();
+    LinkedList<EventSet> eventSets = new LinkedList<>();
 
     TargetVM target;
     boolean closed = false;
--- a/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/EventRequestManagerImpl.java	Thu Jun 29 11:10:30 2017 +0100
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/EventRequestManagerImpl.java	Thu Jun 29 12:59:55 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,11 +25,41 @@
 
 package com.sun.tools.jdi;
 
-import com.sun.jdi.*;
-import com.sun.jdi.request.*;
-import com.sun.tools.jdi.JDWP;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
 
-import java.util.*;
+import com.sun.jdi.Field;
+import com.sun.jdi.Location;
+import com.sun.jdi.NativeMethodException;
+import com.sun.jdi.ObjectReference;
+import com.sun.jdi.ReferenceType;
+import com.sun.jdi.ThreadReference;
+import com.sun.jdi.VirtualMachine;
+import com.sun.jdi.request.AccessWatchpointRequest;
+import com.sun.jdi.request.BreakpointRequest;
+import com.sun.jdi.request.ClassPrepareRequest;
+import com.sun.jdi.request.ClassUnloadRequest;
+import com.sun.jdi.request.DuplicateRequestException;
+import com.sun.jdi.request.EventRequest;
+import com.sun.jdi.request.EventRequestManager;
+import com.sun.jdi.request.ExceptionRequest;
+import com.sun.jdi.request.InvalidRequestStateException;
+import com.sun.jdi.request.MethodEntryRequest;
+import com.sun.jdi.request.MethodExitRequest;
+import com.sun.jdi.request.ModificationWatchpointRequest;
+import com.sun.jdi.request.MonitorContendedEnterRequest;
+import com.sun.jdi.request.MonitorContendedEnteredRequest;
+import com.sun.jdi.request.MonitorWaitRequest;
+import com.sun.jdi.request.MonitorWaitedRequest;
+import com.sun.jdi.request.StepRequest;
+import com.sun.jdi.request.ThreadDeathRequest;
+import com.sun.jdi.request.ThreadStartRequest;
+import com.sun.jdi.request.VMDeathRequest;
+import com.sun.jdi.request.WatchpointRequest;
 
 /**
  * This interface is used to create and remove Breakpoints, Watchpoints,
@@ -41,7 +71,7 @@
 // and List[] requestLists. The generic array is not supported.
 @SuppressWarnings({"unchecked", "rawtypes"})
 class EventRequestManagerImpl extends MirrorImpl
-                                       implements EventRequestManager
+                              implements EventRequestManager
 {
     private final List<? extends EventRequest>[] requestLists;
     private static int methodExitEventCmd = 0;
@@ -102,7 +132,6 @@
             super(EventRequestManagerImpl.this.vm);
         }
 
-
         /*
          * Override superclass back to default equality
          */
@@ -222,7 +251,7 @@
          */
         private Map<Object, Object> getProperties() {
             if (clientProperties == null) {
-                clientProperties = new HashMap<Object, Object>(2);
+                clientProperties = new HashMap<>(2);
             }
             return clientProperties;
         }
@@ -340,7 +369,7 @@
     }
 
     class ClassPrepareRequestImpl extends ClassVisibleEventRequestImpl
-                                     implements ClassPrepareRequest {
+                                  implements ClassPrepareRequest {
         ClassPrepareRequestImpl() {
             requestList().add(this);
         }
@@ -371,7 +400,7 @@
     }
 
     class ClassUnloadRequestImpl extends ClassVisibleEventRequestImpl
-                                     implements ClassUnloadRequest {
+                                 implements ClassUnloadRequest {
         ClassUnloadRequestImpl() {
             requestList().add(this);
         }
@@ -386,7 +415,7 @@
     }
 
     class ExceptionRequestImpl extends ClassVisibleEventRequestImpl
-                                      implements ExceptionRequest {
+                               implements ExceptionRequest {
         ReferenceType exception = null;
         boolean caught = true;
         boolean uncaught = true;
@@ -431,7 +460,7 @@
     }
 
     class MethodEntryRequestImpl extends ClassVisibleEventRequestImpl
-                                      implements MethodEntryRequest {
+                                 implements MethodEntryRequest {
         MethodEntryRequestImpl() {
             requestList().add(this);
         }
@@ -446,7 +475,7 @@
     }
 
     class MethodExitRequestImpl extends ClassVisibleEventRequestImpl
-                                      implements MethodExitRequest {
+                                implements MethodExitRequest {
         MethodExitRequestImpl() {
             if (methodExitEventCmd == 0) {
                 /*
@@ -478,7 +507,7 @@
     }
 
     class MonitorContendedEnterRequestImpl extends ClassVisibleEventRequestImpl
-                                      implements MonitorContendedEnterRequest {
+                                           implements MonitorContendedEnterRequest {
         MonitorContendedEnterRequestImpl() {
             requestList().add(this);
         }
@@ -493,7 +522,7 @@
     }
 
     class MonitorContendedEnteredRequestImpl extends ClassVisibleEventRequestImpl
-                                      implements MonitorContendedEnteredRequest {
+                                             implements MonitorContendedEnteredRequest {
         MonitorContendedEnteredRequestImpl() {
             requestList().add(this);
         }
@@ -523,7 +552,7 @@
     }
 
     class MonitorWaitedRequestImpl extends ClassVisibleEventRequestImpl
-                                 implements MonitorWaitedRequest {
+                                   implements MonitorWaitedRequest {
         MonitorWaitedRequestImpl() {
             requestList().add(this);
         }
@@ -538,7 +567,7 @@
     }
 
     class StepRequestImpl extends ClassVisibleEventRequestImpl
-                                      implements StepRequest {
+                          implements StepRequest {
         ThreadReferenceImpl thread;
         int size;
         int depth;
@@ -620,7 +649,7 @@
     }
 
     class ThreadDeathRequestImpl extends ThreadVisibleEventRequestImpl
-                                      implements ThreadDeathRequest {
+                                 implements ThreadDeathRequest {
         ThreadDeathRequestImpl() {
             requestList().add(this);
         }
@@ -635,7 +664,7 @@
     }
 
     class ThreadStartRequestImpl extends ThreadVisibleEventRequestImpl
-                                      implements ThreadStartRequest {
+                                 implements ThreadStartRequest {
         ThreadStartRequestImpl() {
             requestList().add(this);
         }
@@ -650,7 +679,7 @@
     }
 
     abstract class WatchpointRequestImpl extends ClassVisibleEventRequestImpl
-                                      implements WatchpointRequest {
+                                         implements WatchpointRequest {
         final Field field;
 
         WatchpointRequestImpl(Field field) {
@@ -667,7 +696,7 @@
     }
 
     class AccessWatchpointRequestImpl extends WatchpointRequestImpl
-                                  implements AccessWatchpointRequest {
+                                      implements AccessWatchpointRequest {
         AccessWatchpointRequestImpl(Field field) {
             super(field);
             requestList().add(this);
@@ -683,7 +712,7 @@
     }
 
     class ModificationWatchpointRequestImpl extends WatchpointRequestImpl
-                                  implements ModificationWatchpointRequest {
+                                            implements ModificationWatchpointRequest {
         ModificationWatchpointRequestImpl(Field field) {
             super(field);
             requestList().add(this);
@@ -699,7 +728,7 @@
     }
 
     class VMDeathRequestImpl extends EventRequestImpl
-                                        implements VMDeathRequest {
+                             implements VMDeathRequest {
         VMDeathRequestImpl() {
             requestList().add(this);
         }
@@ -908,8 +937,7 @@
     }
 
     public List<MethodExitRequest> methodExitRequests() {
-        return (List<MethodExitRequest>)unmodifiableRequestList(
-                               EventRequestManagerImpl.methodExitEventCmd);
+        return (List<MethodExitRequest>)unmodifiableRequestList(EventRequestManagerImpl.methodExitEventCmd);
     }
 
     public List<MonitorContendedEnterRequest> monitorContendedEnterRequests() {
@@ -951,9 +979,7 @@
         return null;
     }
 
-    private List<? extends EventRequest>  requestList(int eventCmd) {
+    private List<? extends EventRequest> requestList(int eventCmd) {
         return requestLists[eventCmd];
     }
-
 }
-
--- a/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/EventSetImpl.java	Thu Jun 29 11:10:30 2017 +0100
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/EventSetImpl.java	Thu Jun 29 12:59:55 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,11 +25,48 @@
 
 package com.sun.tools.jdi;
 
-import com.sun.jdi.*;
-import com.sun.jdi.event.*;
-import com.sun.jdi.request.*;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.NoSuchElementException;
+import java.util.Spliterator;
+import java.util.Spliterators;
 
-import java.util.*;
+import com.sun.jdi.Field;
+import com.sun.jdi.InternalException;
+import com.sun.jdi.Locatable;
+import com.sun.jdi.Location;
+import com.sun.jdi.Method;
+import com.sun.jdi.ObjectReference;
+import com.sun.jdi.ReferenceType;
+import com.sun.jdi.ThreadReference;
+import com.sun.jdi.VMDisconnectedException;
+import com.sun.jdi.Value;
+import com.sun.jdi.VirtualMachine;
+import com.sun.jdi.event.AccessWatchpointEvent;
+import com.sun.jdi.event.BreakpointEvent;
+import com.sun.jdi.event.ClassPrepareEvent;
+import com.sun.jdi.event.ClassUnloadEvent;
+import com.sun.jdi.event.Event;
+import com.sun.jdi.event.EventIterator;
+import com.sun.jdi.event.EventSet;
+import com.sun.jdi.event.ExceptionEvent;
+import com.sun.jdi.event.MethodEntryEvent;
+import com.sun.jdi.event.MethodExitEvent;
+import com.sun.jdi.event.ModificationWatchpointEvent;
+import com.sun.jdi.event.MonitorContendedEnterEvent;
+import com.sun.jdi.event.MonitorContendedEnteredEvent;
+import com.sun.jdi.event.MonitorWaitEvent;
+import com.sun.jdi.event.MonitorWaitedEvent;
+import com.sun.jdi.event.StepEvent;
+import com.sun.jdi.event.ThreadDeathEvent;
+import com.sun.jdi.event.ThreadStartEvent;
+import com.sun.jdi.event.VMDeathEvent;
+import com.sun.jdi.event.VMDisconnectEvent;
+import com.sun.jdi.event.VMStartEvent;
+import com.sun.jdi.event.WatchpointEvent;
+import com.sun.jdi.request.EventRequest;
+
 enum EventDestination {UNKNOWN_EVENT, INTERNAL_EVENT, CLIENT_EVENT};
 
 /*
@@ -186,7 +223,7 @@
     }
 
     abstract class LocatableEventImpl extends ThreadedEventImpl
-                                            implements Locatable {
+                                      implements Locatable {
         private Location location;
 
         LocatableEventImpl(JDWP.Event.Composite.Events.EventsCommon evt,
@@ -215,7 +252,7 @@
     }
 
     class BreakpointEventImpl extends LocatableEventImpl
-                            implements BreakpointEvent {
+                              implements BreakpointEvent {
         BreakpointEventImpl(JDWP.Event.Composite.Events.Breakpoint evt) {
             super(evt, evt.requestID, evt.thread, evt.location);
         }
@@ -236,7 +273,7 @@
     }
 
     class MethodEntryEventImpl extends LocatableEventImpl
-                            implements MethodEntryEvent {
+                               implements MethodEntryEvent {
         MethodEntryEventImpl(JDWP.Event.Composite.Events.MethodEntry evt) {
             super(evt, evt.requestID, evt.thread, evt.location);
         }
--- a/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/FieldImpl.java	Thu Jun 29 11:10:30 2017 +0100
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/FieldImpl.java	Thu Jun 29 12:59:55 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,15 +25,16 @@
 
 package com.sun.tools.jdi;
 
-import com.sun.jdi.*;
-
+import com.sun.jdi.ClassNotLoadedException;
+import com.sun.jdi.Field;
+import com.sun.jdi.Type;
+import com.sun.jdi.VirtualMachine;
 
 public class FieldImpl extends TypeComponentImpl
                        implements Field, ValueContainer {
 
     FieldImpl(VirtualMachine vm, ReferenceTypeImpl declaringType,
-              long ref,
-              String name, String signature,
+              long ref, String name, String signature,
               String genericSignature, int modifiers) {
         super(vm, declaringType, ref, name, signature,
               genericSignature, modifiers);
--- a/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/FloatTypeImpl.java	Thu Jun 29 11:10:30 2017 +0100
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/FloatTypeImpl.java	Thu Jun 29 12:59:55 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 1999, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,14 +25,17 @@
 
 package com.sun.tools.jdi;
 
-import com.sun.jdi.*;
+import com.sun.jdi.FloatType;
+import com.sun.jdi.InvalidTypeException;
+import com.sun.jdi.PrimitiveValue;
+import com.sun.jdi.VirtualMachine;
 
 public class FloatTypeImpl extends PrimitiveTypeImpl implements FloatType {
+
     FloatTypeImpl(VirtualMachine vm) {
         super(vm);
     }
 
-
     public String signature() {
         return String.valueOf((char)JDWP.Tag.FLOAT);
     }
@@ -40,5 +43,4 @@
     PrimitiveValue convert(PrimitiveValue value) throws InvalidTypeException {
         return vm.mirrorOf(((PrimitiveValueImpl)value).checkedFloatValue());
     }
-
 }
--- a/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/FloatValueImpl.java	Thu Jun 29 11:10:30 2017 +0100
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/FloatValueImpl.java	Thu Jun 29 12:59:55 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,15 +25,17 @@
 
 package com.sun.tools.jdi;
 
-import com.sun.jdi.*;
+import com.sun.jdi.FloatValue;
+import com.sun.jdi.InvalidTypeException;
+import com.sun.jdi.Type;
+import com.sun.jdi.VirtualMachine;
 
 public class FloatValueImpl extends PrimitiveValueImpl
                             implements FloatValue {
     private float value;
 
-    FloatValueImpl(VirtualMachine aVm,float aValue) {
+    FloatValueImpl(VirtualMachine aVm, float aValue) {
         super(aVm);
-
         value = aValue;
     }
 
@@ -73,27 +75,27 @@
     }
 
     public boolean booleanValue() {
-        return(value == 0.0)?false:true;
+        return (value == 0.0 ? false : true);
     }
 
     public byte byteValue() {
-        return(byte)value;
+        return (byte)value;
     }
 
     public char charValue() {
-        return(char)value;
+        return (char)value;
     }
 
     public short shortValue() {
-        return(short)value;
+        return (short)value;
     }
 
     public int intValue() {
-        return(int)value;
+        return (int)value;
     }
 
     public long longValue() {
-        return(long)value;
+        return (long)value;
     }
 
     public float floatValue() {
@@ -101,7 +103,7 @@
     }
 
     public double doubleValue() {
-        return(double)value;
+        return value;
     }
 
     byte checkedByteValue() throws InvalidTypeException {
--- a/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/GenericAttachingConnector.java	Thu Jun 29 11:10:30 2017 +0100
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/GenericAttachingConnector.java	Thu Jun 29 12:59:55 2017 +0200
@@ -30,8 +30,12 @@
 
 import com.sun.jdi.Bootstrap;
 import com.sun.jdi.VirtualMachine;
-import com.sun.jdi.connect.*;
-import com.sun.jdi.connect.spi.*;
+import com.sun.jdi.connect.AttachingConnector;
+import com.sun.jdi.connect.Connector;
+import com.sun.jdi.connect.IllegalConnectorArgumentsException;
+import com.sun.jdi.connect.Transport;
+import com.sun.jdi.connect.spi.Connection;
+import com.sun.jdi.connect.spi.TransportService;
 
 /*
  * An AttachingConnector to attach to a running VM using any
@@ -60,11 +64,11 @@
     {
         transportService = ts;
         transport = new Transport() {
-                public String name() {
-                    // delegate name to the transport service
-                    return transportService.name();
-                }
-            };
+            public String name() {
+                // delegate name to the transport service
+                return transportService.name();
+            }
+        };
 
         if (addAddressArgument) {
             addStringArgument(
@@ -75,7 +79,6 @@
                 true);
         }
 
-
         addIntegerArgument(
                 ARG_TIMEOUT,
                 getString("generic_attaching.timeout.label"),
@@ -122,8 +125,7 @@
      * of the target VM is specified by the <code>address</code> connector
      * argument.
      */
-    public VirtualMachine
-        attach(Map<String,? extends Connector.Argument> args)
+    public VirtualMachine attach(Map<String, ? extends Connector.Argument> args)
         throws IOException, IllegalConnectorArgumentsException
     {
         String address = argument(ARG_ADDRESS, args).value();
@@ -141,5 +143,4 @@
     public Transport transport() {
         return transport;
     }
-
 }
--- a/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/GenericListeningConnector.java	Thu Jun 29 11:10:30 2017 +0100
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/GenericListeningConnector.java	Thu Jun 29 12:59:55 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,15 +25,19 @@
 
 package com.sun.tools.jdi;
 
-import java.util.Map;
+import java.io.IOException;
+import java.util.ArrayList;
 import java.util.HashMap;
-import java.util.ArrayList;
-import java.io.IOException;
+import java.util.Map;
 
 import com.sun.jdi.Bootstrap;
 import com.sun.jdi.VirtualMachine;
-import com.sun.jdi.connect.*;
-import com.sun.jdi.connect.spi.*;
+import com.sun.jdi.connect.Connector;
+import com.sun.jdi.connect.IllegalConnectorArgumentsException;
+import com.sun.jdi.connect.ListeningConnector;
+import com.sun.jdi.connect.Transport;
+import com.sun.jdi.connect.spi.Connection;
+import com.sun.jdi.connect.spi.TransportService;
 
 /*
  * A ListeningConnector to listen for connections from target VM
@@ -81,7 +85,7 @@
                 false,
                 0, Integer.MAX_VALUE);
 
-        listenMap = new HashMap<Map<String,? extends Connector.Argument>,TransportService.ListenKey>(10);
+        listenMap = new HashMap<Map<String, ? extends Connector.Argument>, TransportService.ListenKey>(10);
     }
 
     /**
@@ -107,7 +111,7 @@
         TransportService.ListenKey listener = listenMap.get(args);
         if (listener != null) {
            throw new IllegalConnectorArgumentsException("Already listening",
-               new ArrayList<String>(args.keySet()));
+               new ArrayList<>(args.keySet()));
         }
 
         listener = transportService.startListening(address);
@@ -116,27 +120,27 @@
     }
 
     public String
-        startListening(Map<String,? extends Connector.Argument> args)
+        startListening(Map<String, ? extends Connector.Argument> args)
         throws IOException, IllegalConnectorArgumentsException
     {
         String address = argument(ARG_ADDRESS, args).value();
         return startListening(address, args);
     }
 
-    public void stopListening(Map<String,? extends Connector.Argument> args)
+    public void stopListening(Map<String, ? extends Connector.Argument> args)
         throws IOException, IllegalConnectorArgumentsException
     {
         TransportService.ListenKey listener = listenMap.get(args);
         if (listener == null) {
            throw new IllegalConnectorArgumentsException("Not listening",
-               new ArrayList<String>(args.keySet()));
+               new ArrayList<>(args.keySet()));
         }
         transportService.stopListening(listener);
         listenMap.remove(args);
     }
 
     public VirtualMachine
-        accept(Map<String,? extends Connector.Argument> args)
+        accept(Map<String, ? extends Connector.Argument> args)
         throws IOException, IllegalConnectorArgumentsException
     {
         String ts = argument(ARG_TIMEOUT, args).value();
@@ -179,5 +183,4 @@
     public Transport transport() {
         return transport;
     }
-
 }
--- a/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/IntegerTypeImpl.java	Thu Jun 29 11:10:30 2017 +0100
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/IntegerTypeImpl.java	Thu Jun 29 12:59:55 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 1999, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,14 +25,17 @@
 
 package com.sun.tools.jdi;
 
-import com.sun.jdi.*;
+import com.sun.jdi.IntegerType;
+import com.sun.jdi.InvalidTypeException;
+import com.sun.jdi.PrimitiveValue;
+import com.sun.jdi.VirtualMachine;
 
 public class IntegerTypeImpl extends PrimitiveTypeImpl implements IntegerType {
+
     IntegerTypeImpl(VirtualMachine vm) {
         super(vm);
     }
 
-
     public String signature() {
         return String.valueOf((char)JDWP.Tag.INT);
     }
@@ -40,5 +43,4 @@
     PrimitiveValue convert(PrimitiveValue value) throws InvalidTypeException {
         return vm.mirrorOf(((PrimitiveValueImpl)value).checkedIntValue());
     }
-
 }
--- a/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/IntegerValueImpl.java	Thu Jun 29 11:10:30 2017 +0100
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/IntegerValueImpl.java	Thu Jun 29 12:59:55 2017 +0200
@@ -25,15 +25,17 @@
 
 package com.sun.tools.jdi;
 
-import com.sun.jdi.*;
+import com.sun.jdi.IntegerValue;
+import com.sun.jdi.InvalidTypeException;
+import com.sun.jdi.Type;
+import com.sun.jdi.VirtualMachine;
 
 public class IntegerValueImpl extends PrimitiveValueImpl
                               implements IntegerValue {
     private int value;
 
-    IntegerValueImpl(VirtualMachine aVm,int aValue) {
+    IntegerValueImpl(VirtualMachine aVm, int aValue) {
         super(aVm);
-
         value = aValue;
     }
 
@@ -67,19 +69,19 @@
     }
 
     public boolean booleanValue() {
-        return(value == 0)?false:true;
+        return (value == 0 ? false : true);
     }
 
     public byte byteValue() {
-        return(byte)value;
+        return (byte)value;
     }
 
     public char charValue() {
-        return(char)value;
+        return (char)value;
     }
 
     public short shortValue() {
-        return(short)value;
+        return (short)value;
     }
 
     public int intValue() {
@@ -87,15 +89,15 @@
     }
 
     public long longValue() {
-        return(long)value;
+        return value;
     }
 
     public float floatValue() {
-        return(float)value;
+        return value;
     }
 
     public double doubleValue() {
-        return(double)value;
+        return value;
     }
 
     byte checkedByteValue() throws InvalidTypeException {
--- a/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/InterfaceTypeImpl.java	Thu Jun 29 11:10:30 2017 +0100
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/InterfaceTypeImpl.java	Thu Jun 29 12:59:55 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,13 +25,16 @@
 
 package com.sun.tools.jdi;
 
-import com.sun.jdi.*;
-
-import java.util.List;
+import java.lang.ref.SoftReference;
 import java.util.ArrayList;
 import java.util.Collections;
-import java.util.Set;
-import java.lang.ref.SoftReference;
+import java.util.List;
+
+import com.sun.jdi.ClassType;
+import com.sun.jdi.InterfaceType;
+import com.sun.jdi.Method;
+import com.sun.jdi.ReferenceType;
+import com.sun.jdi.VirtualMachine;
 
 final public class InterfaceTypeImpl extends InvokableTypeImpl
                                      implements InterfaceType {
--- a/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/InternalEventHandler.java	Thu Jun 29 11:10:30 2017 +0100
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/InternalEventHandler.java	Thu Jun 29 12:59:55 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,17 +25,24 @@
 
 package com.sun.tools.jdi;
 
-import com.sun.jdi.*;
-import com.sun.jdi.event.*;
-import java.util.*;
+import com.sun.jdi.ClassNotPreparedException;
+import com.sun.jdi.InconsistentDebugInfoException;
+import com.sun.jdi.ObjectCollectedException;
+import com.sun.jdi.VMDisconnectedException;
+import com.sun.jdi.VMOutOfMemoryException;
+import com.sun.jdi.VirtualMachine;
+import com.sun.jdi.event.ClassPrepareEvent;
+import com.sun.jdi.event.ClassUnloadEvent;
+import com.sun.jdi.event.Event;
+import com.sun.jdi.event.EventIterator;
+import com.sun.jdi.event.EventSet;
 
 public class InternalEventHandler implements Runnable
 {
     EventQueueImpl queue;
     VirtualMachineImpl vm;
 
-    InternalEventHandler(VirtualMachineImpl vm, EventQueueImpl queue)
-    {
+    InternalEventHandler(VirtualMachineImpl vm, EventQueueImpl queue) {
         this.vm = vm;
         this.queue = queue;
         Thread thread = new Thread(vm.threadGroupForJDI(), this,
@@ -73,7 +80,6 @@
                                               cpEvent.referenceType().name());
                             }
                         }
-
                     }
 
                 /*
--- a/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/InvokableTypeImpl.java	Thu Jun 29 11:10:30 2017 +0100
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/InvokableTypeImpl.java	Thu Jun 29 12:59:55 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,12 @@
 
 package com.sun.tools.jdi;
 
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
 import com.sun.jdi.ClassNotLoadedException;
 import com.sun.jdi.ClassType;
 import com.sun.jdi.IncompatibleThreadStateException;
@@ -34,18 +40,15 @@
 import com.sun.jdi.Method;
 import com.sun.jdi.ReferenceType;
 import com.sun.jdi.ThreadReference;
+import com.sun.jdi.VMCannotBeModifiedException;
 import com.sun.jdi.Value;
 import com.sun.jdi.VirtualMachine;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
 
 /**
  * A supertype for ReferenceTypes allowing method invocations
  */
 abstract class InvokableTypeImpl extends ReferenceTypeImpl {
+
     /**
      * The invocation result wrapper
      * It is necessary because both ClassType and InterfaceType
@@ -74,7 +77,7 @@
      * a member of this type, if the size of the argument list
      * does not match the number of declared arguments for the method, or
      * if the method is not static or is a static initializer.
-     * @throws {@link InvalidTypeException} if any argument in the
+     * @throws InvalidTypeException if any argument in the
      * argument list is not assignable to the corresponding method argument
      * type.
      * @throws ClassNotLoadedException if any argument type has not yet been loaded
@@ -240,7 +243,7 @@
          * Cache the values of args when TRACE_SENDS is enabled, for later printing.
          * If not cached, printing causes a remote call while synchronized, and deadlock.
          */
-        if ((vm.traceFlags & VirtualMachineImpl.TRACE_SENDS) != 0) {
+        if ((vm.traceFlags & VirtualMachine.TRACE_SENDS) != 0) {
            for (ValueImpl arg: args) {
               arg.toString();
            }
--- a/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/JDWPException.java	Thu Jun 29 11:10:30 2017 +0100
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/JDWPException.java	Thu Jun 29 12:59:55 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,10 +24,20 @@
  */
 
 package com.sun.tools.jdi;
-import com.sun.jdi.*;
+
+import com.sun.jdi.ClassNotPreparedException;
+import com.sun.jdi.InconsistentDebugInfoException;
+import com.sun.jdi.InternalException;
+import com.sun.jdi.InvalidModuleException;
+import com.sun.jdi.InvalidStackFrameException;
+import com.sun.jdi.ObjectCollectedException;
+import com.sun.jdi.VMDisconnectedException;
+import com.sun.jdi.VMOutOfMemoryException;
 
 class JDWPException extends Exception {
+
     private static final long serialVersionUID = -6321344442751299874L;
+
     short errorCode;
 
     JDWPException(short errorCode) {
--- a/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/JNITypeParser.java	Thu Jun 29 11:10:30 2017 +0100
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/JNITypeParser.java	Thu Jun 29 12:59:55 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,8 +25,8 @@
 
 package com.sun.tools.jdi;
 
+import java.util.ArrayList;
 import java.util.List;
-import java.util.ArrayList;
 
 public class JNITypeParser {
 
@@ -112,7 +112,7 @@
 
     private synchronized List<String> signatureList() {
         if (signatureList == null) {
-            signatureList = new ArrayList<String>(10);
+            signatureList = new ArrayList<>(10);
             String elem;
 
             currentIndex = 0;
@@ -131,7 +131,7 @@
 
     private synchronized List<String> typeNameList() {
         if (typeNameList == null) {
-            typeNameList = new ArrayList<String>(10);
+            typeNameList = new ArrayList<>(10);
             String elem;
 
             currentIndex = 0;
@@ -235,7 +235,6 @@
             default:
                 throw new IllegalArgumentException(
                     "Invalid JNI signature character '" + key + "'");
-
         }
     }
 }
--- a/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/LineInfo.java	Thu Jun 29 11:10:30 2017 +0100
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/LineInfo.java	Thu Jun 29 12:59:55 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
 
 package com.sun.tools.jdi;
 
-import com.sun.jdi.*;
+import com.sun.jdi.AbsentInformationException;
 
 interface LineInfo {
 
--- a/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/LocalVariableImpl.java	Thu Jun 29 11:10:30 2017 +0100
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/LocalVariableImpl.java	Thu Jun 29 12:59:55 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,7 +24,16 @@
  */
 
 package com.sun.tools.jdi;
-import com.sun.jdi.*;
+
+import com.sun.jdi.AbsentInformationException;
+import com.sun.jdi.ClassNotLoadedException;
+import com.sun.jdi.InternalException;
+import com.sun.jdi.LocalVariable;
+import com.sun.jdi.Location;
+import com.sun.jdi.Method;
+import com.sun.jdi.StackFrame;
+import com.sun.jdi.Type;
+import com.sun.jdi.VirtualMachine;
 
 public class LocalVariableImpl extends MirrorImpl
                                implements LocalVariable, ValueContainer
--- a/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/LocationImpl.java	Thu Jun 29 11:10:30 2017 +0100
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/LocationImpl.java	Thu Jun 29 12:59:55 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,9 +25,11 @@
 
 package com.sun.tools.jdi;
 
-import com.sun.jdi.*;
-
-import java.util.*;
+import com.sun.jdi.AbsentInformationException;
+import com.sun.jdi.Location;
+import com.sun.jdi.Method;
+import com.sun.jdi.ReferenceType;
+import com.sun.jdi.VirtualMachine;
 
 public class LocationImpl extends MirrorImpl implements Location {
     private final ReferenceTypeImpl declaringType;
@@ -37,10 +39,8 @@
     private LineInfo baseLineInfo = null;
     private LineInfo otherLineInfo = null;
 
-    LocationImpl(VirtualMachine vm,
-                 Method method, long codeIndex) {
+    LocationImpl(VirtualMachine vm, Method method, long codeIndex) {
         super(vm);
-
         this.method = method;
         this.codeIndex = method.isNative()? -1 : codeIndex;
         this.declaringType = (ReferenceTypeImpl)method.declaringType();
@@ -123,8 +123,7 @@
 
         /* compute the line info */
         MethodImpl methodImpl = (MethodImpl)method();
-        lineInfo = methodImpl.codeIndexToLineInfo(stratum,
-                                                  codeIndex());
+        lineInfo = methodImpl.codeIndexToLineInfo(stratum, codeIndex());
 
         /* cache it */
         addBaseLineInfo(lineInfo);
@@ -142,8 +141,7 @@
 
         /* check if there is cached info to use */
         lineInfo = otherLineInfo; // copy because of concurrency
-        if (lineInfo != null &&
-                           stratum.id().equals(lineInfo.liStratum())) {
+        if (lineInfo != null && stratum.id().equals(lineInfo.liStratum())) {
             return lineInfo;
         }
 
@@ -159,8 +157,7 @@
         } else {
             /* find best match */
             MethodImpl methodImpl = (MethodImpl)method();
-            lineInfo = methodImpl.codeIndexToLineInfo(stratum,
-                                                      codeIndex());
+            lineInfo = methodImpl.codeIndexToLineInfo(stratum, codeIndex());
         }
 
         /* cache it */
--- a/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/LockObject.java	Thu Jun 29 11:10:30 2017 +0100
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/LockObject.java	Thu Jun 29 12:59:55 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,14 +25,11 @@
 
 package com.sun.tools.jdi;
 
-import com.sun.jdi.*;
-
 /**
  * This class is used by the back end to do thread synchronization.
  * We don't want to use java.lang.Object(s) for two reasons: we can't
  * filter them out, and this class should use less heap.
  */
 
-public class LockObject
-{
+public class LockObject {
 }
--- a/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/LongTypeImpl.java	Thu Jun 29 11:10:30 2017 +0100
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/LongTypeImpl.java	Thu Jun 29 12:59:55 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 1999, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,14 +25,17 @@
 
 package com.sun.tools.jdi;
 
-import com.sun.jdi.*;
+import com.sun.jdi.InvalidTypeException;
+import com.sun.jdi.LongType;
+import com.sun.jdi.PrimitiveValue;
+import com.sun.jdi.VirtualMachine;
 
 public class LongTypeImpl extends PrimitiveTypeImpl implements LongType {
+
     LongTypeImpl(VirtualMachine vm) {
         super(vm);
     }
 
-
     public String signature() {
         return String.valueOf((char)JDWP.Tag.LONG);
     }
@@ -40,5 +43,4 @@
     PrimitiveValue convert(PrimitiveValue value) throws InvalidTypeException {
         return vm.mirrorOf(((PrimitiveValueImpl)value).checkedLongValue());
     }
-
 }
--- a/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/LongValueImpl.java	Thu Jun 29 11:10:30 2017 +0100
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/LongValueImpl.java	Thu Jun 29 12:59:55 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,15 +25,17 @@
 
 package com.sun.tools.jdi;
 
-import com.sun.jdi.*;
+import com.sun.jdi.InvalidTypeException;
+import com.sun.jdi.LongValue;
+import com.sun.jdi.Type;
+import com.sun.jdi.VirtualMachine;
 
 public class LongValueImpl extends PrimitiveValueImpl
                            implements LongValue {
     private long value;
 
-    LongValueImpl(VirtualMachine aVm,long aValue) {
+    LongValueImpl(VirtualMachine aVm, long aValue) {
         super(aVm);
-
         value = aValue;
     }
 
@@ -73,23 +75,23 @@
     }
 
     public boolean booleanValue() {
-        return(value == 0)?false:true;
+        return (value == 0 ? false : true);
     }
 
     public byte byteValue() {
-        return(byte)value;
+        return (byte)value;
     }
 
     public char charValue() {
-        return(char)value;
+        return (char)value;
     }
 
     public short shortValue() {
-        return(short)value;
+        return (short)value;
     }
 
     public int intValue() {
-        return(int)value;
+        return (int)value;
     }
 
     public long longValue() {
@@ -97,11 +99,11 @@
     }
 
     public float floatValue() {
-        return(float)value;
+        return value;
     }
 
     public double doubleValue() {
-        return(double)value;
+        return value;
     }
 
     byte checkedByteValue() throws InvalidTypeException {
--- a/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/MethodImpl.java	Thu Jun 29 11:10:30 2017 +0100
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/MethodImpl.java	Thu Jun 29 12:59:55 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,30 +25,39 @@
 
 package com.sun.tools.jdi;
 
-import com.sun.jdi.*;
-
+import java.util.ArrayList;
 import java.util.List;
-import java.util.Iterator;
-import java.util.ArrayList;
-import java.util.Comparator;
+
+import com.sun.jdi.AbsentInformationException;
+import com.sun.jdi.ArrayReference;
+import com.sun.jdi.ArrayType;
+import com.sun.jdi.ClassNotLoadedException;
+import com.sun.jdi.InterfaceType;
+import com.sun.jdi.InvalidTypeException;
+import com.sun.jdi.Location;
+import com.sun.jdi.Method;
+import com.sun.jdi.Type;
+import com.sun.jdi.Value;
+import com.sun.jdi.VirtualMachine;
 
 public abstract class MethodImpl extends TypeComponentImpl
-    implements Method {
+                                 implements Method
+{
     private JNITypeParser signatureParser;
+
     abstract int argSlotCount() throws AbsentInformationException;
 
     abstract List<Location> allLineLocations(SDE.Stratum stratum,
-                                   String sourceName)
-                           throws AbsentInformationException;
+                                             String sourceName)
+                            throws AbsentInformationException;
 
     abstract List<Location> locationsOfLine(SDE.Stratum stratum,
-                                  String sourceName,
-                                  int lineNumber)
-                           throws AbsentInformationException;
+                                            String sourceName,
+                                            int lineNumber)
+                            throws AbsentInformationException;
 
     MethodImpl(VirtualMachine vm, ReferenceTypeImpl declaringType,
-               long ref,
-               String name, String signature,
+               long ref, String name, String signature,
                String genericSignature, int modifiers) {
         super(vm, declaringType, ref, name, signature,
               genericSignature, modifiers);
@@ -62,8 +71,7 @@
                                        String signature,
                                        String genericSignature,
                                        int modifiers) {
-        if ((modifiers &
-             (VMModifiers.NATIVE | VMModifiers.ABSTRACT)) != 0) {
+        if ((modifiers & (VMModifiers.NATIVE | VMModifiers.ABSTRACT)) != 0) {
             return new NonConcreteMethodImpl(vm, declaringType, ref,
                                              name, signature,
                                              genericSignature,
@@ -92,27 +100,26 @@
     }
 
     public final List<Location> allLineLocations()
-                           throws AbsentInformationException {
+                                throws AbsentInformationException {
         return allLineLocations(vm.getDefaultStratum(), null);
     }
 
     public List<Location> allLineLocations(String stratumID,
-                                 String sourceName)
-                           throws AbsentInformationException {
-        return allLineLocations(declaringType.stratum(stratumID),
-                                sourceName);
+                                           String sourceName)
+                          throws AbsentInformationException {
+        return allLineLocations(declaringType.stratum(stratumID), sourceName);
     }
 
     public final List<Location> locationsOfLine(int lineNumber)
-                           throws AbsentInformationException {
+                                throws AbsentInformationException {
         return locationsOfLine(vm.getDefaultStratum(),
                                null, lineNumber);
     }
 
     public List<Location> locationsOfLine(String stratumID,
-                                String sourceName,
-                                int lineNumber)
-                           throws AbsentInformationException {
+                                          String sourceName,
+                                          int lineNumber)
+                          throws AbsentInformationException {
         return locationsOfLine(declaringType.stratum(stratumID),
                                sourceName, lineNumber);
     }
@@ -122,8 +129,7 @@
         if (stratum.isJava()) {
             return new BaseLineInfo(-1, declaringType);
         } else {
-            return new StratumLineInfo(stratum.id(), -1,
-                                       null, null);
+            return new StratumLineInfo(stratum.id(), -1, null, null);
         }
     }
 
@@ -164,7 +170,7 @@
 
     public List<Type> argumentTypes() throws ClassNotLoadedException {
         int size = argumentSignatures().size();
-        ArrayList<Type> types = new ArrayList<Type>(size);
+        List<Type> types = new ArrayList<>(size);
         for (int i = 0; i < size; i++) {
             Type type = argumentType(i);
             types.add(type);
@@ -177,8 +183,7 @@
         ReferenceTypeImpl declaringType = (ReferenceTypeImpl)declaringType();
         int rc = declaringType.compareTo(method.declaringType());
         if (rc == 0) {
-            rc = declaringType.indexOf(this) -
-                    declaringType.indexOf(method);
+            rc = declaringType.indexOf(this) - declaringType.indexOf(method);
         }
         return rc;
     }
@@ -227,7 +232,6 @@
         }
     }
 
-
     /*
      * A container class for the return value to allow
      * proper type-checking.
@@ -300,7 +304,6 @@
         throws ClassNotLoadedException, InvalidTypeException {
         List<Type> paramTypes = this.argumentTypes();
         ArrayType lastParamType = (ArrayType)paramTypes.get(paramTypes.size() - 1);
-        Type componentType = lastParamType.componentType();
         int argCount = arguments.size();
         int paramCount = paramTypes.size();
         if (argCount < paramCount - 1) {
@@ -365,7 +368,7 @@
     List<Value> validateAndPrepareArgumentsForInvoke(List<? extends Value> origArguments)
                          throws ClassNotLoadedException, InvalidTypeException {
 
-        List<Value> arguments = new ArrayList<Value>(origArguments);
+        List<Value> arguments = new ArrayList<>(origArguments);
         if (isVarArgs()) {
             handleVarArgs(arguments);
         }
--- a/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/MirrorImpl.java	Thu Jun 29 11:10:30 2017 +0100
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/MirrorImpl.java	Thu Jun 29 12:59:55 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,10 +25,13 @@
 
 package com.sun.tools.jdi;
 
-import com.sun.jdi.*;
 import java.util.Collection;
 import java.util.Iterator;
 
+import com.sun.jdi.Mirror;
+import com.sun.jdi.VMMismatchException;
+import com.sun.jdi.VirtualMachine;
+
 abstract class MirrorImpl extends Object implements Mirror {
 
     protected VirtualMachineImpl vm;
@@ -92,6 +95,7 @@
             }
         }
     }
+
     /**
      * Allow null mirrors.
      * Throw VMMismatchException on wrong VM.
--- a/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/ModuleReferenceImpl.java	Thu Jun 29 11:10:30 2017 +0100
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/ModuleReferenceImpl.java	Thu Jun 29 12:59:55 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,8 +25,9 @@
 
 package com.sun.tools.jdi;
 
-import com.sun.jdi.*;
-
+import com.sun.jdi.ClassLoaderReference;
+import com.sun.jdi.ModuleReference;
+import com.sun.jdi.VirtualMachine;
 
 class ModuleReferenceImpl extends ObjectReferenceImpl implements ModuleReference {
 
--- a/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/MonitorInfoImpl.java	Thu Jun 29 11:10:30 2017 +0100
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/MonitorInfoImpl.java	Thu Jun 29 12:59:55 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,12 @@
 
 package com.sun.tools.jdi;
 
-import com.sun.jdi.*;
+import com.sun.jdi.InternalException;
+import com.sun.jdi.InvalidStackFrameException;
+import com.sun.jdi.MonitorInfo;
+import com.sun.jdi.ObjectReference;
+import com.sun.jdi.ThreadReference;
+import com.sun.jdi.VirtualMachine;
 
 public class MonitorInfoImpl extends MirrorImpl
     implements MonitorInfo, ThreadListener {
@@ -37,7 +42,7 @@
 
     ObjectReference monitor;
     ThreadReference thread;
-    int  stack_depth;
+    int stack_depth;
 
     MonitorInfoImpl(VirtualMachine vm, ObjectReference mon,
                     ThreadReferenceImpl thread, int dpth) {
@@ -48,7 +53,6 @@
         thread.addListener(this);
     }
 
-
     /*
      * ThreadListener implementation
      * Must be synchronized since we must protect against
--- a/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/NonConcreteMethodImpl.java	Thu Jun 29 11:10:30 2017 +0100
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/NonConcreteMethodImpl.java	Thu Jun 29 12:59:55 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,15 +25,14 @@
 
 package com.sun.tools.jdi;
 
-import com.sun.jdi.*;
-
+import java.util.ArrayList;
 import java.util.List;
-import java.util.Map;
-import java.util.Iterator;
-import java.util.ListIterator;
-import java.util.HashMap;
-import java.util.ArrayList;
-import java.util.Collections;
+
+import com.sun.jdi.AbsentInformationException;
+import com.sun.jdi.InternalException;
+import com.sun.jdi.LocalVariable;
+import com.sun.jdi.Location;
+import com.sun.jdi.VirtualMachine;
 
 /**
  * Represents non-concrete (that is, native or abstract) methods.
@@ -45,10 +44,9 @@
 
     NonConcreteMethodImpl(VirtualMachine vm,
                           ReferenceTypeImpl declaringType,
-                          long ref,
-                          String name, String signature,
-                          String genericSignature, int modifiers) {
-
+                          long ref, String name, String signature,
+                          String genericSignature, int modifiers)
+    {
         // The generic signature is set when this is created
         super(vm, declaringType, ref, name, signature,
               genericSignature, modifiers);
@@ -65,25 +63,25 @@
     }
 
     public List<Location> allLineLocations(String stratumID,
-                                 String sourceName) {
-        return new ArrayList<Location>(0);
+                                           String sourceName) {
+        return new ArrayList<>(0);
     }
 
     public List<Location> allLineLocations(SDE.Stratum stratum,
-                                 String sourceName) {
-        return new ArrayList<Location>(0);
+                                           String sourceName) {
+        return new ArrayList<>(0);
     }
 
     public List<Location> locationsOfLine(String stratumID,
-                                String sourceName,
-                                int lineNumber) {
-        return new ArrayList<Location>(0);
+                                          String sourceName,
+                                          int lineNumber) {
+        return new ArrayList<>(0);
     }
 
     public List<Location> locationsOfLine(SDE.Stratum stratum,
-                                String sourceName,
-                                int lineNumber) {
-        return new ArrayList<Location>(0);
+                                          String sourceName,
+                                          int lineNumber) {
+        return new ArrayList<>(0);
     }
 
     public Location locationOfCodeIndex(long codeIndex) {
--- a/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/ObjectReferenceImpl.java	Thu Jun 29 11:10:30 2017 +0100
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/ObjectReferenceImpl.java	Thu Jun 29 12:59:55 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,14 +25,31 @@
 
 package com.sun.tools.jdi;
 
-import com.sun.jdi.*;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
 
-import java.util.*;
-import java.util.ArrayList;
+import com.sun.jdi.ClassNotLoadedException;
+import com.sun.jdi.ClassType;
+import com.sun.jdi.Field;
+import com.sun.jdi.IncompatibleThreadStateException;
+import com.sun.jdi.InterfaceType;
+import com.sun.jdi.InternalException;
+import com.sun.jdi.InvalidTypeException;
+import com.sun.jdi.InvocationException;
+import com.sun.jdi.Method;
+import com.sun.jdi.ObjectReference;
+import com.sun.jdi.ReferenceType;
+import com.sun.jdi.ThreadReference;
+import com.sun.jdi.Type;
+import com.sun.jdi.Value;
+import com.sun.jdi.VirtualMachine;
 
 public class ObjectReferenceImpl extends ValueImpl
-             implements ObjectReference, VMListener {
-
+             implements ObjectReference, VMListener
+{
     protected long ref;
     private ReferenceType type = null;
     private int gcDisableCount = 0;
@@ -161,7 +178,7 @@
     }
 
     public Value getValue(Field sig) {
-        List<Field> list = new ArrayList<Field>(1);
+        List<Field> list = new ArrayList<>(1);
         list.add(sig);
         Map<Field, Value> map = getValues(list);
         return map.get(sig);
@@ -170,12 +187,12 @@
     public Map<Field,Value> getValues(List<? extends Field> theFields) {
         validateMirrors(theFields);
 
-        List<Field> staticFields = new ArrayList<Field>(0);
+        List<Field> staticFields = new ArrayList<>(0);
         int size = theFields.size();
-        List<Field> instanceFields = new ArrayList<Field>(size);
+        List<Field> instanceFields = new ArrayList<>(size);
 
-        for (int i=0; i<size; i++) {
-            Field field = (Field)theFields.get(i);
+        for (int i = 0; i < size; i++) {
+            Field field = theFields.get(i);
 
             // Make sure the field is valid
             ((ReferenceTypeImpl)referenceType()).validateFieldAccess(field);
@@ -299,9 +316,6 @@
     void validateClassMethodInvocation(Method method, int options)
                                          throws InvalidTypeException,
                                          InvocationException {
-
-        ClassTypeImpl clazz = invokableReferenceType(method);
-
         /*
          * Method must be a non-constructor
          */
@@ -317,30 +331,6 @@
                 throw new IllegalArgumentException("Abstract method");
             }
         }
-
-        /*
-         * Get the class containing the method that will be invoked.
-         * This class is needed only for proper validation of the
-         * method argument types.
-         */
-        ClassTypeImpl invokedClass;
-        if (isNonVirtual(options)) {
-            // No overrides in non-virtual invokes
-            invokedClass = clazz;
-        } else {
-            /*
-             * For virtual invokes, find any override of the method.
-             * Since we are looking for a method with a real body, we
-             * don't need to bother with interfaces/abstract methods.
-             */
-            Method invoker = clazz.concreteMethodByName(method.name(),
-                                                        method.signature());
-            //  invoker is supposed to be non-null under normal circumstances
-            invokedClass = (ClassTypeImpl)invoker.declaringType();
-        }
-        /* The above code is left over from previous versions.
-         * We haven't had time to divine the intent.  jjh, 7/31/2003
-         */
     }
 
     void validateIfaceMethodInvocation(Method method, int options)
@@ -620,7 +610,6 @@
         }
     }
 
-
     public String toString() {
         return "instance of " + referenceType().name() + "(id=" + uniqueID() + ")";
     }
--- a/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/ObsoleteMethodImpl.java	Thu Jun 29 11:10:30 2017 +0100
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/ObsoleteMethodImpl.java	Thu Jun 29 12:59:55 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,20 +25,19 @@
 
 package com.sun.tools.jdi;
 
-import com.sun.jdi.*;
+import java.util.ArrayList;
+import java.util.List;
 
-import java.util.List;
-import java.util.ArrayList;
+import com.sun.jdi.ClassNotLoadedException;
+import com.sun.jdi.Type;
+import com.sun.jdi.VirtualMachine;
 
 /**
  * Represents methods which have changed when the class was redefined.
  */
 public class ObsoleteMethodImpl extends NonConcreteMethodImpl {
 
-    private Location location = null;
-
-    ObsoleteMethodImpl(VirtualMachine vm,
-                          ReferenceTypeImpl declaringType) {
+    ObsoleteMethodImpl(VirtualMachine vm, ReferenceTypeImpl declaringType) {
         super(vm, declaringType, 0, "<obsolete>", "", null, 0);
     }
 
@@ -55,11 +54,11 @@
     }
 
     public List<String> argumentTypeNames() {
-        return new ArrayList<String>();
+        return new ArrayList<>();
     }
 
     public List<String> argumentSignatures() {
-        return new ArrayList<String>();
+        return new ArrayList<>();
     }
 
     Type argumentType(int index) throws ClassNotLoadedException {
@@ -67,7 +66,6 @@
     }
 
     public List<Type> argumentTypes() throws ClassNotLoadedException {
-        return new ArrayList<Type>();
+        return new ArrayList<>();
     }
-
 }
--- a/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/Packet.java	Thu Jun 29 11:10:30 2017 +0100
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/Packet.java	Thu Jun 29 12:59:55 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,6 @@
 
 package com.sun.tools.jdi;
 
-import com.sun.jdi.*;
 import java.io.IOException;
 
 public class Packet extends Object {
@@ -116,15 +115,13 @@
         return p;
     }
 
-    Packet()
-    {
+    Packet() {
         id = uniqID();
         flags = NoFlags;
         data = nullData;
     }
 
-    static synchronized private int uniqID()
-    {
+    static synchronized private int uniqID() {
         /*
          * JDWP spec does not require this id to be sequential and
          * increasing, but our implementation does. See
--- a/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/PacketStream.java	Thu Jun 29 11:10:30 2017 +0100
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/PacketStream.java	Thu Jun 29 12:59:55 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,9 +25,27 @@
 
 package com.sun.tools.jdi;
 
-import com.sun.jdi.*;
-import java.util.*;
 import java.io.ByteArrayOutputStream;
+import java.util.ArrayList;
+import java.util.List;
+
+import com.sun.jdi.BooleanValue;
+import com.sun.jdi.ByteValue;
+import com.sun.jdi.CharValue;
+import com.sun.jdi.ClassType;
+import com.sun.jdi.DoubleValue;
+import com.sun.jdi.Field;
+import com.sun.jdi.FloatValue;
+import com.sun.jdi.IntegerValue;
+import com.sun.jdi.InterfaceType;
+import com.sun.jdi.InternalException;
+import com.sun.jdi.InvalidTypeException;
+import com.sun.jdi.Location;
+import com.sun.jdi.LongValue;
+import com.sun.jdi.ObjectReference;
+import com.sun.jdi.PrimitiveValue;
+import com.sun.jdi.ShortValue;
+import com.sun.jdi.Value;
 
 class PacketStream {
     final VirtualMachineImpl vm;
@@ -292,8 +310,6 @@
         }
     }
 
-
-
     /**
      * Read byte represented as one bytes.
      */
@@ -407,9 +423,9 @@
           case 8:
               return readLong();
           case 4:
-              return (long)readInt();
+              return readInt();
           case 2:
-              return (long)readShort();
+              return readShort();
           default:
               throw new UnsupportedOperationException("JDWP: ID size not supported: " + size);
         }
@@ -596,7 +612,7 @@
     List<Value> readArrayRegion() {
         byte typeKey = readByte();
         int length = readInt();
-        List<Value> list = new ArrayList<Value>(length);
+        List<Value> list = new ArrayList<>(length);
         boolean gettingObjects = isObjectTag(typeKey);
         for (int i = 0; i < length; i++) {
             /*
--- a/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/PrimitiveTypeImpl.java	Thu Jun 29 11:10:30 2017 +0100
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/PrimitiveTypeImpl.java	Thu Jun 29 12:59:55 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 1999, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,10 @@
 
 package com.sun.tools.jdi;
 
-import com.sun.jdi.*;
+import com.sun.jdi.InvalidTypeException;
+import com.sun.jdi.PrimitiveType;
+import com.sun.jdi.PrimitiveValue;
+import com.sun.jdi.VirtualMachine;
 
 abstract class PrimitiveTypeImpl extends TypeImpl implements PrimitiveType {
 
--- a/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/PrimitiveValueImpl.java	Thu Jun 29 11:10:30 2017 +0100
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/PrimitiveValueImpl.java	Thu Jun 29 12:59:55 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,11 +25,16 @@
 
 package com.sun.tools.jdi;
 
-import com.sun.jdi.*;
+import com.sun.jdi.BooleanValue;
+import com.sun.jdi.ClassNotLoadedException;
+import com.sun.jdi.InternalException;
+import com.sun.jdi.InvalidTypeException;
+import com.sun.jdi.PrimitiveValue;
+import com.sun.jdi.VirtualMachine;
 
 public abstract class PrimitiveValueImpl extends ValueImpl
-                                         implements PrimitiveValue {
-
+                                         implements PrimitiveValue
+{
     PrimitiveValueImpl(VirtualMachine aVm) {
         super(aVm);
     }
@@ -92,14 +97,14 @@
     }
 
     ValueImpl prepareForAssignmentTo(ValueContainer destination)
-                    throws InvalidTypeException {
-
+        throws InvalidTypeException
+    {
         return convertForAssignmentTo(destination);
     }
 
     ValueImpl convertForAssignmentTo(ValueContainer destination)
-                 throws InvalidTypeException {
-
+        throws InvalidTypeException
+    {
         /*
          * TO DO: Centralize JNI signature knowledge
          */
--- a/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/ProcessAttachingConnector.java	Thu Jun 29 11:10:30 2017 +0100
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/ProcessAttachingConnector.java	Thu Jun 29 12:59:55 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,14 +26,17 @@
 package com.sun.tools.jdi;
 
 import java.io.IOException;
-import java.io.UnsupportedEncodingException;
 import java.util.Map;
 import java.util.Properties;
 
 import com.sun.jdi.Bootstrap;
 import com.sun.jdi.VirtualMachine;
-import com.sun.jdi.connect.*;
-import com.sun.jdi.connect.spi.*;
+import com.sun.jdi.connect.AttachingConnector;
+import com.sun.jdi.connect.Connector;
+import com.sun.jdi.connect.IllegalConnectorArgumentsException;
+import com.sun.jdi.connect.Transport;
+import com.sun.jdi.connect.spi.Connection;
+import com.sun.jdi.connect.spi.TransportService;
 
 /*
  * An AttachingConnector that connects to a debuggee by specifying the process
@@ -77,7 +80,6 @@
         };
     }
 
-
     /**
      * Attach to a target VM using the specified address and Connector arguments.
      */
@@ -162,5 +164,4 @@
         }
         return transport;
     }
-
 }
--- a/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/RawCommandLineLauncher.java	Thu Jun 29 11:10:30 2017 +0100
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/RawCommandLineLauncher.java	Thu Jun 29 12:59:55 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,14 +25,18 @@
 
 package com.sun.tools.jdi;
 
-import com.sun.tools.jdi.*;
-import com.sun.jdi.connect.*;
-import com.sun.jdi.connect.spi.*;
+import java.io.IOException;
+import java.lang.reflect.InvocationTargetException;
+import java.util.Map;
+
 import com.sun.jdi.VirtualMachine;
-import java.util.Map;
-import java.io.IOException;
+import com.sun.jdi.connect.Connector;
+import com.sun.jdi.connect.IllegalConnectorArgumentsException;
+import com.sun.jdi.connect.Transport;
+import com.sun.jdi.connect.VMStartException;
+import com.sun.jdi.connect.spi.TransportService;
 
-public class RawCommandLineLauncher extends AbstractLauncher implements LaunchingConnector {
+public class RawCommandLineLauncher extends AbstractLauncher {
 
     static private final String ARG_COMMAND = "command";
     static private final String ARG_ADDRESS = "address";
@@ -53,10 +57,9 @@
         super();
 
         try {
-            @SuppressWarnings("deprecation")
-            Object o =
-                Class.forName("com.sun.tools.jdi.SharedMemoryTransportService").newInstance();
-            transportService = (TransportService)o;
+            transportService = (TransportService)Class.
+                forName("com.sun.tools.jdi.SharedMemoryTransportService").
+                getDeclaredConstructor().newInstance();
             transport = new Transport() {
                 public String name() {
                     return "dt_shmem";
@@ -65,7 +68,9 @@
         } catch (ClassNotFoundException |
                  UnsatisfiedLinkError |
                  InstantiationException |
-                 IllegalAccessException x) {
+                 InvocationTargetException |
+                 IllegalAccessException |
+                 NoSuchMethodException x) {
         };
 
         if (transportService == null) {
@@ -100,13 +105,12 @@
 
 
     public VirtualMachine
-        launch(Map<String,? extends Connector.Argument> arguments)
+        launch(Map<String, ? extends Connector.Argument> arguments)
         throws IOException, IllegalConnectorArgumentsException,
                VMStartException
     {
         String command = argument(ARG_COMMAND, arguments).value();
         String address = argument(ARG_ADDRESS, arguments).value();
-
         String quote = argument(ARG_QUOTE, arguments).value();
 
         if (quote.length() > 1) {
--- a/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/ReferenceTypeImpl.java	Thu Jun 29 11:10:30 2017 +0100
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/ReferenceTypeImpl.java	Thu Jun 29 12:59:55 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,13 +25,34 @@
 
 package com.sun.tools.jdi;
 
-import com.sun.jdi.*;
+import java.lang.ref.SoftReference;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
 
-import java.util.*;
-import java.lang.ref.SoftReference;
+import com.sun.jdi.AbsentInformationException;
+import com.sun.jdi.ClassLoaderReference;
+import com.sun.jdi.ClassNotLoadedException;
+import com.sun.jdi.ClassObjectReference;
+import com.sun.jdi.Field;
+import com.sun.jdi.InterfaceType;
+import com.sun.jdi.InternalException;
+import com.sun.jdi.Location;
+import com.sun.jdi.Method;
+import com.sun.jdi.ModuleReference;
+import com.sun.jdi.ObjectReference;
+import com.sun.jdi.ReferenceType;
+import com.sun.jdi.Type;
+import com.sun.jdi.Value;
+import com.sun.jdi.VirtualMachine;
 
-public abstract class ReferenceTypeImpl extends TypeImpl
-implements ReferenceType {
+public abstract class ReferenceTypeImpl extends TypeImpl implements ReferenceType {
     protected long ref;
     private String signature = null;
     private String genericSignature = null;
@@ -52,14 +73,12 @@
     private int status = 0;
     private boolean isPrepared = false;
 
-
     private boolean versionNumberGotten = false;
     private int majorVersion;
     private int minorVersion;
 
     private boolean constantPoolInfoGotten = false;
     private int constanPoolCount;
-    private byte[] constantPoolBytes;
     private SoftReference<byte[]> constantPoolBytesRef = null;
 
     /* to mark a SourceFile request that returned a genuine JDWP.Error.ABSENT_INFORMATION */
@@ -72,7 +91,6 @@
     private static final int INITIALIZED_OR_FAILED =
         JDWP.ClassStatus.INITIALIZED | JDWP.ClassStatus.ERROR;
 
-
     protected ReferenceTypeImpl(VirtualMachine aVm, long aRef) {
         super(aVm);
         ref = aRef;
@@ -209,8 +227,7 @@
             // Does not need synchronization, since worst-case
             // static info is fetched twice
             try {
-                classLoader = (ClassLoaderReference)
-                    JDWP.ReferenceType.ClassLoader.
+                classLoader = JDWP.ReferenceType.ClassLoader.
                     process(vm, this).classLoader;
                 isClassLoaderCached = true;
             } catch (JDWPException exc) {
@@ -330,7 +347,7 @@
                 } catch (JDWPException exc) {
                     throw exc.toJDIException();
                 }
-                fields = new ArrayList<Field>(jdwpFields.length);
+                fields = new ArrayList<>(jdwpFields.length);
                 for (int i=0; i<jdwpFields.length; i++) {
                     JDWP.ReferenceType.FieldsWithGeneric.FieldInfo fi
                         = jdwpFields[i];
@@ -349,7 +366,7 @@
                 } catch (JDWPException exc) {
                     throw exc.toJDIException();
                 }
-                fields = new ArrayList<Field>(jdwpFields.length);
+                fields = new ArrayList<>(jdwpFields.length);
                 for (int i=0; i<jdwpFields.length; i++) {
                     JDWP.ReferenceType.Fields.FieldInfo fi = jdwpFields[i];
 
@@ -395,7 +412,7 @@
          * hash map provides an efficient way to lookup visible fields
          * by name, important for finding hidden or ambiguous fields.
          */
-        List<Field> visibleList = new ArrayList<Field>();
+        List<Field> visibleList = new ArrayList<>();
         Map<String, Field>  visibleTable = new HashMap<String, Field>();
 
         /* Track fields removed from above collection due to ambiguity */
@@ -416,7 +433,7 @@
          * Insert fields from this type, removing any inherited fields they
          * hide.
          */
-        List<Field> retList = new ArrayList<Field>(fields());
+        List<Field> retList = new ArrayList<>(fields());
         for (Field field : retList) {
             Field hidden = visibleTable.get(field.name());
             if (hidden != null) {
@@ -430,7 +447,7 @@
     void addAllFields(List<Field> fieldList, Set<ReferenceType> typeSet) {
         /* Continue the recursion only if this type is new */
         if (!typeSet.contains(this)) {
-            typeSet.add((ReferenceType)this);
+            typeSet.add(this);
 
             /* Add local fields */
             fieldList.addAll(fields());
@@ -445,7 +462,7 @@
         }
     }
     public List<Field> allFields() {
-        List<Field> fieldList = new ArrayList<Field>();
+        List<Field> fieldList = new ArrayList<>();
         Set<ReferenceType> typeSet = new HashSet<ReferenceType>();
         addAllFields(fieldList, typeSet);
         return fieldList;
@@ -454,7 +471,7 @@
     public Field fieldByName(String fieldName) {
         List<Field> searchList = visibleFields();
 
-        for (int i=0; i<searchList.size(); i++) {
+        for (int i = 0; i < searchList.size(); i++) {
             Field f = searchList.get(i);
 
             if (f.name().equals(fieldName)) {
@@ -478,8 +495,8 @@
                 } catch (JDWPException exc) {
                     throw exc.toJDIException();
                 }
-                methods = new ArrayList<Method>(declared.length);
-                for (int i=0; i<declared.length; i++) {
+                methods = new ArrayList<>(declared.length);
+                for (int i = 0; i < declared.length; i++) {
                     JDWP.ReferenceType.MethodsWithGeneric.MethodInfo
                         mi = declared[i];
 
--- a/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/SDE.java	Thu Jun 29 11:10:30 2017 +0100
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/SDE.java	Thu Jun 29 12:59:55 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,10 +25,9 @@
 
 package com.sun.tools.jdi;
 
-import com.sun.jdi.*;
-
-import java.util.*;
 import java.io.File;
+import java.util.ArrayList;
+import java.util.List;
 
 class SDE {
     private static final int INIT_SIZE_FILE = 3;
@@ -78,6 +77,7 @@
         int jplsEnd;
         int jplsLineInc;
         int njplsStart;
+        @SuppressWarnings("unused")
         int njplsEnd;
         int fileId;
     }
@@ -115,7 +115,7 @@
             int fileIndexStart = stratumTable[sti].fileIndex;
             /* one past end */
             int fileIndexEnd = stratumTable[sti+1].fileIndex;
-            List<String> result = new ArrayList<String>(fileIndexEnd - fileIndexStart);
+            List<String> result = new ArrayList<>(fileIndexEnd - fileIndexStart);
             for (i = fileIndexStart; i < fileIndexEnd; ++i) {
                 result.add(fileTable[i].sourceName);
             }
@@ -134,7 +134,7 @@
             int fileIndexStart = stratumTable[sti].fileIndex;
             /* one past end */
             int fileIndexEnd = stratumTable[sti+1].fileIndex;
-            List<String> result = new ArrayList<String>(fileIndexEnd - fileIndexStart);
+            List<String> result = new ArrayList<>(fileIndexEnd - fileIndexStart);
             for (i = fileIndexStart; i < fileIndexEnd; ++i) {
                 result.add(fileTable[i].getSourcePath(refType));
             }
@@ -370,7 +370,7 @@
     }
 
     List<String> availableStrata() {
-        List<String> strata = new ArrayList<String>();
+        List<String> strata = new ArrayList<>();
 
         for (int i = 0; i < (stratumIndex-1); ++i) {
             StratumTableRecord rec = stratumTable[i];
@@ -470,7 +470,7 @@
     }
 
     void storeLine(int jplsStart, int jplsEnd, int jplsLineInc,
-                  int njplsStart, int njplsEnd, int fileId) {
+                   int njplsStart, int njplsEnd, int fileId) {
         assureLineTableSize();
         lineTable[lineIndex].jplsStart = jplsStart;
         lineTable[lineIndex].jplsEnd = jplsEnd;
--- a/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/ShortTypeImpl.java	Thu Jun 29 11:10:30 2017 +0100
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/ShortTypeImpl.java	Thu Jun 29 12:59:55 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 1999, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,14 +25,17 @@
 
 package com.sun.tools.jdi;
 
-import com.sun.jdi.*;
+import com.sun.jdi.InvalidTypeException;
+import com.sun.jdi.PrimitiveValue;
+import com.sun.jdi.ShortType;
+import com.sun.jdi.VirtualMachine;
 
 public class ShortTypeImpl extends PrimitiveTypeImpl implements ShortType {
+
     ShortTypeImpl(VirtualMachine vm) {
         super(vm);
     }
 
-
     public String signature() {
         return String.valueOf((char)JDWP.Tag.SHORT);
     }
@@ -40,5 +43,4 @@
     PrimitiveValue convert(PrimitiveValue value) throws InvalidTypeException {
         return vm.mirrorOf(((PrimitiveValueImpl)value).checkedShortValue());
     }
-
 }
--- a/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/ShortValueImpl.java	Thu Jun 29 11:10:30 2017 +0100
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/ShortValueImpl.java	Thu Jun 29 12:59:55 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,15 +25,17 @@
 
 package com.sun.tools.jdi;
 
-import com.sun.jdi.*;
+import com.sun.jdi.InvalidTypeException;
+import com.sun.jdi.ShortValue;
+import com.sun.jdi.Type;
+import com.sun.jdi.VirtualMachine;
 
 public class ShortValueImpl extends PrimitiveValueImpl
                             implements ShortValue {
     private short value;
 
-    ShortValueImpl(VirtualMachine aVm,short aValue) {
+    ShortValueImpl(VirtualMachine aVm, short aValue) {
         super(aVm);
-
         value = aValue;
     }
 
@@ -67,15 +69,15 @@
     }
 
     public boolean booleanValue() {
-        return(value == 0)?false:true;
+        return (value == 0 ? false : true);
     }
 
     public byte byteValue() {
-        return(byte)value;
+        return (byte)value;
     }
 
     public char charValue() {
-        return(char)value;
+        return (char)value;
     }
 
     public short shortValue() {
@@ -83,19 +85,19 @@
     }
 
     public int intValue() {
-        return(int)value;
+        return value;
     }
 
     public long longValue() {
-        return(long)value;
+        return value;
     }
 
     public float floatValue() {
-        return(float)value;
+        return value;
     }
 
     public double doubleValue() {
-        return(double)value;
+        return value;
     }
 
     byte checkedByteValue() throws InvalidTypeException {
--- a/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/SocketAttachingConnector.java	Thu Jun 29 11:10:30 2017 +0100
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/SocketAttachingConnector.java	Thu Jun 29 12:59:55 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,14 +24,13 @@
  */
 package com.sun.tools.jdi;
 
-import com.sun.jdi.VirtualMachine;
-import com.sun.jdi.connect.*;
-import com.sun.jdi.connect.spi.*;
+import java.io.IOException;
 import java.util.Map;
-import java.util.HashMap;
-import java.io.IOException;
-import java.net.InetAddress;
-import java.net.UnknownHostException;
+
+import com.sun.jdi.VirtualMachine;
+import com.sun.jdi.connect.Connector;
+import com.sun.jdi.connect.IllegalConnectorArgumentsException;
+import com.sun.jdi.connect.Transport;
 
 /*
  * An AttachingConnector that uses the SocketTransportService
@@ -66,7 +65,6 @@
                 return "dt_socket";     // for compatibility reasons
             }
         };
-
     }
 
     /*
@@ -74,7 +72,7 @@
      * arguments and attach to the target VM.
      */
     public VirtualMachine
-        attach(Map<String,? extends Connector.Argument> arguments)
+        attach(Map<String, ? extends Connector.Argument> arguments)
         throws IOException, IllegalConnectorArgumentsException
     {
         String host = argument(ARG_HOST, arguments).value();
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/SocketConnection.java	Thu Jun 29 12:59:55 2017 +0200
@@ -0,0 +1,183 @@
+/*
+ * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package com.sun.tools.jdi;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.net.Socket;
+
+import com.sun.jdi.connect.spi.ClosedConnectionException;
+import com.sun.jdi.connect.spi.Connection;
+
+/*
+ * The Connection returned by attach and accept is one of these
+ */
+class SocketConnection extends Connection {
+    private Socket socket;
+    private boolean closed = false;
+    private OutputStream socketOutput;
+    private InputStream socketInput;
+    private Object receiveLock = new Object();
+    private Object sendLock = new Object();
+    private Object closeLock = new Object();
+
+    SocketConnection(Socket socket) throws IOException {
+        this.socket = socket;
+        socket.setTcpNoDelay(true);
+        socketInput = socket.getInputStream();
+        socketOutput = socket.getOutputStream();
+    }
+
+    public void close() throws IOException {
+        synchronized (closeLock) {
+           if (closed) {
+                return;
+           }
+           socketOutput.close();
+           socketInput.close();
+           socket.close();
+           closed = true;
+        }
+    }
+
+    public boolean isOpen() {
+        synchronized (closeLock) {
+            return !closed;
+        }
+    }
+
+    public byte[] readPacket() throws IOException {
+        if (!isOpen()) {
+            throw new ClosedConnectionException("connection is closed");
+        }
+        synchronized (receiveLock) {
+            int b1,b2,b3,b4;
+
+            // length
+            try {
+                b1 = socketInput.read();
+                b2 = socketInput.read();
+                b3 = socketInput.read();
+                b4 = socketInput.read();
+            } catch (IOException ioe) {
+                if (!isOpen()) {
+                    throw new ClosedConnectionException("connection is closed");
+                } else {
+                    throw ioe;
+                }
+            }
+
+            // EOF
+            if (b1<0) {
+               return new byte[0];
+            }
+
+            if (b2<0 || b3<0 || b4<0) {
+                throw new IOException("protocol error - premature EOF");
+            }
+
+            int len = ((b1 << 24) | (b2 << 16) | (b3 << 8) | (b4 << 0));
+
+            if (len < 0) {
+                throw new IOException("protocol error - invalid length");
+            }
+
+            byte b[] = new byte[len];
+            b[0] = (byte)b1;
+            b[1] = (byte)b2;
+            b[2] = (byte)b3;
+            b[3] = (byte)b4;
+
+            int off = 4;
+            len -= off;
+
+            while (len > 0) {
+                int count;
+                try {
+                    count = socketInput.read(b, off, len);
+                } catch (IOException ioe) {
+                    if (!isOpen()) {
+                        throw new ClosedConnectionException("connection is closed");
+                    } else {
+                        throw ioe;
+                    }
+                }
+                if (count < 0) {
+                    throw new IOException("protocol error - premature EOF");
+                }
+                len -= count;
+                off += count;
+            }
+
+            return b;
+        }
+    }
+
+    public void writePacket(byte b[]) throws IOException {
+        if (!isOpen()) {
+            throw new ClosedConnectionException("connection is closed");
+        }
+
+        /*
+         * Check the packet size
+         */
+        if (b.length < 11) {
+            throw new IllegalArgumentException("packet is insufficient size");
+        }
+        int b0 = b[0] & 0xff;
+        int b1 = b[1] & 0xff;
+        int b2 = b[2] & 0xff;
+        int b3 = b[3] & 0xff;
+        int len = ((b0 << 24) | (b1 << 16) | (b2 << 8) | (b3 << 0));
+        if (len < 11) {
+            throw new IllegalArgumentException("packet is insufficient size");
+        }
+
+        /*
+         * Check that the byte array contains the complete packet
+         */
+        if (len > b.length) {
+            throw new IllegalArgumentException("length mis-match");
+        }
+
+        synchronized (sendLock) {
+            try {
+                /*
+                 * Send the packet (ignoring any bytes that follow
+                 * the packet in the byte array).
+                 */
+                socketOutput.write(b, 0, len);
+            } catch (IOException ioe) {
+                if (!isOpen()) {
+                    throw new ClosedConnectionException("connection is closed");
+                } else {
+                    throw ioe;
+                }
+            }
+        }
+    }
+}
--- a/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/SocketListeningConnector.java	Thu Jun 29 11:10:30 2017 +0100
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/SocketListeningConnector.java	Thu Jun 29 12:59:55 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,14 +24,15 @@
  */
 package com.sun.tools.jdi;
 
-import com.sun.jdi.connect.*;
-import com.sun.jdi.connect.spi.*;
+import java.io.IOException;
 import java.util.Map;
-import java.util.HashMap;
-import java.io.IOException;
+
+import com.sun.jdi.connect.Connector;
+import com.sun.jdi.connect.IllegalConnectorArgumentsException;
+import com.sun.jdi.connect.Transport;
 
 /*
- * An ListeningConnector that uses the SocketTransportService
+ * A ListeningConnector that uses the SocketTransportService
  */
 public class SocketListeningConnector extends GenericListeningConnector {
 
@@ -63,7 +64,6 @@
         };
     }
 
-
     public String
         startListening(Map<String,? extends Connector.Argument> args)
         throws IOException, IllegalConnectorArgumentsException
--- a/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/SocketTransportService.java	Thu Jun 29 11:10:30 2017 +0100
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/SocketTransportService.java	Thu Jun 29 12:59:55 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,14 +25,20 @@
 
 package com.sun.tools.jdi;
 
-import com.sun.jdi.*;
-import com.sun.jdi.connect.*;
-import com.sun.jdi.connect.spi.*;
-import java.net.*;
-import java.io.*;
-import java.util.Map;
+import java.io.IOException;
+import java.net.Inet6Address;
+import java.net.InetAddress;
+import java.net.InetSocketAddress;
+import java.net.ServerSocket;
+import java.net.Socket;
+import java.net.SocketTimeoutException;
+import java.net.UnknownHostException;
 import java.util.ResourceBundle;
 
+import com.sun.jdi.connect.TransportTimeoutException;
+import com.sun.jdi.connect.spi.Connection;
+import com.sun.jdi.connect.spi.TransportService;
+
 /*
  * A transport service based on a TCP connection between the
  * debugger and debugee.
@@ -176,10 +182,25 @@
      * Return the capabilities of this transport service
      */
     public Capabilities capabilities() {
-        return new SocketTransportServiceCapabilities();
+        return new TransportService.Capabilities() {
+            public boolean supportsMultipleConnections() {
+                return true;
+            }
+
+            public boolean supportsAttachTimeout() {
+                return true;
+            }
+
+            public boolean supportsAcceptTimeout() {
+                return true;
+            }
+
+            public boolean supportsHandshakeTimeout() {
+                return true;
+            }
+        };
     }
 
-
     /**
      * Attach to the specified address with optional attach and handshake
      * timeout.
@@ -217,7 +238,6 @@
                 "unable to parse port number in address");
         }
 
-
         // open TCP connection to VM
         InetSocketAddress sa = new InetSocketAddress(host, port);
         Socket s = new Socket();
@@ -363,177 +383,3 @@
        return name();
     }
 }
-
-
-/*
- * The Connection returned by attach and accept is one of these
- */
-class SocketConnection extends Connection {
-    private Socket socket;
-    private boolean closed = false;
-    private OutputStream socketOutput;
-    private InputStream socketInput;
-    private Object receiveLock = new Object();
-    private Object sendLock = new Object();
-    private Object closeLock = new Object();
-
-    SocketConnection(Socket socket) throws IOException {
-        this.socket = socket;
-        socket.setTcpNoDelay(true);
-        socketInput = socket.getInputStream();
-        socketOutput = socket.getOutputStream();
-    }
-
-    public void close() throws IOException {
-        synchronized (closeLock) {
-           if (closed) {
-                return;
-           }
-           socketOutput.close();
-           socketInput.close();
-           socket.close();
-           closed = true;
-        }
-    }
-
-    public boolean isOpen() {
-        synchronized (closeLock) {
-            return !closed;
-        }
-    }
-
-    public byte[] readPacket() throws IOException {
-        if (!isOpen()) {
-            throw new ClosedConnectionException("connection is closed");
-        }
-        synchronized (receiveLock) {
-            int b1,b2,b3,b4;
-
-            // length
-            try {
-                b1 = socketInput.read();
-                b2 = socketInput.read();
-                b3 = socketInput.read();
-                b4 = socketInput.read();
-            } catch (IOException ioe) {
-                if (!isOpen()) {
-                    throw new ClosedConnectionException("connection is closed");
-                } else {
-                    throw ioe;
-                }
-            }
-
-            // EOF
-            if (b1<0) {
-               return new byte[0];
-            }
-
-            if (b2<0 || b3<0 || b4<0) {
-                throw new IOException("protocol error - premature EOF");
-            }
-
-            int len = ((b1 << 24) | (b2 << 16) | (b3 << 8) | (b4 << 0));
-
-            if (len < 0) {
-                throw new IOException("protocol error - invalid length");
-            }
-
-            byte b[] = new byte[len];
-            b[0] = (byte)b1;
-            b[1] = (byte)b2;
-            b[2] = (byte)b3;
-            b[3] = (byte)b4;
-
-            int off = 4;
-            len -= off;
-
-            while (len > 0) {
-                int count;
-                try {
-                    count = socketInput.read(b, off, len);
-                } catch (IOException ioe) {
-                    if (!isOpen()) {
-                        throw new ClosedConnectionException("connection is closed");
-                    } else {
-                        throw ioe;
-                    }
-                }
-                if (count < 0) {
-                    throw new IOException("protocol error - premature EOF");
-                }
-                len -= count;
-                off += count;
-            }
-
-            return b;
-        }
-    }
-
-    public void writePacket(byte b[]) throws IOException {
-        if (!isOpen()) {
-            throw new ClosedConnectionException("connection is closed");
-        }
-
-        /*
-         * Check the packet size
-         */
-        if (b.length < 11) {
-            throw new IllegalArgumentException("packet is insufficient size");
-        }
-        int b0 = b[0] & 0xff;
-        int b1 = b[1] & 0xff;
-        int b2 = b[2] & 0xff;
-        int b3 = b[3] & 0xff;
-        int len = ((b0 << 24) | (b1 << 16) | (b2 << 8) | (b3 << 0));
-        if (len < 11) {
-            throw new IllegalArgumentException("packet is insufficient size");
-        }
-
-        /*
-         * Check that the byte array contains the complete packet
-         */
-        if (len > b.length) {
-            throw new IllegalArgumentException("length mis-match");
-        }
-
-        synchronized (sendLock) {
-            try {
-                /*
-                 * Send the packet (ignoring any bytes that follow
-                 * the packet in the byte array).
-                 */
-                socketOutput.write(b, 0, len);
-            } catch (IOException ioe) {
-                if (!isOpen()) {
-                    throw new ClosedConnectionException("connection is closed");
-                } else {
-                    throw ioe;
-                }
-            }
-        }
-    }
-}
-
-
-/*
- * The capabilities of the socket transport service
- */
-class SocketTransportServiceCapabilities extends TransportService.Capabilities {
-
-    public boolean supportsMultipleConnections() {
-        return true;
-    }
-
-    public boolean supportsAttachTimeout() {
-        return true;
-    }
-
-    public boolean supportsAcceptTimeout() {
-        return true;
-    }
-
-    public boolean supportsHandshakeTimeout() {
-        return true;
-    }
-
-}
--- a/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/StackFrameImpl.java	Thu Jun 29 11:10:30 2017 +0100
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/StackFrameImpl.java	Thu Jun 29 12:59:55 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,15 +25,26 @@
 
 package com.sun.tools.jdi;
 
-import com.sun.jdi.*;
-
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Collections;
+
+import com.sun.jdi.AbsentInformationException;
+import com.sun.jdi.ClassNotLoadedException;
+import com.sun.jdi.IncompatibleThreadStateException;
+import com.sun.jdi.InternalException;
+import com.sun.jdi.InvalidStackFrameException;
+import com.sun.jdi.InvalidTypeException;
+import com.sun.jdi.LocalVariable;
+import com.sun.jdi.Location;
+import com.sun.jdi.ObjectReference;
+import com.sun.jdi.StackFrame;
+import com.sun.jdi.ThreadReference;
+import com.sun.jdi.Value;
+import com.sun.jdi.VirtualMachine;
 
 public class StackFrameImpl extends MirrorImpl
                             implements StackFrame, ThreadListener
@@ -157,7 +168,7 @@
     private void createVisibleVariables() throws AbsentInformationException {
         if (visibleVariables == null) {
             List<LocalVariable> allVariables = location.method().variables();
-            Map<String, LocalVariable> map = new HashMap<String, LocalVariable>(allVariables.size());
+            Map<String, LocalVariable> map = new HashMap<>(allVariables.size());
 
             for (LocalVariable variable : allVariables) {
                 String name = variable.name();
@@ -180,7 +191,7 @@
     public List<LocalVariable> visibleVariables() throws AbsentInformationException {
         validateStackFrame();
         createVisibleVariables();
-        List<LocalVariable> mapAsList = new ArrayList<LocalVariable>(visibleVariables.values());
+        List<LocalVariable> mapAsList = new ArrayList<>(visibleVariables.values());
         Collections.sort(mapAsList);
         return mapAsList;
     }
@@ -196,7 +207,7 @@
     }
 
     public Value getValue(LocalVariable variable) {
-        List<LocalVariable> list = new ArrayList<LocalVariable>(1);
+        List<LocalVariable> list = new ArrayList<>(1);
         list.add(variable);
         return getValues(list).get(variable);
     }
@@ -246,8 +257,8 @@
             throw new InternalException(
                       "Wrong number of values returned from target VM");
         }
-        Map<LocalVariable, Value> map = new HashMap<LocalVariable, Value>(count);
-        for (int i=0; i<count; ++i) {
+        Map<LocalVariable, Value> map = new HashMap<>(count);
+        for (int i = 0; i < count; ++i) {
             LocalVariableImpl variable = (LocalVariableImpl)variables.get(i);
             map.put(variable, values[i]);
         }
--- a/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/StratumLineInfo.java	Thu Jun 29 11:10:30 2017 +0100
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/StratumLineInfo.java	Thu Jun 29 12:59:55 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
 
 package com.sun.tools.jdi;
 
-import com.sun.jdi.*;
+import com.sun.jdi.AbsentInformationException;
 
 class StratumLineInfo implements LineInfo {
     private final String stratumID;
@@ -49,16 +49,14 @@
         return lineNumber;
     }
 
-    public String liSourceName()
-                            throws AbsentInformationException {
+    public String liSourceName() throws AbsentInformationException {
         if (sourceName == null) {
             throw new AbsentInformationException();
         }
         return sourceName;
     }
 
-    public String liSourcePath()
-                            throws AbsentInformationException {
+    public String liSourcePath() throws AbsentInformationException {
         if (sourcePath == null) {
             throw new AbsentInformationException();
         }
--- a/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/StringReferenceImpl.java	Thu Jun 29 11:10:30 2017 +0100
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/StringReferenceImpl.java	Thu Jun 29 12:59:55 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 1999, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,19 +25,21 @@
 
 package com.sun.tools.jdi;
 
-import com.sun.jdi.*;
+import com.sun.jdi.StringReference;
+import com.sun.jdi.Value;
+import com.sun.jdi.VirtualMachine;
 
 public class StringReferenceImpl extends ObjectReferenceImpl
     implements StringReference
 {
     private String value;
 
-    StringReferenceImpl(VirtualMachine aVm,long aRef) {
-        super(aVm,aRef);
+    StringReferenceImpl(VirtualMachine aVm, long aRef) {
+        super(aVm, aRef);
     }
 
     public String value() {
-        if(value == null) {
+        if (value == null) {
             // Does not need synchronization, since worst-case
             // static info is fetched twice
             try {
--- a/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/SunCommandLineLauncher.java	Thu Jun 29 11:10:30 2017 +0100
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/SunCommandLineLauncher.java	Thu Jun 29 12:59:55 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,17 +25,20 @@
 
 package com.sun.tools.jdi;
 
-import com.sun.tools.jdi.*;
-import com.sun.jdi.connect.*;
-import com.sun.jdi.connect.spi.*;
-import com.sun.jdi.VirtualMachine;
+import java.io.File;
+import java.io.IOException;
+import java.lang.reflect.InvocationTargetException;
 import java.util.Map;
-import java.util.HashMap;
 import java.util.Random;
-import java.io.IOException;
-import java.io.File;
 
-public class SunCommandLineLauncher extends AbstractLauncher implements LaunchingConnector {
+import com.sun.jdi.VirtualMachine;
+import com.sun.jdi.connect.Connector;
+import com.sun.jdi.connect.IllegalConnectorArgumentsException;
+import com.sun.jdi.connect.Transport;
+import com.sun.jdi.connect.VMStartException;
+import com.sun.jdi.connect.spi.TransportService;
+
+public class SunCommandLineLauncher extends AbstractLauncher {
 
     static private final String ARG_HOME = "home";
     static private final String ARG_OPTIONS = "options";
@@ -64,10 +67,9 @@
          * transport or the socket transport
          */
         try {
-            @SuppressWarnings("deprecation")
-            Object o =
-                Class.forName("com.sun.tools.jdi.SharedMemoryTransportService").newInstance();
-            transportService = (TransportService)o;
+            transportService = (TransportService)Class.
+                forName("com.sun.tools.jdi.SharedMemoryTransportService").
+                getDeclaredConstructor().newInstance();
             transport = new Transport() {
                 public String name() {
                     return "dt_shmem";
@@ -77,7 +79,9 @@
         } catch (ClassNotFoundException |
                  UnsatisfiedLinkError |
                  InstantiationException |
-                 IllegalAccessException x) {
+                 InvocationTargetException |
+                 IllegalAccessException |
+                 NoSuchMethodException x) {
         };
         if (transportService == null) {
             transportService = new SocketTransportService();
@@ -139,7 +143,7 @@
     }
 
     public VirtualMachine
-        launch(Map<String,? extends Connector.Argument> arguments)
+        launch(Map<String, ? extends Connector.Argument> arguments)
         throws IOException, IllegalConnectorArgumentsException,
                VMStartException
     {
@@ -237,6 +241,5 @@
 
     public String description() {
         return getString("sun.description");
-
     }
 }
--- a/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/TargetVM.java	Thu Jun 29 11:10:30 2017 +0100
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/TargetVM.java	Thu Jun 29 12:59:55 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,18 +25,24 @@
 
 package com.sun.tools.jdi;
 
-import com.sun.jdi.*;
-import com.sun.jdi.event.*;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import com.sun.jdi.VMDisconnectedException;
+import com.sun.jdi.VirtualMachine;
 import com.sun.jdi.connect.spi.Connection;
+import com.sun.jdi.event.EventQueue;
 import com.sun.jdi.event.EventSet;
 
-import java.util.*;
-import java.io.IOException;
-
 public class TargetVM implements Runnable {
-    private Map<String, Packet> waitingQueue = new HashMap<String, Packet>(32,0.75f);
+    private Map<String, Packet> waitingQueue = new HashMap<>(32,0.75f);
     private boolean shouldListen = true;
-    private List<EventQueue> eventQueues = Collections.synchronizedList(new ArrayList<EventQueue>(2));
+    private List<EventQueue> eventQueues = Collections.synchronizedList(new ArrayList<>(2));
     private VirtualMachineImpl vm;
     private Connection connection;
     private Thread readerThread;
@@ -111,7 +117,7 @@
         Packet p=null,p2;
         String idString;
 
-        while(shouldListen) {
+        while (shouldListen) {
 
             boolean done = false;
             try {
@@ -136,7 +142,7 @@
                 dumpPacket(p, false);
             }
 
-            if((p.flags & Packet.Reply) == 0) {
+            if ((p.flags & Packet.Reply) == 0) {
                 // It's a command
                 handleVMCommand(p);
             } else {
@@ -154,7 +160,7 @@
                         waitingQueue.remove(idString);
                 }
 
-                if(p2 == null) {
+                if (p2 == null) {
                     // Whoa! a reply without a sender. Problem.
                     // FIX ME! Need to post an error.
 
@@ -226,10 +232,7 @@
      */
     protected void handleEventCmdSet(Packet p) {
         EventSet eventSet = new EventSetImpl(vm, p);
-
-        if (eventSet != null) {
-            queueEventSet(eventSet);
-        }
+        queueEventSet(eventSet);
     }
 
     private EventController eventController() {
@@ -371,5 +374,4 @@
             }
         }
     }
-
 }
--- a/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/ThreadAction.java	Thu Jun 29 11:10:30 2017 +0100
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/ThreadAction.java	Thu Jun 29 12:59:55 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,15 +25,17 @@
 
 package com.sun.tools.jdi;
 
-import com.sun.jdi.*;
 import java.util.EventObject;
 
+import com.sun.jdi.ThreadReference;
+
 /*
- * The name "action" is used to avoid confusion
- * with JDI events.
+ * The name "action" is used to avoid confusion with JDI events.
  */
 class ThreadAction extends EventObject {
+
     private static final long serialVersionUID = 5690763191100515283L;
+
     // Event ids
     /*static final int THREAD_SUSPENDED = 1;*/
     static final int THREAD_RESUMABLE = 2;
@@ -44,9 +46,11 @@
         super(thread);
         this.id = id;
     }
+
     ThreadReference thread() {
         return (ThreadReference)getSource();
     }
+
     int id() {
         return id;
     }
--- a/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/ThreadGroupReferenceImpl.java	Thu Jun 29 11:10:30 2017 +0100
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/ThreadGroupReferenceImpl.java	Thu Jun 29 12:59:55 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,11 +25,15 @@
 
 package com.sun.tools.jdi;
 
-import com.sun.jdi.*;
-import java.util.*;
+import java.util.Arrays;
+import java.util.List;
+
+import com.sun.jdi.ThreadGroupReference;
+import com.sun.jdi.ThreadReference;
+import com.sun.jdi.VirtualMachine;
 
 public class ThreadGroupReferenceImpl extends ObjectReferenceImpl
-    implements ThreadGroupReference, VMListener
+    implements ThreadGroupReference
 {
     // Cached components that cannot change
     String name;
@@ -45,8 +49,8 @@
         return new Cache();
     }
 
-    ThreadGroupReferenceImpl(VirtualMachine aVm,long aRef) {
-        super(aVm,aRef);
+    ThreadGroupReferenceImpl(VirtualMachine aVm, long aRef) {
+        super(aVm, aRef);
         vm.state().addListener(this);
     }
 
--- a/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/ThreadReferenceImpl.java	Thu Jun 29 11:10:30 2017 +0100
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/ThreadReferenceImpl.java	Thu Jun 29 12:59:55 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,13 +25,32 @@
 
 package com.sun.tools.jdi;
 
-import com.sun.jdi.*;
+import java.lang.ref.WeakReference;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+
+import com.sun.jdi.ClassNotLoadedException;
+import com.sun.jdi.IncompatibleThreadStateException;
+import com.sun.jdi.InternalException;
+import com.sun.jdi.InvalidStackFrameException;
+import com.sun.jdi.InvalidTypeException;
+import com.sun.jdi.Location;
+import com.sun.jdi.MonitorInfo;
+import com.sun.jdi.NativeMethodException;
+import com.sun.jdi.ObjectReference;
+import com.sun.jdi.ReferenceType;
+import com.sun.jdi.StackFrame;
+import com.sun.jdi.ThreadGroupReference;
+import com.sun.jdi.ThreadReference;
+import com.sun.jdi.Value;
+import com.sun.jdi.VirtualMachine;
 import com.sun.jdi.request.BreakpointRequest;
-import java.util.*;
-import java.lang.ref.WeakReference;
 
 public class ThreadReferenceImpl extends ObjectReferenceImpl
-             implements ThreadReference, VMListener {
+                                 implements ThreadReference {
     static final int SUSPEND_STATUS_SUSPENDED = 0x1;
     static final int SUSPEND_STATUS_BREAK = 0x2;
 
@@ -113,11 +132,10 @@
     }
 
     // Listeners - synchronized on vm.state()
-    private List<WeakReference<ThreadListener>> listeners = new ArrayList<WeakReference<ThreadListener>>();
-
+    private List<WeakReference<ThreadListener>> listeners = new ArrayList<>();
 
     ThreadReferenceImpl(VirtualMachine aVm, long aRef) {
-        super(aVm,aRef);
+        super(aVm, aRef);
         resetLocalCache();
         vm.state().addListener(this);
     }
@@ -165,8 +183,7 @@
                 name = local.name;
             }
             if (name == null) {
-                name = JDWP.ThreadReference.Name.process(vm, this)
-                                                             .threadName;
+                name = JDWP.ThreadReference.Name.process(vm, this).threadName;
                 if (local != null) {
                     local.name = name;
                 }
@@ -404,7 +421,7 @@
                     = JDWP.ThreadReference.Frames.
                     process(vm, this, start, length).frames;
                 int count = jdwpFrames.length;
-                snapshot.frames = new ArrayList<StackFrame>(count);
+                snapshot.frames = new ArrayList<>(count);
 
                 for (int i = 0; i<count; i++) {
                     if (jdwpFrames[i].location == null) {
@@ -500,11 +517,9 @@
                 JDWP.ThreadReference.OwnedMonitorsStackDepthInfo.monitor[] minfo;
                 minfo = JDWP.ThreadReference.OwnedMonitorsStackDepthInfo.process(vm, this).owned;
 
-                snapshot.ownedMonitorsInfo = new ArrayList<MonitorInfo>(minfo.length);
+                snapshot.ownedMonitorsInfo = new ArrayList<>(minfo.length);
 
                 for (int i=0; i < minfo.length; i++) {
-                    JDWP.ThreadReference.OwnedMonitorsStackDepthInfo.monitor mi =
-                                                                         minfo[i];
                     MonitorInfo mon = new MonitorInfoImpl(vm, minfo[i].monitor, this, minfo[i].stack_depth);
                     snapshot.ownedMonitorsInfo.add(mon);
                 }
@@ -542,8 +557,8 @@
         ((StackFrameImpl)frame).pop();
     }
 
-    public void forceEarlyReturn(Value  returnValue) throws InvalidTypeException,
-                                                            ClassNotLoadedException,
+    public void forceEarlyReturn(Value returnValue) throws InvalidTypeException,
+                                                           ClassNotLoadedException,
                                              IncompatibleThreadStateException {
         if (!vm.canForceEarlyReturn()) {
             throw new UnsupportedOperationException(
@@ -595,7 +610,7 @@
 
     void addListener(ThreadListener listener) {
         synchronized (vm.state()) {
-            listeners.add(new WeakReference<ThreadListener>(listener));
+            listeners.add(new WeakReference<>(listener));
         }
     }
 
--- a/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/TypeComponentImpl.java	Thu Jun 29 11:10:30 2017 +0100
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/TypeComponentImpl.java	Thu Jun 29 12:59:55 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,9 +25,9 @@
 
 package com.sun.tools.jdi;
 
-import com.sun.jdi.*;
-
-import java.util.List;
+import com.sun.jdi.ReferenceType;
+import com.sun.jdi.TypeComponent;
+import com.sun.jdi.VirtualMachine;
 
 abstract public class TypeComponentImpl extends MirrorImpl
     implements TypeComponent
@@ -40,8 +40,7 @@
     private final int modifiers;
 
     TypeComponentImpl(VirtualMachine vm, ReferenceTypeImpl declaringType,
-                      long ref,
-                      String name, String signature,
+                      long ref, String name, String signature,
                       String genericSignature, int modifiers) {
         // The generic signature is set when this is created.
         super(vm);
@@ -89,9 +88,9 @@
     }
 
     public boolean isPackagePrivate() {
-        return !isModifierSet(VMModifiers.PRIVATE
-                              | VMModifiers.PROTECTED
-                              | VMModifiers.PUBLIC);
+        return !isModifierSet(VMModifiers.PRIVATE |
+                              VMModifiers.PROTECTED |
+                              VMModifiers.PUBLIC);
     }
 
     public boolean isProtected() {
--- a/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/TypeImpl.java	Thu Jun 29 11:10:30 2017 +0100
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/TypeImpl.java	Thu Jun 29 12:59:55 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2005, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,14 +25,13 @@
 
 package com.sun.tools.jdi;
 
-import com.sun.jdi.*;
+import com.sun.jdi.Type;
+import com.sun.jdi.VirtualMachine;
 
-public abstract class TypeImpl extends MirrorImpl implements Type
-{
+public abstract class TypeImpl extends MirrorImpl implements Type {
     private String myName = null;
 
-    TypeImpl(VirtualMachine vm)
-    {
+    TypeImpl(VirtualMachine vm) {
         super(vm);
     }
 
@@ -49,8 +48,7 @@
     public boolean equals(Object obj) {
         if ((obj != null) && (obj instanceof Type)) {
             Type other = (Type)obj;
-            return signature().equals(other.signature()) &&
-                   super.equals(obj);
+            return signature().equals(other.signature()) && super.equals(obj);
         } else {
             return false;
         }
--- a/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/VMAction.java	Thu Jun 29 11:10:30 2017 +0100
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/VMAction.java	Thu Jun 29 12:59:55 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,14 +25,17 @@
 
 package com.sun.tools.jdi;
 
-import com.sun.jdi.*;
 import java.util.EventObject;
 
+import com.sun.jdi.ThreadReference;
+import com.sun.jdi.VirtualMachine;
+
 /*
  * The name "action" is used to avoid confusion
  * with JDI events.
  */
 class VMAction extends EventObject {
+
     private static final long serialVersionUID = -1701944679310296090L;
 
     // Event ids
@@ -48,14 +51,16 @@
 
     // For id = VM_NOT_SUSPENDED, if resumingThread != null, then it is
     // the only thread that is being resumed.
-     VMAction(VirtualMachine vm,  ThreadReference resumingThread, int id) {
+     VMAction(VirtualMachine vm, ThreadReference resumingThread, int id) {
         super(vm);
         this.id = id;
         this.resumingThread = resumingThread;
     }
+
     VirtualMachine vm() {
         return (VirtualMachine)getSource();
     }
+
     int id() {
         return id;
     }
--- a/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/VMListener.java	Thu Jun 29 11:10:30 2017 +0100
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/VMListener.java	Thu Jun 29 12:59:55 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2000, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,6 @@
 
 package com.sun.tools.jdi;
 
-import com.sun.jdi.*;
 import java.util.EventListener;
 
 interface VMListener extends EventListener {
--- a/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/VMModifiers.java	Thu Jun 29 11:10:30 2017 +0100
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/VMModifiers.java	Thu Jun 29 12:59:55 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,23 +25,20 @@
 
 package com.sun.tools.jdi;
 
-import com.sun.jdi.*;
-
-public interface VMModifiers
-{
-    int PUBLIC = 0x00000001;       /* visible to everyone */
-    int PRIVATE = 0x00000002;      /* visible only to the defining class */
-    int PROTECTED = 0x00000004;    /* visible to subclasses */
-    int STATIC = 0x00000008;       /* instance variable is static */
-    int FINAL = 0x00000010;        /* no further subclassing, overriding */
-    int SYNCHRONIZED = 0x00000020; /* wrap method call in monitor lock */
-    int VOLATILE = 0x00000040;     /* can cache in registers */
-    int BRIDGE = 0x00000040;       /* Bridge method generated by compiler */
-    int TRANSIENT = 0x00000080;    /* not persistant */
-    int VARARGS = 0x00000080;      /* Method accepts var. args*/
-    int NATIVE = 0x00000100;       /* implemented in C */
-    int INTERFACE = 0x00000200;    /* class is an interface */
-    int ABSTRACT = 0x00000400;     /* no definition provided */
+public interface VMModifiers {
+    int PUBLIC = 0x00000001;        /* visible to everyone */
+    int PRIVATE = 0x00000002;       /* visible only to the defining class */
+    int PROTECTED = 0x00000004;     /* visible to subclasses */
+    int STATIC = 0x00000008;        /* instance variable is static */
+    int FINAL = 0x00000010;         /* no further subclassing, overriding */
+    int SYNCHRONIZED = 0x00000020;  /* wrap method call in monitor lock */
+    int VOLATILE = 0x00000040;      /* can cache in registers */
+    int BRIDGE = 0x00000040;        /* Bridge method generated by compiler */
+    int TRANSIENT = 0x00000080;     /* not persistant */
+    int VARARGS = 0x00000080;       /* Method accepts var. args*/
+    int NATIVE = 0x00000100;        /* implemented in C */
+    int INTERFACE = 0x00000200;     /* class is an interface */
+    int ABSTRACT = 0x00000400;      /* no definition provided */
     int ENUM_CONSTANT = 0x00004000; /* enum constant field*/
-    int SYNTHETIC = 0xf0000000;    /* not in source code */
+    int SYNTHETIC = 0xf0000000;     /* not in source code */
 }
--- a/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/VMState.java	Thu Jun 29 11:10:30 2017 +0100
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/VMState.java	Thu Jun 29 12:59:55 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,16 +25,21 @@
 
 package com.sun.tools.jdi;
 
-import com.sun.jdi.*;
+import java.lang.ref.WeakReference;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Iterator;
+import java.util.List;
 
-import java.lang.ref.WeakReference;
-import java.util.*;
+import com.sun.jdi.ThreadGroupReference;
+import com.sun.jdi.ThreadReference;
+import com.sun.jdi.VirtualMachine;
 
 class VMState {
     private final VirtualMachineImpl vm;
 
     // Listeners
-    private final List<WeakReference<VMListener>> listeners = new ArrayList<WeakReference<VMListener>>(); // synchronized (this)
+    private final List<WeakReference<VMListener>> listeners = new ArrayList<>(); // synchronized (this)
     private boolean notifyingListeners = false;  // synchronized (this)
 
     /*
@@ -241,5 +246,4 @@
         }
         return groups;
     }
-
 }
--- a/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/ValueContainer.java	Thu Jun 29 11:10:30 2017 +0100
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/ValueContainer.java	Thu Jun 29 12:59:55 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,8 @@
 
 package com.sun.tools.jdi;
 
-import com.sun.jdi.*;
+import com.sun.jdi.ClassNotLoadedException;
+import com.sun.jdi.Type;
 
 /*
  * This interface allows us to pass fields, variables, and
--- a/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/ValueImpl.java	Thu Jun 29 11:10:30 2017 +0100
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/ValueImpl.java	Thu Jun 29 12:59:55 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 1999, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,10 @@
 
 package com.sun.tools.jdi;
 
-import com.sun.jdi.*;
+import com.sun.jdi.ClassNotLoadedException;
+import com.sun.jdi.InvalidTypeException;
+import com.sun.jdi.Value;
+import com.sun.jdi.VirtualMachine;
 
 abstract class ValueImpl extends MirrorImpl implements Value {
 
--- a/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/VirtualMachineImpl.java	Thu Jun 29 11:10:30 2017 +0100
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/VirtualMachineImpl.java	Thu Jun 29 12:59:55 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,20 +25,56 @@
 
 package com.sun.tools.jdi;
 
-import com.sun.jdi.*;
+import java.lang.ref.Reference;
+import java.lang.ref.ReferenceQueue;
+import java.lang.ref.SoftReference;
+import java.text.MessageFormat;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.TreeSet;
+
+import com.sun.jdi.BooleanType;
+import com.sun.jdi.BooleanValue;
+import com.sun.jdi.ByteType;
+import com.sun.jdi.ByteValue;
+import com.sun.jdi.CharType;
+import com.sun.jdi.CharValue;
+import com.sun.jdi.ClassLoaderReference;
+import com.sun.jdi.ClassNotLoadedException;
+import com.sun.jdi.DoubleType;
+import com.sun.jdi.DoubleValue;
+import com.sun.jdi.FloatType;
+import com.sun.jdi.FloatValue;
+import com.sun.jdi.IntegerType;
+import com.sun.jdi.IntegerValue;
+import com.sun.jdi.InternalException;
+import com.sun.jdi.LongType;
+import com.sun.jdi.LongValue;
 import com.sun.jdi.ModuleReference;
+import com.sun.jdi.PathSearchingVirtualMachine;
+import com.sun.jdi.PrimitiveType;
+import com.sun.jdi.ReferenceType;
+import com.sun.jdi.ShortType;
+import com.sun.jdi.ShortValue;
+import com.sun.jdi.StringReference;
+import com.sun.jdi.ThreadGroupReference;
+import com.sun.jdi.ThreadReference;
+import com.sun.jdi.Type;
+import com.sun.jdi.VMDisconnectedException;
+import com.sun.jdi.VirtualMachine;
+import com.sun.jdi.VirtualMachineManager;
+import com.sun.jdi.VoidType;
+import com.sun.jdi.VoidValue;
 import com.sun.jdi.connect.spi.Connection;
-import com.sun.jdi.request.EventRequestManager;
-import com.sun.jdi.request.EventRequest;
-import com.sun.jdi.request.BreakpointRequest;
 import com.sun.jdi.event.EventQueue;
-
-import java.util.*;
-import java.text.MessageFormat;
-import java.lang.ref.ReferenceQueue;
-import java.lang.ref.Reference;
-import java.lang.ref.SoftReference;
-import java.lang.ref.WeakReference;
+import com.sun.jdi.request.BreakpointRequest;
+import com.sun.jdi.request.EventRequest;
+import com.sun.jdi.request.EventRequestManager;
 
 class VirtualMachineImpl extends MirrorImpl
              implements PathSearchingVirtualMachine, ThreadListener {
@@ -84,11 +120,11 @@
 
     // ObjectReference cache
     // "objectsByID" protected by "synchronized(this)".
-    private final Map<Long, SoftObjectReference> objectsByID = new HashMap<Long, SoftObjectReference>();
-    private final ReferenceQueue<ObjectReferenceImpl> referenceQueue = new ReferenceQueue<ObjectReferenceImpl>();
+    private final Map<Long, SoftObjectReference> objectsByID = new HashMap<>();
+    private final ReferenceQueue<ObjectReferenceImpl> referenceQueue = new ReferenceQueue<>();
     static private final int DISPOSE_THRESHOLD = 50;
     private final List<SoftObjectReference> batchedDisposeRequests =
-            Collections.synchronizedList(new ArrayList<SoftObjectReference>(DISPOSE_THRESHOLD + 10));
+            Collections.synchronizedList(new ArrayList<>(DISPOSE_THRESHOLD + 10));
 
     // These are cached once for the life of the VM
     private JDWP.VirtualMachine.Version versionInfo;
@@ -296,13 +332,13 @@
         }
         ArrayList<ReferenceType> a;
         synchronized (this) {
-            a = new ArrayList<ReferenceType>(typesBySignature);
+            a = new ArrayList<>(typesBySignature);
         }
         return Collections.unmodifiableList(a);
     }
 
     public void
-        redefineClasses(Map<? extends ReferenceType,byte[]> classToBytes)
+        redefineClasses(Map<? extends ReferenceType, byte[]> classToBytes)
     {
         int cnt = classToBytes.size();
         JDWP.VirtualMachine.RedefineClasses.ClassDef[] defs =
@@ -313,7 +349,8 @@
         }
         Iterator<?> it = classToBytes.entrySet().iterator();
         for (int i = 0; it.hasNext(); i++) {
-            Map.Entry<?,?> entry = (Map.Entry)it.next();
+            @SuppressWarnings("rawtypes")
+            Map.Entry<?, ?> entry = (Map.Entry)it.next();
             ReferenceTypeImpl refType = (ReferenceTypeImpl)entry.getKey();
             validateMirror(refType);
             defs[i] = new JDWP.VirtualMachine.RedefineClasses
@@ -330,44 +367,44 @@
             switch (exc.errorCode()) {
             case JDWP.Error.INVALID_CLASS_FORMAT :
                 throw new ClassFormatError(
-                        "class not in class file format");
+                    "class not in class file format");
             case JDWP.Error.CIRCULAR_CLASS_DEFINITION :
                 throw new ClassCircularityError(
-       "circularity has been detected while initializing a class");
+                    "circularity has been detected while initializing a class");
             case JDWP.Error.FAILS_VERIFICATION :
                 throw new VerifyError(
-   "verifier detected internal inconsistency or security problem");
+                    "verifier detected internal inconsistency or security problem");
             case JDWP.Error.UNSUPPORTED_VERSION :
                 throw new UnsupportedClassVersionError(
                     "version numbers of class are not supported");
             case JDWP.Error.ADD_METHOD_NOT_IMPLEMENTED:
                 throw new UnsupportedOperationException(
-                              "add method not implemented");
+                    "add method not implemented");
             case JDWP.Error.SCHEMA_CHANGE_NOT_IMPLEMENTED :
                 throw new UnsupportedOperationException(
-                              "schema change not implemented");
+                    "schema change not implemented");
             case JDWP.Error.HIERARCHY_CHANGE_NOT_IMPLEMENTED:
                 throw new UnsupportedOperationException(
-                              "hierarchy change not implemented");
+                    "hierarchy change not implemented");
             case JDWP.Error.DELETE_METHOD_NOT_IMPLEMENTED :
                 throw new UnsupportedOperationException(
-                              "delete method not implemented");
+                    "delete method not implemented");
             case JDWP.Error.CLASS_MODIFIERS_CHANGE_NOT_IMPLEMENTED:
                 throw new UnsupportedOperationException(
-                       "changes to class modifiers not implemented");
+                    "changes to class modifiers not implemented");
             case JDWP.Error.METHOD_MODIFIERS_CHANGE_NOT_IMPLEMENTED :
                 throw new UnsupportedOperationException(
-                       "changes to method modifiers not implemented");
+                    "changes to method modifiers not implemented");
             case JDWP.Error.NAMES_DONT_MATCH :
                 throw new NoClassDefFoundError(
-                              "class names do not match");
+                    "class names do not match");
             default:
                 throw exc.toJDIException();
             }
         }
 
         // Delete any record of the breakpoints
-        List<BreakpointRequest> toDelete = new ArrayList<BreakpointRequest>();
+        List<BreakpointRequest> toDelete = new ArrayList<>();
         EventRequestManager erm = eventRequestManager();
         it = erm.breakpointRequests().iterator();
         while (it.hasNext()) {
@@ -523,8 +560,8 @@
     public StringReference mirrorOf(String value) {
         validateVM();
         try {
-            return (StringReference)JDWP.VirtualMachine.CreateString.
-                             process(vm, value).stringObject;
+            return JDWP.VirtualMachine.CreateString.
+                process(vm, value).stringObject;
         } catch (JDWPException exc) {
             throw exc.toJDIException();
         }
@@ -621,26 +658,32 @@
         validateVM();
         return capabilities().canWatchFieldModification;
     }
+
     public boolean canWatchFieldAccess() {
         validateVM();
         return capabilities().canWatchFieldAccess;
     }
+
     public boolean canGetBytecodes() {
         validateVM();
         return capabilities().canGetBytecodes;
     }
+
     public boolean canGetSyntheticAttribute() {
         validateVM();
         return capabilities().canGetSyntheticAttribute;
     }
+
     public boolean canGetOwnedMonitorInfo() {
         validateVM();
         return capabilities().canGetOwnedMonitorInfo;
     }
+
     public boolean canGetCurrentContendedMonitor() {
         validateVM();
         return capabilities().canGetCurrentContendedMonitor;
     }
+
     public boolean canGetMonitorInfo() {
         validateVM();
         return capabilities().canGetMonitorInfo;
@@ -661,30 +704,36 @@
         return hasNewCapabilities() &&
             capabilitiesNew().canUseInstanceFilters;
     }
+
     public boolean canRedefineClasses() {
         validateVM();
         return hasNewCapabilities() &&
             capabilitiesNew().canRedefineClasses;
     }
+
     public boolean canAddMethod() {
         validateVM();
         return hasNewCapabilities() &&
             capabilitiesNew().canAddMethod;
     }
+
     public boolean canUnrestrictedlyRedefineClasses() {
         validateVM();
         return hasNewCapabilities() &&
             capabilitiesNew().canUnrestrictedlyRedefineClasses;
     }
+
     public boolean canPopFrames() {
         validateVM();
         return hasNewCapabilities() &&
             capabilitiesNew().canPopFrames;
     }
+
     public boolean canGetMethodReturnValues() {
         return versionInfo().jdwpMajor > 1 ||
             versionInfo().jdwpMinor >= 6;
     }
+
     public boolean canGetInstanceInfo() {
         if (versionInfo().jdwpMajor > 1 ||
             versionInfo().jdwpMinor >= 6) {
@@ -695,47 +744,57 @@
             return false;
         }
     }
+
     public boolean canUseSourceNameFilters() {
         return versionInfo().jdwpMajor > 1 ||
             versionInfo().jdwpMinor >= 6;
     }
+
     public boolean canForceEarlyReturn() {
         validateVM();
         return hasNewCapabilities() &&
             capabilitiesNew().canForceEarlyReturn;
     }
+
     public boolean canBeModified() {
         return true;
     }
+
     public boolean canGetSourceDebugExtension() {
         validateVM();
         return hasNewCapabilities() &&
             capabilitiesNew().canGetSourceDebugExtension;
     }
+
     public boolean canGetClassFileVersion() {
         return versionInfo().jdwpMajor > 1 ||
             versionInfo().jdwpMinor >= 6;
     }
+
     public boolean canGetConstantPool() {
         validateVM();
         return hasNewCapabilities() &&
             capabilitiesNew().canGetConstantPool;
     }
+
     public boolean canRequestVMDeathEvent() {
         validateVM();
         return hasNewCapabilities() &&
             capabilitiesNew().canRequestVMDeathEvent;
     }
+
     public boolean canRequestMonitorEvents() {
         validateVM();
         return hasNewCapabilities() &&
             capabilitiesNew().canRequestMonitorEvents;
     }
+
     public boolean canGetMonitorFrameInfo() {
         validateVM();
         return hasNewCapabilities() &&
             capabilitiesNew().canGetMonitorFrameInfo;
     }
+
     public boolean canGetModuleInfo() {
         validateVM();
         return versionInfo().jdwpMajor >= 9;
@@ -761,8 +820,8 @@
     }
 
     private synchronized ReferenceTypeImpl addReferenceType(long id,
-                                                       int tag,
-                                                       String signature) {
+                                                            int tag,
+                                                            String signature) {
         if (typesByID == null) {
             initReferenceTypes();
         }
@@ -824,9 +883,8 @@
                    vm.printTrace("Uncaching ReferenceType, sig=" + signature +
                                  ", id=" + type.ref());
                 }
-/* fix for 4359077 , don't break out. list is no longer sorted
-        in the order we think
- */
+                // fix for 4359077, don't break out. list is no longer sorted
+                // in the order we think
             }
         }
 
@@ -841,26 +899,25 @@
 
     private synchronized List<ReferenceType> findReferenceTypes(String signature) {
         if (typesByID == null) {
-            return new ArrayList<ReferenceType>(0);
+            return new ArrayList<>(0);
         }
         Iterator<ReferenceType> iter = typesBySignature.iterator();
-        List<ReferenceType> list = new ArrayList<ReferenceType>();
+        List<ReferenceType> list = new ArrayList<>();
         while (iter.hasNext()) {
             ReferenceTypeImpl type = (ReferenceTypeImpl)iter.next();
             int comp = signature.compareTo(type.signature());
             if (comp == 0) {
                 list.add(type);
-/* fix for 4359077 , don't break out. list is no longer sorted
-        in the order we think
- */
+                // fix for 4359077, don't break out. list is no longer sorted
+                // in the order we think
             }
         }
         return list;
     }
 
     private void initReferenceTypes() {
-        typesByID = new HashMap<Long, ReferenceType>(300);
-        typesBySignature = new TreeSet<ReferenceType>();
+        typesByID = new HashMap<>(300);
+        typesBySignature = new TreeSet<>();
     }
 
     ReferenceTypeImpl referenceType(long ref, byte tag) {
@@ -879,8 +936,7 @@
         return (ArrayTypeImpl)referenceType(ref, JDWP.TypeTag.ARRAY, null);
     }
 
-    ReferenceTypeImpl referenceType(long id, int tag,
-                                                 String signature) {
+    ReferenceTypeImpl referenceType(long id, int tag, String signature) {
         if ((vm.traceFlags & VirtualMachine.TRACE_REFTYPES) != 0) {
             StringBuilder sb = new StringBuilder();
             sb.append("Looking up ");
@@ -941,7 +997,7 @@
 
     private synchronized ModuleReference addModule(long id) {
         if (modulesByID == null) {
-            modulesByID = new HashMap<Long, ModuleReference>(77);
+            modulesByID = new HashMap<>(77);
         }
         ModuleReference module = new ModuleReferenceImpl(vm, id);
         modulesByID.put(id, module);
@@ -994,7 +1050,7 @@
         }
 
         int count = cinfos.length;
-        List<ReferenceType> list = new ArrayList<ReferenceType>(count);
+        List<ReferenceType> list = new ArrayList<>(count);
 
         // Hold lock during processing to improve performance
         synchronized (this) {
@@ -1025,9 +1081,8 @@
             if (!retrievedAllTypes) {
                 // Number of classes
                 int count = cinfos.length;
-                for (int i=0; i<count; i++) {
-                    JDWP.VirtualMachine.AllClasses.ClassInfo ci =
-                                                               cinfos[i];
+                for (int i = 0; i < count; i++) {
+                    JDWP.VirtualMachine.AllClasses.ClassInfo ci = cinfos[i];
                     ReferenceTypeImpl type = referenceType(ci.typeID,
                                                            ci.refTypeTag,
                                                            ci.signature);
@@ -1052,7 +1107,6 @@
          * To save time (assuming the caller will be
          * using then) we will get the generic sigs too.
          */
-
         JDWP.VirtualMachine.AllClassesWithGeneric.ClassInfo[] cinfos;
         try {
             cinfos = JDWP.VirtualMachine.AllClassesWithGeneric.process(vm).classes;
@@ -1066,7 +1120,7 @@
             if (!retrievedAllTypes) {
                 // Number of classes
                 int count = cinfos.length;
-                for (int i=0; i<count; i++) {
+                for (int i = 0; i < count; i++) {
                     JDWP.VirtualMachine.AllClassesWithGeneric.ClassInfo ci =
                                                                cinfos[i];
                     ReferenceTypeImpl type = referenceType(ci.typeID,
@@ -1360,7 +1414,6 @@
     }
 
     synchronized void removeObjectMirror(ObjectReferenceImpl object) {
-
         // Handle any queue elements that are not strongly reachable
         processQueue();
 
--- a/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/VirtualMachineManagerImpl.java	Thu Jun 29 11:10:30 2017 +0100
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/VirtualMachineManagerImpl.java	Thu Jun 29 12:59:55 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,25 +25,30 @@
 
 package com.sun.tools.jdi;
 
-import com.sun.jdi.*;
-import com.sun.jdi.connect.*;
-import com.sun.jdi.connect.spi.*;
-import java.lang.reflect.Constructor;
-import java.lang.reflect.InvocationTargetException;
-import java.util.List;
+import java.io.IOException;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.Iterator;
+import java.util.List;
 import java.util.ResourceBundle;
-import java.io.IOException;
+import java.util.ServiceLoader;
 
-import java.util.ServiceLoader;
+import com.sun.jdi.JDIPermission;
+import com.sun.jdi.VMDisconnectedException;
+import com.sun.jdi.VirtualMachine;
+import com.sun.jdi.VirtualMachineManager;
+import com.sun.jdi.connect.AttachingConnector;
+import com.sun.jdi.connect.Connector;
+import com.sun.jdi.connect.LaunchingConnector;
+import com.sun.jdi.connect.ListeningConnector;
+import com.sun.jdi.connect.spi.Connection;
+import com.sun.jdi.connect.spi.TransportService;
 
 /* Public for use by com.sun.jdi.Bootstrap */
 public class VirtualMachineManagerImpl implements VirtualMachineManagerService {
-    private List<Connector> connectors = new ArrayList<Connector>();
+    private List<Connector> connectors = new ArrayList<>();
     private LaunchingConnector defaultConnector = null;
-    private List<VirtualMachine> targets = new ArrayList<VirtualMachine>();
+    private List<VirtualMachine> targets = new ArrayList<>();
     private final ThreadGroup mainGroupForJDI;
     private ResourceBundle messages = null;
     private int vmSequenceNumber = 0;
@@ -158,7 +163,6 @@
         if (!found && launchers.size() > 0) {
             setDefaultConnector(launchers.get(0));
         }
-
     }
 
     public LaunchingConnector defaultConnector() {
@@ -173,7 +177,7 @@
     }
 
     public List<LaunchingConnector> launchingConnectors() {
-        List<LaunchingConnector> launchingConnectors = new ArrayList<LaunchingConnector>(connectors.size());
+        List<LaunchingConnector> launchingConnectors = new ArrayList<>(connectors.size());
         for (Connector connector: connectors) {
             if (connector instanceof LaunchingConnector) {
                 launchingConnectors.add((LaunchingConnector)connector);
@@ -183,7 +187,7 @@
     }
 
     public List<AttachingConnector> attachingConnectors() {
-        List<AttachingConnector> attachingConnectors = new ArrayList<AttachingConnector>(connectors.size());
+        List<AttachingConnector> attachingConnectors = new ArrayList<>(connectors.size());
         for (Connector connector: connectors) {
             if (connector instanceof AttachingConnector) {
                 attachingConnectors.add((AttachingConnector)connector);
@@ -193,7 +197,7 @@
     }
 
     public List<ListeningConnector> listeningConnectors() {
-        List<ListeningConnector> listeningConnectors = new ArrayList<ListeningConnector>(connectors.size());
+        List<ListeningConnector> listeningConnectors = new ArrayList<>(connectors.size());
         for (Connector connector: connectors) {
             if (connector instanceof ListeningConnector) {
                 listeningConnectors.add((ListeningConnector)connector);
@@ -267,5 +271,4 @@
         }
         return messages.getString(key);
     }
-
 }
--- a/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/VirtualMachineManagerService.java	Thu Jun 29 11:10:30 2017 +0100
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/VirtualMachineManagerService.java	Thu Jun 29 12:59:55 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,23 +25,23 @@
 
 package com.sun.tools.jdi;
 
-import com.sun.jdi.connect.*;
-import com.sun.jdi.VirtualMachine;
 import com.sun.jdi.VirtualMachineManager;
-import java.io.IOException;
+import com.sun.jdi.connect.Connector;
+import com.sun.jdi.connect.LaunchingConnector;
 
 /**
  * VirtualMachineManager SPI
  */
 public interface VirtualMachineManagerService extends VirtualMachineManager {
+
     /**
      * Replaces the default connector.
      *
+     * @param connector the new default connector
+     *
      * @throws java.lang.IllegalArgumentException if the given
      * connector is not a member of the list returned by
      * {@link #launchingConnectors}
-     *
-     * @param connector the new default connector
      */
     void setDefaultConnector(LaunchingConnector connector);
 
@@ -58,5 +58,4 @@
      * @param connector the connector to be removed
      */
     void removeConnector(Connector connector);
-
 }
--- a/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/VoidTypeImpl.java	Thu Jun 29 11:10:30 2017 +0100
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/VoidTypeImpl.java	Thu Jun 29 12:59:55 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 1999, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,9 +25,11 @@
 
 package com.sun.tools.jdi;
 
-import com.sun.jdi.*;
+import com.sun.jdi.VirtualMachine;
+import com.sun.jdi.VoidType;
 
 public class VoidTypeImpl extends TypeImpl implements VoidType {
+
     VoidTypeImpl(VirtualMachine vm) {
         super(vm);
     }
--- a/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/VoidValueImpl.java	Thu Jun 29 11:10:30 2017 +0100
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/VoidValueImpl.java	Thu Jun 29 12:59:55 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,10 @@
 
 package com.sun.tools.jdi;
 
-import com.sun.jdi.*;
+import com.sun.jdi.InvalidTypeException;
+import com.sun.jdi.Type;
+import com.sun.jdi.VirtualMachine;
+import com.sun.jdi.VoidValue;
 
 public class VoidValueImpl extends ValueImpl implements VoidValue {
 
@@ -49,7 +52,8 @@
     }
 
     ValueImpl prepareForAssignmentTo(ValueContainer destination)
-                    throws InvalidTypeException {
+        throws InvalidTypeException
+    {
         if ("void".equals(destination.typeName())) {
             return this;
         }