karaf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dav...@apache.org
Subject svn commit: r1545569 - in /karaf/branches/karaf-2.x/jaas/modules/src/main/java/org/apache/karaf/jaas/modules/properties: PropertiesBackingEngine.java PropertiesLoginModule.java
Date Tue, 26 Nov 2013 08:47:29 GMT
Author: davidb
Date: Tue Nov 26 08:47:29 2013
New Revision: 1545569

URL: http://svn.apache.org/r1545569
Log:
Adding back the strangely necessary (but unnecessary) casts that are apparently needed for
a JDK 1.7 build...

Modified:
    karaf/branches/karaf-2.x/jaas/modules/src/main/java/org/apache/karaf/jaas/modules/properties/PropertiesBackingEngine.java
    karaf/branches/karaf-2.x/jaas/modules/src/main/java/org/apache/karaf/jaas/modules/properties/PropertiesLoginModule.java

Modified: karaf/branches/karaf-2.x/jaas/modules/src/main/java/org/apache/karaf/jaas/modules/properties/PropertiesBackingEngine.java
URL: http://svn.apache.org/viewvc/karaf/branches/karaf-2.x/jaas/modules/src/main/java/org/apache/karaf/jaas/modules/properties/PropertiesBackingEngine.java?rev=1545569&r1=1545568&r2=1545569&view=diff
==============================================================================
--- karaf/branches/karaf-2.x/jaas/modules/src/main/java/org/apache/karaf/jaas/modules/properties/PropertiesBackingEngine.java
(original)
+++ karaf/branches/karaf-2.x/jaas/modules/src/main/java/org/apache/karaf/jaas/modules/properties/PropertiesBackingEngine.java
Tue Nov 26 08:47:29 2013
@@ -76,7 +76,7 @@ public class PropertiesBackingEngine imp
             }
         }
 
-        String userInfos = users.get(username);
+        String userInfos = (String) users.get(username);
 
         //If user already exists, update password
         if (userInfos != null && userInfos.length() > 0) {
@@ -143,7 +143,7 @@ public class PropertiesBackingEngine imp
     private List<RolePrincipal> listRoles(String name) {
 
         List<RolePrincipal> result = new ArrayList<RolePrincipal>();
-        String userInfo = users.get(name);
+        String userInfo = (String) users.get(name);
         String[] infos = userInfo.split(",");
         for (int i = 1; i < infos.length; i++) {
             String roleName = infos[i];
@@ -165,7 +165,7 @@ public class PropertiesBackingEngine imp
 
     @Override
     public void addRole(String username, String role) {
-        String userInfos = users.get(username);
+        String userInfos = (String) users.get(username);
         if (userInfos != null) {
             String newUserInfos = userInfos + "," + role;
             users.put(username, newUserInfos);
@@ -182,7 +182,7 @@ public class PropertiesBackingEngine imp
         String[] infos = null;
         StringBuffer userInfoBuffer = new StringBuffer();
 
-        String userInfos = users.get(username);
+        String userInfos = (String) users.get(username);
 
         //If user already exists, remove the role
         if (userInfos != null && userInfos.length() > 0) {
@@ -215,7 +215,7 @@ public class PropertiesBackingEngine imp
 
     private List<GroupPrincipal> listGroups(String userName) {
         List<GroupPrincipal> result = new ArrayList<GroupPrincipal>();
-        String userInfo = users.get(userName);
+        String userInfo = (String) users.get(userName);
         if (userInfo != null) {
             String[] infos = userInfo.split(",");
             for (int i = 1; i < infos.length; i++) {

Modified: karaf/branches/karaf-2.x/jaas/modules/src/main/java/org/apache/karaf/jaas/modules/properties/PropertiesLoginModule.java
URL: http://svn.apache.org/viewvc/karaf/branches/karaf-2.x/jaas/modules/src/main/java/org/apache/karaf/jaas/modules/properties/PropertiesLoginModule.java?rev=1545569&r1=1545568&r2=1545569&view=diff
==============================================================================
--- karaf/branches/karaf-2.x/jaas/modules/src/main/java/org/apache/karaf/jaas/modules/properties/PropertiesLoginModule.java
(original)
+++ karaf/branches/karaf-2.x/jaas/modules/src/main/java/org/apache/karaf/jaas/modules/properties/PropertiesLoginModule.java
Tue Nov 26 08:47:29 2013
@@ -104,7 +104,7 @@ public class PropertiesLoginModule exten
         String userInfos = null;
 
         try {
-            userInfos = users.get(user);
+            userInfos = (String) users.get(user);
         } catch (NullPointerException e) {
             //error handled in the next statement
         }
@@ -171,7 +171,7 @@ public class PropertiesLoginModule exten
             if (infos[i].startsWith(PropertiesBackingEngine.GROUP_PREFIX)) {
                 // it's a group reference
                 principals.add(new GroupPrincipal(infos[i].substring(PropertiesBackingEngine.GROUP_PREFIX.length())));
-                String groupInfo = users.get(infos[i]);
+                String groupInfo = (String) users.get(infos[i]);
                 if (groupInfo != null) {
                     String[] roles = groupInfo.split(",");
                     for (int j = 1; j < roles.length; j++) {



Mime
View raw message