Skip to content

Commit b1f4377

Browse files
committed
Formatting
1 parent c3e415d commit b1f4377

57 files changed

Lines changed: 2013 additions & 2914 deletions

File tree

Some content is hidden

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

src/main/java/org/apache/tomcat/maven/common/deployer/TomcatManager.java

Lines changed: 229 additions & 275 deletions
Large diffs are not rendered by default.

src/main/java/org/apache/tomcat/maven/common/deployer/TomcatManagerException.java

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,7 @@
2323
*
2424
* @author Mark Hobson (markhobson@gmail.com)
2525
*/
26-
public class TomcatManagerException
27-
extends Exception
28-
{
26+
public class TomcatManagerException extends Exception {
2927
// ----------------------------------------------------------------------
3028
// Constants
3129
// ----------------------------------------------------------------------
@@ -42,8 +40,7 @@ public class TomcatManagerException
4240
/**
4341
* Creates a new <code>TomcatManagerException</code> with no message or cause.
4442
*/
45-
public TomcatManagerException()
46-
{
43+
public TomcatManagerException() {
4744
super();
4845
}
4946

@@ -52,9 +49,8 @@ public TomcatManagerException()
5249
*
5350
* @param message the message for this exception
5451
*/
55-
public TomcatManagerException( String message )
56-
{
57-
super( message );
52+
public TomcatManagerException(String message) {
53+
super(message);
5854
}
5955

6056
/**
@@ -63,8 +59,7 @@ public TomcatManagerException( String message )
6359
* @param message the message for this exception
6460
* @param cause the cause of this exception
6561
*/
66-
public TomcatManagerException( String message, Throwable cause )
67-
{
68-
super( message, cause );
62+
public TomcatManagerException(String message, Throwable cause) {
63+
super(message, cause);
6964
}
7065
}

src/main/java/org/apache/tomcat/maven/common/deployer/TomcatManagerResponse.java

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -20,50 +20,43 @@
2020

2121
/**
2222
* @author Olivier Lamy
23+
*
2324
* @since 2.0
2425
*/
25-
public class TomcatManagerResponse
26-
{
26+
public class TomcatManagerResponse {
2727
private int statusCode;
2828

2929
private String reasonPhrase;
3030

3131
private String httpResponseBody;
3232

33-
public TomcatManagerResponse()
34-
{
33+
public TomcatManagerResponse() {
3534
// no op
3635
}
3736

38-
public int getStatusCode()
39-
{
37+
public int getStatusCode() {
4038
return statusCode;
4139
}
4240

43-
public TomcatManagerResponse setStatusCode( int statusCode )
44-
{
41+
public TomcatManagerResponse setStatusCode(int statusCode) {
4542
this.statusCode = statusCode;
4643
return this;
4744
}
4845

49-
public String getReasonPhrase()
50-
{
46+
public String getReasonPhrase() {
5147
return reasonPhrase;
5248
}
5349

54-
public TomcatManagerResponse setReasonPhrase( String reasonPhrase )
55-
{
50+
public TomcatManagerResponse setReasonPhrase(String reasonPhrase) {
5651
this.reasonPhrase = reasonPhrase;
5752
return this;
5853
}
5954

60-
public String getHttpResponseBody()
61-
{
55+
public String getHttpResponseBody() {
6256
return httpResponseBody;
6357
}
6458

65-
public TomcatManagerResponse setHttpResponseBody( String httpResponseBody )
66-
{
59+
public TomcatManagerResponse setHttpResponseBody(String httpResponseBody) {
6760
this.httpResponseBody = httpResponseBody;
6861
return this;
6962
}

src/main/java/org/apache/tomcat/maven/common/messages/DefaultMessagesProvider.java

Lines changed: 15 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -26,61 +26,55 @@
2626

2727
/**
2828
* @author Olivier Lamy
29+
*
2930
* @since 2.0
3031
*/
31-
@Component( role = MessagesProvider.class )
32-
public class DefaultMessagesProvider
33-
implements MessagesProvider
34-
{
32+
@Component(role = MessagesProvider.class)
33+
public class DefaultMessagesProvider implements MessagesProvider {
3534

3635
/**
3736
* plugin messages
3837
*/
3938
private final ResourceBundle messages;
4039

4140

42-
public DefaultMessagesProvider()
43-
{
41+
public DefaultMessagesProvider() {
4442
String packageName = getClass().getPackage().getName();
4543

46-
messages = ResourceBundle.getBundle( packageName + ".messages" );
44+
messages = ResourceBundle.getBundle(packageName + ".messages");
4745
}
4846

49-
public ResourceBundle getResourceBundle()
50-
{
47+
public ResourceBundle getResourceBundle() {
5148
return this.messages;
5249
}
5350

5451
/**
5552
* Gets the message for the given key from this packages resource bundle.
5653
*
5754
* @param key the key for the required message
55+
*
5856
* @return the message
5957
*/
6058
@Override
61-
public String getMessage( String key )
62-
{
63-
try
64-
{
65-
return getResourceBundle().getString( key );
66-
}
67-
catch (NullPointerException | MissingResourceException | ClassCastException exception )
68-
{
59+
public String getMessage(String key) {
60+
try {
61+
return getResourceBundle().getString(key);
62+
} catch (NullPointerException | MissingResourceException | ClassCastException exception) {
6963
return "???" + key + "???";
7064
}
7165
}
7266

7367
/**
7468
* Gets the message for the given key from this packages resource bundle and formats it with the given parameter.
7569
*
76-
* @param key the key for the required message
70+
* @param key the key for the required message
7771
* @param params the parameters to be used to format the message with
72+
*
7873
* @return the formatted message
7974
*/
8075
@Override
81-
public String getMessage( String key, Object... params )
82-
{
83-
return MessageFormat.format( getMessage( key ), params );
76+
public String getMessage(String key, Object... params) {
77+
return MessageFormat.format(getMessage(key), params);
8478
}
8579

8680
}

src/main/java/org/apache/tomcat/maven/common/messages/MessagesProvider.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@
2222
* messages provider
2323
*
2424
* @author Olivier Lamy
25+
*
2526
* @since 2.0
2627
*/
27-
public interface MessagesProvider
28-
{
29-
String getMessage( String key );
28+
public interface MessagesProvider {
29+
String getMessage(String key);
3030

31-
String getMessage( String key, Object... param1 );
31+
String getMessage(String key, Object... param1);
3232

3333
}

src/main/java/org/apache/tomcat/maven/common/run/ClassLoaderEntriesCalculator.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@
2020

2121
/**
2222
* @author Olivier Lamy
23+
*
2324
* @since 2.0
2425
*/
25-
public interface ClassLoaderEntriesCalculator
26-
{
27-
ClassLoaderEntriesCalculatorResult calculateClassPathEntries( ClassLoaderEntriesCalculatorRequest classLoaderEntriesCalculatorRequest )
28-
throws TomcatRunException;
26+
public interface ClassLoaderEntriesCalculator {
27+
ClassLoaderEntriesCalculatorResult calculateClassPathEntries(
28+
ClassLoaderEntriesCalculatorRequest classLoaderEntriesCalculatorRequest) throws TomcatRunException;
2929
}

src/main/java/org/apache/tomcat/maven/common/run/ClassLoaderEntriesCalculatorRequest.java

Lines changed: 12 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@
2626

2727
/**
2828
* @author Olivier Lamy
29+
*
2930
* @since 2.0
3031
*/
31-
public class ClassLoaderEntriesCalculatorRequest
32-
{
32+
public class ClassLoaderEntriesCalculatorRequest {
3333
private MavenProject mavenProject;
3434

3535
private Set<Artifact> dependencies;
@@ -40,58 +40,48 @@ public class ClassLoaderEntriesCalculatorRequest
4040

4141
private boolean useTestClassPath;
4242

43-
public MavenProject getMavenProject()
44-
{
43+
public MavenProject getMavenProject() {
4544
return mavenProject;
4645
}
4746

48-
public ClassLoaderEntriesCalculatorRequest setMavenProject( MavenProject mavenProject )
49-
{
47+
public ClassLoaderEntriesCalculatorRequest setMavenProject(MavenProject mavenProject) {
5048
this.mavenProject = mavenProject;
5149
return this;
5250
}
5351

54-
public Set<Artifact> getDependencies()
55-
{
52+
public Set<Artifact> getDependencies() {
5653
return dependencies;
5754
}
5855

59-
public ClassLoaderEntriesCalculatorRequest setDependencies( Set<Artifact> dependencies )
60-
{
56+
public ClassLoaderEntriesCalculatorRequest setDependencies(Set<Artifact> dependencies) {
6157
this.dependencies = dependencies;
6258
return this;
6359
}
6460

65-
public Log getLog()
66-
{
61+
public Log getLog() {
6762
return log;
6863
}
6964

70-
public ClassLoaderEntriesCalculatorRequest setLog( Log log )
71-
{
65+
public ClassLoaderEntriesCalculatorRequest setLog(Log log) {
7266
this.log = log;
7367
return this;
7468
}
7569

76-
public boolean isAddWarDependenciesInClassloader()
77-
{
70+
public boolean isAddWarDependenciesInClassloader() {
7871
return addWarDependenciesInClassloader;
7972
}
8073

8174
public ClassLoaderEntriesCalculatorRequest setAddWarDependenciesInClassloader(
82-
boolean addWarDependenciesInClassloader )
83-
{
75+
boolean addWarDependenciesInClassloader) {
8476
this.addWarDependenciesInClassloader = addWarDependenciesInClassloader;
8577
return this;
8678
}
8779

88-
public boolean isUseTestClassPath()
89-
{
80+
public boolean isUseTestClassPath() {
9081
return useTestClassPath;
9182
}
9283

93-
public ClassLoaderEntriesCalculatorRequest setUseTestClassPath( boolean useTestClassPath )
94-
{
84+
public ClassLoaderEntriesCalculatorRequest setUseTestClassPath(boolean useTestClassPath) {
9585
this.useTestClassPath = useTestClassPath;
9686
return this;
9787
}

src/main/java/org/apache/tomcat/maven/common/run/ClassLoaderEntriesCalculatorResult.java

Lines changed: 12 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@
2323

2424
/**
2525
* @author Olivier Lamy
26+
*
2627
* @since 2.0
2728
*/
28-
public class ClassLoaderEntriesCalculatorResult
29-
{
29+
public class ClassLoaderEntriesCalculatorResult {
3030
/**
3131
* classpath entries File .toURI().toString()
3232
*/
@@ -44,40 +44,34 @@ public class ClassLoaderEntriesCalculatorResult
4444
private final List<String> buildDirectories;
4545

4646
/**
47-
* @param classPathEntries Classpath entries File .toURI().toString()
48-
* @param tmpDirectories List of files to cleanup after execution
49-
* @param buildDirectories Directory part of webapp classpath (project.build.directory and reactor projects)
47+
* @param classPathEntries Classpath entries File .toURI().toString()
48+
* @param tmpDirectories List of files to cleanup after execution
49+
* @param buildDirectories Directory part of webapp classpath (project.build.directory and reactor projects)
5050
*/
51-
public ClassLoaderEntriesCalculatorResult( List<String> classPathEntries, List<File> tmpDirectories,
52-
List<String> buildDirectories )
53-
{
51+
public ClassLoaderEntriesCalculatorResult(List<String> classPathEntries, List<File> tmpDirectories,
52+
List<String> buildDirectories) {
5453
this.classPathEntries = classPathEntries;
5554
this.tmpDirectories = tmpDirectories;
5655
this.buildDirectories = buildDirectories;
5756
}
5857

59-
public List<String> getClassPathEntries()
60-
{
58+
public List<String> getClassPathEntries() {
6159
return classPathEntries;
6260
}
6361

64-
public void setClassPathEntries( List<String> classPathEntries )
65-
{
62+
public void setClassPathEntries(List<String> classPathEntries) {
6663
this.classPathEntries = classPathEntries;
6764
}
6865

69-
public List<File> getTmpDirectories()
70-
{
66+
public List<File> getTmpDirectories() {
7167
return tmpDirectories;
7268
}
7369

74-
public void setTmpDirectories( List<File> tmpDirectories )
75-
{
70+
public void setTmpDirectories(List<File> tmpDirectories) {
7671
this.tmpDirectories = tmpDirectories;
7772
}
7873

79-
public List<String> getBuildDirectories()
80-
{
74+
public List<String> getBuildDirectories() {
8175
return buildDirectories;
8276
}
8377
}

0 commit comments

Comments
 (0)