directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kayyag...@apache.org
Subject svn commit: r1470211 - /directory/apacheds/trunk/kerberos-client2/src/main/java/org/apache/directory/kerberos/client/ChangePasswordResult.java
Date Sat, 20 Apr 2013 18:02:17 GMT
Author: kayyagari
Date: Sat Apr 20 18:02:17 2013
New Revision: 1470211

URL: http://svn.apache.org/r1470211
Log:
fixed the wrong mask (the max allowed code value is 0xFFFF)

Modified:
    directory/apacheds/trunk/kerberos-client2/src/main/java/org/apache/directory/kerberos/client/ChangePasswordResult.java

Modified: directory/apacheds/trunk/kerberos-client2/src/main/java/org/apache/directory/kerberos/client/ChangePasswordResult.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-client2/src/main/java/org/apache/directory/kerberos/client/ChangePasswordResult.java?rev=1470211&r1=1470210&r2=1470211&view=diff
==============================================================================
--- directory/apacheds/trunk/kerberos-client2/src/main/java/org/apache/directory/kerberos/client/ChangePasswordResult.java
(original)
+++ directory/apacheds/trunk/kerberos-client2/src/main/java/org/apache/directory/kerberos/client/ChangePasswordResult.java
Sat Apr 20 18:02:17 2013
@@ -37,7 +37,7 @@ public class ChangePasswordResult
     public ChangePasswordResult( byte[] userData )
     {
         // first 2 bytes contain the result code ( from 0-7 )
-        int r = ( userData[0] & 0xFF << 8 ) + ( userData[1] & 0xFF );
+        int r = ( userData[0] & 0xFFFF << 8 ) + ( userData[1] & 0xFFFF );
         
         code = ChangePasswordResultCode.getByValue( r );
         
@@ -62,5 +62,5 @@ public class ChangePasswordResult
     {
         return "ChangePasswordResult [result=" + code + ", message=" + message + "]";
     }
-
+    
 }



Mime
View raw message