You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by us...@apache.org on 2016/05/20 22:47:39 UTC
[1/2] lucene-solr:branch_6_0: SOLR-9115: Get rid of
javax.xml.bind.DatatypeConverter in Solr's SimplePostTool
Repository: lucene-solr
Updated Branches:
refs/heads/branch_6_0 9b04cd0d0 -> 1272c02ea
SOLR-9115: Get rid of javax.xml.bind.DatatypeConverter in Solr's SimplePostTool
# Conflicts:
# solr/CHANGES.txt
Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/24381c23
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/24381c23
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/24381c23
Branch: refs/heads/branch_6_0
Commit: 24381c23d5300143aa8e078ca662184fe179b6ab
Parents: 3709760
Author: Uwe Schindler <us...@apache.org>
Authored: Mon May 16 18:01:32 2016 +0200
Committer: Uwe Schindler <us...@apache.org>
Committed: Sat May 21 00:46:29 2016 +0200
----------------------------------------------------------------------
solr/CHANGES.txt | 3 +++
solr/core/src/java/org/apache/solr/util/SimplePostTool.java | 6 +++---
2 files changed, 6 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/24381c23/solr/CHANGES.txt
----------------------------------------------------------------------
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index e02f40b..fd9e137 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -91,6 +91,9 @@ Other Changes
* SOLR-9053: Upgrade commons-fileupload to 1.3.1, fixing a potential vulnerability (Jeff Field, Mike Drob via janhoy)
+* SOLR-9115: Get rid of javax.xml.bind.DatatypeConverter in SimplePostTool
+ for Java 9 compatibility. (Uwe Schindler)
+
================== 6.0.0 ==================
Consult the LUCENE_CHANGES.txt file for additional, low level, changes in this release
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/24381c23/solr/core/src/java/org/apache/solr/util/SimplePostTool.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/util/SimplePostTool.java b/solr/core/src/java/org/apache/solr/util/SimplePostTool.java
index 448897a..10e3eb4 100644
--- a/solr/core/src/java/org/apache/solr/util/SimplePostTool.java
+++ b/solr/core/src/java/org/apache/solr/util/SimplePostTool.java
@@ -16,7 +16,6 @@
*/
package org.apache.solr.util;
-import javax.xml.bind.DatatypeConverter;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.xpath.XPath;
@@ -45,6 +44,7 @@ import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
+import java.util.Base64;
import java.util.Date;
import java.util.HashMap;
import java.util.HashSet;
@@ -852,7 +852,7 @@ public class SimplePostTool {
if(mockMode) return;
HttpURLConnection urlc = (HttpURLConnection) url.openConnection();
if (url.getUserInfo() != null) {
- String encoding = DatatypeConverter.printBase64Binary(url.getUserInfo().getBytes(StandardCharsets.US_ASCII));
+ String encoding = Base64.getEncoder().encodeToString(url.getUserInfo().getBytes(StandardCharsets.US_ASCII));
urlc.setRequestProperty("Authorization", "Basic " + encoding);
}
urlc.connect();
@@ -887,7 +887,7 @@ public class SimplePostTool {
urlc.setAllowUserInteraction(false);
urlc.setRequestProperty("Content-type", type);
if (url.getUserInfo() != null) {
- String encoding = DatatypeConverter.printBase64Binary(url.getUserInfo().getBytes(StandardCharsets.US_ASCII));
+ String encoding = Base64.getEncoder().encodeToString(url.getUserInfo().getBytes(StandardCharsets.US_ASCII));
urlc.setRequestProperty("Authorization", "Basic " + encoding);
}
if (null != length) urlc.setFixedLengthStreamingMode(length);
[2/2] lucene-solr:branch_6_0: Merge branch 'branch_6_0' of
https://git-wip-us.apache.org/repos/asf/lucene-solr into branch_6_0
Posted by us...@apache.org.
Merge branch 'branch_6_0' of https://git-wip-us.apache.org/repos/asf/lucene-solr into branch_6_0
Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/1272c02e
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/1272c02e
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/1272c02e
Branch: refs/heads/branch_6_0
Commit: 1272c02ea85f8f2e7aebde284322ee2e26d1f62e
Parents: 24381c2 9b04cd0
Author: Uwe Schindler <us...@apache.org>
Authored: Sat May 21 00:47:29 2016 +0200
Committer: Uwe Schindler <us...@apache.org>
Committed: Sat May 21 00:47:29 2016 +0200
----------------------------------------------------------------------
solr/CHANGES.txt | 2 ++
solr/core/src/java/org/apache/solr/search/HashQParserPlugin.java | 1 +
.../src/test/org/apache/solr/search/TestHashQParserPlugin.java | 4 ++--
3 files changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/1272c02e/solr/CHANGES.txt
----------------------------------------------------------------------