8049736: Fix raw and unchecked lint warnings in sun.tracing
authordarcy
Thu, 10 Jul 2014 22:57:56 -0700
changeset 25410 b81bea02c075
parent 25409 ce5485fce3d2
child 25411 b827000aa99a
8049736: Fix raw and unchecked lint warnings in sun.tracing Reviewed-by: mchung
jdk/src/share/classes/sun/tracing/ProviderSkeleton.java
jdk/src/share/classes/sun/tracing/dtrace/DTraceProvider.java
--- a/jdk/src/share/classes/sun/tracing/ProviderSkeleton.java	Fri Jul 11 09:17:10 2014 +0800
+++ b/jdk/src/share/classes/sun/tracing/ProviderSkeleton.java	Thu Jul 10 22:57:56 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 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
@@ -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 {
--- a/jdk/src/share/classes/sun/tracing/dtrace/DTraceProvider.java	Fri Jul 11 09:17:10 2014 +0800
+++ b/jdk/src/share/classes/sun/tracing/dtrace/DTraceProvider.java	Thu Jul 10 22:57:56 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 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
@@ -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);