karaf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Glen Mazza <gma...@talend.com>
Subject Hazelcast commit (svn commit: r1162249 [2/2] - in /karaf/cellar/trunk...)
Date Fri, 26 Aug 2011 21:06:53 GMT
On 08/26/2011 04:52 PM, iocanel@apache.org wrote:
> Modified: karaf/cellar/trunk/hazelcast/src/main/java/org/apache/karaf/cellar/hazelcast/factory/HazelcastServiceFactory.java
> URL: http://svn.apache.org/viewvc/karaf/cellar/trunk/hazelcast/src/main/java/org/apache/karaf/cellar/hazelcast/factory/HazelcastServiceFactory.java?rev=1162249&r1=1162248&r2=1162249&view=diff
> ==============================================================================
> --- karaf/cellar/trunk/hazelcast/src/main/java/org/apache/karaf/cellar/hazelcast/factory/HazelcastServiceFactory.java
(original)
> +++ karaf/cellar/trunk/hazelcast/src/main/java/org/apache/karaf/cellar/hazelcast/factory/HazelcastServiceFactory.java
Fri Aug 26 20:52:08 2011
> @@ -44,6 +44,21 @@ public class HazelcastServiceFactory imp
>
>
>       public void setUsername(String username) {
> -        this.username = username;
> +        if (username != null) {
> +            this.username = username;
> +        }
>       }
>
>       public String getPassword() {
> @@ -321,7 +359,9 @@ public class HazelcastServiceFactory imp
>       }
>
>       public void setPassword(String password) {
> -        this.password = password;
> +        if (password != null) {
> +            this.password = password;
> +        }
>       }
>

Are you sure you want to implement it this way (retain the old username 
and password if the caller tries to set either to "null"?)  I'm not sure 
how username and password are being used here, but if the caller sets 
the username and password to "null" that's usually (?) to indicate that 
no more authorizations (actions) are wanted--to refuse everything 
afterwards.  But with the above implementation in order to accomplish 
the same thing you'd need to set bogus non-zero-length usernames and 
passwords instead--something strange to be encouraging.

Glen

-- 
Glen Mazza
Talend - http://www.talend.com/ai
Blog - http://www.jroller.com/gmazza
Twitter - glenmazza



Mime
View raw message