Permalink
Browse files

Visibility Modifier Check, updated option setter, issue #710

  • Loading branch information...
1 parent a2f7442 commit de4485a22bfe8eafc3c2e273fd328a0221d0ff9e @alexkravin alexkravin committed with romani Mar 3, 2015
@@ -293,7 +293,7 @@ public void setAllowPublicImmutableFields(boolean allow)
* Set the list of immutable classes types names.
* @param classNames array of immutable types short names.
*/
- public void setImmutableClassNames(String[] classNames)
+ public void setImmutableClassCanonicalNames(String[] classNames)
{
immutableClassCanonicalNames = Arrays.asList(classNames);
}
@@ -113,7 +113,7 @@ public void testUserSpecifiedImmutableClassesList() throws Exception
{
final DefaultConfiguration checkConfig =
createCheckConfig(VisibilityModifierCheck.class);
- checkConfig.addAttribute("immutableClassNames", "java.util.List,"
+ checkConfig.addAttribute("immutableClassCanonicalNames", "java.util.List,"
+ "com.google.common.collect.ImmutableSet");
final String[] expected = {
"14:35: " + getCheckMessage(MSG_KEY, "notes"),
@@ -133,7 +133,7 @@ public void testImmutableSpecifiedSameTypeName() throws Exception
{
final DefaultConfiguration checkConfig =
createCheckConfig(VisibilityModifierCheck.class);
- checkConfig.addAttribute("immutableClassNames",
+ checkConfig.addAttribute("immutableClassCanonicalNames",
"com.puppycrawl.tools.checkstyle.coding.GregorianCalendar,"
+ "com.puppycrawl.tools.checkstyle.InetSocketAddress");
final String[] expected = {
@@ -162,7 +162,7 @@ public void testImmutableStarImportFalseNegative() throws Exception
{
final DefaultConfiguration checkConfig =
createCheckConfig(VisibilityModifierCheck.class);
- checkConfig.addAttribute("immutableClassNames", "java.util.Arrays");
+ checkConfig.addAttribute("immutableClassCanonicalNames", "java.util.Arrays");
final String[] expected = {
};
verify(checkConfig, getPath("InputImmutableStarImport.java"), expected);
@@ -173,7 +173,8 @@ public void testImmutableStarImportNoWarn() throws Exception
{
final DefaultConfiguration checkConfig =
createCheckConfig(VisibilityModifierCheck.class);
- checkConfig.addAttribute("immutableClassNames", "com.google.common.collect.ImmutableSet");
+ checkConfig.addAttribute("immutableClassCanonicalNames",
+ "com.google.common.collect.ImmutableSet");
final String[] expected = {
};
verify(checkConfig, getPath("InputImmutableStarImport2.java"), expected);

0 comments on commit de4485a

Please sign in to comment.