Skip to content

Commit e0a4be6

Browse files
committed
Remove and enforce trailing whitespace
Also Javadoc author tags
1 parent aa1e9c3 commit e0a4be6

File tree

119 files changed

+520
-510
lines changed

Some content is hidden

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

119 files changed

+520
-510
lines changed

checkstyle.xml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,17 @@
4343
<!-- See http://checkstyle.sf.net/config_sizes.html -->
4444
<module name="FileLength" />
4545
<module name="FileTabCharacterCheck" />
46-
46+
<module name="RegexpSingleline">
47+
<property name="format" value="^\s+\*\s+@author\s" />
48+
<property name="message" value="Deprecated @author tag" />
49+
<property name="fileExtensions" value="java" />
50+
<property name="severity" value="warning" />
51+
</module>
52+
<module name="RegexpSingleline">
53+
<!-- \s matches whitespace character, $ matches end of line. -->
54+
<property name="format" value="\s+$"/>
55+
<property name="message" value="Line has trailing spaces."/>
56+
</module>
4757
<module name="TreeWalker">
4858
<module name="ExplicitInitialization" />
4959
<!--property name="cacheFile" value="${checkstyle.cache.file}"/ -->

src/main/java/org/apache/commons/jxpath/AbstractFactory.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
*/
2727
public abstract class AbstractFactory {
2828

29-
29+
3030
/**
3131
* Constructs a new instance for subclasses.
3232
*/

src/main/java/org/apache/commons/jxpath/BasicNodeSet.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public class BasicNodeSet implements NodeSet {
3131
private List<Pointer> readOnlyPointers;
3232
private List nodes;
3333
private List values;
34-
34+
3535
/**
3636
* Constructs a new instance.
3737
*/
@@ -41,7 +41,7 @@ public BasicNodeSet() {
4141

4242
/**
4343
* Add the specified NodeSet to this NodeSet.
44-
*
44+
*
4545
* @param nodeSet to add
4646
*/
4747
public void add(final NodeSet nodeSet) {
@@ -52,7 +52,7 @@ public void add(final NodeSet nodeSet) {
5252

5353
/**
5454
* Add a pointer to this NodeSet.
55-
*
55+
*
5656
* @param pointer to add
5757
*/
5858
public void add(final Pointer pointer) {
@@ -96,7 +96,7 @@ public synchronized List getValues() {
9696

9797
/**
9898
* Remove a pointer from this NodeSet.
99-
*
99+
*
100100
* @param pointer to remove
101101
*/
102102
public void remove(final Pointer pointer) {

src/main/java/org/apache/commons/jxpath/BasicVariables.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public class BasicVariables implements Variables {
3030
* Contains the values of declared variables
3131
*/
3232
private final HashMap vars = new HashMap();
33-
33+
3434
/**
3535
* Constructs a new instance.
3636
*/

src/main/java/org/apache/commons/jxpath/ClassFunctions.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,11 @@
3030
* Extension functions provided by a Java class.
3131
*
3232
* Let's say we declared a ClassFunction like this: <blockquote>
33-
*
33+
*
3434
* <pre>
3535
* new ClassFunctions(Integer.class, "int")
3636
* </pre>
37-
*
37+
*
3838
* </blockquote>
3939
*
4040
* We can now use XPaths like:
@@ -58,7 +58,7 @@ public class ClassFunctions implements Functions {
5858

5959
/**
6060
* Constructs a new ClassFunctions.
61-
*
61+
*
6262
* @param functionClass Class providing the functions
6363
* @param namespace assigned ns
6464
*/

src/main/java/org/apache/commons/jxpath/CompiledExpression.java

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public interface CompiledExpression {
3333
/**
3434
* Creates intermediate elements of the path by invoking an {@link AbstractFactory}, which should first be installed on the context by calling
3535
* {@link JXPathContext#setFactory}.
36-
*
36+
*
3737
* @param context base
3838
* @return Pointer created
3939
*/
@@ -49,7 +49,7 @@ public interface CompiledExpression {
4949
* <li>The AbstractFactory fails to create an instance for an intermediate element.
5050
* <li>The property is not writable (no public, non-static set method)
5151
* </ul>
52-
*
52+
*
5353
* @param context base
5454
* @param value to set
5555
* @return Pointer created
@@ -59,7 +59,7 @@ public interface CompiledExpression {
5959
/**
6060
* Traverses the xpath and returns a Pointer. A Pointer provides easy access to a property. If the xpath matches no properties in the graph, the pointer
6161
* will be null.
62-
*
62+
*
6363
* @param context base
6464
* @param xpath string
6565
* @return Pointer found
@@ -68,15 +68,15 @@ public interface CompiledExpression {
6868

6969
/**
7070
* Evaluates the xpath and returns the resulting object. Primitive types are wrapped into objects.
71-
*
71+
*
7272
* @param context to evaluate
7373
* @return Object
7474
*/
7575
Object getValue(JXPathContext context);
7676

7777
/**
7878
* Evaluates the xpath, converts the result to the specified class and returns the resulting object.
79-
*
79+
*
8080
* @param context to evaluate
8181
* @param requiredType return type
8282
* @return Object
@@ -86,7 +86,7 @@ public interface CompiledExpression {
8686
/**
8787
* Traverses the xpath and returns a Iterator of all results found for the path. If the xpath matches no properties in the graph, the Iterator will not be
8888
* null.
89-
*
89+
*
9090
* @param context base
9191
* @return Iterator
9292
*/
@@ -95,22 +95,22 @@ public interface CompiledExpression {
9595
/**
9696
* Traverses the xpath and returns an Iterator of Pointers. A Pointer provides easy access to a property. If the xpath matches no properties in the graph,
9797
* the Iterator be empty, but not null.
98-
*
98+
*
9999
* @param context to iterate
100100
* @return Iterator
101101
*/
102102
Iterator iteratePointers(JXPathContext context);
103103

104104
/**
105105
* Remove all graph elements described by this expression.
106-
*
106+
*
107107
* @param context base
108108
*/
109109
void removeAll(JXPathContext context);
110110

111111
/**
112112
* Remove the graph element described by this expression.
113-
*
113+
*
114114
* @param context base
115115
*/
116116
void removePath(JXPathContext context);
@@ -121,7 +121,7 @@ public interface CompiledExpression {
121121
* <li>The xpath does not in fact describe an existing property
122122
* <li>The property is not writable (no public, non-static set method)
123123
* </ul>
124-
*
124+
*
125125
* @param context base
126126
* @param value to set
127127
*/

src/main/java/org/apache/commons/jxpath/Container.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,14 @@ public interface Container extends Serializable {
2727

2828
/**
2929
* Returns the contained value.
30-
*
30+
*
3131
* @return Object value
3232
*/
3333
Object getValue();
3434

3535
/**
3636
* Modifies the value contained by this container. May throw UnsupportedOperationException.
37-
*
37+
*
3838
* @param value Object value to set.
3939
*/
4040
void setValue(Object value);

src/main/java/org/apache/commons/jxpath/DynamicPropertyHandler.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public interface DynamicPropertyHandler {
3535

3636
/**
3737
* Returns the value of the specified dynamic property.
38-
*
38+
*
3939
* @param object to search
4040
* @param propertyName to retrieve
4141
* @return Object
@@ -44,15 +44,15 @@ public interface DynamicPropertyHandler {
4444

4545
/**
4646
* Returns a list of dynamic property names for the supplied object.
47-
*
47+
*
4848
* @param object to inspect
4949
* @return String[]
5050
*/
5151
String[] getPropertyNames(Object object);
5252

5353
/**
5454
* Modifies the value of the specified dynamic property.
55-
*
55+
*
5656
* @param object to modify
5757
* @param propertyName to modify
5858
* @param value to set

src/main/java/org/apache/commons/jxpath/ExceptionHandler.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,14 @@
1919

2020
/**
2121
* Exception handler interface. Actually handles Throwables.
22-
*
22+
*
2323
* @since 1.4
2424
*/
2525
public interface ExceptionHandler {
2626

2727
/**
2828
* Handle an encountered Throwable.
29-
*
29+
*
3030
* @param t to handle
3131
* @param ptr specific context
3232
*/

src/main/java/org/apache/commons/jxpath/ExpressionContext.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@
2323
* If an extenstion function has an argument of type ExpressionContext, it can gain access to the current node of an XPath expression context.
2424
* <p>
2525
* Example: <blockquote>
26-
*
26+
*
2727
* <pre>
2828
* public class MyExtenstionFunctions {
29-
*
29+
*
3030
* public static String objectType(ExpressionContext context) {
3131
* Object value = context.getContextNodePointer().getValue();
3232
* if (value == null) {
@@ -36,15 +36,15 @@
3636
* }
3737
* }
3838
* </pre>
39-
*
39+
*
4040
* </blockquote>
4141
*
4242
* You can then register this extension function using a {@link ClassFunctions ClassFunctions} object and call it like this: <blockquote>
43-
*
43+
*
4444
* <pre>
4545
* "/descendent-or-self::node()[ns:objectType() = 'java.util.Date']"
4646
* </pre>
47-
*
47+
*
4848
* </blockquote> This expression will find all nodes of the graph that are dates.
4949
*/
5050
public interface ExpressionContext {
@@ -72,7 +72,7 @@ public interface ExpressionContext {
7272

7373
/**
7474
* Returns the current context position.
75-
*
75+
*
7676
* @return int
7777
*/
7878
int getPosition();

0 commit comments

Comments
 (0)