Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit d82af9f

Browse filesBrowse files
committed
Merge pull request hub4j#50 from pescuma/jackson
Updates Jackson to 2.2.3
2 parents bbc78ff + 4712d2c commit d82af9f
Copy full SHA for d82af9f

File tree

Expand file treeCollapse file tree

5 files changed

+35
-16
lines changed
Filter options
Expand file treeCollapse file tree

5 files changed

+35
-16
lines changed

‎pom.xml

Copy file name to clipboardExpand all lines: pom.xml
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,9 @@
6464
<scope>test</scope>
6565
</dependency>
6666
<dependency>
67-
<groupId>org.codehaus.jackson</groupId>
68-
<artifactId>jackson-mapper-asl</artifactId>
69-
<version>1.9.9</version>
67+
<groupId>com.fasterxml.jackson.core</groupId>
68+
<artifactId>jackson-databind</artifactId>
69+
<version>2.2.3</version>
7070
</dependency>
7171
<dependency>
7272
<groupId>commons-io</groupId>

‎src/main/java/org/kohsuke/github/GHEventInfo.java

Copy file name to clipboardExpand all lines: src/main/java/org/kohsuke/github/GHEventInfo.java
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
package org.kohsuke.github;
22

3-
import org.codehaus.jackson.node.ObjectNode;
4-
53
import java.io.IOException;
64
import java.util.Date;
75

6+
import com.fasterxml.jackson.databind.node.ObjectNode;
7+
88
/**
99
* Represents an event.
1010
*

‎src/main/java/org/kohsuke/github/GHIssue.java

Copy file name to clipboardExpand all lines: src/main/java/org/kohsuke/github/GHIssue.java
+20-2Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public class GHIssue {
4949
protected String closed_at;
5050
protected int comments;
5151
protected String body;
52-
protected List<String> labels;
52+
protected List<Label> labels;
5353
protected GHUser user;
5454
protected String title, created_at, html_url;
5555
protected GHIssue.PullRequest pull_request;
@@ -58,6 +58,24 @@ public class GHIssue {
5858
protected int id;
5959
protected GHUser closed_by;
6060

61+
public static class Label {
62+
private String url;
63+
private String name;
64+
private String color;
65+
66+
public String getUrl() {
67+
return url;
68+
}
69+
70+
public String getName() {
71+
return name;
72+
}
73+
74+
public String getColor() {
75+
return color;
76+
}
77+
}
78+
6179
/*package*/ GHIssue wrap(GHRepository owner) {
6280
this.owner = owner;
6381
this.root = owner.root;
@@ -111,7 +129,7 @@ public GHIssueState getState() {
111129
return Enum.valueOf(GHIssueState.class, state.toUpperCase(Locale.ENGLISH));
112130
}
113131

114-
public Collection<String> getLabels() {
132+
public Collection<Label> getLabels() {
115133
if(labels == null){
116134
return Collections.EMPTY_LIST;
117135
}

‎src/main/java/org/kohsuke/github/GHPullRequest.java

Copy file name to clipboardExpand all lines: src/main/java/org/kohsuke/github/GHPullRequest.java
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ public Date getMergedAt() {
118118
}
119119

120120
@Override
121-
public Collection<String> getLabels() {
121+
public Collection<Label> getLabels() {
122122
return super.getLabels();
123123
}
124124

‎src/main/java/org/kohsuke/github/GitHub.java

Copy file name to clipboardExpand all lines: src/main/java/org/kohsuke/github/GitHub.java
+9-8Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,7 @@
2323
*/
2424
package org.kohsuke.github;
2525

26-
import com.infradna.tool.bridge_method_injector.WithBridgeMethods;
27-
import org.apache.commons.codec.binary.Base64;
28-
import org.apache.commons.io.IOUtils;
29-
import org.codehaus.jackson.map.DeserializationConfig.Feature;
30-
import org.codehaus.jackson.map.ObjectMapper;
31-
import org.codehaus.jackson.map.introspect.VisibilityChecker.Std;
26+
import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.*;
3227

3328
import java.io.File;
3429
import java.io.FileInputStream;
@@ -47,7 +42,13 @@
4742
import java.util.Properties;
4843
import java.util.TimeZone;
4944

50-
import static org.codehaus.jackson.annotate.JsonAutoDetect.Visibility.*;
45+
import org.apache.commons.codec.binary.Base64;
46+
import org.apache.commons.io.IOUtils;
47+
48+
import com.fasterxml.jackson.databind.DeserializationFeature;
49+
import com.fasterxml.jackson.databind.ObjectMapper;
50+
import com.fasterxml.jackson.databind.introspect.VisibilityChecker.Std;
51+
import com.infradna.tool.bridge_method_injector.WithBridgeMethods;
5152

5253
/**
5354
* Root of the GitHub API.
@@ -397,7 +398,7 @@ public boolean isCredentialValid() throws IOException {
397398

398399
static {
399400
MAPPER.setVisibilityChecker(new Std(NONE, NONE, NONE, NONE, ANY));
400-
MAPPER.getDeserializationConfig().set(Feature.FAIL_ON_UNKNOWN_PROPERTIES, false);
401+
MAPPER.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
401402
}
402403

403404
private static final String GITHUB_URL = "https://api.github.com";

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.