Skip to content

Commit 80f4a45

Browse files
committed
Fix incorrect indentation
1 parent 46c223a commit 80f4a45

File tree

3 files changed

+41
-35
lines changed

3 files changed

+41
-35
lines changed

modernizer-maven-plugin/src/main/java/org/gaul/modernizer_maven_plugin/Modernizer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ public Collection<ViolationOccurrence> check(ClassReader classReader)
7777
}
7878

7979
public Collection<ViolationOccurrence> check(InputStream is)
80-
throws IOException {
80+
throws IOException {
8181
return check(new ClassReader(is));
8282
}
8383

modernizer-maven-plugin/src/main/java/org/gaul/modernizer_maven_plugin/ModernizerMojo.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818

1919
import static java.lang.String.format;
2020
import static java.util.Collections.emptyList;
21-
2221
import static org.gaul.modernizer_maven_plugin.Utils.checkArgument;
2322

2423
import java.io.File;

modernizer-maven-plugin/src/test/java/org/gaul/modernizer_maven_plugin/ModernizerTest.java

Lines changed: 40 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -151,23 +151,23 @@ public void testConstructorCurrentApi() throws Exception {
151151
assertThat(occurrences).hasSize(0);
152152
}
153153

154-
@Test
155-
public void testStackConstructorLegacyApiLegacyJava() throws Exception {
156-
ClassReader cr = new ClassReader(StackTestClass.class.getName());
157-
Collection<ViolationOccurrence> occurrences =
158-
createModernizer("1.0").check(cr);
159-
assertThat(occurrences).hasSize(0);
160-
}
161-
162-
@Test
163-
public void testStackConstructorLegacyApiCurrentJava() throws Exception {
164-
ClassReader cr = new ClassReader(StackTestClass.class.getName());
165-
Collection<ViolationOccurrence> occurrences =
166-
createModernizer("1.6").check(cr);
167-
assertThat(occurrences).hasSize(1);
168-
assertThat(occurrences.iterator().next().getViolation().getName())
169-
.isEqualTo("java/util/Stack.\"<init>\":()V");
170-
}
154+
@Test
155+
public void testStackConstructorLegacyApiLegacyJava() throws Exception {
156+
ClassReader cr = new ClassReader(StackTestClass.class.getName());
157+
Collection<ViolationOccurrence> occurrences =
158+
createModernizer("1.0").check(cr);
159+
assertThat(occurrences).hasSize(0);
160+
}
161+
162+
@Test
163+
public void testStackConstructorLegacyApiCurrentJava() throws Exception {
164+
ClassReader cr = new ClassReader(StackTestClass.class.getName());
165+
Collection<ViolationOccurrence> occurrences =
166+
createModernizer("1.6").check(cr);
167+
assertThat(occurrences).hasSize(1);
168+
assertThat(occurrences.iterator().next().getViolation().getName())
169+
.isEqualTo("java/util/Stack.\"<init>\":()V");
170+
}
171171

172172
@Test
173173
public void testVectorConstructorLegacyApiLegacyJava() throws Exception {
@@ -358,16 +358,16 @@ public void testHandlingOfDefaultPackageClass() throws Exception {
358358
assertThat(occurrences).hasSize(0);
359359
}
360360

361-
@Test
362-
public void testStackConstructorLegacyApiCurrentJavaWithVersionShorthand()
363-
throws Exception {
364-
ClassReader cr = new ClassReader(StackTestClass.class.getName());
365-
Collection<ViolationOccurrence> occurrences =
366-
createModernizer("6").check(cr);
367-
assertThat(occurrences).hasSize(1);
368-
assertThat(occurrences.iterator().next().getViolation().getName())
369-
.isEqualTo("java/util/Stack.\"<init>\":()V");
370-
}
361+
@Test
362+
public void testStackConstructorLegacyApiCurrentJavaWithVersionShorthand()
363+
throws Exception {
364+
ClassReader cr = new ClassReader(StackTestClass.class.getName());
365+
Collection<ViolationOccurrence> occurrences =
366+
createModernizer("6").check(cr);
367+
assertThat(occurrences).hasSize(1);
368+
assertThat(occurrences.iterator().next().getViolation().getName())
369+
.isEqualTo("java/util/Stack.\"<init>\":()V");
370+
}
371371

372372
@Test
373373
public void testVectorConstructorLegacyApiCurrentJavaWithVersionShorthand()
@@ -500,8 +500,8 @@ private static class ArrayListTestClass {
500500
}
501501

502502
private static class StackTestClass {
503-
@SuppressWarnings("JdkObsolete")
504-
private final Object object = new Stack<Object>();
503+
@SuppressWarnings("JdkObsolete")
504+
private final Object object = new Stack<Object>();
505505
}
506506

507507
private static class VectorTestClass {
@@ -521,10 +521,14 @@ private static class StringGetBytesCharset {
521521

522522
private static class EnumerationTestClass implements Enumeration<Object> {
523523
@Override
524-
public boolean hasMoreElements() { return false; }
524+
public boolean hasMoreElements() {
525+
return false;
526+
}
525527

526528
@Override
527-
public Object nextElement() { return null; }
529+
public Object nextElement() {
530+
return null;
531+
}
528532
}
529533

530534
private static class VoidFunction implements Function<Void, Void> {
@@ -579,8 +583,11 @@ public Object get() {
579583
}
580584

581585
private static class AllViolations {
582-
@SuppressWarnings(value = {"BoxedPrimitiveConstructor",
583-
"CheckReturnValue", "deprecation", "JdkObsolete"})
586+
@SuppressWarnings(value = {
587+
"BoxedPrimitiveConstructor",
588+
"CheckReturnValue",
589+
"deprecation",
590+
"JdkObsolete"})
584591
private static void method() throws Exception {
585592
Object object;
586593
object = Charsets.ISO_8859_1;

0 commit comments

Comments
 (0)