Skip to content

Commit 7714436

Browse files
committed
Normalise EOL
1 parent 7ff7e3f commit 7714436

File tree

5 files changed

+420
-403
lines changed

5 files changed

+420
-403
lines changed

.gitattributes

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one or more
2+
# contributor license agreements. See the NOTICE file distributed with
3+
# this work for additional information regarding copyright ownership.
4+
# The ASF licenses this file to You under the Apache License, Version 2.0
5+
# (the "License"); you may not use this file except in compliance with
6+
# the License. You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
16+
* text=auto
17+
*.bat -text

README.md

Lines changed: 102 additions & 102 deletions
Original file line numberDiff line numberDiff line change
@@ -1,103 +1,103 @@
1-
<!---
2-
Licensed to the Apache Software Foundation (ASF) under one or more
3-
contributor license agreements. See the NOTICE file distributed with
4-
this work for additional information regarding copyright ownership.
5-
The ASF licenses this file to You under the Apache License, Version 2.0
6-
(the "License"); you may not use this file except in compliance with
7-
the License. You may obtain a copy of the License at
8-
9-
http://www.apache.org/licenses/LICENSE-2.0
10-
11-
Unless required by applicable law or agreed to in writing, software
12-
distributed under the License is distributed on an "AS IS" BASIS,
13-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14-
See the License for the specific language governing permissions and
15-
limitations under the License.
16-
-->
17-
<!---
18-
+======================================================================+
19-
|**** ****|
20-
|**** THIS FILE IS GENERATED BY THE COMMONS BUILD PLUGIN ****|
21-
|**** DO NOT EDIT DIRECTLY ****|
22-
|**** ****|
23-
+======================================================================+
24-
| TEMPLATE FILE: readme-md-template.md |
25-
| commons-build-plugin/trunk/src/main/resources/commons-xdoc-templates |
26-
+======================================================================+
27-
| |
28-
| 1) Re-generate using: mvn commons:readme-md |
29-
| |
30-
| 2) Set the following properties in the component's pom: |
31-
| - commons.componentid (required, alphabetic, lower case) |
32-
| - commons.release.version (required) |
33-
| |
34-
| 3) Example Properties |
35-
| |
36-
| <properties> |
37-
| <commons.componentid>math</commons.componentid> |
38-
| <commons.release.version>1.2</commons.release.version> |
39-
| </properties> |
40-
| |
41-
+======================================================================+
42-
--->
43-
Apache Commons JXPath
44-
===================
45-
1+
<!---
2+
Licensed to the Apache Software Foundation (ASF) under one or more
3+
contributor license agreements. See the NOTICE file distributed with
4+
this work for additional information regarding copyright ownership.
5+
The ASF licenses this file to You under the Apache License, Version 2.0
6+
(the "License"); you may not use this file except in compliance with
7+
the License. You may obtain a copy of the License at
8+
9+
http://www.apache.org/licenses/LICENSE-2.0
10+
11+
Unless required by applicable law or agreed to in writing, software
12+
distributed under the License is distributed on an "AS IS" BASIS,
13+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
See the License for the specific language governing permissions and
15+
limitations under the License.
16+
-->
17+
<!---
18+
+======================================================================+
19+
|**** ****|
20+
|**** THIS FILE IS GENERATED BY THE COMMONS BUILD PLUGIN ****|
21+
|**** DO NOT EDIT DIRECTLY ****|
22+
|**** ****|
23+
+======================================================================+
24+
| TEMPLATE FILE: readme-md-template.md |
25+
| commons-build-plugin/trunk/src/main/resources/commons-xdoc-templates |
26+
+======================================================================+
27+
| |
28+
| 1) Re-generate using: mvn commons:readme-md |
29+
| |
30+
| 2) Set the following properties in the component's pom: |
31+
| - commons.componentid (required, alphabetic, lower case) |
32+
| - commons.release.version (required) |
33+
| |
34+
| 3) Example Properties |
35+
| |
36+
| <properties> |
37+
| <commons.componentid>math</commons.componentid> |
38+
| <commons.release.version>1.2</commons.release.version> |
39+
| </properties> |
40+
| |
41+
+======================================================================+
42+
--->
43+
Apache Commons JXPath
44+
===================
45+
4646
[![Java CI](https://github.com/apache/commons-jxpath/actions/workflows/maven.yml/badge.svg)](https://github.com/apache/commons-jxpath/actions/workflows/maven.yml)
47-
[![Maven Central](https://img.shields.io/maven-central/v/commons-jxpath/commons-jxpath?label=Maven%20Central)](https://search.maven.org/artifact/commons-jxpath/commons-jxpath)
48-
49-
A Java-based implementation of XPath 1.0 that, in addition to XML processing, can inspect/modify Java object graphs (the library's explicit purpose) and even mixed Java/XML structures.
50-
51-
Documentation
52-
-------------
53-
54-
More information can be found on the [Apache Commons JXPath homepage](https://commons.apache.org/proper/commons-jxpath).
55-
The [Javadoc](https://commons.apache.org/proper/commons-jxpath/javadocs/api-release) can be browsed.
56-
Questions related to the usage of Apache Commons JXPath should be posted to the [user mailing list](https://commons.apache.org/mail-lists.html).
57-
58-
Where can I get the latest release?
59-
-----------------------------------
60-
You can download source and binaries from our [download page](https://commons.apache.org/proper/commons-jxpath/download_jxpath.cgi).
61-
62-
Alternatively, you can pull it from the central Maven repositories:
63-
64-
```xml
65-
<dependency>
66-
<groupId>commons-jxpath</groupId>
67-
<artifactId>commons-jxpath</artifactId>
68-
<version>1.3</version>
69-
</dependency>
70-
```
71-
72-
Contributing
73-
------------
74-
75-
We accept Pull Requests via GitHub. The [developer mailing list][ml] is the main channel of communication for contributors.
76-
There are some guidelines which will make applying PRs easier for us:
77-
+ No tabs! Please use spaces for indentation.
78-
+ Respect the code style.
79-
+ Create minimal diffs - disable on save actions like reformat source code or organize imports. If you feel the source code should be reformatted create a separate PR for this change.
80-
+ Provide JUnit tests for your changes and make sure your changes don't break any existing tests by running ```mvn clean test```.
81-
82-
If you plan to contribute on a regular basis, please consider filing a [contributor license agreement](https://www.apache.org/licenses/#clas).
83-
You can learn more about contributing via GitHub in our [contribution guidelines](CONTRIBUTING.md).
84-
85-
License
86-
-------
87-
This code is under the [Apache Licence v2](https://www.apache.org/licenses/LICENSE-2.0).
88-
89-
See the `NOTICE.txt` file for required notices and attributions.
90-
91-
Donations
92-
---------
93-
You like Apache Commons JXPath? Then [donate back to the ASF](https://www.apache.org/foundation/contributing.html) to support the development.
94-
95-
Additional Resources
96-
--------------------
97-
98-
+ [Apache Commons Homepage](https://commons.apache.org/)
99-
+ [Apache Issue Tracker (JIRA)](https://issues.apache.org/jira/browse/JXPATH)
100-
+ [Apache Commons Twitter Account](https://twitter.com/ApacheCommons)
101-
+ `#apache-commons` IRC channel on `irc.freenode.org`
102-
103-
[ml]:https://commons.apache.org/mail-lists.html
47+
[![Maven Central](https://img.shields.io/maven-central/v/commons-jxpath/commons-jxpath?label=Maven%20Central)](https://search.maven.org/artifact/commons-jxpath/commons-jxpath)
48+
49+
A Java-based implementation of XPath 1.0 that, in addition to XML processing, can inspect/modify Java object graphs (the library's explicit purpose) and even mixed Java/XML structures.
50+
51+
Documentation
52+
-------------
53+
54+
More information can be found on the [Apache Commons JXPath homepage](https://commons.apache.org/proper/commons-jxpath).
55+
The [Javadoc](https://commons.apache.org/proper/commons-jxpath/javadocs/api-release) can be browsed.
56+
Questions related to the usage of Apache Commons JXPath should be posted to the [user mailing list](https://commons.apache.org/mail-lists.html).
57+
58+
Where can I get the latest release?
59+
-----------------------------------
60+
You can download source and binaries from our [download page](https://commons.apache.org/proper/commons-jxpath/download_jxpath.cgi).
61+
62+
Alternatively, you can pull it from the central Maven repositories:
63+
64+
```xml
65+
<dependency>
66+
<groupId>commons-jxpath</groupId>
67+
<artifactId>commons-jxpath</artifactId>
68+
<version>1.3</version>
69+
</dependency>
70+
```
71+
72+
Contributing
73+
------------
74+
75+
We accept Pull Requests via GitHub. The [developer mailing list][ml] is the main channel of communication for contributors.
76+
There are some guidelines which will make applying PRs easier for us:
77+
+ No tabs! Please use spaces for indentation.
78+
+ Respect the code style.
79+
+ Create minimal diffs - disable on save actions like reformat source code or organize imports. If you feel the source code should be reformatted create a separate PR for this change.
80+
+ Provide JUnit tests for your changes and make sure your changes don't break any existing tests by running ```mvn clean test```.
81+
82+
If you plan to contribute on a regular basis, please consider filing a [contributor license agreement](https://www.apache.org/licenses/#clas).
83+
You can learn more about contributing via GitHub in our [contribution guidelines](CONTRIBUTING.md).
84+
85+
License
86+
-------
87+
This code is under the [Apache Licence v2](https://www.apache.org/licenses/LICENSE-2.0).
88+
89+
See the `NOTICE.txt` file for required notices and attributions.
90+
91+
Donations
92+
---------
93+
You like Apache Commons JXPath? Then [donate back to the ASF](https://www.apache.org/foundation/contributing.html) to support the development.
94+
95+
Additional Resources
96+
--------------------
97+
98+
+ [Apache Commons Homepage](https://commons.apache.org/)
99+
+ [Apache Issue Tracker (JIRA)](https://issues.apache.org/jira/browse/JXPATH)
100+
+ [Apache Commons Twitter Account](https://twitter.com/ApacheCommons)
101+
+ `#apache-commons` IRC channel on `irc.freenode.org`
102+
103+
[ml]:https://commons.apache.org/mail-lists.html
Lines changed: 84 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -1,84 +1,84 @@
1-
/*
2-
* Licensed to the Apache Software Foundation (ASF) under one or more
3-
* contributor license agreements. See the NOTICE file distributed with
4-
* this work for additional information regarding copyright ownership.
5-
* The ASF licenses this file to You under the Apache License, Version 2.0
6-
* (the "License"); you may not use this file except in compliance with
7-
* the License. You may obtain a copy of the License at
8-
*
9-
* http://www.apache.org/licenses/LICENSE-2.0
10-
*
11-
* Unless required by applicable law or agreed to in writing, software
12-
* distributed under the License is distributed on an "AS IS" BASIS,
13-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14-
* See the License for the specific language governing permissions and
15-
* limitations under the License.
16-
*/
17-
package org.apache.commons.jxpath.issues;
18-
19-
import java.util.Iterator;
20-
21-
import org.apache.commons.jxpath.JXPathContext;
22-
import org.apache.commons.jxpath.Pointer;
23-
24-
import org.junit.jupiter.api.Test;
25-
26-
import static org.junit.jupiter.api.Assertions.assertEquals;
27-
28-
/**
29-
* Testcase proving JXPATH-118 issue with asPath() returning wrong names.
30-
*/
31-
public class JXPath118Test
32-
{
33-
34-
@Test
35-
public void testJXPATH118IssueWithAsPath() throws Exception
36-
{
37-
final Object contextBean = new SomeChildClass();
38-
final JXPathContext context = JXPathContext.newContext(contextBean);
39-
final Iterator<Pointer> iteratePointers = context.iteratePointers("//*");
40-
assertEquals("/bar", iteratePointers.next().asPath());
41-
assertEquals("/baz", iteratePointers.next().asPath());
42-
assertEquals("/foo", iteratePointers.next().asPath());
43-
}
44-
45-
public static class SomeChildClass
46-
{
47-
48-
private int foo = 1;
49-
private int bar = 2;
50-
private int baz = 3;
51-
52-
public int getFoo()
53-
{
54-
return foo;
55-
}
56-
57-
public void setFoo(final int foo)
58-
{
59-
this.foo = foo;
60-
}
61-
62-
public int getBar()
63-
{
64-
return bar;
65-
}
66-
67-
public void setBar(final int bar)
68-
{
69-
this.bar = bar;
70-
}
71-
72-
public int getBaz()
73-
{
74-
return baz;
75-
}
76-
77-
public void setBaz(final int baz)
78-
{
79-
this.baz = baz;
80-
}
81-
82-
}
83-
84-
}
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one or more
3+
* contributor license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright ownership.
5+
* The ASF licenses this file to You under the Apache License, Version 2.0
6+
* (the "License"); you may not use this file except in compliance with
7+
* the License. You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
17+
package org.apache.commons.jxpath.issues;
18+
19+
import java.util.Iterator;
20+
21+
import org.apache.commons.jxpath.JXPathContext;
22+
import org.apache.commons.jxpath.Pointer;
23+
24+
import org.junit.jupiter.api.Test;
25+
26+
import static org.junit.jupiter.api.Assertions.assertEquals;
27+
28+
/**
29+
* Testcase proving JXPATH-118 issue with asPath() returning wrong names.
30+
*/
31+
public class JXPath118Test
32+
{
33+
34+
@Test
35+
public void testJXPATH118IssueWithAsPath() throws Exception
36+
{
37+
final Object contextBean = new SomeChildClass();
38+
final JXPathContext context = JXPathContext.newContext(contextBean);
39+
final Iterator<Pointer> iteratePointers = context.iteratePointers("//*");
40+
assertEquals("/bar", iteratePointers.next().asPath());
41+
assertEquals("/baz", iteratePointers.next().asPath());
42+
assertEquals("/foo", iteratePointers.next().asPath());
43+
}
44+
45+
public static class SomeChildClass
46+
{
47+
48+
private int foo = 1;
49+
private int bar = 2;
50+
private int baz = 3;
51+
52+
public int getFoo()
53+
{
54+
return foo;
55+
}
56+
57+
public void setFoo(final int foo)
58+
{
59+
this.foo = foo;
60+
}
61+
62+
public int getBar()
63+
{
64+
return bar;
65+
}
66+
67+
public void setBar(final int bar)
68+
{
69+
this.bar = bar;
70+
}
71+
72+
public int getBaz()
73+
{
74+
return baz;
75+
}
76+
77+
public void setBaz(final int baz)
78+
{
79+
this.baz = baz;
80+
}
81+
82+
}
83+
84+
}

0 commit comments

Comments
 (0)