< prev index next >
test/jdk/javax/naming/InitialContext/EnvClone.java
Print this page
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 1999, 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.
@@ -32,21 +32,21 @@
import java.util.Hashtable;
import javax.naming.*;
public class EnvClone extends InitialContext {
- EnvClone(Hashtable env) throws NamingException{
+ EnvClone(Hashtable<Object, Object> env) throws NamingException{
super(env);
}
EnvClone(boolean lazy) throws NamingException{
super(lazy);
}
public static void main(String[] args) throws Exception {
- Hashtable env = new Hashtable(5);
+ Hashtable<Object, Object> env = new Hashtable<>(5);
EnvClone ctx = new EnvClone(env);
if (env == ctx.myProps) {
throw new Exception(
"Test failed: constructor didn't clone environment");
< prev index next >