--- old/test/jdk/com/sun/jndi/ldap/BalancedParentheses.java 2020-03-25 13:45:42.000000000 +0800 +++ new/test/jdk/com/sun/jndi/ldap/BalancedParentheses.java 2020-03-25 13:45:42.000000000 +0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 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 @@ -103,7 +103,7 @@ } // set up the environment for creating the initial context - Hashtable env = new Hashtable(); + Hashtable env = new Hashtable<>(); env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory"); env.put(Context.PROVIDER_URL, "ldap://localhost:" + serverPort); @@ -121,7 +121,7 @@ scs.setSearchScope(SearchControls.SUBTREE_SCOPE); try { - NamingEnumeration answer = context.search( + NamingEnumeration answer = context.search( "o=sun,c=us", "(&(cn=Bob)))", scs); } catch (InvalidSearchFilterException isfe) { // ignore, it is the expected filter exception. @@ -132,7 +132,7 @@ } try { - NamingEnumeration answer = context.search( + NamingEnumeration answer = context.search( "o=sun,c=us", ")(&(cn=Bob)", scs); } catch (InvalidSearchFilterException isfe) { // ignore, it is the expected filter exception. @@ -143,7 +143,7 @@ } try { - NamingEnumeration answer = context.search( + NamingEnumeration answer = context.search( "o=sun,c=us", "(&(cn=Bob))", scs); } catch (InvalidSearchFilterException isfe) { // ignore, it is the expected filter exception.