directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1200287 - /directory/apacheds/branches/apacheds-txns/kerberos-test/src/test/java/org/apache/directory/server/kerberos/kdc/AbstractKerberosITest.java
Date Thu, 10 Nov 2011 12:20:52 GMT
Author: elecharny
Date: Thu Nov 10 12:20:52 2011
New Revision: 1200287

URL: http://svn.apache.org/viewvc?rev=1200287&view=rev
Log:
Fixed the test with the latest JVM on mac

Modified:
    directory/apacheds/branches/apacheds-txns/kerberos-test/src/test/java/org/apache/directory/server/kerberos/kdc/AbstractKerberosITest.java

Modified: directory/apacheds/branches/apacheds-txns/kerberos-test/src/test/java/org/apache/directory/server/kerberos/kdc/AbstractKerberosITest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/kerberos-test/src/test/java/org/apache/directory/server/kerberos/kdc/AbstractKerberosITest.java?rev=1200287&r1=1200286&r2=1200287&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/kerberos-test/src/test/java/org/apache/directory/server/kerberos/kdc/AbstractKerberosITest.java
(original)
+++ directory/apacheds/branches/apacheds-txns/kerberos-test/src/test/java/org/apache/directory/server/kerberos/kdc/AbstractKerberosITest.java
Thu Nov 10 12:20:52 2011
@@ -210,7 +210,19 @@ public class AbstractKerberosITest exten
     {
         String clazz = "sun.security.krb5.KrbKdcReq";
         Class<?> krbKdcReqClass = Class.forName( clazz );
-        Field udpPrefLimitField = krbKdcReqClass.getDeclaredField( "udpPrefLimit" );
+        
+        // Absolutely ugly fix to get this method working with the latest JVM on Mac (1.6.0_29)
+        Field udpPrefLimitField = null;
+        
+        try
+        { 
+        	udpPrefLimitField = krbKdcReqClass.getDeclaredField( "udpPrefLimit" );
+        }
+        catch ( NoSuchFieldException nsfe )
+        {
+        	udpPrefLimitField = krbKdcReqClass.getDeclaredField( "defaultUdpPrefLimit" );
+        }
+        
         udpPrefLimitField.setAccessible( true );
         return udpPrefLimitField;
     }



Mime
View raw message