Skip to content

Commit 5742cd0

Browse files
committed
Merge branch 'release/0.0.13' into master/0.x
2 parents 3d8ac9b + 31b1d22 commit 5742cd0

17 files changed

Lines changed: 205 additions & 64 deletions

File tree

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# this name appears in the badge
2+
name: 'test'
3+
on:
4+
push:
5+
branches:
6+
- develop/0.x
7+
jobs:
8+
build:
9+
runs-on: ubuntu-18.04
10+
steps:
11+
- uses: actions/checkout@v1
12+
- name: Set up JDK 1.8
13+
uses: actions/setup-java@v1
14+
with:
15+
java-version: 1.8
16+
17+
- name: Download jq-1.5 and jq-1.6
18+
run: |
19+
mkdir -p $HOME/bin
20+
wget -O $HOME/bin/jq-1.5 https://github.com/stedolan/jq/releases/download/jq-1.5/jq-linux64
21+
wget -O $HOME/bin/jq-1.6 https://github.com/stedolan/jq/releases/download/jq-1.6/jq-linux64
22+
chmod +x $HOME/bin/jq-1.5 $HOME/bin/jq-1.6
23+
24+
- name: Configure Maven
25+
env:
26+
M2_SETTINGS_XML: ${{ secrets.M2_SETTINGS_XML }}
27+
run: |
28+
mkdir -p $HOME/.m2
29+
echo "$M2_SETTINGS_XML" > $HOME/.m2/settings.xml
30+
31+
- name: Build & Deploy
32+
run: 'PATH="$HOME/bin:$PATH" mvn clean deploy'

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ jackson-jq
33

44
[jq](http://stedolan.github.io/jq/) for Jackson JSON Processor
55

6-
[![CircleCI](https://circleci.com/gh/eiiches/jackson-jq/tree/develop.svg?style=shield)](https://circleci.com/gh/eiiches/jackson-jq/tree/develop)
6+
[![GitHub Actions](https://github.com/eiiches/jackson-jq/workflows/test/badge.svg?branch=develop%2F0.x)](https://github.com/eiiches/jackson-jq/actions)
77

88
Installation
99
------------
@@ -15,7 +15,7 @@ Just add jackson-jq in your pom.xml.
1515
<dependency>
1616
<groupId>net.thisptr</groupId>
1717
<artifactId>jackson-jq</artifactId>
18-
<version>0.0.12</version>
18+
<version>0.0.13</version>
1919
</dependency>
2020
</dependencies>
2121
```
@@ -211,7 +211,7 @@ Using jackson-jq-extra module
211211
<dependency>
212212
<groupId>net.thisptr</groupId>
213213
<artifactId>jackson-jq-extra</artifactId>
214-
<version>0.0.12</version>
214+
<version>0.0.13</version>
215215
</dependency>
216216
</dependencies>
217217
```

circle.yml

Lines changed: 0 additions & 11 deletions
This file was deleted.

jackson-jq-cli/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@
88
<parent>
99
<groupId>net.thisptr</groupId>
1010
<artifactId>jackson-jq-parent</artifactId>
11-
<version>0.0.12</version>
11+
<version>0.0.13</version>
1212
</parent>
1313

1414
<dependencies>
1515
<dependency>
1616
<groupId>net.thisptr</groupId>
1717
<artifactId>jackson-jq-extra</artifactId>
18-
<version>0.0.12</version>
18+
<version>0.0.13</version>
1919
</dependency>
2020
<dependency>
2121
<groupId>commons-cli</groupId>

jackson-jq-extra/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@
88
<parent>
99
<groupId>net.thisptr</groupId>
1010
<artifactId>jackson-jq-parent</artifactId>
11-
<version>0.0.12</version>
11+
<version>0.0.13</version>
1212
</parent>
1313

1414
<dependencies>
1515
<dependency>
1616
<groupId>net.thisptr</groupId>
1717
<artifactId>jackson-jq</artifactId>
18-
<version>0.0.12</version>
18+
<version>0.0.13</version>
1919
</dependency>
2020
</dependencies>
2121
</project>

jackson-jq/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<parent>
99
<groupId>net.thisptr</groupId>
1010
<artifactId>jackson-jq-parent</artifactId>
11-
<version>0.0.12</version>
11+
<version>0.0.13</version>
1212
</parent>
1313

1414
<dependencies>

jackson-jq/src/main/java/net/thisptr/jackson/jq/internal/misc/Pair.java

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,36 @@ public static <T, U> List<U> _2(final List<Pair<T, U>> items) {
3434
public String toString() {
3535
return String.format("(%s, %s)", _1, _2);
3636
}
37+
38+
@Override
39+
public int hashCode() {
40+
final int prime = 31;
41+
int result = 1;
42+
result = prime * result + ((_1 == null) ? 0 : _1.hashCode());
43+
result = prime * result + ((_2 == null) ? 0 : _2.hashCode());
44+
return result;
45+
}
46+
47+
@Override
48+
public boolean equals(final Object obj) {
49+
if (this == obj)
50+
return true;
51+
if (obj == null)
52+
return false;
53+
if (getClass() != obj.getClass())
54+
return false;
55+
@SuppressWarnings("rawtypes")
56+
final Pair other = (Pair) obj;
57+
if (_1 == null) {
58+
if (other._1 != null)
59+
return false;
60+
} else if (!_1.equals(other._1))
61+
return false;
62+
if (_2 == null) {
63+
if (other._2 != null)
64+
return false;
65+
} else if (!_2.equals(other._2))
66+
return false;
67+
return true;
68+
}
3769
}

jackson-jq/src/main/java/net/thisptr/jackson/jq/internal/tree/ForeachExpression.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public List<JsonNode> apply(final Scope scope, final JsonNode in) throws JsonQue
5757
}
5858
accumulators[0] = newaccumulator;
5959
}
60-
}, stack, true);
60+
}, stack);
6161
}
6262
}
6363

jackson-jq/src/main/java/net/thisptr/jackson/jq/internal/tree/PipedQuery.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ private static void applyRecursive(final Scope scope, final JsonNode in, final L
5050
scope2.setValue(var._1, var._2);
5151
}
5252
applyRecursive(scope2, in, out, qs.subList(1, qs.size()));
53-
}, accumulate, true);
53+
}, accumulate);
5454
} else {
5555
applyRecursive(scope2, o, out, qs.subList(1, qs.size()));
5656
}

jackson-jq/src/main/java/net/thisptr/jackson/jq/internal/tree/ReduceExpression.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public List<JsonNode> apply(final Scope scope, final JsonNode in) throws JsonQue
5353
// We only use the last value from reduce expression.
5454
final List<JsonNode> reduceResult = reduceExpr.apply(childScope, accumulators[0]);
5555
accumulators[0] = reduceResult.isEmpty() ? NullNode.getInstance() : reduceResult.get(reduceResult.size() - 1);
56-
}, stack, true);
56+
}, stack);
5757
}
5858

5959
} finally {

0 commit comments

Comments
 (0)