src/share/classes/sun/rmi/transport/DGCImpl.java

Print this page

        

@@ -82,11 +82,11 @@
             new RuntimeUtil.GetInstanceAction()).getScheduler();
 
     /** remote implementation of DGC interface for this VM */
     private static DGCImpl dgc;
     /** table that maps VMID to LeaseInfo */
-    private Map<VMID,LeaseInfo> leaseTable = new HashMap<VMID,LeaseInfo>();
+    private Map<VMID,LeaseInfo> leaseTable = new HashMap<>();
     /** checks for lease expiration */
     private Future<?> checker = null;
 
     /**
      * Return the remote implementation of the DGC interface for

@@ -234,11 +234,11 @@
      */
     private void checkLeases() {
         long time = System.currentTimeMillis();
 
         /* List of vmids that need to be removed from the leaseTable */
-        List<LeaseInfo> toUnregister = new ArrayList<LeaseInfo>();
+        List<LeaseInfo> toUnregister = new ArrayList<>();
 
         /* Build a list of leaseInfo objects that need to have
          * targets removed from their notifySet.  Remove expired
          * leases from leaseTable.
          */

@@ -311,11 +311,11 @@
     }
 
     private static class LeaseInfo {
         VMID vmid;
         long expiration;
-        Set<Target> notifySet = new HashSet<Target>();
+        Set<Target> notifySet = new HashSet<>();
 
         LeaseInfo(VMID vmid, long lease) {
             this.vmid = vmid;
             expiration = System.currentTimeMillis() + lease;
         }