polygene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nic...@apache.org
Subject zest-java git commit: Removed all warnings from org.apache.zest.api package
Date Mon, 24 Oct 2016 01:23:24 GMT
Repository: zest-java
Updated Branches:
  refs/heads/develop 9db550ef5 -> 3b1ed4c6d


Removed all warnings from org.apache.zest.api package


Project: http://git-wip-us.apache.org/repos/asf/zest-java/repo
Commit: http://git-wip-us.apache.org/repos/asf/zest-java/commit/3b1ed4c6
Tree: http://git-wip-us.apache.org/repos/asf/zest-java/tree/3b1ed4c6
Diff: http://git-wip-us.apache.org/repos/asf/zest-java/diff/3b1ed4c6

Branch: refs/heads/develop
Commit: 3b1ed4c6d42621fc6c9013e01c228d355c7a6e07
Parents: 9db550e
Author: Niclas Hedhman <niclas@hedhman.org>
Authored: Mon Oct 24 09:23:24 2016 +0800
Committer: Niclas Hedhman <niclas@hedhman.org>
Committed: Mon Oct 24 09:23:24 2016 +0800

----------------------------------------------------------------------
 .../java/org/apache/zest/api/activation/Activation.java |  1 +
 .../org/apache/zest/api/activation/ActivationEvent.java | 12 +++++++++++-
 .../api/activation/ApplicationPassivationThread.java    |  6 ++++--
 .../zest/api/activation/PassivationException.java       |  5 +----
 .../entitystore/memory/MemoryEntityStoreTest.java       |  2 +-
 5 files changed, 18 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/zest-java/blob/3b1ed4c6/core/api/src/main/java/org/apache/zest/api/activation/Activation.java
----------------------------------------------------------------------
diff --git a/core/api/src/main/java/org/apache/zest/api/activation/Activation.java b/core/api/src/main/java/org/apache/zest/api/activation/Activation.java
index fe6756c..510c79b 100644
--- a/core/api/src/main/java/org/apache/zest/api/activation/Activation.java
+++ b/core/api/src/main/java/org/apache/zest/api/activation/Activation.java
@@ -24,6 +24,7 @@ package org.apache.zest.api.activation;
  * <p>Application and Layer expose this interface so you can activate and passivate
them.</p>
  * <p>Module and ServiceComposite activation/passivation is handled by the Zest runtime.</p>
  */
+@SuppressWarnings("JavaDoc")
 public interface Activation
 {
     /**

http://git-wip-us.apache.org/repos/asf/zest-java/blob/3b1ed4c6/core/api/src/main/java/org/apache/zest/api/activation/ActivationEvent.java
----------------------------------------------------------------------
diff --git a/core/api/src/main/java/org/apache/zest/api/activation/ActivationEvent.java b/core/api/src/main/java/org/apache/zest/api/activation/ActivationEvent.java
index 553ede4..27b616e 100644
--- a/core/api/src/main/java/org/apache/zest/api/activation/ActivationEvent.java
+++ b/core/api/src/main/java/org/apache/zest/api/activation/ActivationEvent.java
@@ -59,6 +59,16 @@ public final class ActivationEvent
         return type;
     }
 
+
+    /**
+     *
+     * @return The instant that this event was created.
+     */
+    public Instant eventTime()
+    {
+        return timestamp;
+    }
+
     /**
      * @return an informative message describing the event
      */
@@ -84,6 +94,6 @@ public final class ActivationEvent
     @Override
     public String toString()
     {
-        return message();
+        return message() + "@" + timestamp;
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/zest-java/blob/3b1ed4c6/core/api/src/main/java/org/apache/zest/api/activation/ApplicationPassivationThread.java
----------------------------------------------------------------------
diff --git a/core/api/src/main/java/org/apache/zest/api/activation/ApplicationPassivationThread.java
b/core/api/src/main/java/org/apache/zest/api/activation/ApplicationPassivationThread.java
index b5323b8..78ef07c 100644
--- a/core/api/src/main/java/org/apache/zest/api/activation/ApplicationPassivationThread.java
+++ b/core/api/src/main/java/org/apache/zest/api/activation/ApplicationPassivationThread.java
@@ -37,7 +37,8 @@ public final class ApplicationPassivationThread
      * Create a new Application Passivation Thread that output errors to STDERR.
      * @param application The Application to passivate
      */
-    public ApplicationPassivationThread( final Application application )
+    @SuppressWarnings("unused")
+    public ApplicationPassivationThread(final Application application )
     {
         this( application, null, null );
     }
@@ -47,7 +48,8 @@ public final class ApplicationPassivationThread
      * @param application The Application to passivate
      * @param logger Logger for errors
      */
-    public ApplicationPassivationThread( Application application, Logger logger )
+    @SuppressWarnings("unused")
+    public ApplicationPassivationThread(Application application, Logger logger )
     {
         this( application, null, logger );
     }

http://git-wip-us.apache.org/repos/asf/zest-java/blob/3b1ed4c6/core/api/src/main/java/org/apache/zest/api/activation/PassivationException.java
----------------------------------------------------------------------
diff --git a/core/api/src/main/java/org/apache/zest/api/activation/PassivationException.java
b/core/api/src/main/java/org/apache/zest/api/activation/PassivationException.java
index ee79dd8..fd212da 100644
--- a/core/api/src/main/java/org/apache/zest/api/activation/PassivationException.java
+++ b/core/api/src/main/java/org/apache/zest/api/activation/PassivationException.java
@@ -42,10 +42,7 @@ public final class PassivationException
     public PassivationException( Collection<Exception> exceptions )
     {
         super( "Passivation Exception - [has " + exceptions.size() + " cause(s)]" );
-        for( Throwable cause : exceptions )
-        {
-            addSuppressed( cause );
-        }
+        exceptions.forEach( this::addSuppressed );
         this.causes = new ArrayList<>( exceptions );
     }
 

http://git-wip-us.apache.org/repos/asf/zest-java/blob/3b1ed4c6/core/runtime/src/test/java/org/apache/zest/test/performance/entitystore/memory/MemoryEntityStoreTest.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/test/java/org/apache/zest/test/performance/entitystore/memory/MemoryEntityStoreTest.java
b/core/runtime/src/test/java/org/apache/zest/test/performance/entitystore/memory/MemoryEntityStoreTest.java
index 9ce6e46..004f8f4 100644
--- a/core/runtime/src/test/java/org/apache/zest/test/performance/entitystore/memory/MemoryEntityStoreTest.java
+++ b/core/runtime/src/test/java/org/apache/zest/test/performance/entitystore/memory/MemoryEntityStoreTest.java
@@ -49,7 +49,7 @@ public class MemoryEntityStoreTest
         module.objects( StatePrinter.class );
     }
 
-    static public class StatePrinter
+    private static class StatePrinter
         implements StateChangeListener
     {
         public void notifyChanges( Iterable<EntityState> changedStates )


Mime
View raw message