directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r504891 - in /directory/apacheds/branches/1.0/server-main/src/main/java/org/apache/directory/server: Service.java UberjarMain.java
Date Thu, 08 Feb 2007 13:44:33 GMT
Author: elecharny
Date: Thu Feb  8 05:44:33 2007
New Revision: 504891

URL: http://svn.apache.org/viewvc?view=rev&rev=504891
Log:
A protection against null args has been added (DIRSERVER-846)

Modified:
    directory/apacheds/branches/1.0/server-main/src/main/java/org/apache/directory/server/Service.java
    directory/apacheds/branches/1.0/server-main/src/main/java/org/apache/directory/server/UberjarMain.java

Modified: directory/apacheds/branches/1.0/server-main/src/main/java/org/apache/directory/server/Service.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/1.0/server-main/src/main/java/org/apache/directory/server/Service.java?view=diff&rev=504891&r1=504890&r2=504891
==============================================================================
--- directory/apacheds/branches/1.0/server-main/src/main/java/org/apache/directory/server/Service.java
(original)
+++ directory/apacheds/branches/1.0/server-main/src/main/java/org/apache/directory/server/Service.java
Thu Feb  8 05:44:33 2007
@@ -60,7 +60,7 @@
     {
         printBanner();
         long startTime = System.currentTimeMillis();
-
+        
         if ( install != null )
         {
             log.info( "server: loading settings from ", install.getConfigurationFile() );
@@ -69,7 +69,7 @@
             cfg = ( MutableServerStartupConfiguration ) factory.getBean( "configuration"
);
             env = ( Properties ) factory.getBean( "environment" );
         }
-        else if ( args.length > 0 && new File( args[0] ).exists() ) // hack that
takes server.xml file argument
+        else if ( ( args != null ) && ( args.length > 0 ) && new File(
args[0] ).exists() ) // hack that takes server.xml file argument
         {
             log.info( "server: loading settings from ", args[0] );
             ApplicationContext factory = null;

Modified: directory/apacheds/branches/1.0/server-main/src/main/java/org/apache/directory/server/UberjarMain.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/1.0/server-main/src/main/java/org/apache/directory/server/UberjarMain.java?view=diff&rev=504891&r1=504890&r2=504891
==============================================================================
--- directory/apacheds/branches/1.0/server-main/src/main/java/org/apache/directory/server/UberjarMain.java
(original)
+++ directory/apacheds/branches/1.0/server-main/src/main/java/org/apache/directory/server/UberjarMain.java
Thu Feb  8 05:44:33 2007
@@ -44,12 +44,12 @@
     {
         Service server = new Service();
 
-        if ( args.length > 0 && new File( args[0] ).isDirectory() )
+        if ( ( args != null ) && ( args.length > 0 ) && new File( args[0]
).isDirectory() )
         {
             server.init( new InstallationLayout( args[0] ), null );
             server.start();
         }
-        else if ( args.length > 0 && new File( args[0] ).isFile() )
+        else if ( (args != null ) && ( args.length > 0 ) && new File(
args[0] ).isFile() )
         {
             server.init( null, args );
             server.start();



Mime
View raw message