aries-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cschnei...@apache.org
Subject svn commit: r1796996 - in /aries/trunk/util/src: main/java/org/apache/aries/util/ main/java/org/apache/aries/util/filesystem/ main/java/org/apache/aries/util/internal/ main/java/org/apache/aries/util/log/ main/java/org/apache/aries/util/service/registr...
Date Wed, 31 May 2017 08:20:04 GMT
Author: cschneider
Date: Wed May 31 08:20:03 2017
New Revision: 1796996

URL: http://svn.apache.org/viewvc?rev=1796996&view=rev
Log:
Fix warnings

Modified:
    aries/trunk/util/src/main/java/org/apache/aries/util/AriesFrameworkUtil.java
    aries/trunk/util/src/main/java/org/apache/aries/util/filesystem/FileSystem.java
    aries/trunk/util/src/main/java/org/apache/aries/util/internal/BundleToClassLoaderAdapter.java
    aries/trunk/util/src/main/java/org/apache/aries/util/log/Logger.java
    aries/trunk/util/src/main/java/org/apache/aries/util/service/registry/ServicePair.java
    aries/trunk/util/src/main/java/org/apache/aries/util/tracker/BundleTrackerFactory.java
    aries/trunk/util/src/main/java/org/apache/aries/util/tracker/InternalRecursiveBundleTracker.java
    aries/trunk/util/src/main/java/org/apache/aries/util/tracker/RecursiveBundleTracker.java
    aries/trunk/util/src/main/java/org/apache/aries/util/tracker/SingleServiceTracker.java
    aries/trunk/util/src/main/java/org/apache/aries/util/tracker/hook/BundleHookBundleTracker.java
    aries/trunk/util/src/test/java/org/apache/aries/util/FragmentUtilsTest.java
    aries/trunk/util/src/test/java/org/apache/aries/util/RecursiveBundleTrackerTest.java
    aries/trunk/util/src/test/java/org/apache/aries/util/filesystem/FileSystemTest.java
    aries/trunk/util/src/test/java/org/apache/aries/util/filesystem/FileUtilsTest.java
    aries/trunk/util/src/test/java/org/apache/aries/util/log/LoggerTest.java

Modified: aries/trunk/util/src/main/java/org/apache/aries/util/AriesFrameworkUtil.java
URL: http://svn.apache.org/viewvc/aries/trunk/util/src/main/java/org/apache/aries/util/AriesFrameworkUtil.java?rev=1796996&r1=1796995&r2=1796996&view=diff
==============================================================================
--- aries/trunk/util/src/main/java/org/apache/aries/util/AriesFrameworkUtil.java (original)
+++ aries/trunk/util/src/main/java/org/apache/aries/util/AriesFrameworkUtil.java Wed May 31
08:20:03 2017
@@ -102,6 +102,7 @@ public final class AriesFrameworkUtil
    * 
    * @param reg The {@link ServiceRegistration}, may be null
    */
+  @SuppressWarnings("rawtypes")
   public static void safeUnregisterService(ServiceRegistration reg) 
   {
     if(reg != null) {

Modified: aries/trunk/util/src/main/java/org/apache/aries/util/filesystem/FileSystem.java
URL: http://svn.apache.org/viewvc/aries/trunk/util/src/main/java/org/apache/aries/util/filesystem/FileSystem.java?rev=1796996&r1=1796995&r2=1796996&view=diff
==============================================================================
--- aries/trunk/util/src/main/java/org/apache/aries/util/filesystem/FileSystem.java (original)
+++ aries/trunk/util/src/main/java/org/apache/aries/util/filesystem/FileSystem.java Wed May
31 08:20:03 2017
@@ -20,14 +20,9 @@
 package org.apache.aries.util.filesystem;
 
 import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
 import java.io.InputStream;
-import java.util.zip.ZipFile;
 
 import org.apache.aries.util.filesystem.impl.FileSystemImpl;
-import org.apache.aries.util.filesystem.impl.NestedZipDirectory;
-import org.apache.aries.util.io.IOUtils;
 
 /**
  * An abstraction of a file system. A file system can be a zip, or a directory.

Modified: aries/trunk/util/src/main/java/org/apache/aries/util/internal/BundleToClassLoaderAdapter.java
URL: http://svn.apache.org/viewvc/aries/trunk/util/src/main/java/org/apache/aries/util/internal/BundleToClassLoaderAdapter.java?rev=1796996&r1=1796995&r2=1796996&view=diff
==============================================================================
--- aries/trunk/util/src/main/java/org/apache/aries/util/internal/BundleToClassLoaderAdapter.java
(original)
+++ aries/trunk/util/src/main/java/org/apache/aries/util/internal/BundleToClassLoaderAdapter.java
Wed May 31 08:20:03 2017
@@ -75,7 +75,6 @@ public class BundleToClassLoaderAdapter
     Enumeration<URL> urls;
     try {
       urls = AccessController.doPrivileged(new PrivilegedExceptionAction<Enumeration<URL>>()
{
-		@SuppressWarnings("unchecked")
         public Enumeration<URL> run() throws IOException
         {
           return b.getResources(name);

Modified: aries/trunk/util/src/main/java/org/apache/aries/util/log/Logger.java
URL: http://svn.apache.org/viewvc/aries/trunk/util/src/main/java/org/apache/aries/util/log/Logger.java?rev=1796996&r1=1796995&r2=1796996&view=diff
==============================================================================
--- aries/trunk/util/src/main/java/org/apache/aries/util/log/Logger.java (original)
+++ aries/trunk/util/src/main/java/org/apache/aries/util/log/Logger.java Wed May 31 08:20:03
2017
@@ -32,6 +32,7 @@ import org.osgi.util.tracker.ServiceTrac
  * @see org.osgi.service.log.LogService
  * @see org.osgi.util.tracker.ServiceTracker
  */
+@SuppressWarnings({"rawtypes", "unchecked"})
 public class Logger extends ServiceTracker implements LogService {
     /**
      * Constructs new Logger(ServiceTracker for LogService).

Modified: aries/trunk/util/src/main/java/org/apache/aries/util/service/registry/ServicePair.java
URL: http://svn.apache.org/viewvc/aries/trunk/util/src/main/java/org/apache/aries/util/service/registry/ServicePair.java?rev=1796996&r1=1796995&r2=1796996&view=diff
==============================================================================
--- aries/trunk/util/src/main/java/org/apache/aries/util/service/registry/ServicePair.java
(original)
+++ aries/trunk/util/src/main/java/org/apache/aries/util/service/registry/ServicePair.java
Wed May 31 08:20:03 2017
@@ -25,6 +25,7 @@ import org.osgi.framework.BundleContext;
 import org.osgi.framework.ServiceReference;
 
 // TODO need to determine if this needs to be thread safe or not
+@SuppressWarnings({"rawtypes", "unchecked"})
 public class ServicePair<T>
 {
   private BundleContext ctx;
@@ -44,7 +45,6 @@ public class ServicePair<T>
     serviceObject = service;
   }
   
-  @SuppressWarnings("unchecked")
   public T get()
   {
     if (serviceObject == null && ref.getBundle() != null) {

Modified: aries/trunk/util/src/main/java/org/apache/aries/util/tracker/BundleTrackerFactory.java
URL: http://svn.apache.org/viewvc/aries/trunk/util/src/main/java/org/apache/aries/util/tracker/BundleTrackerFactory.java?rev=1796996&r1=1796995&r2=1796996&view=diff
==============================================================================
--- aries/trunk/util/src/main/java/org/apache/aries/util/tracker/BundleTrackerFactory.java
(original)
+++ aries/trunk/util/src/main/java/org/apache/aries/util/tracker/BundleTrackerFactory.java
Wed May 31 08:20:03 2017
@@ -29,6 +29,7 @@ import org.osgi.util.tracker.BundleTrack
 /**
  * This is the factory for BundleTracker
  */
+@SuppressWarnings("rawtypes")
 public class BundleTrackerFactory {
     private static ConcurrentHashMap<String, List<BundleTracker>> btMap = new
ConcurrentHashMap<String, List<BundleTracker>>();
 

Modified: aries/trunk/util/src/main/java/org/apache/aries/util/tracker/InternalRecursiveBundleTracker.java
URL: http://svn.apache.org/viewvc/aries/trunk/util/src/main/java/org/apache/aries/util/tracker/InternalRecursiveBundleTracker.java?rev=1796996&r1=1796995&r2=1796996&view=diff
==============================================================================
--- aries/trunk/util/src/main/java/org/apache/aries/util/tracker/InternalRecursiveBundleTracker.java
(original)
+++ aries/trunk/util/src/main/java/org/apache/aries/util/tracker/InternalRecursiveBundleTracker.java
Wed May 31 08:20:03 2017
@@ -36,6 +36,7 @@ import org.osgi.util.tracker.BundleTrack
  * normal non-recursive BundleTracker when registering bundle tracker
  * customizers.
  */
+@SuppressWarnings({"rawtypes", "unchecked"})
 public class InternalRecursiveBundleTracker extends BundleTracker
 {
   private final int mask;

Modified: aries/trunk/util/src/main/java/org/apache/aries/util/tracker/RecursiveBundleTracker.java
URL: http://svn.apache.org/viewvc/aries/trunk/util/src/main/java/org/apache/aries/util/tracker/RecursiveBundleTracker.java?rev=1796996&r1=1796995&r2=1796996&view=diff
==============================================================================
--- aries/trunk/util/src/main/java/org/apache/aries/util/tracker/RecursiveBundleTracker.java
(original)
+++ aries/trunk/util/src/main/java/org/apache/aries/util/tracker/RecursiveBundleTracker.java
Wed May 31 08:20:03 2017
@@ -37,6 +37,7 @@ import org.osgi.util.tracker.BundleTrack
  *
  * @author pradine
  */
+@SuppressWarnings({"rawtypes", "unchecked"})
 public final class RecursiveBundleTracker {
     private static final int COMPOSITE_BUNDLE_MASK =
             Bundle.INSTALLED | Bundle.RESOLVED | Bundle.STARTING | Bundle.ACTIVE | Bundle.STOPPING;

Modified: aries/trunk/util/src/main/java/org/apache/aries/util/tracker/SingleServiceTracker.java
URL: http://svn.apache.org/viewvc/aries/trunk/util/src/main/java/org/apache/aries/util/tracker/SingleServiceTracker.java?rev=1796996&r1=1796995&r2=1796996&view=diff
==============================================================================
--- aries/trunk/util/src/main/java/org/apache/aries/util/tracker/SingleServiceTracker.java
(original)
+++ aries/trunk/util/src/main/java/org/apache/aries/util/tracker/SingleServiceTracker.java
Wed May 31 08:20:03 2017
@@ -29,6 +29,7 @@ import org.osgi.framework.ServiceEvent;
 import org.osgi.framework.ServiceListener;
 import org.osgi.framework.ServiceReference;
 
+@SuppressWarnings({"rawtypes", "unchecked"})
 public final class SingleServiceTracker<T> 
 {
   public static interface SingleServiceListener
@@ -123,7 +124,6 @@ public final class SingleServiceTracker<
 	  ref = ctx.getServiceReference(className);
     }
     if (ref != null) {
-      @SuppressWarnings("unchecked")
       T service = (T) ctx.getService(ref);
       if (service != null) {
         clear = false;

Modified: aries/trunk/util/src/main/java/org/apache/aries/util/tracker/hook/BundleHookBundleTracker.java
URL: http://svn.apache.org/viewvc/aries/trunk/util/src/main/java/org/apache/aries/util/tracker/hook/BundleHookBundleTracker.java?rev=1796996&r1=1796995&r2=1796996&view=diff
==============================================================================
--- aries/trunk/util/src/main/java/org/apache/aries/util/tracker/hook/BundleHookBundleTracker.java
(original)
+++ aries/trunk/util/src/main/java/org/apache/aries/util/tracker/hook/BundleHookBundleTracker.java
Wed May 31 08:20:03 2017
@@ -41,6 +41,7 @@ import java.util.Map;
  *
  * @version $Rev$ $Date$
  */
+@SuppressWarnings({"rawtypes", "unchecked"})
 public class BundleHookBundleTracker<T> extends BundleTracker {
 
     static {

Modified: aries/trunk/util/src/test/java/org/apache/aries/util/FragmentUtilsTest.java
URL: http://svn.apache.org/viewvc/aries/trunk/util/src/test/java/org/apache/aries/util/FragmentUtilsTest.java?rev=1796996&r1=1796995&r2=1796996&view=diff
==============================================================================
--- aries/trunk/util/src/test/java/org/apache/aries/util/FragmentUtilsTest.java (original)
+++ aries/trunk/util/src/test/java/org/apache/aries/util/FragmentUtilsTest.java Wed May 31
08:20:03 2017
@@ -31,6 +31,7 @@ import org.junit.Test;
 import org.osgi.framework.Bundle;
 import org.osgi.framework.Constants;
 
+@SuppressWarnings("rawtypes")
 public class FragmentUtilsTest {
 
     private Bundle hostBundle;
@@ -41,7 +42,6 @@ public class FragmentUtilsTest {
                 new Hashtable<String, Object>()), Bundle.class);
     }
 
-    @SuppressWarnings("unchecked")
     @Test
     public void testFragmentCreation() throws Exception {
         Bundle exportBundle = makeBundleWithExports("export.bundle", "1.2.3",

Modified: aries/trunk/util/src/test/java/org/apache/aries/util/RecursiveBundleTrackerTest.java
URL: http://svn.apache.org/viewvc/aries/trunk/util/src/test/java/org/apache/aries/util/RecursiveBundleTrackerTest.java?rev=1796996&r1=1796995&r2=1796996&view=diff
==============================================================================
--- aries/trunk/util/src/test/java/org/apache/aries/util/RecursiveBundleTrackerTest.java (original)
+++ aries/trunk/util/src/test/java/org/apache/aries/util/RecursiveBundleTrackerTest.java Wed
May 31 08:20:03 2017
@@ -114,6 +114,7 @@ public class RecursiveBundleTrackerTest
         assertEquals(1, BundleTrackerFactory.getBundleTrackerList(cb.getSymbolicName()+"_"+cb.getVersion()).size());
       
     }
     
+    @SuppressWarnings("rawtypes")
     private void makeSUT() {
         BundleTrackerCustomizer customizer = Skeleton.newMock(BundleTrackerCustomizer.class);
 

Modified: aries/trunk/util/src/test/java/org/apache/aries/util/filesystem/FileSystemTest.java
URL: http://svn.apache.org/viewvc/aries/trunk/util/src/test/java/org/apache/aries/util/filesystem/FileSystemTest.java?rev=1796996&r1=1796995&r2=1796996&view=diff
==============================================================================
--- aries/trunk/util/src/test/java/org/apache/aries/util/filesystem/FileSystemTest.java (original)
+++ aries/trunk/util/src/test/java/org/apache/aries/util/filesystem/FileSystemTest.java Wed
May 31 08:20:03 2017
@@ -130,7 +130,7 @@ public class FileSystemTest
 	  File baseDir = new File(getTestResourceDir(), "/app1");
 	  File manifest = new File(baseDir, "META-INF/APPLICATION.MF");
 	  try {
-	      IDirectory dir = FileSystem.getFSRoot(manifest);
+	      FileSystem.getFSRoot(manifest);
 	      fail("Should have thrown an IORuntimeException");
 	  } catch (IORuntimeException e) {
 	      // good!
@@ -280,6 +280,7 @@ public class FileSystemTest
 		  InputStream is = zip.getInputStream(ze);
 		  is.close();
 	  }
+	  zip.close();
 	  long duration = System.currentTimeMillis() - start;
 
 

Modified: aries/trunk/util/src/test/java/org/apache/aries/util/filesystem/FileUtilsTest.java
URL: http://svn.apache.org/viewvc/aries/trunk/util/src/test/java/org/apache/aries/util/filesystem/FileUtilsTest.java?rev=1796996&r1=1796995&r2=1796996&view=diff
==============================================================================
--- aries/trunk/util/src/test/java/org/apache/aries/util/filesystem/FileUtilsTest.java (original)
+++ aries/trunk/util/src/test/java/org/apache/aries/util/filesystem/FileUtilsTest.java Wed
May 31 08:20:03 2017
@@ -48,7 +48,6 @@ public class FileUtilsTest
    * @throws IOException
    */
 
-  @SuppressWarnings("deprecation")
   @Test
   public void testGetBundlesRecursive() throws IOException {
     File tmpDir = new File("../src/test/resources/tmpJars");

Modified: aries/trunk/util/src/test/java/org/apache/aries/util/log/LoggerTest.java
URL: http://svn.apache.org/viewvc/aries/trunk/util/src/test/java/org/apache/aries/util/log/LoggerTest.java?rev=1796996&r1=1796995&r2=1796996&view=diff
==============================================================================
--- aries/trunk/util/src/test/java/org/apache/aries/util/log/LoggerTest.java (original)
+++ aries/trunk/util/src/test/java/org/apache/aries/util/log/LoggerTest.java Wed May 31 08:20:03
2017
@@ -33,6 +33,7 @@ import org.osgi.framework.BundleContext;
 import org.osgi.framework.ServiceReference;
 import org.osgi.service.log.LogService;
 
+@SuppressWarnings("rawtypes")
 public class LoggerTest {
     private BundleContext ctx;
 



Mime
View raw message