JDK 9 RFR of JDK-8050798: New unchecked warning introduced in com.sun.jndi.ldap.Connection

Lance Andersen Lance.Andersen at oracle.com
Thu Jul 17 00:27:04 UTC 2014


+1
On Jul 16, 2014, at 8:24 PM, Joe Darcy <joe.darcy at oracle.com> wrote:

> Hello,
> 
> Please review the patch below for
> 
>    JDK-8050798: New unchecked warning introduced in com.sun.jndi.ldap.Connection
> 
> which addresses a newly-introduced unchecked warning in core libs.
> 
> Thanks,
> 
> -Joe
> 
> diff -r e4a6f3779797 src/share/classes/com/sun/jndi/ldap/Connection.java
> --- a/src/share/classes/com/sun/jndi/ldap/Connection.java    Tue Jul 15 11:22:14 2014 -0700
> +++ b/src/share/classes/com/sun/jndi/ldap/Connection.java    Wed Jul 16 17:22:37 2014 -0700
> @@ -258,9 +258,9 @@
> 
>             // create the factory
> 
> +            @SuppressWarnings("unchecked")
>             Class<? extends SocketFactory> socketFactoryClass =
> -                    (Class<? extends SocketFactory>) Obj.helper.loadClass
> -                    (socketFactory);
> +                (Class<? extends SocketFactory>)Obj.helper.loadClass(socketFactory);
>             Method getDefault =
>                 socketFactoryClass.getMethod("getDefault", new Class<?>[]{});
>             SocketFactory factory = (SocketFactory) getDefault.invoke(null, new Object[]{});
> 




Lance Andersen| Principal Member of Technical Staff | +1.781.442.2037
Oracle Java Engineering 
1 Network Drive 
Burlington, MA 01803
Lance.Andersen at oracle.com







More information about the core-libs-dev mailing list