JDK 9 RFR of JDK-8049736: Fix raw and unchecked lint warnings in sun.tracing

Mandy Chung mandy.chung at oracle.com
Thu Jul 10 23:07:36 UTC 2014


Looks good.
Mandy

On 7/9/14 10:53 AM, Joe Darcy wrote:
> Hello,
>
> Please review the patch below which addresses
>
>     JDK-8049736: Fix raw and unchecked lint warnings in sun.tracing
>
> Thanks,
>
> -Joe
>
> diff -r 2b7bf1d63a9c src/share/classes/sun/tracing/ProviderSkeleton.java
> --- a/src/share/classes/sun/tracing/ProviderSkeleton.java    Wed Jul 
> 09 10:02:30 2014 -0700
> +++ b/src/share/classes/sun/tracing/ProviderSkeleton.java    Wed Jul 
> 09 10:53:02 2014 -0700
> @@ -154,7 +154,7 @@
>       * @return always null, if the method is a user-defined probe
>       */
>      public Object invoke(Object proxy, Method method, Object[] args) {
> -        Class declaringClass = method.getDeclaringClass();
> +        Class<?> declaringClass = method.getDeclaringClass();
>          // not a provider subtype's own method
>          if (declaringClass != providerType) {
>              try {
> diff -r 2b7bf1d63a9c 
> src/share/classes/sun/tracing/dtrace/DTraceProvider.java
> --- a/src/share/classes/sun/tracing/dtrace/DTraceProvider.java Wed Jul 
> 09 10:02:30 2014 -0700
> +++ b/src/share/classes/sun/tracing/dtrace/DTraceProvider.java Wed Jul 
> 09 10:53:02 2014 -0700
> @@ -50,7 +50,7 @@
>      private Object proxy;
>
>      // For proxy generation
> -    private final static Class[] constructorParams = { 
> InvocationHandler.class };
> +    private final static Class<?>[] constructorParams = { 
> InvocationHandler.class };
>      private final String proxyClassNamePrefix = "$DTraceTracingProxy";
>
>      static final String DEFAULT_MODULE = "java_tracing";
> @@ -135,7 +135,7 @@
>           * Invoke its constructor with the designated invocation 
> handler.
>           */
>          try {
> -            Constructor cons = 
> proxyClass.getConstructor(constructorParams);
> +            Constructor<?> cons = 
> proxyClass.getConstructor(constructorParams);
>              return (T)cons.newInstance(new Object[] { this });
>          } catch (ReflectiveOperationException e) {
>              throw new InternalError(e.toString(), e);
>



More information about the serviceability-dev mailing list