tamaya-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anat...@apache.org
Subject [11/11] incubator-tamaya-extensions git commit: TAMAYA-222: Fixed/deprecated spelling errors.
Date Sun, 26 Feb 2017 23:05:24 GMT
TAMAYA-222: Fixed/deprecated spelling errors.


Project: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/commit/e86db7dd
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/tree/e86db7dd
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/diff/e86db7dd

Branch: refs/heads/master
Commit: e86db7dd67be78e70664e2aca8e4c00589c2d50d
Parents: 78be87e
Author: anatole <anatole@apache.org>
Authored: Thu Feb 23 01:36:47 2017 +0100
Committer: anatole <anatole@apache.org>
Committed: Mon Feb 27 00:05:00 2017 +0100

----------------------------------------------------------------------
 .../integration/cdi/DefaultDynamicValue.java    | 10 ++++++----
 .../apache/tamaya/inject/api/UpdatePolicy.java  | 14 +++++++++++---
 .../inject/internal/DefaultDynamicValue.java    | 10 ++++++----
 .../internal/DefaultDynamicValueTest.java       | 20 ++++++++++----------
 4 files changed, 33 insertions(+), 21 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/blob/e86db7dd/modules/injection/cdi-ee/src/main/java/org/apache/tamaya/integration/cdi/DefaultDynamicValue.java
----------------------------------------------------------------------
diff --git a/modules/injection/cdi-ee/src/main/java/org/apache/tamaya/integration/cdi/DefaultDynamicValue.java
b/modules/injection/cdi-ee/src/main/java/org/apache/tamaya/integration/cdi/DefaultDynamicValue.java
index 7015598..a06feb8 100644
--- a/modules/injection/cdi-ee/src/main/java/org/apache/tamaya/integration/cdi/DefaultDynamicValue.java
+++ b/modules/injection/cdi-ee/src/main/java/org/apache/tamaya/integration/cdi/DefaultDynamicValue.java
@@ -135,11 +135,11 @@ final class DefaultDynamicValue<T> extends BaseDynamicValue<T>
{
     }
 
     public static DynamicValue of(Field annotatedField, Configuration configuration) {
-        return of(annotatedField, configuration, LoadPolicy.ALWAYS, UpdatePolicy.IMMEDEATE);
+        return of(annotatedField, configuration, LoadPolicy.ALWAYS, UpdatePolicy.IMMEDIATE);
     }
 
     public static DynamicValue of(Field annotatedField, Configuration configuration, LoadPolicy
loadPolicy) {
-        return of(annotatedField, configuration, loadPolicy, UpdatePolicy.IMMEDEATE);
+        return of(annotatedField, configuration, loadPolicy, UpdatePolicy.IMMEDIATE);
     }
 
     public static DynamicValue of(Field annotatedField, Configuration configuration, UpdatePolicy
updatePolicy) {
@@ -179,7 +179,7 @@ final class DefaultDynamicValue<T> extends BaseDynamicValue<T>
{
     }
 
     public static DynamicValue of(Method method, Configuration configuration) {
-        return of(method, configuration, LoadPolicy.ALWAYS, UpdatePolicy.IMMEDEATE);
+        return of(method, configuration, LoadPolicy.ALWAYS, UpdatePolicy.IMMEDIATE);
     }
 
     public static DynamicValue of(Method method, Configuration configuration, UpdatePolicy
updatePolicy) {
@@ -187,7 +187,7 @@ final class DefaultDynamicValue<T> extends BaseDynamicValue<T>
{
     }
 
     public static DynamicValue of(Method method, Configuration configuration, LoadPolicy
loadPolicy) {
-        return of(method, configuration, loadPolicy, UpdatePolicy.IMMEDEATE);
+        return of(method, configuration, loadPolicy, UpdatePolicy.IMMEDIATE);
     }
 
     public static DynamicValue of(Method method, Configuration configuration, LoadPolicy
loadPolicy, UpdatePolicy updatePolicy) {
@@ -313,9 +313,11 @@ final class DefaultDynamicValue<T> extends BaseDynamicValue<T>
{
             if(!Objects.equals(this.value, newLocalValue)){
                 switch (updatePolicy){
                     case IMMEDEATE:
+                    case IMMEDIATE:
                         commit();
                         break;
                     case EXPLCIT:
+                    case EXPLICIT:
                         this.newValue = new Object[]{newLocalValue};
                         break;
                     case LOG_ONLY:

http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/blob/e86db7dd/modules/injection/injection-api/src/main/java/org/apache/tamaya/inject/api/UpdatePolicy.java
----------------------------------------------------------------------
diff --git a/modules/injection/injection-api/src/main/java/org/apache/tamaya/inject/api/UpdatePolicy.java
b/modules/injection/injection-api/src/main/java/org/apache/tamaya/inject/api/UpdatePolicy.java
index 64e273a..1664b67 100644
--- a/modules/injection/injection-api/src/main/java/org/apache/tamaya/inject/api/UpdatePolicy.java
+++ b/modules/injection/injection-api/src/main/java/org/apache/tamaya/inject/api/UpdatePolicy.java
@@ -22,14 +22,22 @@ package org.apache.tamaya.inject.api;
  * Policy to control how new values are applied to a {@link DynamicValue}.
  */
 public enum UpdatePolicy {
-    /** New values are applied immedately and registered listeners are informed about the
change. */
-    // REVIEW: typo IMMEDIATE
+    /**
+     * @deprecated Use {@link #IMMEDIATE} instead of.
+     */
+    @Deprecated
     IMMEDEATE,
+    /** New values are applied immedately and registered listeners are informed about the
change. */
+    IMMEDIATE,
     /** New values or not applied, but stored in the newValue property. Explicit call to
DynamicValue#commit
      of DynamicValue#commitAndGet are required to accept the change and inform the listeners
about the change.
      * Registered listeners will be informed, when the commit was performed explicitly.
      */
-    // REVIEW: typo EXPLICIT
+    EXPLICIT,
+    /**
+     * @deprecated Use {@link #EXPLICIT} instead of.
+     */
+    @Deprecated
     EXPLCIT,
     /**
      * New values are always immedately discarded, listeners are not triggered.

http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/blob/e86db7dd/modules/injection/standalone/src/main/java/org/apache/tamaya/inject/internal/DefaultDynamicValue.java
----------------------------------------------------------------------
diff --git a/modules/injection/standalone/src/main/java/org/apache/tamaya/inject/internal/DefaultDynamicValue.java
b/modules/injection/standalone/src/main/java/org/apache/tamaya/inject/internal/DefaultDynamicValue.java
index 0c7bed4..4b091f6 100644
--- a/modules/injection/standalone/src/main/java/org/apache/tamaya/inject/internal/DefaultDynamicValue.java
+++ b/modules/injection/standalone/src/main/java/org/apache/tamaya/inject/internal/DefaultDynamicValue.java
@@ -135,11 +135,11 @@ final class DefaultDynamicValue<T> extends BaseDynamicValue<T>
{
     }
 
     public static DynamicValue of(Field annotatedField, Configuration configuration) {
-        return of(annotatedField, configuration, LoadPolicy.ALWAYS, UpdatePolicy.IMMEDEATE);
+        return of(annotatedField, configuration, LoadPolicy.ALWAYS, UpdatePolicy.IMMEDIATE);
     }
 
     public static DynamicValue of(Field annotatedField, Configuration configuration, LoadPolicy
loadPolicy) {
-        return of(annotatedField, configuration, loadPolicy, UpdatePolicy.IMMEDEATE);
+        return of(annotatedField, configuration, loadPolicy, UpdatePolicy.IMMEDIATE);
     }
 
     public static DynamicValue of(Field annotatedField, Configuration configuration, UpdatePolicy
updatePolicy) {
@@ -179,7 +179,7 @@ final class DefaultDynamicValue<T> extends BaseDynamicValue<T>
{
     }
 
     public static DynamicValue of(Method method, Configuration configuration) {
-        return of(method, configuration, LoadPolicy.ALWAYS, UpdatePolicy.IMMEDEATE);
+        return of(method, configuration, LoadPolicy.ALWAYS, UpdatePolicy.IMMEDIATE);
     }
 
     public static DynamicValue of(Method method, Configuration configuration, UpdatePolicy
updatePolicy) {
@@ -187,7 +187,7 @@ final class DefaultDynamicValue<T> extends BaseDynamicValue<T>
{
     }
 
     public static DynamicValue of(Method method, Configuration configuration, LoadPolicy
loadPolicy) {
-        return of(method, configuration, loadPolicy, UpdatePolicy.IMMEDEATE);
+        return of(method, configuration, loadPolicy, UpdatePolicy.IMMEDIATE);
     }
 
     public static DynamicValue of(Method method, Configuration configuration, LoadPolicy
loadPolicy, UpdatePolicy updatePolicy) {
@@ -313,9 +313,11 @@ final class DefaultDynamicValue<T> extends BaseDynamicValue<T>
{
             if(!Objects.equals(this.value, newLocalValue)){
                 switch (updatePolicy){
                     case IMMEDEATE:
+                    case IMMEDIATE:
                         commit();
                         break;
                     case EXPLCIT:
+                    case EXPLICIT:
                         this.newValue = new Object[]{newLocalValue};
                         break;
                     case LOG_ONLY:

http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/blob/e86db7dd/modules/injection/standalone/src/test/java/org/apache/tamaya/inject/internal/DefaultDynamicValueTest.java
----------------------------------------------------------------------
diff --git a/modules/injection/standalone/src/test/java/org/apache/tamaya/inject/internal/DefaultDynamicValueTest.java
b/modules/injection/standalone/src/test/java/org/apache/tamaya/inject/internal/DefaultDynamicValueTest.java
index 26ea2de..16cc265 100644
--- a/modules/injection/standalone/src/test/java/org/apache/tamaya/inject/internal/DefaultDynamicValueTest.java
+++ b/modules/injection/standalone/src/test/java/org/apache/tamaya/inject/internal/DefaultDynamicValueTest.java
@@ -117,7 +117,7 @@ public class DefaultDynamicValueTest {
         properties.put("a","aValue");
         DynamicValue val = DefaultDynamicValue.of(getClass().getDeclaredField("myValue"),
                 config);
-        val.setUpdatePolicy(UpdatePolicy.EXPLCIT);
+        val.setUpdatePolicy(UpdatePolicy.EXPLICIT);
         assertNotNull(val);
         assertEquals("aValue",val.evaluateValue());
         // change config
@@ -132,7 +132,7 @@ public class DefaultDynamicValueTest {
         properties.put("a", "aValue");
         DynamicValue val = DefaultDynamicValue.of(getClass().getDeclaredField("myValue"),
                 config);
-        val.setUpdatePolicy(UpdatePolicy.EXPLCIT);
+        val.setUpdatePolicy(UpdatePolicy.EXPLICIT);
         assertNotNull(val);
         assertEquals("aValue", val.evaluateValue());
         // change config
@@ -159,7 +159,7 @@ public class DefaultDynamicValueTest {
         properties.put("a","aValue");
         DynamicValue val = DefaultDynamicValue.of(getClass().getDeclaredField("myValue"),
                 config);
-        val.setUpdatePolicy(UpdatePolicy.IMMEDEATE);
+        val.setUpdatePolicy(UpdatePolicy.IMMEDIATE);
         val.addListener(consumer);
         // change config
         val.get();
@@ -178,7 +178,7 @@ public class DefaultDynamicValueTest {
         properties.put("a", "aValue");
         DynamicValue val = DefaultDynamicValue.of(getClass().getDeclaredField("myValue"),
                 config);
-        val.setUpdatePolicy(UpdatePolicy.IMMEDEATE);
+        val.setUpdatePolicy(UpdatePolicy.IMMEDIATE);
         properties.put("a", "aValue2");
         val.updateValue();
         assertEquals("aValue2", val.get());
@@ -189,12 +189,12 @@ public class DefaultDynamicValueTest {
         properties.put("a","aValue");
         DynamicValue val = DefaultDynamicValue.of(getClass().getDeclaredField("myValue"),
                 config);
-        val.setUpdatePolicy(UpdatePolicy.EXPLCIT);
+        val.setUpdatePolicy(UpdatePolicy.EXPLICIT);
         assertNotNull(val.get());
         assertEquals("aValue", val.get());
         val.updateValue();
         assertEquals("aValue", val.get());
-        val.setUpdatePolicy(UpdatePolicy.IMMEDEATE);
+        val.setUpdatePolicy(UpdatePolicy.IMMEDIATE);
         val.updateValue();
         assertEquals("aValue",val.get());
     }
@@ -204,7 +204,7 @@ public class DefaultDynamicValueTest {
         properties.put("a","aValue");
         DynamicValue val = DefaultDynamicValue.of(getClass().getDeclaredField("myValue"),
                 config);
-        val.setUpdatePolicy(UpdatePolicy.EXPLCIT);
+        val.setUpdatePolicy(UpdatePolicy.EXPLICIT);
         assertNotNull(val.get());
         assertEquals("aValue",val.evaluateValue());
         properties.put("a", "aValue2");
@@ -216,7 +216,7 @@ public class DefaultDynamicValueTest {
         properties.put("a","aValue");
         DynamicValue val = DefaultDynamicValue.of(getClass().getDeclaredField("myValue"),
                 config);
-        val.setUpdatePolicy(UpdatePolicy.EXPLCIT);
+        val.setUpdatePolicy(UpdatePolicy.EXPLICIT);
         val.get();
         assertNull(val.getNewValue());
         properties.put("a", "aValue2");
@@ -237,7 +237,7 @@ public class DefaultDynamicValueTest {
         properties.put("a","aValue");
         DynamicValue val = DefaultDynamicValue.of(getClass().getDeclaredField("myValue"),
                 config);
-        val.setUpdatePolicy(UpdatePolicy.IMMEDEATE);
+        val.setUpdatePolicy(UpdatePolicy.IMMEDIATE);
         assertTrue(val.isPresent());
         properties.remove("a");
         val.updateValue();
@@ -248,7 +248,7 @@ public class DefaultDynamicValueTest {
     public void testOrElse() throws Exception {
         DynamicValue val = DefaultDynamicValue.of(getClass().getDeclaredField("myValue"),
                 config);
-        val.setUpdatePolicy(UpdatePolicy.IMMEDEATE);
+        val.setUpdatePolicy(UpdatePolicy.IMMEDIATE);
         assertEquals("bla", val.orElse("bla"));
         properties.put("a","aValue");
         val.updateValue();


Mime
View raw message