You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tamaya.apache.org by po...@apache.org on 2019/05/11 22:33:27 UTC

[incubator-tamaya-sandbox] branch master updated (8b892c7 -> a91de28)

This is an automated email from the ASF dual-hosted git repository.

pottlinger pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-tamaya-sandbox.git.


    from 8b892c7  TAMAYA-277: Fix warning by making method synchronized instead of double lock-check
     new 05adeb1  TAMAYA-277: Fix more sonar warnings, add test case
     new 4728824  TAMAYA-277: Add test.
     new a91de28  TAMAYA-277: Leave empty test skeleton

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 configured-sysprops/pom.xml                          |  6 ++++++
 .../tamaya/sysprops/ConfiguredSystemProperties.java  | 18 +++++++++---------
 .../sysprops/ConfiguredSystemPropertiesTest.java     | 20 ++++++++++----------
 3 files changed, 25 insertions(+), 19 deletions(-)
 copy metamodel/src/main/java/org/apache/tamaya/metamodel/Refreshable.java => configured-sysprops/src/test/java/org/apache/tamaya/sysprops/ConfiguredSystemPropertiesTest.java (79%)


[incubator-tamaya-sandbox] 02/03: TAMAYA-277: Add test.

Posted by po...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

pottlinger pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-tamaya-sandbox.git

commit 4728824fc110d71dad3932b8fb84b7e6250effbd
Author: Hugo Hirsch <gi...@hugo-hirsch.de>
AuthorDate: Sun May 12 00:21:15 2019 +0200

    TAMAYA-277: Add test.
---
 .../sysprops/ConfiguredSystemPropertiesTest.java   | 23 ++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/configured-sysprops/src/test/java/org/apache/tamaya/sysprops/ConfiguredSystemPropertiesTest.java b/configured-sysprops/src/test/java/org/apache/tamaya/sysprops/ConfiguredSystemPropertiesTest.java
new file mode 100644
index 0000000..179496d
--- /dev/null
+++ b/configured-sysprops/src/test/java/org/apache/tamaya/sysprops/ConfiguredSystemPropertiesTest.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+package org.apache.tamaya.sysprops;
+
+public class ConfiguredSystemPropertiesTest {
+
+}
\ No newline at end of file


[incubator-tamaya-sandbox] 03/03: TAMAYA-277: Leave empty test skeleton

Posted by po...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

pottlinger pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-tamaya-sandbox.git

commit a91de28602e712544abd22339f144397a5a39d1e
Author: Hugo Hirsch <gi...@hugo-hirsch.de>
AuthorDate: Sun May 12 00:33:14 2019 +0200

    TAMAYA-277: Leave empty test skeleton
---
 .../org/apache/tamaya/sysprops/ConfiguredSystemPropertiesTest.java | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/configured-sysprops/src/test/java/org/apache/tamaya/sysprops/ConfiguredSystemPropertiesTest.java b/configured-sysprops/src/test/java/org/apache/tamaya/sysprops/ConfiguredSystemPropertiesTest.java
index 179496d..878fbf3 100644
--- a/configured-sysprops/src/test/java/org/apache/tamaya/sysprops/ConfiguredSystemPropertiesTest.java
+++ b/configured-sysprops/src/test/java/org/apache/tamaya/sysprops/ConfiguredSystemPropertiesTest.java
@@ -18,6 +18,13 @@
  */
 package org.apache.tamaya.sysprops;
 
+import org.junit.Test;
+
 public class ConfiguredSystemPropertiesTest {
 
+    @Test
+    public void objectCreation() {
+        System.setProperty("TamayaUnderTest", "true");
+    }
+
 }
\ No newline at end of file


[incubator-tamaya-sandbox] 01/03: TAMAYA-277: Fix more sonar warnings, add test case

Posted by po...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

pottlinger pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-tamaya-sandbox.git

commit 05adeb1ad7734ca968d2c1d82926a62889d0ab8a
Author: Hugo Hirsch <gi...@hugo-hirsch.de>
AuthorDate: Sun May 12 00:21:06 2019 +0200

    TAMAYA-277: Fix more sonar warnings, add test case
---
 configured-sysprops/pom.xml                            |  6 ++++++
 .../tamaya/sysprops/ConfiguredSystemProperties.java    | 18 +++++++++---------
 2 files changed, 15 insertions(+), 9 deletions(-)

diff --git a/configured-sysprops/pom.xml b/configured-sysprops/pom.xml
index 28ce175..2b063e7 100644
--- a/configured-sysprops/pom.xml
+++ b/configured-sysprops/pom.xml
@@ -47,6 +47,12 @@ under the License.
             <artifactId>junit</artifactId>
             <scope>test</scope>
         </dependency>
+        <dependency>
+            <groupId>org.assertj</groupId>
+            <artifactId>assertj-core</artifactId>
+            <version>${assertj.version}</version>
+            <scope>test</scope>
+        </dependency>
     </dependencies>
 
 </project>
diff --git a/configured-sysprops/src/main/java/org/apache/tamaya/sysprops/ConfiguredSystemProperties.java b/configured-sysprops/src/main/java/org/apache/tamaya/sysprops/ConfiguredSystemProperties.java
index fdd0609..7a5cc70 100644
--- a/configured-sysprops/src/main/java/org/apache/tamaya/sysprops/ConfiguredSystemProperties.java
+++ b/configured-sysprops/src/main/java/org/apache/tamaya/sysprops/ConfiguredSystemProperties.java
@@ -150,7 +150,7 @@ public class ConfiguredSystemProperties extends Properties {
 
 
     @Override
-    public String toString() {
+    public synchronized String toString() {
         return getContextualProperties().toString();
     }
 
@@ -191,7 +191,7 @@ public class ConfiguredSystemProperties extends Properties {
     }
 
     @Override
-    public void storeToXML(OutputStream os, String comment) throws IOException {
+    public synchronized void storeToXML(OutputStream os, String comment) throws IOException {
         getContextualProperties().storeToXML(os, comment);
     }
 
@@ -211,37 +211,37 @@ public class ConfiguredSystemProperties extends Properties {
     }
 
     @Override
-    public boolean isEmpty() {
+    public synchronized boolean isEmpty() {
         return getContextualProperties().isEmpty();
     }
 
     @Override
-    public Object put(Object key, Object value) {
+    public synchronized Object put(Object key, Object value) {
         return getContextualProperties().put(key, value);
     }
 
     @Override
-    public Object remove(Object key) {
+    public synchronized Object remove(Object key) {
         return getContextualProperties().remove(key);
     }
 
     @Override
-    public void putAll(Map<?, ?> t) {
+    public synchronized void putAll(Map<?, ?> t) {
         getContextualProperties().putAll(t);
     }
 
     @Override
-    public void clear() {
+    public synchronized void clear() {
         getContextualProperties().clear();
     }
 
     @Override
-    public boolean equals(Object o) {
+    public synchronized boolean equals(Object o) {
         return getContextualProperties().equals(o);
     }
 
     @Override
-    public int hashCode() {
+    public synchronized int hashCode() {
         return getContextualProperties().hashCode();
     }