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.git


The following commit(s) were added to refs/heads/master by this push:
     new cb1af55  TAMAYA-379: Enforce checkstyle rules on the example projects
     new 9d618f7  Merge pull request #38 from acoburn/TAMAYA-379b
cb1af55 is described below

commit cb1af55b140048a774f9b8e0d4726503ce874da9
Author: Aaron Coburn <[email protected]>
AuthorDate: Mon Jan 28 09:20:32 2019 -0500

    TAMAYA-379: Enforce checkstyle rules on the example projects
    
    This enforces checkstyle rules on the example projects and makes a few
    minor adjustments to bring the custom-property-source project in line
    with the formatting rules.
---
 examples/01-minimal/pom.xml                                    | 10 +++++++++-
 examples/02-custom-property-source/pom.xml                     | 10 +++++++++-
 .../examples/custompropertysource/SimplePropertySource.java    | 10 ++++++----
 .../custompropertysource/SimplePropertySourceProvider.java     |  3 +++
 examples/11-distributed/pom.xml                                |  5 +++++
 5 files changed, 32 insertions(+), 6 deletions(-)

diff --git a/examples/01-minimal/pom.xml b/examples/01-minimal/pom.xml
index 0f0f8ba..f0e4db3 100644
--- a/examples/01-minimal/pom.xml
+++ b/examples/01-minimal/pom.xml
@@ -54,5 +54,13 @@ under the License.
             <scope>test</scope>
         </dependency>
     </dependencies>
-    
+
+    <build>
+        <plugins>
+            <plugin>
+              <groupId>org.apache.maven.plugins</groupId>
+              <artifactId>maven-checkstyle-plugin</artifactId>
+            </plugin>
+        </plugins>
+    </build>
 </project>
diff --git a/examples/02-custom-property-source/pom.xml 
b/examples/02-custom-property-source/pom.xml
index 53b0f81..3e21a14 100644
--- a/examples/02-custom-property-source/pom.xml
+++ b/examples/02-custom-property-source/pom.xml
@@ -51,5 +51,13 @@ under the License.
             <scope>test</scope>
         </dependency>
     </dependencies>
-    
+
+    <build>
+        <plugins>
+            <plugin>
+              <groupId>org.apache.maven.plugins</groupId>
+              <artifactId>maven-checkstyle-plugin</artifactId>
+            </plugin>
+        </plugins>
+    </build>
 </project>
diff --git 
a/examples/02-custom-property-source/src/main/java/org/apache/tamaya/examples/custompropertysource/SimplePropertySource.java
 
b/examples/02-custom-property-source/src/main/java/org/apache/tamaya/examples/custompropertysource/SimplePropertySource.java
index 7510090..80820dc 100644
--- 
a/examples/02-custom-property-source/src/main/java/org/apache/tamaya/examples/custompropertysource/SimplePropertySource.java
+++ 
b/examples/02-custom-property-source/src/main/java/org/apache/tamaya/examples/custompropertysource/SimplePropertySource.java
@@ -29,6 +29,9 @@ import java.util.HashMap;
 import java.util.Map;
 import java.util.Properties;
 
+/**
+ * A simple PropertySource class.
+ */
 public class SimplePropertySource extends BasePropertySource {
 
     public static final String CONFIG_PROPERTIES_LOCATION = 
"META-INF/MyOtherConfigProperties.properties";
@@ -38,7 +41,7 @@ public class SimplePropertySource extends BasePropertySource {
         URL url = 
ClassLoader.getSystemClassLoader().getResource(CONFIG_PROPERTIES_LOCATION);
         Properties properties = new Properties();
 
-        try(InputStream is = url.openStream()){
+        try(InputStream is = url.openStream()) {
             properties.load(is);
 
             for(Map.Entry en: properties.entrySet()){
@@ -46,8 +49,7 @@ public class SimplePropertySource extends BasePropertySource {
                         PropertyValue.createValue(en.getKey().toString(), 
en.getValue().toString())
                         .setMeta("source", getName()));
             }
-        }
-        finally{
+        } finally {
             props = Collections.unmodifiableMap(props);
         }
     }
@@ -61,4 +63,4 @@ public class SimplePropertySource extends BasePropertySource {
     public Map<String, PropertyValue> getProperties() {
         return props;
     }
-}
\ No newline at end of file
+}
diff --git 
a/examples/02-custom-property-source/src/main/java/org/apache/tamaya/examples/custompropertysource/SimplePropertySourceProvider.java
 
b/examples/02-custom-property-source/src/main/java/org/apache/tamaya/examples/custompropertysource/SimplePropertySourceProvider.java
index 0573fbd..6c61976 100644
--- 
a/examples/02-custom-property-source/src/main/java/org/apache/tamaya/examples/custompropertysource/SimplePropertySourceProvider.java
+++ 
b/examples/02-custom-property-source/src/main/java/org/apache/tamaya/examples/custompropertysource/SimplePropertySourceProvider.java
@@ -28,6 +28,9 @@ import java.util.Collection;
 import java.util.Collections;
 import java.util.List;
 
+/**
+ * A simple PropertySource provider class.
+ */
 public class SimplePropertySourceProvider implements PropertySourceProvider {
     private static final String[] RESOURCES = {
         "cfgOther/a.properties", "cfgOther/b.properties", 
"cfgOther/c.properties"
diff --git a/examples/11-distributed/pom.xml b/examples/11-distributed/pom.xml
index b253b2c..8ed7412 100644
--- a/examples/11-distributed/pom.xml
+++ b/examples/11-distributed/pom.xml
@@ -104,6 +104,11 @@
                     
<showDeprecation>${maven.compile.deprecation}</showDeprecation>
                 </configuration>
             </plugin>
+
+            <plugin>
+              <groupId>org.apache.maven.plugins</groupId>
+              <artifactId>maven-checkstyle-plugin</artifactId>
+            </plugin>
         </plugins>
     </build>
 

Reply via email to