directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r752216 - /directory/daemon/trunk/bootstrappers/src/main/java/org/apache/directory/daemon/Bootstrapper.java
Date Tue, 10 Mar 2009 18:58:39 GMT
Author: akarasulu
Date: Tue Mar 10 18:58:38 2009
New Revision: 752216

URL: http://svn.apache.org/viewvc?rev=752216&view=rev
Log:
minor cleanups while parusing code

Modified:
    directory/daemon/trunk/bootstrappers/src/main/java/org/apache/directory/daemon/Bootstrapper.java

Modified: directory/daemon/trunk/bootstrappers/src/main/java/org/apache/directory/daemon/Bootstrapper.java
URL: http://svn.apache.org/viewvc/directory/daemon/trunk/bootstrappers/src/main/java/org/apache/directory/daemon/Bootstrapper.java?rev=752216&r1=752215&r2=752216&view=diff
==============================================================================
--- directory/daemon/trunk/bootstrappers/src/main/java/org/apache/directory/daemon/Bootstrapper.java
(original)
+++ directory/daemon/trunk/bootstrappers/src/main/java/org/apache/directory/daemon/Bootstrapper.java
Tue Mar 10 18:58:38 2009
@@ -43,7 +43,9 @@
 
 
 /**
- * The base bootstrapper extended by all frameworks and java applications.
+ * The base Bootstrapper extended by all frameworks and java applications. The
+ * basic machinery to load an DaemonApplication class for lifecycle method 
+ * calls exists here.
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$
@@ -70,7 +72,7 @@
     private ClassLoader parent;
     private String startClassName;
     private String stopClassName;
-    private Class startClass;
+    private Class<DaemonApplication> startClass;
     private DaemonApplication start;
     private DaemonApplication stop;
 
@@ -123,12 +125,13 @@
     }
 
 
+    @SuppressWarnings("unchecked")
     public void callInit( String[] args )
     {
         Thread.currentThread().setContextClassLoader( application );
         try
         {
-            startClass = application.loadClass( args[0] );
+            startClass = ( Class<DaemonApplication> ) application.loadClass ( args[0]
);
         }
         catch ( ClassNotFoundException e )
         {
@@ -138,7 +141,7 @@
 
         try
         {
-            start = ( DaemonApplication ) startClass.newInstance();
+            start = startClass.newInstance();
         }
         catch ( Exception e )
         {



Mime
View raw message