From commits-return-106387-archive-asf-public=cust-asf.ponee.io@lucene.apache.org Wed Feb 6 08:17:45 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 828BF18067C for ; Wed, 6 Feb 2019 09:17:44 +0100 (CET) Received: (qmail 43047 invoked by uid 500); 6 Feb 2019 08:17:43 -0000 Mailing-List: contact commits-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@lucene.apache.org Delivered-To: mailing list commits@lucene.apache.org Received: (qmail 42833 invoked by uid 99); 6 Feb 2019 08:17:43 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Feb 2019 08:17:43 +0000 Received: by gitbox.apache.org (ASF Mail Server at gitbox.apache.org, from userid 33) id A343380632; Wed, 6 Feb 2019 08:17:42 +0000 (UTC) Date: Wed, 06 Feb 2019 08:17:45 +0000 To: "commits@lucene.apache.org" Subject: [lucene-solr] 03/03: SOLR-12121: Use a different JSON parser for JWTAuthPluginTest after upgrade to Hadoop3 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit From: janhoy@apache.org In-Reply-To: <154944106236.1549.15990607363308192202@gitbox.apache.org> References: <154944106236.1549.15990607363308192202@gitbox.apache.org> X-Git-Host: gitbox.apache.org X-Git-Repo: lucene-solr X-Git-Refname: refs/heads/branch_8x X-Git-Reftype: branch X-Git-Rev: d28ec13b9a977e0fdf1bb10a0fe89c6cb2e2caad X-Git-NotificationType: diff X-Git-Multimail-Version: 1.5.dev Auto-Submitted: auto-generated Message-Id: <20190206081742.A343380632@gitbox.apache.org> This is an automated email from the ASF dual-hosted git repository. janhoy pushed a commit to branch branch_8x in repository https://gitbox.apache.org/repos/asf/lucene-solr.git commit d28ec13b9a977e0fdf1bb10a0fe89c6cb2e2caad Author: Jan Høydahl AuthorDate: Wed Feb 6 09:02:24 2019 +0100 SOLR-12121: Use a different JSON parser for JWTAuthPluginTest after upgrade to Hadoop3 --- solr/core/src/test/org/apache/solr/security/JWTAuthPluginTest.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/solr/core/src/test/org/apache/solr/security/JWTAuthPluginTest.java b/solr/core/src/test/org/apache/solr/security/JWTAuthPluginTest.java index 72a908e..10b049e 100644 --- a/solr/core/src/test/org/apache/solr/security/JWTAuthPluginTest.java +++ b/solr/core/src/test/org/apache/solr/security/JWTAuthPluginTest.java @@ -44,7 +44,6 @@ import org.junit.After; import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; -import org.mortbay.util.ajax.JSON; import static org.apache.solr.security.JWTAuthPlugin.JWTAuthenticationResponse.AuthCode.AUTZ_HEADER_PROBLEM; import static org.apache.solr.security.JWTAuthPlugin.JWTAuthenticationResponse.AuthCode.NO_AUTZ_HEADER; @@ -398,7 +397,7 @@ public class JWTAuthPluginTest extends SolrTestCaseJ4 { plugin.init(testConfig); String headerBase64 = plugin.generateAuthDataHeader(); String headerJson = new String(Base64.base64ToByteArray(headerBase64), StandardCharsets.UTF_8); - Map parsed = (Map) JSON.parse(headerJson); + Map parsed = (Map) Utils.fromJSONString(headerJson); assertEquals("solr:admin", parsed.get("scope")); assertEquals("http://acmepaymentscorp/oauth/auz/authorize", parsed.get("authorizationEndpoint")); assertEquals("solr-cluster", parsed.get("client_id"));