summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCristiano Gavião2012-02-21 18:31:29 (EST)
committerCristiano Gavião2012-02-21 18:31:29 (EST)
commit1091e2eb9d39beccb81acc608265d8893db45bff (patch)
tree74b287b2d081aa1c2048feaa99f37b37021ff158
parent1cc21a62f1669eacd1a8d06934e742a5b03ded8c (diff)
downloadorg.eclipse.gemini.jpa-1091e2eb9d39beccb81acc608265d8893db45bff.zip
org.eclipse.gemini.jpa-1091e2eb9d39beccb81acc608265d8893db45bff.tar.gz
org.eclipse.gemini.jpa-1091e2eb9d39beccb81acc608265d8893db45bff.tar.bz2
added SuppressWarnings to removed warnings from eclipse IDE.
-rw-r--r--org.eclipse.gemini.jpa.samples/src/sample/Activator.java1
-rw-r--r--org.eclipse.gemini.jpa/src/org/eclipse/gemini/jpa/DSFOfflineTracker.java3
-rw-r--r--org.eclipse.gemini.jpa/src/org/eclipse/gemini/jpa/DSFOnlineTracker.java1
-rw-r--r--org.eclipse.gemini.jpa/src/org/eclipse/gemini/jpa/GeminiServicesUtil.java3
-rw-r--r--org.eclipse.gemini.jpa/src/org/eclipse/gemini/jpa/GeminiUtil.java5
-rw-r--r--org.eclipse.gemini.jpa/src/org/eclipse/gemini/jpa/PUnitInfo.java13
-rw-r--r--org.eclipse.gemini.jpa/src/org/eclipse/gemini/jpa/PersistenceBundleExtender.java11
-rw-r--r--org.eclipse.gemini.jpa/src/org/eclipse/gemini/jpa/classloader/BundleProxyClassLoader.java1
-rw-r--r--org.eclipse.gemini.jpa/src/org/eclipse/gemini/jpa/provider/BundleArchive.java2
-rw-r--r--org.eclipse.gemini.jpa/src/org/eclipse/gemini/jpa/provider/EclipseLinkOSGiProvider.java2
-rw-r--r--org.eclipse.gemini.jpa/src/org/eclipse/gemini/jpa/provider/GeminiOSGiInitializer.java2
-rw-r--r--org.eclipse.gemini.jpa/src/org/eclipse/gemini/jpa/provider/OSGiArchiveFactoryImpl.java1
-rw-r--r--org.eclipse.gemini.jpa/src/org/eclipse/gemini/jpa/provider/PersistenceProvider.java2
-rw-r--r--org.eclipse.gemini.jpa/src/org/eclipse/gemini/jpa/proxy/EMFBuilderServiceProxyHandler.java10
-rw-r--r--org.eclipse.gemini.jpa/src/org/eclipse/gemini/jpa/proxy/EMFServiceProxyHandler.java1
15 files changed, 29 insertions, 29 deletions
diff --git a/org.eclipse.gemini.jpa.samples/src/sample/Activator.java b/org.eclipse.gemini.jpa.samples/src/sample/Activator.java
index 5d44795..bec40b7 100644
--- a/org.eclipse.gemini.jpa.samples/src/sample/Activator.java
+++ b/org.eclipse.gemini.jpa.samples/src/sample/Activator.java
@@ -29,6 +29,7 @@ import org.osgi.util.tracker.ServiceTrackerCustomizer;
*
* @author mkeith
*/
+@SuppressWarnings({"rawtypes","unchecked"})
public class Activator implements BundleActivator, ServiceTrackerCustomizer {
BundleContext ctx;
diff --git a/org.eclipse.gemini.jpa/src/org/eclipse/gemini/jpa/DSFOfflineTracker.java b/org.eclipse.gemini.jpa/src/org/eclipse/gemini/jpa/DSFOfflineTracker.java
index 25cc7e8..8221c93 100644
--- a/org.eclipse.gemini.jpa/src/org/eclipse/gemini/jpa/DSFOfflineTracker.java
+++ b/org.eclipse.gemini.jpa/src/org/eclipse/gemini/jpa/DSFOfflineTracker.java
@@ -14,8 +14,6 @@
******************************************************************************/
package org.eclipse.gemini.jpa;
-import static org.eclipse.gemini.jpa.GeminiUtil.debug;
-
import org.osgi.framework.ServiceReference;
import org.osgi.util.tracker.ServiceTrackerCustomizer;
@@ -24,6 +22,7 @@ import org.osgi.util.tracker.ServiceTrackerCustomizer;
* Created and started when a registered DSF service was discovered
* at EMF service registration time.
*/
+@SuppressWarnings("rawtypes")
public class DSFOfflineTracker implements ServiceTrackerCustomizer {
// The unit this tracker belongs to
diff --git a/org.eclipse.gemini.jpa/src/org/eclipse/gemini/jpa/DSFOnlineTracker.java b/org.eclipse.gemini.jpa/src/org/eclipse/gemini/jpa/DSFOnlineTracker.java
index a3b00b5..be857ed 100644
--- a/org.eclipse.gemini.jpa/src/org/eclipse/gemini/jpa/DSFOnlineTracker.java
+++ b/org.eclipse.gemini.jpa/src/org/eclipse/gemini/jpa/DSFOnlineTracker.java
@@ -22,6 +22,7 @@ import org.osgi.util.tracker.ServiceTrackerCustomizer;
* Created and started when no DSF service was found to be registered
* at EMF service registration time.
*/
+@SuppressWarnings("rawtypes")
public class DSFOnlineTracker implements ServiceTrackerCustomizer {
// The unit this tracker belongs to
diff --git a/org.eclipse.gemini.jpa/src/org/eclipse/gemini/jpa/GeminiServicesUtil.java b/org.eclipse.gemini.jpa/src/org/eclipse/gemini/jpa/GeminiServicesUtil.java
index 0a4dcd2..db8bf0d 100644
--- a/org.eclipse.gemini.jpa/src/org/eclipse/gemini/jpa/GeminiServicesUtil.java
+++ b/org.eclipse.gemini.jpa/src/org/eclipse/gemini/jpa/GeminiServicesUtil.java
@@ -26,7 +26,6 @@ import java.util.Collection;
import java.util.Dictionary;
import java.util.Hashtable;
import java.util.Map;
-import java.sql.Driver;
import javax.persistence.EntityManagerFactory;
@@ -36,7 +35,6 @@ import org.eclipse.gemini.jpa.provider.OSGiJpaProvider;
import org.eclipse.gemini.jpa.proxy.EMFBuilderServiceProxyHandler;
import org.eclipse.gemini.jpa.proxy.EMFServiceProxyHandler;
import org.osgi.framework.Bundle;
-import org.osgi.framework.BundleContext;
import org.osgi.framework.InvalidSyntaxException;
import org.osgi.framework.ServiceReference;
import org.osgi.framework.ServiceRegistration;
@@ -47,6 +45,7 @@ import org.osgi.util.tracker.ServiceTracker;
* This class provides functionality to handle service registration of
* persistence units and providers, etc. One instance per provider.
*/
+@SuppressWarnings({"rawtypes","unchecked"})
public class GeminiServicesUtil {
// The provider using this instance
diff --git a/org.eclipse.gemini.jpa/src/org/eclipse/gemini/jpa/GeminiUtil.java b/org.eclipse.gemini.jpa/src/org/eclipse/gemini/jpa/GeminiUtil.java
index 2a5b145..9437579 100644
--- a/org.eclipse.gemini.jpa/src/org/eclipse/gemini/jpa/GeminiUtil.java
+++ b/org.eclipse.gemini.jpa/src/org/eclipse/gemini/jpa/GeminiUtil.java
@@ -14,12 +14,8 @@
******************************************************************************/
package org.eclipse.gemini.jpa;
-import static org.eclipse.gemini.jpa.GeminiUtil.debug;
-import static org.eclipse.gemini.jpa.GeminiUtil.fatalError;
-
import java.io.Closeable;
import java.lang.reflect.Array;
-import java.util.ArrayList;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleContext;
@@ -31,6 +27,7 @@ import org.osgi.service.packageadmin.PackageAdmin;
* Utility class containing functions that are generally useful during
* development and at runtime.
*/
+@SuppressWarnings({"rawtypes","unchecked", "deprecation"})
public class GeminiUtil {
/*==================*/
diff --git a/org.eclipse.gemini.jpa/src/org/eclipse/gemini/jpa/PUnitInfo.java b/org.eclipse.gemini.jpa/src/org/eclipse/gemini/jpa/PUnitInfo.java
index be39e2f..64d8e10 100644
--- a/org.eclipse.gemini.jpa/src/org/eclipse/gemini/jpa/PUnitInfo.java
+++ b/org.eclipse.gemini.jpa/src/org/eclipse/gemini/jpa/PUnitInfo.java
@@ -14,25 +14,22 @@
******************************************************************************/
package org.eclipse.gemini.jpa;
-import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
-import java.sql.Driver;
-
import javax.persistence.EntityManagerFactory;
-import javax.sql.DataSource;
+import org.eclipse.gemini.jpa.provider.OSGiJpaProvider;
+import org.eclipse.gemini.jpa.proxy.EMFBuilderServiceProxyHandler;
+import org.eclipse.gemini.jpa.proxy.EMFServiceProxyHandler;
+import org.eclipse.gemini.jpa.xml.PersistenceDescriptorHandler;
import org.osgi.framework.Bundle;
import org.osgi.framework.ServiceReference;
import org.osgi.framework.ServiceRegistration;
import org.osgi.util.tracker.ServiceTracker;
-import org.eclipse.gemini.jpa.provider.OSGiJpaProvider;
-import org.eclipse.gemini.jpa.proxy.EMFBuilderServiceProxyHandler;
-import org.eclipse.gemini.jpa.proxy.EMFServiceProxyHandler;
-
+@SuppressWarnings({"rawtypes"})
public class PUnitInfo {
/*===============*/
diff --git a/org.eclipse.gemini.jpa/src/org/eclipse/gemini/jpa/PersistenceBundleExtender.java b/org.eclipse.gemini.jpa/src/org/eclipse/gemini/jpa/PersistenceBundleExtender.java
index caaf740..2d7bcc0 100644
--- a/org.eclipse.gemini.jpa/src/org/eclipse/gemini/jpa/PersistenceBundleExtender.java
+++ b/org.eclipse.gemini.jpa/src/org/eclipse/gemini/jpa/PersistenceBundleExtender.java
@@ -14,6 +14,10 @@
******************************************************************************/
package org.eclipse.gemini.jpa;
+import static org.eclipse.gemini.jpa.GeminiUtil.debug;
+import static org.eclipse.gemini.jpa.GeminiUtil.getPackageAdmin;
+import static org.eclipse.gemini.jpa.GeminiUtil.warning;
+
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
@@ -21,6 +25,8 @@ import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
+
+import org.eclipse.gemini.jpa.provider.OSGiJpaProvider;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleContext;
import org.osgi.framework.BundleEvent;
@@ -28,14 +34,11 @@ import org.osgi.framework.Constants;
import org.osgi.framework.SynchronousBundleListener;
import org.osgi.service.packageadmin.PackageAdmin;
-import org.eclipse.gemini.jpa.provider.OSGiJpaProvider;
-
-import static org.eclipse.gemini.jpa.GeminiUtil.*;
-
/**
* This extender is used by the provider to listen for persistence unit
* bundles and assign them to the provider if the unit is able to be assigned.
*/
+@SuppressWarnings({"deprecation"})
public class PersistenceBundleExtender implements SynchronousBundleListener {
/*================*/
diff --git a/org.eclipse.gemini.jpa/src/org/eclipse/gemini/jpa/classloader/BundleProxyClassLoader.java b/org.eclipse.gemini.jpa/src/org/eclipse/gemini/jpa/classloader/BundleProxyClassLoader.java
index df5172b..95af563 100644
--- a/org.eclipse.gemini.jpa/src/org/eclipse/gemini/jpa/classloader/BundleProxyClassLoader.java
+++ b/org.eclipse.gemini.jpa/src/org/eclipse/gemini/jpa/classloader/BundleProxyClassLoader.java
@@ -26,6 +26,7 @@ import java.util.List;
import org.osgi.framework.Bundle;
+@SuppressWarnings({"rawtypes","unchecked"})
public class BundleProxyClassLoader extends ClassLoader {
private Bundle bundle;
diff --git a/org.eclipse.gemini.jpa/src/org/eclipse/gemini/jpa/provider/BundleArchive.java b/org.eclipse.gemini.jpa/src/org/eclipse/gemini/jpa/provider/BundleArchive.java
index 1b58466..8d9d53e 100644
--- a/org.eclipse.gemini.jpa/src/org/eclipse/gemini/jpa/provider/BundleArchive.java
+++ b/org.eclipse.gemini.jpa/src/org/eclipse/gemini/jpa/provider/BundleArchive.java
@@ -39,6 +39,7 @@ import org.osgi.framework.Bundle;
* @author tware
*
*/
+@SuppressWarnings({"rawtypes","deprecation"})
public class BundleArchive extends ArchiveBase implements Archive {
protected Bundle bundle = null;
@@ -55,7 +56,6 @@ public class BundleArchive extends ArchiveBase implements Archive {
*/
protected Integer pathPrefixSize = null;
- @SuppressWarnings("deprecation")
public BundleArchive(URL rootUrl, Map properties, String descriptorLocation) throws MalformedURLException {
this(rootUrl, properties, descriptorLocation, Logger.global);
}
diff --git a/org.eclipse.gemini.jpa/src/org/eclipse/gemini/jpa/provider/EclipseLinkOSGiProvider.java b/org.eclipse.gemini.jpa/src/org/eclipse/gemini/jpa/provider/EclipseLinkOSGiProvider.java
index 5393a48..78685e2 100644
--- a/org.eclipse.gemini.jpa/src/org/eclipse/gemini/jpa/provider/EclipseLinkOSGiProvider.java
+++ b/org.eclipse.gemini.jpa/src/org/eclipse/gemini/jpa/provider/EclipseLinkOSGiProvider.java
@@ -22,7 +22,6 @@ import static org.eclipse.gemini.jpa.GeminiUtil.warning;
import static org.osgi.service.jdbc.DataSourceFactory.JDBC_PASSWORD;
import static org.osgi.service.jdbc.DataSourceFactory.JDBC_URL;
import static org.osgi.service.jdbc.DataSourceFactory.JDBC_USER;
-import static org.osgi.service.jdbc.DataSourceFactory.OSGI_JDBC_DRIVER_CLASS;
import java.io.FileWriter;
import java.io.IOException;
@@ -66,6 +65,7 @@ import org.osgi.service.jdbc.DataSourceFactory;
//TODO Add substitutability of provider
+@SuppressWarnings({"rawtypes","unchecked"})
public class EclipseLinkOSGiProvider implements BundleActivator,
OSGiJpaProvider,
PersistenceProvider {
diff --git a/org.eclipse.gemini.jpa/src/org/eclipse/gemini/jpa/provider/GeminiOSGiInitializer.java b/org.eclipse.gemini.jpa/src/org/eclipse/gemini/jpa/provider/GeminiOSGiInitializer.java
index 67e5dea..7d4b6e0 100644
--- a/org.eclipse.gemini.jpa/src/org/eclipse/gemini/jpa/provider/GeminiOSGiInitializer.java
+++ b/org.eclipse.gemini.jpa/src/org/eclipse/gemini/jpa/provider/GeminiOSGiInitializer.java
@@ -40,6 +40,7 @@ import org.osgi.framework.BundleContext;
import org.osgi.framework.hooks.weaving.WeavingHook;
+@SuppressWarnings("rawtypes")
public class GeminiOSGiInitializer extends JPAInitializer {
public static final String OSGI_BUNDLE = "org.eclipse.gemini.jpa.bundle";
@@ -143,7 +144,6 @@ public class GeminiOSGiInitializer extends JPAInitializer {
/**
* In OSGi we don't need a temp loader so use the loader built for the bundle.
*/
- @SuppressWarnings("rawtypes")
@Override
protected ClassLoader createTempLoader(Collection col) {
return this.initializationClassloader;
diff --git a/org.eclipse.gemini.jpa/src/org/eclipse/gemini/jpa/provider/OSGiArchiveFactoryImpl.java b/org.eclipse.gemini.jpa/src/org/eclipse/gemini/jpa/provider/OSGiArchiveFactoryImpl.java
index ded32b4..ad9143e 100644
--- a/org.eclipse.gemini.jpa/src/org/eclipse/gemini/jpa/provider/OSGiArchiveFactoryImpl.java
+++ b/org.eclipse.gemini.jpa/src/org/eclipse/gemini/jpa/provider/OSGiArchiveFactoryImpl.java
@@ -31,6 +31,7 @@ import org.eclipse.persistence.jpa.Archive;
* @author tware
*
*/
+@SuppressWarnings({"rawtypes"})
public class OSGiArchiveFactoryImpl extends ArchiveFactoryImpl{
@Override
diff --git a/org.eclipse.gemini.jpa/src/org/eclipse/gemini/jpa/provider/PersistenceProvider.java b/org.eclipse.gemini.jpa/src/org/eclipse/gemini/jpa/provider/PersistenceProvider.java
index 6961db8..3c1a046 100644
--- a/org.eclipse.gemini.jpa/src/org/eclipse/gemini/jpa/provider/PersistenceProvider.java
+++ b/org.eclipse.gemini.jpa/src/org/eclipse/gemini/jpa/provider/PersistenceProvider.java
@@ -18,9 +18,9 @@ import java.util.Map;
import org.eclipse.persistence.internal.jpa.deployment.JPAInitializer;
+@SuppressWarnings({"rawtypes"})
public class PersistenceProvider extends org.eclipse.persistence.jpa.PersistenceProvider {
- @SuppressWarnings("rawtypes")
public JPAInitializer createInitializer(final ClassLoader classLoader, Map m) {
return new GeminiOSGiInitializer(classLoader);
}
diff --git a/org.eclipse.gemini.jpa/src/org/eclipse/gemini/jpa/proxy/EMFBuilderServiceProxyHandler.java b/org.eclipse.gemini.jpa/src/org/eclipse/gemini/jpa/proxy/EMFBuilderServiceProxyHandler.java
index 7aebbbd..4307ffb 100644
--- a/org.eclipse.gemini.jpa/src/org/eclipse/gemini/jpa/proxy/EMFBuilderServiceProxyHandler.java
+++ b/org.eclipse.gemini.jpa/src/org/eclipse/gemini/jpa/proxy/EMFBuilderServiceProxyHandler.java
@@ -14,23 +14,23 @@
******************************************************************************/
package org.eclipse.gemini.jpa.proxy;
+import static org.eclipse.gemini.jpa.GeminiUtil.JPA_JDBC_DRIVER_PROPERTY;
+import static org.eclipse.gemini.jpa.GeminiUtil.JPA_JDBC_URL_PROPERTY;
+import static org.eclipse.gemini.jpa.GeminiUtil.debug;
+
import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;
-import java.lang.reflect.Proxy;
import java.util.HashMap;
import java.util.Map;
import javax.persistence.EntityManagerFactory;
-
import org.eclipse.gemini.jpa.PUnitInfo;
-import org.eclipse.gemini.jpa.proxy.EMFServiceProxyHandler;
-
-import static org.eclipse.gemini.jpa.GeminiUtil.*;
/**
* Dynamic proxy class to proxy the EMFBuilder service
*/
+@SuppressWarnings({"unchecked"})
public class EMFBuilderServiceProxyHandler extends EMFServiceProxyHandler
implements InvocationHandler {
diff --git a/org.eclipse.gemini.jpa/src/org/eclipse/gemini/jpa/proxy/EMFServiceProxyHandler.java b/org.eclipse.gemini.jpa/src/org/eclipse/gemini/jpa/proxy/EMFServiceProxyHandler.java
index eafb93d..a066493 100644
--- a/org.eclipse.gemini.jpa/src/org/eclipse/gemini/jpa/proxy/EMFServiceProxyHandler.java
+++ b/org.eclipse.gemini.jpa/src/org/eclipse/gemini/jpa/proxy/EMFServiceProxyHandler.java
@@ -33,6 +33,7 @@ import static org.eclipse.gemini.jpa.GeminiUtil.*;
/**
* Dynamic proxy class to proxy the EMF service
*/
+@SuppressWarnings({"rawtypes"})
public class EMFServiceProxyHandler implements InvocationHandler, ServiceFactory {
PUnitInfo pUnitInfo;