You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jclouds.apache.org by ga...@apache.org on 2014/08/26 20:30:28 UTC

git commit: Enforce type naming via Checkstyle

Repository: jclouds
Updated Branches:
  refs/heads/master bf678edb9 -> 967f55c2e


Enforce type naming via Checkstyle


Project: http://git-wip-us.apache.org/repos/asf/jclouds/repo
Commit: http://git-wip-us.apache.org/repos/asf/jclouds/commit/967f55c2
Tree: http://git-wip-us.apache.org/repos/asf/jclouds/tree/967f55c2
Diff: http://git-wip-us.apache.org/repos/asf/jclouds/diff/967f55c2

Branch: refs/heads/master
Commit: 967f55c2e425170f396a285cbba80a5c390bc250
Parents: bf678ed
Author: Andrew Gaul <ga...@apache.org>
Authored: Tue Aug 26 11:29:25 2014 -0700
Committer: Andrew Gaul <ga...@apache.org>
Committed: Tue Aug 26 11:29:25 2014 -0700

----------------------------------------------------------------------
 .../java/org/jclouds/compute/util/ComputeServiceUtils.java     | 6 +++---
 resources/checkstyle.xml                                       | 1 +
 2 files changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jclouds/blob/967f55c2/compute/src/main/java/org/jclouds/compute/util/ComputeServiceUtils.java
----------------------------------------------------------------------
diff --git a/compute/src/main/java/org/jclouds/compute/util/ComputeServiceUtils.java b/compute/src/main/java/org/jclouds/compute/util/ComputeServiceUtils.java
index 0cddf5a..b9333a5 100644
--- a/compute/src/main/java/org/jclouds/compute/util/ComputeServiceUtils.java
+++ b/compute/src/main/java/org/jclouds/compute/util/ComputeServiceUtils.java
@@ -228,7 +228,7 @@ public class ComputeServiceUtils {
             return osVersionMap.get(family).get(in);
          if (osVersionMap.get(family).containsValue(in))
             return in;
-         CONTAINS_SUBSTRING contains = new CONTAINS_SUBSTRING(in.replace('-', '.'));
+         ContainsSubstring contains = new ContainsSubstring(in.replace('-', '.'));
          try {
             String key = Iterables.find(osVersionMap.get(family).keySet(), contains);
             return osVersionMap.get(family).get(key);
@@ -242,10 +242,10 @@ public class ComputeServiceUtils {
       return "";
    }
 
-   static final class CONTAINS_SUBSTRING implements Predicate<String> {
+   static final class ContainsSubstring implements Predicate<String> {
       private final String in;
 
-      CONTAINS_SUBSTRING(String in) {
+      ContainsSubstring(String in) {
          this.in = in;
       }
 

http://git-wip-us.apache.org/repos/asf/jclouds/blob/967f55c2/resources/checkstyle.xml
----------------------------------------------------------------------
diff --git a/resources/checkstyle.xml b/resources/checkstyle.xml
index f3e3fb4..6a67747 100644
--- a/resources/checkstyle.xml
+++ b/resources/checkstyle.xml
@@ -46,6 +46,7 @@
             <property name="tokens" value="METHOD_DEF, ANNOTATION_FIELD_DEF, INTERFACE_DEF"/>
         </module>
         <module name="SimplifyBooleanExpression"/>
+        <module name="TypeName"/>
         <module name="UnnecessaryParentheses"/>
         <module name="UnusedImports">
             <property name="processJavadoc" value="true"/>