db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhille...@apache.org
Subject svn commit: r1487051 - in /db/derby/code/trunk: ./ java/stubs/felix/org/osgi/framework/
Date Tue, 28 May 2013 19:12:29 GMT
Author: rhillegas
Date: Tue May 28 19:12:29 2013
New Revision: 1487051

URL: http://svn.apache.org/r1487051
Log:
DERBY-6213: Generify the Felix stubs in order to remove a lint diagnostic at build time.

Modified:
    db/derby/code/trunk/build.xml
    db/derby/code/trunk/java/stubs/felix/org/osgi/framework/AdminPermission.java
    db/derby/code/trunk/java/stubs/felix/org/osgi/framework/BundlePermission.java
    db/derby/code/trunk/java/stubs/felix/org/osgi/framework/FrameworkUtil.java
    db/derby/code/trunk/java/stubs/felix/org/osgi/framework/PackagePermission.java
    db/derby/code/trunk/java/stubs/felix/org/osgi/framework/ServicePermission.java

Modified: db/derby/code/trunk/build.xml
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/build.xml?rev=1487051&r1=1487050&r2=1487051&view=diff
==============================================================================
--- db/derby/code/trunk/build.xml (original)
+++ db/derby/code/trunk/build.xml Tue May 28 19:12:29 2013
@@ -837,6 +837,7 @@
       <classpath>
         <pathelement path="${java16compile.classpath}"/>
       </classpath>
+      <compilerarg value="-Xlint:unchecked"/>
      </javac>
 
   </target>

Modified: db/derby/code/trunk/java/stubs/felix/org/osgi/framework/AdminPermission.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/stubs/felix/org/osgi/framework/AdminPermission.java?rev=1487051&r1=1487050&r2=1487051&view=diff
==============================================================================
--- db/derby/code/trunk/java/stubs/felix/org/osgi/framework/AdminPermission.java (original)
+++ db/derby/code/trunk/java/stubs/felix/org/osgi/framework/AdminPermission.java Tue May 28
19:12:29 2013
@@ -145,12 +145,12 @@ public final class AdminPermission exten
 	 * class will delegate method calls to the vendor AdminPermission instance.
 	 */
 
-	private static class ImplHolder implements PrivilegedAction {
+	private static class ImplHolder implements PrivilegedAction<Constructor[]> {
 		private static final String			packageProperty		= "org.osgi.vendor.framework";
 		static final Constructor	initStringString;
 		static final Constructor	initBundleString;
 		static {
-			Constructor[] constructors = (Constructor[]) AccessController.doPrivileged(new ImplHolder());
+			Constructor[] constructors = AccessController.doPrivileged(new ImplHolder());
 			
 			initStringString = constructors[0];
 			initBundleString = constructors[1];
@@ -159,7 +159,7 @@ public final class AdminPermission exten
 		private ImplHolder() {
 		}
 		
-		public Object run() {
+		public Constructor[] run() {
 			String packageName = System
 			.getProperty(packageProperty);
 			if (packageName == null) {
@@ -167,7 +167,7 @@ public final class AdminPermission exten
 						+ " property not set");
 			}
 			
-			Class delegateClass;
+			Class<?> delegateClass;
 			try {
 				delegateClass = Class.forName(packageName
 						+ ".AdminPermission");

Modified: db/derby/code/trunk/java/stubs/felix/org/osgi/framework/BundlePermission.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/stubs/felix/org/osgi/framework/BundlePermission.java?rev=1487051&r1=1487050&r2=1487051&view=diff
==============================================================================
--- db/derby/code/trunk/java/stubs/felix/org/osgi/framework/BundlePermission.java (original)
+++ db/derby/code/trunk/java/stubs/felix/org/osgi/framework/BundlePermission.java Tue May
28 19:12:29 2013
@@ -438,7 +438,7 @@ final class BundlePermissionCollection e
 	 * 
 	 * @serial
 	 */
-	private Hashtable			permissions;
+	private Hashtable<String,Permission>			permissions;
 
 	/**
 	 * Boolean saying if "*" is in the collection.
@@ -453,7 +453,7 @@ final class BundlePermissionCollection e
 	 */
 
 	public BundlePermissionCollection() {
-		permissions = new Hashtable();
+		permissions = new Hashtable<String,Permission>();
 		all_allowed = false;
 	}
 
@@ -578,7 +578,7 @@ final class BundlePermissionCollection e
 	 * @return Enumeration of all <code>BundlePermission</code> objects.
 	 */
 
-	public Enumeration elements() {
+	public Enumeration<Permission> elements() {
 		return (permissions.elements());
 	}
 }

Modified: db/derby/code/trunk/java/stubs/felix/org/osgi/framework/FrameworkUtil.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/stubs/felix/org/osgi/framework/FrameworkUtil.java?rev=1487051&r1=1487050&r2=1487051&view=diff
==============================================================================
--- db/derby/code/trunk/java/stubs/felix/org/osgi/framework/FrameworkUtil.java (original)
+++ db/derby/code/trunk/java/stubs/felix/org/osgi/framework/FrameworkUtil.java Tue May 28
19:12:29 2013
@@ -47,7 +47,7 @@ public class FrameworkUtil {
 	 * will delegate method calls to the vendor FrameworkUtil instance.
 	 */
 
-	private static class ImplHolder implements PrivilegedAction {
+	private static class ImplHolder implements PrivilegedAction<Method> {
 		private static final String	packageProperty	= "org.osgi.vendor.framework";
 		
 		/*
@@ -56,13 +56,13 @@ public class FrameworkUtil {
 		static final Method	createFilter;
 		
 		static {
-			createFilter = (Method) AccessController.doPrivileged(new ImplHolder());
+			createFilter = AccessController.doPrivileged(new ImplHolder());
 		}
 		
 		private ImplHolder() {
 		}
 
-		public Object run() {
+		public Method run() {
 			String packageName = System
 			.getProperty(packageProperty);
 			if (packageName == null) {
@@ -70,7 +70,7 @@ public class FrameworkUtil {
 						+ " property not set");
 			}
 			
-			Class delegateClass;
+			Class<?> delegateClass;
 			try {
 				delegateClass = Class.forName(packageName
 						+ ".FrameworkUtil");

Modified: db/derby/code/trunk/java/stubs/felix/org/osgi/framework/PackagePermission.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/stubs/felix/org/osgi/framework/PackagePermission.java?rev=1487051&r1=1487050&r2=1487051&view=diff
==============================================================================
--- db/derby/code/trunk/java/stubs/felix/org/osgi/framework/PackagePermission.java (original)
+++ db/derby/code/trunk/java/stubs/felix/org/osgi/framework/PackagePermission.java Tue May
28 19:12:29 2013
@@ -394,7 +394,7 @@ final class PackagePermissionCollection 
 	 * 
 	 * @serial
 	 */
-	private Hashtable	permissions;
+	private Hashtable<String,Permission>	permissions;
 
 	/**
 	 * Boolean saying if "*" is in the collection.
@@ -408,7 +408,7 @@ final class PackagePermissionCollection 
 	 */
 
 	public PackagePermissionCollection() {
-		permissions = new Hashtable();
+		permissions = new Hashtable<String,Permission>();
 		all_allowed = false;
 	}
 
@@ -535,7 +535,7 @@ final class PackagePermissionCollection 
 	 * @return Enumeration of all <code>PackagePermission</code> objects.
 	 */
 
-	public Enumeration elements() {
+	public Enumeration<Permission> elements() {
 		return (permissions.elements());
 	}
 }

Modified: db/derby/code/trunk/java/stubs/felix/org/osgi/framework/ServicePermission.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/stubs/felix/org/osgi/framework/ServicePermission.java?rev=1487051&r1=1487050&r2=1487051&view=diff
==============================================================================
--- db/derby/code/trunk/java/stubs/felix/org/osgi/framework/ServicePermission.java (original)
+++ db/derby/code/trunk/java/stubs/felix/org/osgi/framework/ServicePermission.java Tue May
28 19:12:29 2013
@@ -364,7 +364,7 @@ final class ServicePermissionCollection 
 	 * 
 	 * @serial
 	 */
-	private Hashtable	permissions;
+	private Hashtable<String,Permission>	permissions;
 
 	/**
 	 * Boolean saying if "*" is in the collection.
@@ -378,7 +378,7 @@ final class ServicePermissionCollection 
 	 */
 
 	public ServicePermissionCollection() {
-		permissions = new Hashtable();
+		permissions = new Hashtable<String,Permission>();
 		all_allowed = false;
 	}
 
@@ -502,7 +502,7 @@ final class ServicePermissionCollection 
 	 * @return Enumeration of all the ServicePermission objects.
 	 */
 
-	public Enumeration elements() {
+	public Enumeration<Permission> elements() {
 		return (permissions.elements());
 	}
 }



Mime
View raw message