Skip to content

Commit f7a4613

Browse files
committed
[MCOMPILER-526] Reformat
# Conflicts: # src/test/java/org/apache/maven/plugin/compiler/CompilerMojoTestCase.java
1 parent cc78aee commit f7a4613

File tree

260 files changed

+3660
-4991
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

260 files changed

+3660
-4991
lines changed

pom.xml

+24-26
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
<?xml version='1.0' encoding='UTF-8'?>
2-
1+
<?xml version="1.0" encoding="UTF-8"?>
32
<!--
43
Licensed to the Apache Software Foundation (ASF) under one
54
or more contributor license agreements. See the NOTICE file
@@ -18,7 +17,6 @@ KIND, either express or implied. See the License for the
1817
specific language governing permissions and limitations
1918
under the License.
2019
-->
21-
2220
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
2321
<modelVersion>4.0.0</modelVersion>
2422

@@ -37,15 +35,21 @@ under the License.
3735
<description>The Compiler Plugin is used to compile the sources of your project.</description>
3836
<inceptionYear>2001</inceptionYear>
3937

38+
<contributors>
39+
<contributor>
40+
<name>Jan Sievers</name>
41+
</contributor>
42+
</contributors>
43+
4044
<prerequisites>
4145
<maven>${mavenVersion}</maven>
4246
</prerequisites>
4347

4448
<scm>
4549
<connection>scm:git:https://github.com/apache/maven-compiler-plugin.git</connection>
4650
<developerConnection>scm:git:https://github.com/apache/maven-compiler-plugin.git</developerConnection>
47-
<url>https://github.com/apache/maven-compiler-plugin/tree/${project.scm.tag}</url>
4851
<tag>maven-compiler-plugin-3.10.0</tag>
52+
<url>https://github.com/apache/maven-compiler-plugin/tree/${project.scm.tag}</url>
4953
</scm>
5054
<issueManagement>
5155
<system>JIRA</system>
@@ -80,25 +84,6 @@ under the License.
8084
<invoker.junitPackageName>org.apache.maven.plugins.compiler.its</invoker.junitPackageName>
8185
</properties>
8286

83-
<contributors>
84-
<contributor>
85-
<name>Jan Sievers</name>
86-
</contributor>
87-
</contributors>
88-
89-
<repositories>
90-
<repository>
91-
<id>plexus.snapshots</id>
92-
<url>https://oss.sonatype.org/content/repositories/plexus-snapshots</url>
93-
<releases>
94-
<enabled>false</enabled>
95-
</releases>
96-
<snapshots>
97-
<enabled>true</enabled>
98-
</snapshots>
99-
</repository>
100-
</repositories>
101-
10287
<dependencyManagement>
10388
<dependencies>
10489
<dependency>
@@ -145,16 +130,16 @@ under the License.
145130
<version>1.1</version>
146131
<exclusions>
147132
<exclusion>
148-
<artifactId>maven-core</artifactId>
149133
<groupId>org.apache.maven</groupId>
134+
<artifactId>maven-core</artifactId>
150135
</exclusion>
151136
<exclusion>
152-
<artifactId>maven-plugin-api</artifactId>
153137
<groupId>org.apache.maven</groupId>
138+
<artifactId>maven-plugin-api</artifactId>
154139
</exclusion>
155140
<exclusion>
156-
<artifactId>maven-shared-utils</artifactId>
157141
<groupId>org.apache.maven.shared</groupId>
142+
<artifactId>maven-shared-utils</artifactId>
158143
</exclusion>
159144
</exclusions>
160145
</dependency>
@@ -209,6 +194,19 @@ under the License.
209194
</dependency>
210195
</dependencies>
211196

197+
<repositories>
198+
<repository>
199+
<releases>
200+
<enabled>false</enabled>
201+
</releases>
202+
<snapshots>
203+
<enabled>true</enabled>
204+
</snapshots>
205+
<id>plexus.snapshots</id>
206+
<url>https://oss.sonatype.org/content/repositories/plexus-snapshots</url>
207+
</repository>
208+
</repositories>
209+
212210
<build>
213211
<plugins>
214212
<plugin>
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,21 @@
1-
/*
2-
* Licensed to the Apache Software Foundation (ASF) under one
3-
* or more contributor license agreements. See the NOTICE file
4-
* distributed with this work for additional information
5-
* regarding copyright ownership. The ASF licenses this file
6-
* to you under the Apache License, Version 2.0 (the
7-
* "License"); you may not use this file except in compliance
8-
* with the License. You may obtain a copy of the License at
9-
*
10-
* http://www.apache.org/licenses/LICENSE-2.0
11-
*
12-
* Unless required by applicable law or agreed to in writing,
13-
* software distributed under the License is distributed on an
14-
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15-
* KIND, either express or implied. See the License for the
16-
* specific language governing permissions and limitations
17-
* under the License.
18-
*/
19-
20-
public class MyClass
21-
{
22-
23-
}
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one
3+
* or more contributor license agreements. See the NOTICE file
4+
* distributed with this work for additional information
5+
* regarding copyright ownership. The ASF licenses this file
6+
* to you under the Apache License, Version 2.0 (the
7+
* "License"); you may not use this file except in compliance
8+
* with the License. You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing,
13+
* software distributed under the License is distributed on an
14+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
* KIND, either express or implied. See the License for the
16+
* specific language governing permissions and limitations
17+
* under the License.
18+
*/
19+
package foo;
20+
21+
public class MyClass {}

src/it/MCOMPILER-157/annotation-processor/src/main/java/org/issue/SimpleAnnotation.java

+2-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
package org.issue;
2-
31
/*
42
* Licensed to the Apache Software Foundation (ASF) under one
53
* or more contributor license agreements. See the NOTICE file
@@ -18,6 +16,7 @@
1816
* specific language governing permissions and limitations
1917
* under the License.
2018
*/
19+
package org.issue;
2120

2221
import java.lang.annotation.ElementType;
2322
import java.lang.annotation.Retention;
@@ -26,6 +25,4 @@
2625

2726
@Target(ElementType.TYPE)
2827
@Retention(RetentionPolicy.SOURCE)
29-
public @interface SimpleAnnotation {
30-
31-
}
28+
public @interface SimpleAnnotation {}
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
package org.issue;
2-
31
/*
42
* Licensed to the Apache Software Foundation (ASF) under one
53
* or more contributor license agreements. See the NOTICE file
@@ -18,10 +16,7 @@
1816
* specific language governing permissions and limitations
1917
* under the License.
2018
*/
21-
22-
import java.io.IOException;
23-
import java.io.Writer;
24-
import java.util.Set;
19+
package org.issue;
2520

2621
import javax.annotation.processing.AbstractProcessor;
2722
import javax.annotation.processing.Filer;
@@ -37,44 +32,39 @@
3732
import javax.tools.FileObject;
3833
import javax.tools.StandardLocation;
3934

40-
@SupportedSourceVersion( SourceVersion.RELEASE_6 )
41-
@SupportedAnnotationTypes( "org.issue.SimpleAnnotation" )
42-
public class SimpleAnnotationProcessor
43-
extends AbstractProcessor
44-
{
35+
import java.io.IOException;
36+
import java.io.Writer;
37+
import java.util.Set;
38+
39+
@SupportedSourceVersion(SourceVersion.RELEASE_6)
40+
@SupportedAnnotationTypes("org.issue.SimpleAnnotation")
41+
public class SimpleAnnotationProcessor extends AbstractProcessor {
4542

4643
@Override
47-
public boolean process( Set<? extends TypeElement> annotations, RoundEnvironment roundEnv )
48-
{
44+
public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) {
4945
Filer filer = processingEnv.getFiler();
5046

5147
Elements elementUtils = processingEnv.getElementUtils();
5248

53-
Set<? extends Element> elements = roundEnv.getElementsAnnotatedWith( SimpleAnnotation.class );
49+
Set<? extends Element> elements = roundEnv.getElementsAnnotatedWith(SimpleAnnotation.class);
5450

55-
for ( Element element : elements )
56-
{
51+
for (Element element : elements) {
5752
Name name = element.getSimpleName();
5853

59-
PackageElement packageElement = elementUtils.getPackageOf( element );
54+
PackageElement packageElement = elementUtils.getPackageOf(element);
6055

61-
try
62-
{
63-
FileObject resource =
64-
filer.createResource( StandardLocation.SOURCE_OUTPUT, packageElement.getQualifiedName(), name
65-
+ ".txt", element );
56+
try {
57+
FileObject resource = filer.createResource(
58+
StandardLocation.SOURCE_OUTPUT, packageElement.getQualifiedName(), name + ".txt", element);
6659

6760
Writer writer = resource.openWriter();
68-
writer.write( name.toString() );
61+
writer.write(name.toString());
6962
writer.close();
70-
}
71-
catch ( IOException e )
72-
{
73-
throw new RuntimeException( e );
63+
} catch (IOException e) {
64+
throw new RuntimeException(e);
7465
}
7566
}
7667

7768
return !elements.isEmpty();
7869
}
79-
8070
}

src/it/MCOMPILER-157/annotation-user/src/main/java/org/issue/SimpleObject.java

+2-6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
package org.issue;
2-
31
/*
42
* Licensed to the Apache Software Foundation (ASF) under one
53
* or more contributor license agreements. See the NOTICE file
@@ -18,9 +16,7 @@
1816
* specific language governing permissions and limitations
1917
* under the License.
2018
*/
19+
package org.issue;
2120

2221
@SimpleAnnotation
23-
public class SimpleObject
24-
{
25-
26-
}
22+
public class SimpleObject {}

src/it/MCOMPILER-157/annotation-user/src/test/java/org/issue/SimpleTestObject.java

+2-6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
package org.issue;
2-
31
/*
42
* Licensed to the Apache Software Foundation (ASF) under one
53
* or more contributor license agreements. See the NOTICE file
@@ -18,9 +16,7 @@
1816
* specific language governing permissions and limitations
1917
* under the License.
2018
*/
19+
package org.issue;
2120

2221
@SimpleAnnotation
23-
public class SimpleTestObject
24-
{
25-
26-
}
22+
public class SimpleTestObject {}
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
package org.apache.maven.plugins.compiler.it;
2-
31
/*
42
* Licensed to the Apache Software Foundation (ASF) under one
53
* or more contributor license agreements. See the NOTICE file
@@ -8,45 +6,39 @@
86
* to you under the Apache License, Version 2.0 (the
97
* "License"); you may not use this file except in compliance
108
* with the License. You may obtain a copy of the License at
11-
*
9+
*
1210
* http://www.apache.org/licenses/LICENSE-2.0
13-
*
11+
*
1412
* Unless required by applicable law or agreed to in writing,
1513
* software distributed under the License is distributed on an
1614
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
1715
* KIND, either express or implied. See the License for the
1816
* specific language governing permissions and limitations
1917
* under the License.
2018
*/
21-
19+
package org.apache.maven.plugins.compiler.it;
2220

2321
/**
2422
* Hello world!
2523
*/
26-
public class App
27-
{
28-
public static void main( String[] args )
29-
{
30-
System.out.println( "Hello World!" );
24+
public class App {
25+
public static void main(String[] args) {
26+
System.out.println("Hello World!");
3127
}
3228

33-
public static void mainFoo( String[] args )
34-
{
35-
System.out.println( "Hello World!" );
29+
public static void mainFoo(String[] args) {
30+
System.out.println("Hello World!");
3631
}
3732

38-
public void bar( String[] args )
39-
{
40-
System.out.println( "Hello World!" );
33+
public void bar(String[] args) {
34+
System.out.println("Hello World!");
4135
}
4236

43-
public void foo( String[] args )
44-
{
45-
System.out.println( "Hello World!" );
37+
public void foo(String[] args) {
38+
System.out.println("Hello World!");
4639
}
4740

48-
public void barfoo( String[] args )
49-
{
50-
System.out.println( "Hello World!" );
41+
public void barfoo(String[] args) {
42+
System.out.println("Hello World!");
5143
}
5244
}

0 commit comments

Comments
 (0)