< prev index next >

test/jdk/javax/naming/spi/DirectoryManager/GetContDirCtx.java

Print this page

        

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2020, 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.

@@ -37,11 +37,11 @@
 public class GetContDirCtx {
 
     public static void main(String[] args) throws Exception {
 
         CannotProceedException cpe = new CannotProceedException();
-        Hashtable env = new Hashtable(1);
+        Hashtable<?,?> env = new Hashtable<>(1);
         cpe.setEnvironment(env);
 
         Reference ref = new Reference("java.lang.Object",
                                     "DummyObjectFactory",
                                     null);

@@ -50,11 +50,11 @@
         try {
             contCtx  = DirectoryManager.getContinuationDirContext(cpe);
         } catch (CannotProceedException e) {
         }
 
-        Hashtable contEnv = contCtx.getEnvironment();
+        Hashtable<?,?> contEnv = contCtx.getEnvironment();
         if (contEnv.get(NamingManager.CPE) != cpe) {
             throw new Exception("Test failed: CPE property not set" +
                         " in the continuation context");
         }
     }
< prev index next >