Skip to content

Commit abad86a

Browse files
committed
Format code
1 parent 1468c5f commit abad86a

Some content is hidden

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

50 files changed

+2013
-3024
lines changed

pom.xml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
12
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
23
~
34
~ Copyright 2001-2006 The Codehaus Foundation.
@@ -14,7 +15,6 @@
1415
~ See the License for the specific language governing permissions and
1516
~ limitations under the License.
1617
-->
17-
1818
<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">
1919
<modelVersion>4.0.0</modelVersion>
2020

@@ -35,8 +35,8 @@
3535
<scm>
3636
<connection>scm:git:[email protected]:codehaus-plexus/plexus-classworlds.git</connection>
3737
<developerConnection>scm:git:[email protected]:codehaus-plexus/plexus-classworlds.git</developerConnection>
38-
<url>http://github.com/codehaus-plexus/plexus-classworlds/tree/${project.scm.tag}/</url>
3938
<tag>master</tag>
39+
<url>http://github.com/codehaus-plexus/plexus-classworlds/tree/${project.scm.tag}/</url>
4040
</scm>
4141
<issueManagement>
4242
<system>github</system>
@@ -102,7 +102,8 @@
102102
<groupId>org.apache.maven.plugins</groupId>
103103
<artifactId>maven-scm-publish-plugin</artifactId>
104104
<configuration>
105-
<content>${project.reporting.outputDirectory}</content><!-- mono-module doesn't require site:stage -->
105+
<content>${project.reporting.outputDirectory}</content>
106+
<!-- mono-module doesn't require site:stage -->
106107
</configuration>
107108
</plugin>
108109
<plugin>
@@ -124,10 +125,11 @@
124125
<executions>
125126
<execution>
126127
<id>scm-publish</id>
127-
<phase>site-deploy</phase><!-- deploy site with maven-scm-publish-plugin -->
128+
<!-- deploy site with maven-scm-publish-plugin -->
128129
<goals>
129130
<goal>publish-scm</goal>
130131
</goals>
132+
<phase>site-deploy</phase>
131133
</execution>
132134
</executions>
133135
</plugin>
@@ -177,10 +179,10 @@
177179
<artifactId>maven-dependency-plugin</artifactId>
178180
<executions>
179181
<execution>
180-
<phase>generate-test-resources</phase>
181182
<goals>
182183
<goal>copy</goal>
183184
</goals>
185+
<phase>generate-test-resources</phase>
184186
<configuration>
185187
<artifactItems>
186188
<artifactItem>

src/main/java/org/codehaus/classworlds/BytesURLConnection.java

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -16,34 +16,29 @@
1616
* limitations under the License.
1717
*/
1818

19-
import java.net.URLConnection;
20-
import java.net.URL;
21-
import java.io.InputStream;
2219
import java.io.ByteArrayInputStream;
20+
import java.io.InputStream;
21+
import java.net.URL;
22+
import java.net.URLConnection;
2323

2424
/**
2525
*/
2626
@Deprecated
27-
public class BytesURLConnection extends URLConnection
28-
{
27+
public class BytesURLConnection extends URLConnection {
2928
protected byte[] content;
3029

3130
protected int offset;
3231

3332
protected int length;
3433

35-
public BytesURLConnection( URL url, byte[] content )
36-
{
37-
super( url );
34+
public BytesURLConnection(URL url, byte[] content) {
35+
super(url);
3836
this.content = content;
3937
}
4038

41-
public void connect()
42-
{
43-
}
39+
public void connect() {}
4440

45-
public InputStream getInputStream()
46-
{
47-
return new ByteArrayInputStream( content );
41+
public InputStream getInputStream() {
42+
return new ByteArrayInputStream(content);
4843
}
49-
}
44+
}

src/main/java/org/codehaus/classworlds/BytesURLStreamHandler.java

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,31 +16,28 @@
1616
* limitations under the License.
1717
*/
1818

19-
import java.net.URLStreamHandler;
20-
import java.net.URLConnection;
2119
import java.net.URL;
20+
import java.net.URLConnection;
21+
import java.net.URLStreamHandler;
2222

2323
/**
2424
* @author Hani Suleiman ([email protected])
2525
* Date: Oct 20, 2003
2626
* Time: 12:45:18 AM
2727
*/
2828
@Deprecated
29-
public class BytesURLStreamHandler extends URLStreamHandler
30-
{
29+
public class BytesURLStreamHandler extends URLStreamHandler {
3130
byte[] content;
3231

3332
int offset;
3433

3534
int length;
3635

37-
public BytesURLStreamHandler( byte[] content )
38-
{
36+
public BytesURLStreamHandler(byte[] content) {
3937
this.content = content;
4038
}
4139

42-
public URLConnection openConnection( URL url )
43-
{
44-
return new BytesURLConnection( url, content );
40+
public URLConnection openConnection(URL url) {
41+
return new BytesURLConnection(url, content);
4542
}
46-
}
43+
}

src/main/java/org/codehaus/classworlds/ClassRealm.java

Lines changed: 53 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -2,48 +2,48 @@
22

33
/*
44
5-
Copyright 2002 (C) The Werken Company. All Rights Reserved.
6-
7-
Redistribution and use of this software and associated documentation
8-
("Software"), with or without modification, are permitted provided
9-
that the following conditions are met:
10-
11-
1. Redistributions of source code must retain copyright
12-
statements and notices. Redistributions must also contain a
13-
copy of this document.
14-
15-
2. Redistributions in binary form must reproduce the
16-
above copyright notice, this list of conditions and the
17-
following disclaimer in the documentation and/or other
18-
materials provided with the distribution.
19-
20-
3. The name "classworlds" must not be used to endorse or promote
21-
products derived from this Software without prior written
22-
permission of The Werken Company. For written permission,
23-
please contact [email protected].
24-
25-
4. Products derived from this Software may not be called "classworlds"
26-
nor may "classworlds" appear in their names without prior written
27-
permission of The Werken Company. "classworlds" is a registered
28-
trademark of The Werken Company.
29-
30-
5. Due credit should be given to The Werken Company.
31-
(http://classworlds.werken.com/).
32-
33-
THIS SOFTWARE IS PROVIDED BY THE WERKEN COMPANY AND CONTRIBUTORS
34-
``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT
35-
NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
36-
FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
37-
THE WERKEN COMPANY OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
38-
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
39-
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
40-
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
41-
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
42-
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
43-
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
44-
OF THE POSSIBILITY OF SUCH DAMAGE.
45-
46-
*/
5+
Copyright 2002 (C) The Werken Company. All Rights Reserved.
6+
7+
Redistribution and use of this software and associated documentation
8+
("Software"), with or without modification, are permitted provided
9+
that the following conditions are met:
10+
11+
1. Redistributions of source code must retain copyright
12+
statements and notices. Redistributions must also contain a
13+
copy of this document.
14+
15+
2. Redistributions in binary form must reproduce the
16+
above copyright notice, this list of conditions and the
17+
following disclaimer in the documentation and/or other
18+
materials provided with the distribution.
19+
20+
3. The name "classworlds" must not be used to endorse or promote
21+
products derived from this Software without prior written
22+
permission of The Werken Company. For written permission,
23+
please contact [email protected].
24+
25+
4. Products derived from this Software may not be called "classworlds"
26+
nor may "classworlds" appear in their names without prior written
27+
permission of The Werken Company. "classworlds" is a registered
28+
trademark of The Werken Company.
29+
30+
5. Due credit should be given to The Werken Company.
31+
(http://classworlds.werken.com/).
32+
33+
THIS SOFTWARE IS PROVIDED BY THE WERKEN COMPANY AND CONTRIBUTORS
34+
``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT
35+
NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
36+
FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
37+
THE WERKEN COMPANY OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
38+
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
39+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
40+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
41+
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
42+
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
43+
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
44+
OF THE POSSIBILITY OF SUCH DAMAGE.
45+
46+
*/
4747

4848
import java.io.IOException;
4949
import java.io.InputStream;
@@ -52,7 +52,7 @@ STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
5252

5353
/**
5454
* <p>Autonomous sub-portion of a <code>ClassWorld</code>.</p>
55-
*
55+
*
5656
* <p>This class most closed maps to the <code>ClassLoader</code>
5757
* role from Java and in facts can provide a <code>ClassLoader</code>
5858
* view of itself using {@link #getClassLoader}.</p>
@@ -61,23 +61,20 @@ STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
6161
* @author <a href="mailto:[email protected]">Jason van Zyl</a>
6262
*/
6363
@Deprecated
64-
public interface ClassRealm
65-
{
64+
public interface ClassRealm {
6665
String getId();
6766

6867
ClassWorld getWorld();
6968

70-
void importFrom( String realmId, String pkgName )
71-
throws NoSuchRealmException;
69+
void importFrom(String realmId, String pkgName) throws NoSuchRealmException;
7270

73-
void addConstituent( URL constituent );
71+
void addConstituent(URL constituent);
7472

75-
ClassRealm locateSourceRealm( String className );
73+
ClassRealm locateSourceRealm(String className);
7674

77-
void setParent( ClassRealm classRealm );
75+
void setParent(ClassRealm classRealm);
7876

79-
ClassRealm createChildRealm( String id )
80-
throws DuplicateRealmException;
77+
ClassRealm createChildRealm(String id) throws DuplicateRealmException;
8178

8279
ClassLoader getClassLoader();
8380

@@ -89,20 +86,17 @@ ClassRealm createChildRealm( String id )
8986
// Classloading
9087
// ----------------------------------------------------------------------
9188

92-
Class loadClass( String name )
93-
throws ClassNotFoundException;
89+
Class loadClass(String name) throws ClassNotFoundException;
9490

9591
// ----------------------------------------------------------------------
9692
// Resource handling
9793
// ----------------------------------------------------------------------
9894

99-
URL getResource( String name );
95+
URL getResource(String name);
10096

101-
Enumeration findResources( String name )
102-
throws IOException;
97+
Enumeration findResources(String name) throws IOException;
10398

104-
InputStream getResourceAsStream( String name );
99+
InputStream getResourceAsStream(String name);
105100

106101
void display();
107102
}
108-

0 commit comments

Comments
 (0)