Return-Path: X-Original-To: apmail-directory-commits-archive@www.apache.org Delivered-To: apmail-directory-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id CBAF7DFE5 for ; Thu, 8 Nov 2012 14:27:39 +0000 (UTC) Received: (qmail 75927 invoked by uid 500); 8 Nov 2012 14:27:39 -0000 Delivered-To: apmail-directory-commits-archive@directory.apache.org Received: (qmail 75747 invoked by uid 500); 8 Nov 2012 14:27:34 -0000 Mailing-List: contact commits-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@directory.apache.org Delivered-To: mailing list commits@directory.apache.org Received: (qmail 75706 invoked by uid 99); 8 Nov 2012 14:27:33 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 08 Nov 2012 14:27:33 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 08 Nov 2012 14:27:32 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 04ED223888E3 for ; Thu, 8 Nov 2012 14:27:12 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1407098 - /directory/apacheds/trunk/test-framework/src/main/java/org/apache/directory/server/core/integ/FrameworkRunner.java Date: Thu, 08 Nov 2012 14:27:11 -0000 To: commits@directory.apache.org From: elecharny@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20121108142712.04ED223888E3@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: elecharny Date: Thu Nov 8 14:27:11 2012 New Revision: 1407098 URL: http://svn.apache.org/viewvc?rev=1407098&view=rev Log: Avoid an exception when the members are not defined Modified: directory/apacheds/trunk/test-framework/src/main/java/org/apache/directory/server/core/integ/FrameworkRunner.java Modified: directory/apacheds/trunk/test-framework/src/main/java/org/apache/directory/server/core/integ/FrameworkRunner.java URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/test-framework/src/main/java/org/apache/directory/server/core/integ/FrameworkRunner.java?rev=1407098&r1=1407097&r2=1407098&view=diff ============================================================================== --- directory/apacheds/trunk/test-framework/src/main/java/org/apache/directory/server/core/integ/FrameworkRunner.java (original) +++ directory/apacheds/trunk/test-framework/src/main/java/org/apache/directory/server/core/integ/FrameworkRunner.java Thu Nov 8 14:27:11 2012 @@ -328,14 +328,43 @@ public class FrameworkRunner extends Blo // At this point, we know which service to use. // Inject it into the class - Method setService = getTestClass().getJavaClass().getMethod( SET_SERVICE_METHOD_NAME, - DirectoryService.class ); - setService.invoke( getTestClass().getJavaClass(), directoryService ); + Method setService = null; + + try + { + setService = getTestClass().getJavaClass().getMethod( SET_SERVICE_METHOD_NAME, + DirectoryService.class ); + + setService.invoke( getTestClass().getJavaClass(), directoryService ); + } + catch ( NoSuchMethodException nsme ) + { + // Do nothing + } // if we run this class in a suite, tell it to the test - Method setLdapServer = getTestClass().getJavaClass().getMethod( SET_LDAP_SERVER_METHOD_NAME, - LdapServer.class ); - Method setKdcServer = getTestClass().getJavaClass().getMethod( SET_KDC_SERVER_METHOD_NAME, KdcServer.class ); + Method setLdapServer = null; + + try + { + setLdapServer = getTestClass().getJavaClass().getMethod( SET_LDAP_SERVER_METHOD_NAME, + LdapServer.class ); + } + catch ( NoSuchMethodException nsme ) + { + // Do nothing + } + + Method setKdcServer = null; + + try + { + setKdcServer = getTestClass().getJavaClass().getMethod( SET_KDC_SERVER_METHOD_NAME, KdcServer.class ); + } + catch ( NoSuchMethodException nsme ) + { + // Do nothing + } DirectoryService oldLdapServerDirService = null; DirectoryService oldKdcServerDirService = null;