You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@felix.apache.org by cz...@apache.org on 2009/02/18 18:35:25 UTC

svn commit: r745582 - /felix/trunk/framework/src/main/java/org/apache/felix/framework/ServiceRegistrationImpl.java

Author: cziegeler
Date: Wed Feb 18 17:35:25 2009
New Revision: 745582

URL: http://svn.apache.org/viewvc?rev=745582&view=rev
Log:
FELIX-948 : Remove casts to integer.

Modified:
    felix/trunk/framework/src/main/java/org/apache/felix/framework/ServiceRegistrationImpl.java

Modified: felix/trunk/framework/src/main/java/org/apache/felix/framework/ServiceRegistrationImpl.java
URL: http://svn.apache.org/viewvc/felix/trunk/framework/src/main/java/org/apache/felix/framework/ServiceRegistrationImpl.java?rev=745582&r1=745581&r2=745582&view=diff
==============================================================================
--- felix/trunk/framework/src/main/java/org/apache/felix/framework/ServiceRegistrationImpl.java (original)
+++ felix/trunk/framework/src/main/java/org/apache/felix/framework/ServiceRegistrationImpl.java Wed Feb 18 17:35:25 2009
@@ -320,11 +320,11 @@
             return null;
         }
     }
-    
+
     class ServiceReferenceImpl implements ServiceReference
     {
         private ServiceReferenceImpl() {}
-    
+
         ServiceRegistrationImpl getServiceRegistration()
         {
             return ServiceRegistrationImpl.this;
@@ -406,7 +406,7 @@
             // Get package wiring from service provider.
             IModule providerModule = ((BundleImpl) m_bundle).getCurrentModule();
             IWire providerWire = Util.getWire(providerModule, pkgName);
-            
+
             // Case 2: Only include service reference if the service
             // object uses the same class as the requester.
             if (providerWire == null)
@@ -461,8 +461,8 @@
                 return 0; // same service
             }
 
-            Object rankObj = (Integer) getProperty(Constants.SERVICE_RANKING);
-            Object otherRankObj = (Integer) other.getProperty(Constants.SERVICE_RANKING);
+            Object rankObj = getProperty(Constants.SERVICE_RANKING);
+            Object otherRankObj = other.getProperty(Constants.SERVICE_RANKING);
 
             // If no rank, then spec says it defaults to zero.
             rankObj = (rankObj == null) ? new Integer(0) : rankObj;