Skip to content

Commit b98245a

Browse files
committed
Merge remote-tracking branch 'upstream/master'
2 parents aa47faa + eea531e commit b98245a

99 files changed

Lines changed: 2060 additions & 1505 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.

‎addressbuilder/pom.xml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<parent>
55
<groupId>org.ocpsoft.rewrite</groupId>
66
<artifactId>rewrite-parent</artifactId>
7-
<version>2.0.8-SNAPSHOT</version>
7+
<version>2.0.9.Final-SNAPSHOT</version>
88
<relativePath>../</relativePath>
99
</parent>
1010

‎annotations-api/pom.xml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<parent>
55
<artifactId>rewrite-parent</artifactId>
66
<groupId>org.ocpsoft.rewrite</groupId>
7-
<version>2.0.8-SNAPSHOT</version>
7+
<version>2.0.9.Final-SNAPSHOT</version>
88
<relativePath>../</relativePath>
99
</parent>
1010

‎annotations-impl/pom.xml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<parent>
55
<artifactId>rewrite-parent</artifactId>
66
<groupId>org.ocpsoft.rewrite</groupId>
7-
<version>2.0.8-SNAPSHOT</version>
7+
<version>2.0.9.Final-SNAPSHOT</version>
88
<relativePath>../</relativePath>
99
</parent>
1010

‎annotations-impl/src/main/java/org/ocpsoft/rewrite/annotation/config/AnnotationConfigProvider.java‎

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717

1818
import java.lang.annotation.Annotation;
1919
import java.util.ArrayList;
20-
import java.util.HashSet;
2120
import java.util.Iterator;
21+
import java.util.LinkedHashSet;
2222
import java.util.List;
2323
import java.util.Set;
2424

@@ -54,8 +54,7 @@ public Configuration getConfiguration(ServletContext servletContext)
5454
{
5555

5656
/*
57-
* ======================================================
58-
* ============[ Configuration parameters ]==============
57+
* ====================================================== ============[ Configuration parameters ]==============
5958
* ======================================================
6059
*/
6160

@@ -65,32 +64,34 @@ public Configuration getConfiguration(ServletContext servletContext)
6564
// does the user want to scan the WEB-INF/lib directory
6665
boolean scanLibDir = false;
6766
String jarConfig = servletContext.getInitParameter(CONFIG_SCAN_LIB_DIR);
68-
if ((jarConfig != null) && jarConfig.trim().equalsIgnoreCase("true")) {
67+
if ((jarConfig != null) && jarConfig.trim().equalsIgnoreCase("true"))
68+
{
6969
scanLibDir = true;
7070
}
7171

7272
// users can disable annotation scanning
73-
if ((packageFilters != null) && packageFilters.trim().equalsIgnoreCase("none")) {
73+
if ((packageFilters != null) && packageFilters.trim().equalsIgnoreCase("none"))
74+
{
7475
log.debug("Annotation scanning is disabled!");
7576
return null;
7677
}
7778

7879
/*
79-
* ======================================================
80-
* ============[ Prepare scanning process ]==============
80+
* ====================================================== ============[ Prepare scanning process ]==============
8181
* ======================================================
8282
*/
8383

8484
// the byte code filter needs to know the annotations to look for
85-
Set<Class<? extends Annotation>> annotationType = new HashSet<Class<? extends Annotation>>();
85+
Set<Class<? extends Annotation>> annotationType = new LinkedHashSet<Class<? extends Annotation>>();
8686

8787
// list of annotation handlers for the ClassVisitor
8888
List<AnnotationHandler<Annotation>> annotationHandlers = new ArrayList<AnnotationHandler<Annotation>>();
8989

9090
// load the implementations of the AnnotationHandler SPI
9191
@SuppressWarnings("unchecked")
9292
Iterator<AnnotationHandler<Annotation>> handlerIterator = ServiceLoader.load(AnnotationHandler.class).iterator();
93-
while (handlerIterator.hasNext()) {
93+
while (handlerIterator.hasNext())
94+
{
9495
AnnotationHandler<Annotation> handler = handlerIterator.next();
9596
annotationHandlers.add(handler);
9697
annotationType.add(handler.handles());
@@ -107,26 +108,28 @@ public Configuration getConfiguration(ServletContext servletContext)
107108

108109
// fallback to some other classloder if there is no context class loader
109110
ClassLoader classloader = Thread.currentThread().getContextClassLoader();
110-
if (classloader == null) {
111+
if (classloader == null)
112+
{
111113
classloader = this.getClass().getClassLoader();
112114
}
113115

114116
/*
115-
* ======================================================
116-
* =============[ Scanning process starts ]==============
117+
* ====================================================== =============[ Scanning process starts ]==============
117118
* ======================================================
118119
*/
119120

120121
// TODO this should be pulled out into a utility allowing it to run in Java SE
121122
// compile a list of class finders to run
122123
List<ClassFinder> classFinders = new ArrayList<ClassFinder>();
123124
classFinders.add(new WebClassesFinder(servletContext, classloader, packageFilter, byteCodeFilter));
124-
if (scanLibDir) {
125+
if (scanLibDir)
126+
{
125127
classFinders.add(new WebLibFinder(servletContext, classloader, packageFilter, byteCodeFilter));
126128
}
127129

128130
// start the scanning process
129-
for (ClassFinder finder : classFinders) {
131+
for (ClassFinder finder : classFinders)
132+
{
130133
finder.findClasses(classVisitor);
131134
}
132135

‎annotations-impl/src/main/java/org/ocpsoft/rewrite/annotation/scan/ByteCodeFilter.java‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
import java.io.InputStream;
2121
import java.lang.annotation.Annotation;
2222
import java.util.HashSet;
23+
import java.util.LinkedHashSet;
2324
import java.util.Set;
2425

2526
import org.ocpsoft.logging.Logger;
@@ -69,7 +70,7 @@ public class ByteCodeFilter
6970
/**
7071
* The strings to look for in the constants table
7172
*/
72-
private final Set<String> fieldDescriptors = new HashSet<String>();
73+
private final Set<String> fieldDescriptors = new LinkedHashSet<String>();
7374

7475
/**
7576
* The filter must be initialized with a list of types to look for when scanning the class files. If a class files

‎annotations-impl/src/main/java/org/ocpsoft/rewrite/annotation/scan/PackageFilter.java‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*/
1616
package org.ocpsoft.rewrite.annotation.scan;
1717

18-
import java.util.HashSet;
18+
import java.util.LinkedHashSet;
1919
import java.util.Set;
2020

2121
import org.ocpsoft.logging.Logger;
@@ -33,7 +33,7 @@ public class PackageFilter
3333

3434
private final static Logger log = Logger.getLogger(PackageFilter.class);
3535

36-
private final Set<String> packageSet = new HashSet<String>();
36+
private final Set<String> packageSet = new LinkedHashSet<String>();
3737

3838
/**
3939
* Creates a new {@link PackageFilter}

‎annotations-impl/src/main/java/org/ocpsoft/rewrite/annotation/scan/WebClassesFinder.java‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
import java.io.InputStream;
2020
import java.net.MalformedURLException;
2121
import java.net.URL;
22-
import java.util.HashSet;
22+
import java.util.LinkedHashSet;
2323
import java.util.Set;
2424

2525
import javax.servlet.ServletContext;
@@ -45,7 +45,7 @@ public class WebClassesFinder extends AbstractClassFinder
4545
/**
4646
* Manage a set of classes already processed
4747
*/
48-
private final Set<String> processedClasses = new HashSet<String>();
48+
private final Set<String> processedClasses = new LinkedHashSet<String>();
4949

5050
/**
5151
* Initialization

‎api-el/pom.xml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<parent>
1414
<groupId>org.ocpsoft.rewrite</groupId>
1515
<artifactId>rewrite-parent</artifactId>
16-
<version>2.0.8-SNAPSHOT</version>
16+
<version>2.0.9.Final-SNAPSHOT</version>
1717
<relativePath>../</relativePath>
1818
</parent>
1919

‎api-servlet/pom.xml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<parent>
55
<groupId>org.ocpsoft.rewrite</groupId>
66
<artifactId>rewrite-parent</artifactId>
7-
<version>2.0.8-SNAPSHOT</version>
7+
<version>2.0.9.Final-SNAPSHOT</version>
88
<relativePath>../</relativePath>
99
</parent>
1010

‎api-tests/pom.xml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<parent>
55
<groupId>org.ocpsoft.rewrite</groupId>
66
<artifactId>rewrite-parent</artifactId>
7-
<version>2.0.8-SNAPSHOT</version>
7+
<version>2.0.9.Final-SNAPSHOT</version>
88
<relativePath>../</relativePath>
99
</parent>
1010

0 commit comments

Comments
 (0)