You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tamaya.apache.org by an...@apache.org on 2015/08/03 22:19:22 UTC

incubator-tamaya git commit: Added missing license headers. Fixed compile issues for latest changes in modules. Added missing builder dep. Fixed some (possible not all) FindBugs issues.

Repository: incubator-tamaya
Updated Branches:
  refs/heads/master 4cf849e98 -> ba95a65b3


Added missing license headers.
Fixed compile issues for latest changes in modules.
Added missing builder dep.
Fixed some (possible not all) FindBugs issues.


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

Branch: refs/heads/master
Commit: ba95a65b328c8cba7c75d88543922e1448ff2f88
Parents: 4cf849e
Author: anatole <at...@gmail.com>
Authored: Mon Aug 3 22:19:08 2015 +0200
Committer: anatole <at...@gmail.com>
Committed: Mon Aug 3 22:19:08 2015 +0200

----------------------------------------------------------------------
 .../tamaya/examples/resolver/ExampleMain.java   |  3 +++
 .../tamaya/examples/minimal/MinimalTests.java   | 18 ++++++++++++++++++
 .../org/tamaya/examples/minimal/TestEnum.java   | 18 ++++++++++++++++++
 .../META-INF/javaconfiguration.properties       | 20 +++++++++++++++++++-
 .../tamaya/examples/simple/ExampleMain.java     |  3 +++
 .../tamaya/examples/resources/ExampleMain.java  |  6 +++++-
 .../resources/MyPathPropertySourceProvider.java |  3 ++-
 .../tamaya/examples/resolver/ExampleMain.java   |  3 +++
 .../src/main/resources/buildata                 | 18 ++++++++++++++++++
 .../tamaya/examples/minimal/MinimalTests.java   | 18 ++++++++++++++++++
 .../org/tamaya/examples/minimal/TestEnum.java   | 18 ++++++++++++++++++
 .../tamaya/examples/injection/Example.java      |  4 ++--
 .../tamaya/examples/injection/ExampleMain.java  |  9 +++++++--
 .../examples/injection/ExampleTemplate.java     | 16 +++++++++-------
 examples/7-builder-example/pom.xml              |  5 +++++
 .../examples/builder/UsingABuilderExample.java  |  1 +
 16 files changed, 149 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/ba95a65b/examples/1-minimal-example/src/main/java/org/apache/tamaya/examples/resolver/ExampleMain.java
----------------------------------------------------------------------
diff --git a/examples/1-minimal-example/src/main/java/org/apache/tamaya/examples/resolver/ExampleMain.java b/examples/1-minimal-example/src/main/java/org/apache/tamaya/examples/resolver/ExampleMain.java
index e0b094e..462b1eb 100644
--- a/examples/1-minimal-example/src/main/java/org/apache/tamaya/examples/resolver/ExampleMain.java
+++ b/examples/1-minimal-example/src/main/java/org/apache/tamaya/examples/resolver/ExampleMain.java
@@ -29,6 +29,9 @@ import java.util.TreeMap;
  */
 public class ExampleMain {
 
+    private ExampleMain() {
+    }
+
     public static void main(String... args){
         System.out.println("****************************************************");
         System.out.println("Minimal Example");

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/ba95a65b/examples/1-minimal-example/src/test/java/org/tamaya/examples/minimal/MinimalTests.java
----------------------------------------------------------------------
diff --git a/examples/1-minimal-example/src/test/java/org/tamaya/examples/minimal/MinimalTests.java b/examples/1-minimal-example/src/test/java/org/tamaya/examples/minimal/MinimalTests.java
index 990f77a..fb4d55e 100644
--- a/examples/1-minimal-example/src/test/java/org/tamaya/examples/minimal/MinimalTests.java
+++ b/examples/1-minimal-example/src/test/java/org/tamaya/examples/minimal/MinimalTests.java
@@ -1,3 +1,21 @@
+/*
+ * 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.tamaya.examples.minimal;
 
 import org.apache.tamaya.ConfigException;

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/ba95a65b/examples/1-minimal-example/src/test/java/org/tamaya/examples/minimal/TestEnum.java
----------------------------------------------------------------------
diff --git a/examples/1-minimal-example/src/test/java/org/tamaya/examples/minimal/TestEnum.java b/examples/1-minimal-example/src/test/java/org/tamaya/examples/minimal/TestEnum.java
index c595330..be83dd5 100644
--- a/examples/1-minimal-example/src/test/java/org/tamaya/examples/minimal/TestEnum.java
+++ b/examples/1-minimal-example/src/test/java/org/tamaya/examples/minimal/TestEnum.java
@@ -1,3 +1,21 @@
+/*
+ * 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.tamaya.examples.minimal;
 
 /**

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/ba95a65b/examples/1-minimal-example/src/test/resources/META-INF/javaconfiguration.properties
----------------------------------------------------------------------
diff --git a/examples/1-minimal-example/src/test/resources/META-INF/javaconfiguration.properties b/examples/1-minimal-example/src/test/resources/META-INF/javaconfiguration.properties
index 339bcfd..df20bea 100644
--- a/examples/1-minimal-example/src/test/resources/META-INF/javaconfiguration.properties
+++ b/examples/1-minimal-example/src/test/resources/META-INF/javaconfiguration.properties
@@ -1,5 +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 current 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.
+#
 # My Config Properties
-
+#
 tamaya.ordinal=-1
 example.description=A minimal example only using API and RI, now partially overridden!
 

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/ba95a65b/examples/2-simple-propertysource-example/src/main/java/org/apache/tamaya/examples/simple/ExampleMain.java
----------------------------------------------------------------------
diff --git a/examples/2-simple-propertysource-example/src/main/java/org/apache/tamaya/examples/simple/ExampleMain.java b/examples/2-simple-propertysource-example/src/main/java/org/apache/tamaya/examples/simple/ExampleMain.java
index 48af51d..b9da92f 100644
--- a/examples/2-simple-propertysource-example/src/main/java/org/apache/tamaya/examples/simple/ExampleMain.java
+++ b/examples/2-simple-propertysource-example/src/main/java/org/apache/tamaya/examples/simple/ExampleMain.java
@@ -31,6 +31,9 @@ import java.util.TreeMap;
  */
 public class ExampleMain {
 
+    private ExampleMain() {
+    }
+
     public static void main(String... args){
         System.out.println("*****************************************************");
         System.out.println("Simple Example (with a PropertySource and a Provider)");

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/ba95a65b/examples/3-resources-example/src/main/java/org/apache/tamaya/examples/resources/ExampleMain.java
----------------------------------------------------------------------
diff --git a/examples/3-resources-example/src/main/java/org/apache/tamaya/examples/resources/ExampleMain.java b/examples/3-resources-example/src/main/java/org/apache/tamaya/examples/resources/ExampleMain.java
index 50543e9..d43358a 100644
--- a/examples/3-resources-example/src/main/java/org/apache/tamaya/examples/resources/ExampleMain.java
+++ b/examples/3-resources-example/src/main/java/org/apache/tamaya/examples/resources/ExampleMain.java
@@ -1,4 +1,4 @@
-package org.apache.tamaya.examples.resources;/*
+/*
  * 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
@@ -16,6 +16,7 @@ package org.apache.tamaya.examples.resources;/*
  * specific language governing permissions and limitations
  * under the License.
  */
+package org.apache.tamaya.examples.resources;
 
 import org.apache.tamaya.Configuration;
 import org.apache.tamaya.ConfigurationProvider;
@@ -28,6 +29,9 @@ import java.util.TreeMap;
  */
 public class ExampleMain {
 
+    private ExampleMain() {
+    }
+
     public static void main(String... args){
         System.out.println("****************************************************");
         System.out.println("Resources Example shows the implementation of path");

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/ba95a65b/examples/3-resources-example/src/main/java/org/apache/tamaya/examples/resources/MyPathPropertySourceProvider.java
----------------------------------------------------------------------
diff --git a/examples/3-resources-example/src/main/java/org/apache/tamaya/examples/resources/MyPathPropertySourceProvider.java b/examples/3-resources-example/src/main/java/org/apache/tamaya/examples/resources/MyPathPropertySourceProvider.java
index 0f485c5..fa5559b 100644
--- a/examples/3-resources-example/src/main/java/org/apache/tamaya/examples/resources/MyPathPropertySourceProvider.java
+++ b/examples/3-resources-example/src/main/java/org/apache/tamaya/examples/resources/MyPathPropertySourceProvider.java
@@ -1,4 +1,4 @@
-package org.apache.tamaya.examples.resources;/*
+/*
  * 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
@@ -16,6 +16,7 @@ package org.apache.tamaya.examples.resources;/*
  * specific language governing permissions and limitations
  * under the License.
  */
+package org.apache.tamaya.examples.resources;
 
 import org.apache.tamaya.core.propertysource.SimplePropertySource;
 import org.apache.tamaya.resource.AbstractPathPropertySourceProvider;

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/ba95a65b/examples/4-resolver-example/src/main/java/org/apache/tamaya/examples/resolver/ExampleMain.java
----------------------------------------------------------------------
diff --git a/examples/4-resolver-example/src/main/java/org/apache/tamaya/examples/resolver/ExampleMain.java b/examples/4-resolver-example/src/main/java/org/apache/tamaya/examples/resolver/ExampleMain.java
index 73f2f7f..ae32f56 100644
--- a/examples/4-resolver-example/src/main/java/org/apache/tamaya/examples/resolver/ExampleMain.java
+++ b/examples/4-resolver-example/src/main/java/org/apache/tamaya/examples/resolver/ExampleMain.java
@@ -29,6 +29,9 @@ import java.util.TreeMap;
  */
 public class ExampleMain {
 
+    private ExampleMain() {
+    }
+
     public static void main(String... args){
         System.out.println("****************************************************");
         System.out.println("Resolver Example");

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/ba95a65b/examples/4-resolver-example/src/main/resources/buildata
----------------------------------------------------------------------
diff --git a/examples/4-resolver-example/src/main/resources/buildata b/examples/4-resolver-example/src/main/resources/buildata
index 286ceb0..d9161e7 100644
--- a/examples/4-resolver-example/src/main/resources/buildata
+++ b/examples/4-resolver-example/src/main/resources/buildata
@@ -1 +1,19 @@
+#
+# 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 current 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.
+#
 Build 1234
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/ba95a65b/examples/4-resolver-example/src/test/java/org/tamaya/examples/minimal/MinimalTests.java
----------------------------------------------------------------------
diff --git a/examples/4-resolver-example/src/test/java/org/tamaya/examples/minimal/MinimalTests.java b/examples/4-resolver-example/src/test/java/org/tamaya/examples/minimal/MinimalTests.java
index 990f77a..fb4d55e 100644
--- a/examples/4-resolver-example/src/test/java/org/tamaya/examples/minimal/MinimalTests.java
+++ b/examples/4-resolver-example/src/test/java/org/tamaya/examples/minimal/MinimalTests.java
@@ -1,3 +1,21 @@
+/*
+ * 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.tamaya.examples.minimal;
 
 import org.apache.tamaya.ConfigException;

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/ba95a65b/examples/4-resolver-example/src/test/java/org/tamaya/examples/minimal/TestEnum.java
----------------------------------------------------------------------
diff --git a/examples/4-resolver-example/src/test/java/org/tamaya/examples/minimal/TestEnum.java b/examples/4-resolver-example/src/test/java/org/tamaya/examples/minimal/TestEnum.java
index c595330..be83dd5 100644
--- a/examples/4-resolver-example/src/test/java/org/tamaya/examples/minimal/TestEnum.java
+++ b/examples/4-resolver-example/src/test/java/org/tamaya/examples/minimal/TestEnum.java
@@ -1,3 +1,21 @@
+/*
+ * 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.tamaya.examples.minimal;
 
 /**

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/ba95a65b/examples/5-injection-example/src/main/java/org/apache/tamaya/examples/injection/Example.java
----------------------------------------------------------------------
diff --git a/examples/5-injection-example/src/main/java/org/apache/tamaya/examples/injection/Example.java b/examples/5-injection-example/src/main/java/org/apache/tamaya/examples/injection/Example.java
index 2cc0396..c55fa78 100644
--- a/examples/5-injection-example/src/main/java/org/apache/tamaya/examples/injection/Example.java
+++ b/examples/5-injection-example/src/main/java/org/apache/tamaya/examples/injection/Example.java
@@ -18,14 +18,14 @@
  */
 package org.apache.tamaya.examples.injection;
 
-import org.apache.tamaya.inject.ConfigRoot;
 import org.apache.tamaya.inject.ConfiguredProperty;
+import org.apache.tamaya.inject.ConfiguredType;
 import org.apache.tamaya.inject.DefaultValue;
 
 /**
  * Simple example bean, mapped by default names mostly.
  */
-@ConfigRoot("example")
+@ConfiguredType(defaultSections = "example")
 public class Example {
 
     private String type;

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/ba95a65b/examples/5-injection-example/src/main/java/org/apache/tamaya/examples/injection/ExampleMain.java
----------------------------------------------------------------------
diff --git a/examples/5-injection-example/src/main/java/org/apache/tamaya/examples/injection/ExampleMain.java b/examples/5-injection-example/src/main/java/org/apache/tamaya/examples/injection/ExampleMain.java
index b3497c1..816f8a7 100644
--- a/examples/5-injection-example/src/main/java/org/apache/tamaya/examples/injection/ExampleMain.java
+++ b/examples/5-injection-example/src/main/java/org/apache/tamaya/examples/injection/ExampleMain.java
@@ -20,6 +20,7 @@ package org.apache.tamaya.examples.injection;
 
 import org.apache.tamaya.Configuration;
 import org.apache.tamaya.ConfigurationProvider;
+import org.apache.tamaya.inject.ConfigurationInjection;
 import org.apache.tamaya.inject.ConfigurationInjector;
 
 import java.util.Map;
@@ -30,19 +31,23 @@ import java.util.TreeMap;
  */
 public class ExampleMain {
 
+    private ExampleMain() {
+    }
+
     public static void main(String... args){
         System.out.println("****************************************************");
         System.out.println("Injection and TemplatesExample");
         System.out.println("****************************************************");
         System.out.println();
         Example example = new Example();
-        ConfigurationInjector.getInstance().configure(example);
+        ConfigurationInjector injector = ConfigurationInjection.getConfigurationInjector();
+        injector.configure(example);
         System.out.println("Injected:");
         System.out.println("---------");
         System.out.println(example);
         System.out.println("Template:");
         System.out.println("---------");
-        ExampleTemplate template = ConfigurationInjector.getInstance().createTemplate(ExampleTemplate.class);
+        ExampleTemplate template = injector.createTemplate(ExampleTemplate.class);
         System.out.println(template);
         System.out.println();
     }

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/ba95a65b/examples/5-injection-example/src/main/java/org/apache/tamaya/examples/injection/ExampleTemplate.java
----------------------------------------------------------------------
diff --git a/examples/5-injection-example/src/main/java/org/apache/tamaya/examples/injection/ExampleTemplate.java b/examples/5-injection-example/src/main/java/org/apache/tamaya/examples/injection/ExampleTemplate.java
index b9c24bc..e817da7 100644
--- a/examples/5-injection-example/src/main/java/org/apache/tamaya/examples/injection/ExampleTemplate.java
+++ b/examples/5-injection-example/src/main/java/org/apache/tamaya/examples/injection/ExampleTemplate.java
@@ -18,22 +18,24 @@
  */
 package org.apache.tamaya.examples.injection;
 
-import org.apache.tamaya.inject.ConfigRoot;
 import org.apache.tamaya.inject.ConfiguredProperty;
+import org.apache.tamaya.inject.ConfiguredType;
 import org.apache.tamaya.inject.DefaultValue;
 
 /**
  * Simple example bean, mapped by default names mostly.
  */
-@ConfigRoot("example")
+@ConfiguredType(defaultSections = "example")
 public interface ExampleTemplate {
 
-    public String getType();
-    public String getName();
+    String getType();
+
+    String getName();
     @DefaultValue("No description available.")
-    public String getDescription();
-    public int getVersion();
+    String getDescription();
+
+    int getVersion();
     @ConfiguredProperty(keys = "author")
-    public String getExampleAuthor();
+    String getExampleAuthor();
 
 }

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/ba95a65b/examples/7-builder-example/pom.xml
----------------------------------------------------------------------
diff --git a/examples/7-builder-example/pom.xml b/examples/7-builder-example/pom.xml
index 3fbfebe..4453d63 100644
--- a/examples/7-builder-example/pom.xml
+++ b/examples/7-builder-example/pom.xml
@@ -40,6 +40,11 @@ under the License.
         </dependency>
         <dependency>
             <groupId>org.apache.tamaya.ext</groupId>
+            <artifactId>tamaya-builder</artifactId>
+            <version>0.1-incubating-SNAPSHOT</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.tamaya.ext</groupId>
             <artifactId>tamaya-events</artifactId>
             <version>0.1-incubating-SNAPSHOT</version>
         </dependency>

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/ba95a65b/examples/7-builder-example/src/main/java/org/apache/tamaya/examples/builder/UsingABuilderExample.java
----------------------------------------------------------------------
diff --git a/examples/7-builder-example/src/main/java/org/apache/tamaya/examples/builder/UsingABuilderExample.java b/examples/7-builder-example/src/main/java/org/apache/tamaya/examples/builder/UsingABuilderExample.java
index 9817938..71c648b 100644
--- a/examples/7-builder-example/src/main/java/org/apache/tamaya/examples/builder/UsingABuilderExample.java
+++ b/examples/7-builder-example/src/main/java/org/apache/tamaya/examples/builder/UsingABuilderExample.java
@@ -19,6 +19,7 @@
 package org.apache.tamaya.examples.builder;
 
 import org.apache.tamaya.Configuration;
+import org.apache.tamaya.ConfigurationProvider;
 import org.apache.tamaya.builder.ConfigurationBuilder;
 import org.apache.tamaya.resource.ConfigResources;