incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bdelacre...@apache.org
Subject svn commit: r1233346 - in /sling/trunk/testing/tools/src: main/java/org/apache/sling/testing/tools/serversetup/ test/java/org/apache/sling/testing/tools/test/
Date Thu, 19 Jan 2012 13:07:15 GMT
Author: bdelacretaz
Date: Thu Jan 19 13:07:14 2012
New Revision: 1233346

URL: http://svn.apache.org/viewvc?rev=1233346&view=rev
Log:
SLING-2368 - use toString() instead of getDescription()

Modified:
    sling/trunk/testing/tools/src/main/java/org/apache/sling/testing/tools/serversetup/ServerSetup.java
    sling/trunk/testing/tools/src/main/java/org/apache/sling/testing/tools/serversetup/SetupPhase.java
    sling/trunk/testing/tools/src/main/java/org/apache/sling/testing/tools/serversetup/StartRunnableJarPhase.java
    sling/trunk/testing/tools/src/test/java/org/apache/sling/testing/tools/test/TestSetupPhase.java

Modified: sling/trunk/testing/tools/src/main/java/org/apache/sling/testing/tools/serversetup/ServerSetup.java
URL: http://svn.apache.org/viewvc/sling/trunk/testing/tools/src/main/java/org/apache/sling/testing/tools/serversetup/ServerSetup.java?rev=1233346&r1=1233345&r2=1233346&view=diff
==============================================================================
--- sling/trunk/testing/tools/src/main/java/org/apache/sling/testing/tools/serversetup/ServerSetup.java
(original)
+++ sling/trunk/testing/tools/src/main/java/org/apache/sling/testing/tools/serversetup/ServerSetup.java
Thu Jan 19 13:07:14 2012
@@ -169,7 +169,7 @@ public class ServerSetup {
             
             if(p.isStartupPhase() == startup) {
                 log.info("Executing ({}) {}:{}", 
-                        new Object [] { mode, p.getClass().getSimpleName(), p.getDescription()});
+                        new Object [] { mode, p.getClass().getSimpleName(), p});
                 try {
                     p.run(this);
                 } catch(Exception e) {

Modified: sling/trunk/testing/tools/src/main/java/org/apache/sling/testing/tools/serversetup/SetupPhase.java
URL: http://svn.apache.org/viewvc/sling/trunk/testing/tools/src/main/java/org/apache/sling/testing/tools/serversetup/SetupPhase.java?rev=1233346&r1=1233345&r2=1233346&view=diff
==============================================================================
--- sling/trunk/testing/tools/src/main/java/org/apache/sling/testing/tools/serversetup/SetupPhase.java
(original)
+++ sling/trunk/testing/tools/src/main/java/org/apache/sling/testing/tools/serversetup/SetupPhase.java
Thu Jan 19 13:07:14 2012
@@ -24,9 +24,6 @@ public interface SetupPhase {
     /** Is this a startup or shutdown phase? */
     public boolean isStartupPhase();
     
-    /** Describe this phase */
-    public String getDescription();
-    
     /** Get the phase ID string, a list of those
      *  is used by {@link ServerSetup} to decide
      *  which phases to run

Modified: sling/trunk/testing/tools/src/main/java/org/apache/sling/testing/tools/serversetup/StartRunnableJarPhase.java
URL: http://svn.apache.org/viewvc/sling/trunk/testing/tools/src/main/java/org/apache/sling/testing/tools/serversetup/StartRunnableJarPhase.java?rev=1233346&r1=1233345&r2=1233346&view=diff
==============================================================================
--- sling/trunk/testing/tools/src/main/java/org/apache/sling/testing/tools/serversetup/StartRunnableJarPhase.java
(original)
+++ sling/trunk/testing/tools/src/main/java/org/apache/sling/testing/tools/serversetup/StartRunnableJarPhase.java
Thu Jan 19 13:07:14 2012
@@ -33,9 +33,10 @@ public class StartRunnableJarPhase imple
         log.info("Server base URL={}", url);
         owner.getContext().put(ServerSetup.SERVER_BASE_URL, url);
     }
-    
+
+    @Override
     public String toString() {
-        return getClass().getSimpleName() + "(" + id + ")";
+        return getClass().getSimpleName() + " (" + id + ") " + description; 
     }
     
     /** @inheritDoc */
@@ -49,11 +50,6 @@ public class StartRunnableJarPhase imple
     }
 
     /** @inheritDoc */
-    public String getDescription() {
-        return description;
-    }
-
-    /** @inheritDoc */
     public String getId() {
         return id;
     }
@@ -71,8 +67,9 @@ public class StartRunnableJarPhase imple
                 return true;
             }
 
-            public String getDescription() {
-                return "Kill the process started by " + StartRunnableJarPhase.this.getDescription();
+            @Override
+            public String toString() {
+                return "Kill the process started by " + StartRunnableJarPhase.this;
             }
 
             public String getId() {
@@ -80,4 +77,4 @@ public class StartRunnableJarPhase imple
             }
         };
     }
-}
+}
\ No newline at end of file

Modified: sling/trunk/testing/tools/src/test/java/org/apache/sling/testing/tools/test/TestSetupPhase.java
URL: http://svn.apache.org/viewvc/sling/trunk/testing/tools/src/test/java/org/apache/sling/testing/tools/test/TestSetupPhase.java?rev=1233346&r1=1233345&r2=1233346&view=diff
==============================================================================
--- sling/trunk/testing/tools/src/test/java/org/apache/sling/testing/tools/test/TestSetupPhase.java
(original)
+++ sling/trunk/testing/tools/src/test/java/org/apache/sling/testing/tools/test/TestSetupPhase.java
Thu Jan 19 13:07:14 2012
@@ -50,10 +50,6 @@ class TestSetupPhase implements SetupPha
     
     @Override
     public String toString() {
-        return getDescription();
-    }
-
-    public String getDescription() {
         return getClass().getSimpleName() + "(" + id + ")";
     }
 



Mime
View raw message