Enforce type naming via Checkstyle

This commit is contained in:
Andrew Gaul 2014-08-26 11:29:25 -07:00
parent bf678edb97
commit 967f55c2e4
2 changed files with 4 additions and 3 deletions

View File

@ -228,7 +228,7 @@ public class ComputeServiceUtils {
return osVersionMap.get(family).get(in); return osVersionMap.get(family).get(in);
if (osVersionMap.get(family).containsValue(in)) if (osVersionMap.get(family).containsValue(in))
return in; return in;
CONTAINS_SUBSTRING contains = new CONTAINS_SUBSTRING(in.replace('-', '.')); ContainsSubstring contains = new ContainsSubstring(in.replace('-', '.'));
try { try {
String key = Iterables.find(osVersionMap.get(family).keySet(), contains); String key = Iterables.find(osVersionMap.get(family).keySet(), contains);
return osVersionMap.get(family).get(key); return osVersionMap.get(family).get(key);
@ -242,10 +242,10 @@ public class ComputeServiceUtils {
return ""; return "";
} }
static final class CONTAINS_SUBSTRING implements Predicate<String> { static final class ContainsSubstring implements Predicate<String> {
private final String in; private final String in;
CONTAINS_SUBSTRING(String in) { ContainsSubstring(String in) {
this.in = in; this.in = in;
} }

View File

@ -46,6 +46,7 @@
<property name="tokens" value="METHOD_DEF, ANNOTATION_FIELD_DEF, INTERFACE_DEF"/> <property name="tokens" value="METHOD_DEF, ANNOTATION_FIELD_DEF, INTERFACE_DEF"/>
</module> </module>
<module name="SimplifyBooleanExpression"/> <module name="SimplifyBooleanExpression"/>
<module name="TypeName"/>
<module name="UnnecessaryParentheses"/> <module name="UnnecessaryParentheses"/>
<module name="UnusedImports"> <module name="UnusedImports">
<property name="processJavadoc" value="true"/> <property name="processJavadoc" value="true"/>