From 9cc400a0812036c46e7555c6e95f8bc5dbf7b8bf Mon Sep 17 00:00:00 2001 From: Gyuri Grell Date: Thu, 1 Mar 2018 20:50:00 -0500 Subject: [PATCH] Fixes #421 - Enum case doesn't match for Pull Request Reviews * Set Jackson to ignore case differences in enums. --- src/main/java/org/kohsuke/github/GitHub.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/org/kohsuke/github/GitHub.java b/src/main/java/org/kohsuke/github/GitHub.java index f7e0d58096..52a16906da 100644 --- a/src/main/java/org/kohsuke/github/GitHub.java +++ b/src/main/java/org/kohsuke/github/GitHub.java @@ -24,6 +24,7 @@ package org.kohsuke.github; import com.fasterxml.jackson.databind.DeserializationFeature; +import com.fasterxml.jackson.databind.MapperFeature; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.introspect.VisibilityChecker.Std; import com.infradna.tool.bridge_method_injector.WithBridgeMethods; @@ -909,6 +910,7 @@ public Reader renderMarkdown(String text) throws IOException { static { MAPPER.setVisibilityChecker(new Std(NONE, NONE, NONE, NONE, ANY)); MAPPER.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); + MAPPER.configure(MapperFeature.ACCEPT_CASE_INSENSITIVE_ENUMS, true); } /* package */ static final String GITHUB_URL = "https://api.github.com";