You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@felix.apache.org by pa...@apache.org on 2008/04/14 08:37:30 UTC
svn commit: r647671 - in
/felix/trunk/framework/src/main/java/org/apache/felix/framework:
ServiceReferenceImpl.java util/ldap/Parser.java
Author: pauls
Date: Sun Apr 13 23:37:08 2008
New Revision: 647671
URL: http://svn.apache.org/viewvc?rev=647671&view=rev
Log:
Reorder some instructions to speed up things a bit more.
Modified:
felix/trunk/framework/src/main/java/org/apache/felix/framework/ServiceReferenceImpl.java
felix/trunk/framework/src/main/java/org/apache/felix/framework/util/ldap/Parser.java
Modified: felix/trunk/framework/src/main/java/org/apache/felix/framework/ServiceReferenceImpl.java
URL: http://svn.apache.org/viewvc/felix/trunk/framework/src/main/java/org/apache/felix/framework/ServiceReferenceImpl.java?rev=647671&r1=647670&r2=647671&view=diff
==============================================================================
--- felix/trunk/framework/src/main/java/org/apache/felix/framework/ServiceReferenceImpl.java (original)
+++ felix/trunk/framework/src/main/java/org/apache/felix/framework/ServiceReferenceImpl.java Sun Apr 13 23:37:08 2008
@@ -121,9 +121,10 @@
// Get the package.
String pkgName =
Util.getClassPackage(className);
- IModule current = ((FelixBundle) requester).getInfo().getCurrentModule();
+ IModule requesterModule =
+ ((FelixBundle) requester).getInfo().getCurrentModule();
// Get package wiring from service requester.
- IWire requesterWire = Util.getWire(current, pkgName);
+ IWire requesterWire = Util.getWire(requesterModule, pkgName);
// There are three situations that may occur here:
// 1. The requester does not have a wire for the package.
@@ -146,7 +147,9 @@
}
// Get package wiring from service provider.
- IWire providerWire = Util.getWire(current, pkgName);
+ IModule providerModule =
+ ((FelixBundle) m_bundle).getInfo().getCurrentModule();
+ IWire providerWire = Util.getWire(providerModule, pkgName);
// Case 2: Only include service reference if the service
// object uses the same class as the requester.
@@ -160,7 +163,7 @@
try
{
// Load the class from the requesting bundle.
- Class requestClass = current.getClass(className);
+ Class requestClass = requesterModule.getClass(className);
// Get the service registration and ask it to check
// if the service object is assignable to the requesting
// bundle's class.
@@ -177,7 +180,7 @@
// O.k. the provider is the exporter of the requester's package, now check
// if the requester is wired to the latest version of the provider, if so
// then allow else don't (the provider has been updated but not refreshed).
- allow = current == requesterWire.getExporter();
+ allow = providerModule == requesterWire.getExporter();
}
}
// Case 3: Include service reference if the wires have the
Modified: felix/trunk/framework/src/main/java/org/apache/felix/framework/util/ldap/Parser.java
URL: http://svn.apache.org/viewvc/felix/trunk/framework/src/main/java/org/apache/felix/framework/util/ldap/Parser.java?rev=647671&r1=647670&r2=647671&view=diff
==============================================================================
--- felix/trunk/framework/src/main/java/org/apache/felix/framework/util/ldap/Parser.java (original)
+++ felix/trunk/framework/src/main/java/org/apache/felix/framework/util/ldap/Parser.java Sun Apr 13 23:37:08 2008
@@ -257,7 +257,7 @@
switch (kind)
{
case SIMPLE :
- if ("objectClass".equals(attr.toString()) && (op == '='))
+ if ((op == '=') && "objectClass".equalsIgnoreCase(attr.toString()))
{
program.add(new ObjectClassOperator((String) pieces.get(0)));
return true;