onami-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From simonetrip...@apache.org
Subject svn commit: r1451874 - /incubator/onami/trunk/scopes/src/main/java/org/apache/onami/scopes/
Date Sat, 02 Mar 2013 10:37:06 GMT
Author: simonetripodi
Date: Sat Mar  2 10:37:06 2013
New Revision: 1451874

URL: http://svn.apache.org/r1451874
Log:
@trivial: code format, no functional modifications

Modified:
    incubator/onami/trunk/scopes/src/main/java/org/apache/onami/scopes/ConcurrentLazySingleton.java
    incubator/onami/trunk/scopes/src/main/java/org/apache/onami/scopes/ConcurrentLazySingletonScope.java
    incubator/onami/trunk/scopes/src/main/java/org/apache/onami/scopes/ConcurrentLazySingletonScopeImpl.java
    incubator/onami/trunk/scopes/src/main/java/org/apache/onami/scopes/LazySingleton.java
    incubator/onami/trunk/scopes/src/main/java/org/apache/onami/scopes/LazySingletonScope.java
    incubator/onami/trunk/scopes/src/main/java/org/apache/onami/scopes/LazySingletonScopeImpl.java
    incubator/onami/trunk/scopes/src/main/java/org/apache/onami/scopes/ScopesModule.java

Modified: incubator/onami/trunk/scopes/src/main/java/org/apache/onami/scopes/ConcurrentLazySingleton.java
URL: http://svn.apache.org/viewvc/incubator/onami/trunk/scopes/src/main/java/org/apache/onami/scopes/ConcurrentLazySingleton.java?rev=1451874&r1=1451873&r2=1451874&view=diff
==============================================================================
--- incubator/onami/trunk/scopes/src/main/java/org/apache/onami/scopes/ConcurrentLazySingleton.java
(original)
+++ incubator/onami/trunk/scopes/src/main/java/org/apache/onami/scopes/ConcurrentLazySingleton.java
Sat Mar  2 10:37:06 2013
@@ -35,8 +35,8 @@ import java.lang.annotation.Target;
  * on the object key and, thus, can construct multiple types of singletons
  * concurrently.
  */
-@Target({ ElementType.TYPE, ElementType.METHOD })
-@Retention(RetentionPolicy.RUNTIME)
+@Target( { ElementType.TYPE, ElementType.METHOD } )
+@Retention( RetentionPolicy.RUNTIME )
 @ScopeAnnotation
 public @interface ConcurrentLazySingleton
 {

Modified: incubator/onami/trunk/scopes/src/main/java/org/apache/onami/scopes/ConcurrentLazySingletonScope.java
URL: http://svn.apache.org/viewvc/incubator/onami/trunk/scopes/src/main/java/org/apache/onami/scopes/ConcurrentLazySingletonScope.java?rev=1451874&r1=1451873&r2=1451874&view=diff
==============================================================================
--- incubator/onami/trunk/scopes/src/main/java/org/apache/onami/scopes/ConcurrentLazySingletonScope.java
(original)
+++ incubator/onami/trunk/scopes/src/main/java/org/apache/onami/scopes/ConcurrentLazySingletonScope.java
Sat Mar  2 10:37:06 2013
@@ -28,6 +28,7 @@ import com.google.inject.Scope;
  */
 public class ConcurrentLazySingletonScope
 {
+
     private static final Scope instance = new ConcurrentLazySingletonScopeImpl();
 
     /**
@@ -39,4 +40,5 @@ public class ConcurrentLazySingletonScop
     {
         return instance;
     }
+
 }

Modified: incubator/onami/trunk/scopes/src/main/java/org/apache/onami/scopes/ConcurrentLazySingletonScopeImpl.java
URL: http://svn.apache.org/viewvc/incubator/onami/trunk/scopes/src/main/java/org/apache/onami/scopes/ConcurrentLazySingletonScopeImpl.java?rev=1451874&r1=1451873&r2=1451874&view=diff
==============================================================================
--- incubator/onami/trunk/scopes/src/main/java/org/apache/onami/scopes/ConcurrentLazySingletonScopeImpl.java
(original)
+++ incubator/onami/trunk/scopes/src/main/java/org/apache/onami/scopes/ConcurrentLazySingletonScopeImpl.java
Sat Mar  2 10:37:06 2013
@@ -31,6 +31,7 @@ import java.util.Map;
 class ConcurrentLazySingletonScopeImpl
     implements Scope
 {
+
     private static final Object NULL = new Object();
 
     private static final Map<Key<?>, LockRecord> locks = new HashMap<Key<?>,
LockRecord>();
@@ -92,8 +93,8 @@ class ConcurrentLazySingletonScopeImpl
 
                 Object localInstance = instance;
                 // This is safe because instance has type T or is equal to NULL
-                @SuppressWarnings({ "unchecked", "UnnecessaryLocalVariable" }) T returnedInstance
=
-                    ( localInstance != NULL ) ? (T) localInstance : null;
+                @SuppressWarnings({ "unchecked", "UnnecessaryLocalVariable" })
+                T returnedInstance = ( localInstance != NULL ) ? (T) localInstance : null;
                 return returnedInstance;
             }
 
@@ -140,4 +141,5 @@ class ConcurrentLazySingletonScopeImpl
     {
         return "ConcurrentLazySingletonScope.SCOPE";
     }
+
 }

Modified: incubator/onami/trunk/scopes/src/main/java/org/apache/onami/scopes/LazySingleton.java
URL: http://svn.apache.org/viewvc/incubator/onami/trunk/scopes/src/main/java/org/apache/onami/scopes/LazySingleton.java?rev=1451874&r1=1451873&r2=1451874&view=diff
==============================================================================
--- incubator/onami/trunk/scopes/src/main/java/org/apache/onami/scopes/LazySingleton.java
(original)
+++ incubator/onami/trunk/scopes/src/main/java/org/apache/onami/scopes/LazySingleton.java
Sat Mar  2 10:37:06 2013
@@ -30,8 +30,8 @@ import java.lang.annotation.Target;
  * Scope annotation that marks a class as singleton that should NOT be
  * allocated eagerly
  */
-@Target({ ElementType.TYPE, ElementType.METHOD })
-@Retention(RetentionPolicy.RUNTIME)
+@Target( { ElementType.TYPE, ElementType.METHOD } )
+@Retention( RetentionPolicy.RUNTIME )
 @ScopeAnnotation
 public @interface LazySingleton
 {

Modified: incubator/onami/trunk/scopes/src/main/java/org/apache/onami/scopes/LazySingletonScope.java
URL: http://svn.apache.org/viewvc/incubator/onami/trunk/scopes/src/main/java/org/apache/onami/scopes/LazySingletonScope.java?rev=1451874&r1=1451873&r2=1451874&view=diff
==============================================================================
--- incubator/onami/trunk/scopes/src/main/java/org/apache/onami/scopes/LazySingletonScope.java
(original)
+++ incubator/onami/trunk/scopes/src/main/java/org/apache/onami/scopes/LazySingletonScope.java
Sat Mar  2 10:37:06 2013
@@ -26,6 +26,7 @@ import com.google.inject.Scope;
  */
 public class LazySingletonScope
 {
+
     /**
      * Returns the scope
      *
@@ -41,4 +42,5 @@ public class LazySingletonScope
     private LazySingletonScope()
     {
     }
+
 }

Modified: incubator/onami/trunk/scopes/src/main/java/org/apache/onami/scopes/LazySingletonScopeImpl.java
URL: http://svn.apache.org/viewvc/incubator/onami/trunk/scopes/src/main/java/org/apache/onami/scopes/LazySingletonScopeImpl.java?rev=1451874&r1=1451873&r2=1451874&view=diff
==============================================================================
--- incubator/onami/trunk/scopes/src/main/java/org/apache/onami/scopes/LazySingletonScopeImpl.java
(original)
+++ incubator/onami/trunk/scopes/src/main/java/org/apache/onami/scopes/LazySingletonScopeImpl.java
Sat Mar  2 10:37:06 2013
@@ -30,8 +30,10 @@ import com.google.inject.Scopes;
 final class LazySingletonScopeImpl
     implements Scope
 {
+
     public <T> Provider<T> scope( Key<T> key, Provider<T> unscoped
)
     {
         return Scopes.SINGLETON.scope( key, unscoped );
     }
+
 }

Modified: incubator/onami/trunk/scopes/src/main/java/org/apache/onami/scopes/ScopesModule.java
URL: http://svn.apache.org/viewvc/incubator/onami/trunk/scopes/src/main/java/org/apache/onami/scopes/ScopesModule.java?rev=1451874&r1=1451873&r2=1451874&view=diff
==============================================================================
--- incubator/onami/trunk/scopes/src/main/java/org/apache/onami/scopes/ScopesModule.java (original)
+++ incubator/onami/trunk/scopes/src/main/java/org/apache/onami/scopes/ScopesModule.java Sat
Mar  2 10:37:06 2013
@@ -27,10 +27,12 @@ import com.google.inject.AbstractModule;
 public class ScopesModule
     extends AbstractModule
 {
+
     @Override
     protected void configure()
     {
         bindScope( LazySingleton.class, LazySingletonScope.get() );
         bindScope( ConcurrentLazySingleton.class, ConcurrentLazySingletonScope.get() );
     }
+
 }



Mime
View raw message