tamaya-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ple...@apache.org
Subject incubator-tamaya-extensions git commit: [TAMAYA-243] Commited the actual change to the DefaultConfigChangeObserver. Messed up somehow the last commit.
Date Sun, 26 Feb 2017 10:15:23 GMT
Repository: incubator-tamaya-extensions
Updated Branches:
  refs/heads/master 0f1a2c637 -> dd22364a9


[TAMAYA-243] Commited the actual change to the DefaultConfigChangeObserver. Messed up somehow
the last commit.


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/dd22364a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/tree/dd22364a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/diff/dd22364a

Branch: refs/heads/master
Commit: dd22364a9f16b2a0c3e68f43a4c1bacd5ad89423
Parents: 0f1a2c6
Author: Oliver B. Fischer <plexus@apache.org>
Authored: Sun Feb 26 11:13:18 2017 +0100
Committer: Oliver B. Fischer <plexus@apache.org>
Committed: Sun Feb 26 11:13:18 2017 +0100

----------------------------------------------------------------------
 .../tamaya/events/internal/DefaultConfigChangeObserver.java      | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tamaya-extensions/blob/dd22364a/modules/events/src/main/java/org/apache/tamaya/events/internal/DefaultConfigChangeObserver.java
----------------------------------------------------------------------
diff --git a/modules/events/src/main/java/org/apache/tamaya/events/internal/DefaultConfigChangeObserver.java
b/modules/events/src/main/java/org/apache/tamaya/events/internal/DefaultConfigChangeObserver.java
index 9ee5ac2..eea22fe 100644
--- a/modules/events/src/main/java/org/apache/tamaya/events/internal/DefaultConfigChangeObserver.java
+++ b/modules/events/src/main/java/org/apache/tamaya/events/internal/DefaultConfigChangeObserver.java
@@ -70,13 +70,15 @@ public class DefaultConfigChangeObserver {
         FrozenConfiguration frozenConfig = FrozenConfiguration.of(ConfigurationProvider.getConfiguration());
         ConfigurationChange changes;
         if(lastConfig==null){
-            lastConfig = frozenConfig;
             changes = ConfigurationChangeBuilder.of().putAll(frozenConfig.getProperties())
                     .build();
         }else{
             changes = ConfigurationChangeBuilder.of(lastConfig).addChanges(frozenConfig)
                     .build();
         }
+
+        lastConfig = frozenConfig;
+        
         if(!changes.isEmpty()) {
             LOG.info("Identified configuration changes, publishing changes:\n" + changes);
             ConfigEventManager.fireEvent(changes);


Mime
View raw message