src/share/classes/com/sun/jndi/ldap/ClientId.java

Print this page
rev 10284 : 8048175: Remove redundant use of reflection on core classes from JNDI
Reviewed-by: duke

*** 1,7 **** /* ! * Copyright (c) 2002, 2011, 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 --- 1,7 ---- /* ! * Copyright (c) 2002, 2014, 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
*** 84,96 **** if ((socketFactory != null) && !socketFactory.equals(LdapCtx.DEFAULT_SSL_FACTORY)) { try { Class<?> socketFactoryClass = Obj.helper.loadClass(socketFactory); - Class<?> objClass = Class.forName("java.lang.Object"); this.sockComparator = socketFactoryClass.getMethod( ! "compare", new Class<?>[]{objClass, objClass}); Method getDefault = socketFactoryClass.getMethod( "getDefault", new Class<?>[]{}); this.factory = (SocketFactory)getDefault.invoke(null, new Object[]{}); } catch (Exception e) { --- 84,95 ---- if ((socketFactory != null) && !socketFactory.equals(LdapCtx.DEFAULT_SSL_FACTORY)) { try { Class<?> socketFactoryClass = Obj.helper.loadClass(socketFactory); this.sockComparator = socketFactoryClass.getMethod( ! "compare", new Class<?>[]{Object.class, Object.class}); Method getDefault = socketFactoryClass.getMethod( "getDefault", new Class<?>[]{}); this.factory = (SocketFactory)getDefault.invoke(null, new Object[]{}); } catch (Exception e) {