Skip to content

Commit acb4703

Browse files
committed
Reformat code
1 parent df44d88 commit acb4703

File tree

66 files changed

+2646
-4004
lines changed

Some content is hidden

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

66 files changed

+2646
-4004
lines changed

‎pom.xml‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
12
<projectxmlns="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">
23
<modelVersion>4.0.0</modelVersion>
34

@@ -16,8 +17,8 @@
1617
<scm>
1718
<connection>scm:git:https://github.com/codehaus-plexus/plexus-interpolation.git</connection>
1819
<developerConnection>scm:git:https://github.com/codehaus-plexus/plexus-interpolation.git</developerConnection>
19-
<url>http://github.com/codehaus-plexus/plexus-interpolation/tree/${project.scm.tag}/</url>
2020
<tag>master</tag>
21+
<url>http://github.com/codehaus-plexus/plexus-interpolation/tree/${project.scm.tag}/</url>
2122
</scm>
2223

2324
<issueManagement>
@@ -60,15 +61,17 @@
6061
<groupId>org.apache.maven.plugins</groupId>
6162
<artifactId>maven-scm-publish-plugin</artifactId>
6263
<configuration>
63-
<content>${project.reporting.outputDirectory}</content><!-- mono-module doesn't require site:stage -->
64+
<content>${project.reporting.outputDirectory}</content>
65+
<!-- mono-module doesn't require site:stage -->
6466
</configuration>
6567
<executions>
6668
<execution>
6769
<id>scm-publish</id>
68-
<phase>site-deploy</phase><!-- deploy site with maven-scm-publish-plugin -->
70+
<!-- deploy site with maven-scm-publish-plugin -->
6971
<goals>
7072
<goal>publish-scm</goal>
7173
</goals>
74+
<phase>site-deploy</phase>
7275
</execution>
7376
</executions>
7477
</plugin>

‎src/main/java/org/codehaus/plexus/interpolation/AbstractDelegatingValueSource.java‎

Lines changed: 13 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -18,40 +18,31 @@
1818

1919
importjava.util.List;
2020

21-
publicabstractclassAbstractDelegatingValueSource
22-
implementsValueSource
23-
{
24-
21+
publicabstractclassAbstractDelegatingValueSourceimplementsValueSource{
22+
2523
privatefinalValueSourcedelegate;
2624

27-
protectedAbstractDelegatingValueSource( ValueSourcedelegate )
28-
{
29-
if ( delegate == null )
30-
{
31-
thrownewNullPointerException( "Delegate ValueSource cannot be null." );
25+
protectedAbstractDelegatingValueSource(ValueSourcedelegate){
26+
if (delegate == null){
27+
thrownewNullPointerException("Delegate ValueSource cannot be null.");
3228
}
33-
29+
3430
this.delegate = delegate;
3531
}
36-
37-
protectedValueSourcegetDelegate()
38-
{
32+
33+
protectedValueSourcegetDelegate(){
3934
returndelegate;
4035
}
4136

42-
publicObjectgetValue( Stringexpression )
43-
{
44-
returngetDelegate().getValue( expression );
37+
publicObjectgetValue(Stringexpression){
38+
returngetDelegate().getValue(expression);
4539
}
46-
47-
publicvoidclearFeedback()
48-
{
40+
41+
publicvoidclearFeedback(){
4942
delegate.clearFeedback();
5043
}
5144

52-
publicListgetFeedback()
53-
{
45+
publicListgetFeedback(){
5446
returndelegate.getFeedback();
5547
}
56-
5748
}

‎src/main/java/org/codehaus/plexus/interpolation/AbstractFunctionValueSourceWrapper.java‎

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,7 @@
2828
* value of the second expression, which is resolved from the wrapped value
2929
* source.</p>
3030
*/
31-
publicabstractclassAbstractFunctionValueSourceWrapper
32-
implementsValueSource
33-
{
31+
publicabstractclassAbstractFunctionValueSourceWrapperimplementsValueSource{
3432

3533
privatefinalValueSourcevalueSource;
3634

@@ -40,8 +38,7 @@ public abstract class AbstractFunctionValueSourceWrapper
4038
*
4139
* @param valueSource The value source to wrap
4240
*/
43-
protectedAbstractFunctionValueSourceWrapper( ValueSourcevalueSource )
44-
{
41+
protectedAbstractFunctionValueSourceWrapper(ValueSourcevalueSource){
4542
this.valueSource = valueSource;
4643
}
4744

@@ -56,26 +53,23 @@ protected AbstractFunctionValueSourceWrapper( ValueSource valueSource )
5653
* for the current expression.</li>
5754
* </ol>
5855
*/
59-
publicObjectgetValue( Stringexpression )
60-
{
61-
Objectvalue = valueSource.getValue( expression );
56+
publicObjectgetValue(Stringexpression){
57+
Objectvalue = valueSource.getValue(expression);
6258

6359
Stringexpr = expression;
6460

65-
if ( valueSourceinstanceofQueryEnabledValueSource )
66-
{
61+
if (valueSourceinstanceofQueryEnabledValueSource){
6762
expr = ((QueryEnabledValueSource) valueSource).getLastExpression();
6863
}
6964

70-
returnexecuteFunction(expr, value);
65+
returnexecuteFunction(expr, value);
7166
}
7267

7368
/**
7469
* Retrieve the embedded value source.
7570
* @return{@link ValueSource}
7671
*/
77-
protectedValueSourcegetValueSource()
78-
{
72+
protectedValueSourcegetValueSource(){
7973
returnvalueSource;
8074
}
8175

@@ -87,6 +81,5 @@ protected ValueSource getValueSource()
8781
* @param value The value for the current expression, resolved by the embedded{@link ValueSource}
8882
* @return The result of modifying the current expression's value using the function named by the last expression.
8983
*/
90-
protectedabstractObjectexecuteFunction( Stringexpression, Objectvalue );
91-
84+
protectedabstractObjectexecuteFunction(Stringexpression, Objectvalue);
9285
}

‎src/main/java/org/codehaus/plexus/interpolation/AbstractValueSource.java‎

Lines changed: 15 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -19,45 +19,34 @@
1919
importjava.util.ArrayList;
2020
importjava.util.List;
2121

22-
publicabstractclassAbstractValueSource
23-
implementsValueSource
24-
{
25-
22+
publicabstractclassAbstractValueSourceimplementsValueSource{
23+
2624
privatefinalListfeedback;
27-
28-
protectedAbstractValueSource( booleanusesFeedback )
29-
{
30-
if ( usesFeedback )
31-
{
25+
26+
protectedAbstractValueSource(booleanusesFeedback){
27+
if (usesFeedback){
3228
feedback = newArrayList();
33-
}
34-
else
35-
{
29+
} else{
3630
feedback = null;
3731
}
3832
}
3933

40-
publicvoidclearFeedback()
41-
{
42-
if ( feedback != null )
43-
{
34+
publicvoidclearFeedback(){
35+
if (feedback != null){
4436
feedback.clear();
4537
}
4638
}
4739

48-
publicListgetFeedback()
49-
{
40+
publicListgetFeedback(){
5041
returnfeedback;
5142
}
5243

53-
protectedvoidaddFeedback( Stringmessage )
54-
{
55-
feedback.add( message );
44+
protectedvoidaddFeedback(Stringmessage){
45+
feedback.add(message);
5646
}
57-
58-
protectedvoidaddFeedback( Stringmessage, Throwablecause )
59-
{
60-
feedback.add( message );
61-
feedback.add( cause );
47+
48+
protectedvoidaddFeedback(Stringmessage, Throwablecause){
49+
feedback.add(message);
50+
feedback.add(cause);
6251
}
6352
}

‎src/main/java/org/codehaus/plexus/interpolation/BasicInterpolator.java‎

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@
2020
*
2121
* TODO: Really really needs a way to communicate errors.
2222
*/
23-
publicinterfaceBasicInterpolator
24-
{
23+
publicinterfaceBasicInterpolator{
2524
/**
2625
* See{@link org.codehaus.plexus.interpolation.Interpolator#interpolate(String, String, org.codehaus.plexus.interpolation.RecursionInterceptor)}.
2726
* <p>
@@ -34,8 +33,7 @@ public interface BasicInterpolator
3433
* @return the interpolated string.
3534
* @throws InterpolationException in case of an error.
3635
*/
37-
Stringinterpolate( Stringinput )
38-
throwsInterpolationException;
36+
Stringinterpolate(Stringinput) throwsInterpolationException;
3937

4038
/**
4139
* See{@link org.codehaus.plexus.interpolation.Interpolator#interpolate(String, String, org.codehaus.plexus.interpolation.RecursionInterceptor)}.
@@ -52,6 +50,5 @@ String interpolate( String input )
5250
* @return the interpolated string.
5351
* @throws InterpolationException in case of an error.
5452
*/
55-
Stringinterpolate( Stringinput, RecursionInterceptorrecursionInterceptor )
56-
throwsInterpolationException;
53+
Stringinterpolate(Stringinput, RecursionInterceptorrecursionInterceptor) throwsInterpolationException;
5754
}

‎src/main/java/org/codehaus/plexus/interpolation/EnvarBasedValueSource.java‎

Lines changed: 22 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -16,20 +16,18 @@
1616
* limitations under the License.
1717
*/
1818

19-
importorg.codehaus.plexus.interpolation.os.OperatingSystemUtils;
20-
2119
importjava.io.IOException;
2220
importjava.util.Properties;
2321

22+
importorg.codehaus.plexus.interpolation.os.OperatingSystemUtils;
23+
2424
/**
2525
*{@link ValueSource} which resolves expressions against the environment variables
2626
* available from the underlying operating system (and possibly, the shell environment
2727
* that created the present Java process). If the expression starts with 'env.',
2828
* this prefix is trimmed before resolving the rest as an environment variable name.
2929
*/
30-
publicclassEnvarBasedValueSource
31-
extendsAbstractValueSource
32-
{
30+
publicclassEnvarBasedValueSourceextendsAbstractValueSource{
3331

3432
privatestaticPropertiesenvarsCaseSensitive;
3533
privatestaticPropertiesenvarsCaseInsensitive;
@@ -43,9 +41,8 @@ public class EnvarBasedValueSource
4341
*
4442
* @throws IOException in case of an error.
4543
*/
46-
publicEnvarBasedValueSource() throwsIOException
47-
{
48-
this( true );
44+
publicEnvarBasedValueSource() throwsIOException{
45+
this(true);
4946
}
5047

5148
/**
@@ -55,29 +52,21 @@ public EnvarBasedValueSource() throws IOException
5552
* case-sensitive manner for lookups
5653
* @throws IOException in case of an error.
5754
*/
58-
publicEnvarBasedValueSource( booleancaseSensitive ) throwsIOException
59-
{
60-
super( false );
55+
publicEnvarBasedValueSource(booleancaseSensitive) throwsIOException{
56+
super(false);
6157
this.caseSensitive = caseSensitive;
62-
this.envars = getEnvars(caseSensitive);
58+
this.envars = getEnvars(caseSensitive);
6359
}
6460

65-
privatestaticsynchronizedPropertiesgetEnvars( booleancaseSensitive )
66-
throwsIOException
67-
{
68-
if ( caseSensitive )
69-
{
70-
if ( envarsCaseSensitive == null )
71-
{
72-
envarsCaseSensitive = OperatingSystemUtils.getSystemEnvVars( caseSensitive );
61+
privatestaticsynchronizedPropertiesgetEnvars(booleancaseSensitive) throwsIOException{
62+
if (caseSensitive){
63+
if (envarsCaseSensitive == null){
64+
envarsCaseSensitive = OperatingSystemUtils.getSystemEnvVars(caseSensitive);
7365
}
7466
returnenvarsCaseSensitive;
75-
}
76-
else
77-
{
78-
if ( envarsCaseInsensitive == null )
79-
{
80-
envarsCaseInsensitive = OperatingSystemUtils.getSystemEnvVars( caseSensitive );
67+
} else{
68+
if (envarsCaseInsensitive == null){
69+
envarsCaseInsensitive = OperatingSystemUtils.getSystemEnvVars(caseSensitive);
8170
}
8271
returnenvarsCaseInsensitive;
8372
}
@@ -92,30 +81,25 @@ private static synchronized Properties getEnvars( boolean caseSensitive )
9281
* @param expression envar expression, like 'HOME' or 'env.HOME'
9382
* @return the environment variable value for the given expression
9483
*/
95-
publicObjectgetValue( Stringexpression )
96-
{
84+
publicObjectgetValue(Stringexpression){
9785
Stringexpr = expression;
9886

99-
if ( expr.startsWith( "env." ) )
100-
{
101-
expr = expr.substring( "env.".length() );
87+
if (expr.startsWith("env.")){
88+
expr = expr.substring("env.".length());
10289
}
10390

104-
if ( !caseSensitive )
105-
{
91+
if (!caseSensitive){
10692
expr = expr.toUpperCase();
10793
}
10894

109-
returnenvars.getProperty(expr);
95+
returnenvars.getProperty(expr);
11096
}
111-
97+
11298
/**
11399
* reset static variables acting as a cache for testing purposes only
114100
*/
115-
staticvoidresetStatics()
116-
{
101+
staticvoidresetStatics(){
117102
envarsCaseSensitive = null;
118103
envarsCaseInsensitive = null;
119104
}
120-
121105
}

‎src/main/java/org/codehaus/plexus/interpolation/FeedbackEnabledValueSource.java‎

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
* limitations under the License.
1717
*/
1818

19-
2019
/**
2120
* Represents a{@link ValueSource} which provides information back to the caller
2221
* about what may have gone wrong while resolving the value for an expression.
@@ -25,7 +24,4 @@
2524
*
2625
* @deprecated Rolled into{@link ValueSource} now.
2726
*/
28-
publicinterfaceFeedbackEnabledValueSource
29-
extendsValueSource
30-
{
31-
}
27+
publicinterfaceFeedbackEnabledValueSourceextendsValueSource{}

0 commit comments

Comments
(0)