FELIX-4389 Apply patch by Tobias Bocanegra fixing field hiding issue (thanks for the patch!)
git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1560267 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/jaas/src/main/java/org/apache/felix/jaas/internal/OsgiLoginModuleProvider.java b/jaas/src/main/java/org/apache/felix/jaas/internal/OsgiLoginModuleProvider.java
index 97a3e4d..8d49efa 100644
--- a/jaas/src/main/java/org/apache/felix/jaas/internal/OsgiLoginModuleProvider.java
+++ b/jaas/src/main/java/org/apache/felix/jaas/internal/OsgiLoginModuleProvider.java
@@ -50,13 +50,13 @@
public void configure() {
// FELIX-4389: Support jaas.ranking (in addition to service.ranking
// to help ordering LoginModuleFactory instances
- Object ranking = serviceReference.getProperty(LoginModuleFactory.JAAS_RANKING);
- if (ranking == null) {
- ranking = serviceReference.getProperty(Constants.SERVICE_RANKING);
+ Object rankingProperty = serviceReference.getProperty(LoginModuleFactory.JAAS_RANKING);
+ if (rankingProperty == null) {
+ rankingProperty = serviceReference.getProperty(Constants.SERVICE_RANKING);
}
- ranking = PropertiesUtil.toInteger(ranking, 0);
- flag = ControlFlag.from((String) serviceReference.getProperty(LoginModuleFactory.JAAS_CONTROL_FLAG)).flag();
- realmName = (String) serviceReference.getProperty(LoginModuleFactory.JAAS_REALM_NAME);
+ this.ranking = PropertiesUtil.toInteger(rankingProperty, 0);
+ this.flag = ControlFlag.from((String) serviceReference.getProperty(LoginModuleFactory.JAAS_CONTROL_FLAG)).flag();
+ this.realmName = (String) serviceReference.getProperty(LoginModuleFactory.JAAS_REALM_NAME);
}
public Map<String, ?> options()