Skip to content

Commit 8b041a2

Browse files
committed
Merge branch 'release-5.5.2'
2 parents c6544ce + 5da9d8b commit 8b041a2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+1139
-459
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# CHANGELOG
22

3+
## 5.5.2
4+
#### New Functionality
5+
- [#1329](https://github.com/marklogic/java-client-api/issues/1329) - Inspect information about columns in the plan before execution - Server release 10.0-9 or above required
6+
7+
#### Improvements and Bug Fixes
8+
- [#1335](https://github.com/marklogic/java-client-api/issues/1335) - Project description on Maven Central corrected
9+
310
## 5.5.1
411
#### New Functionality
512
- [#1296](https://github.com/marklogic/java-client-api/issues/1296) - Type anyDocument support for data service - Server release 10.0-7 or above required

NOTICE.txt

Lines changed: 74 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MarkLogic® Java Client API
22

3-
Copyright © 2021 MarkLogic Corporation. MarkLogic and the MarkLogic logo are trademarks or registered trademarks of MarkLogic Corporation in the United States and other countries. All other trademarks are the property of their respective owners.
3+
Copyright © 2022 MarkLogic Corporation. MarkLogic and the MarkLogic logo are trademarks or registered trademarks of MarkLogic Corporation in the United States and other countries. All other trademarks are the property of their respective owners.
44

55
This project is licensed under the Apache License, Version 2.0 (the "License"); you may not use this project except in compliance with the License. You may obtain a copy of the License at
66

@@ -10,9 +10,8 @@ Unless required by applicable law or agreed to in writing, software distributed
1010

1111
To the extent required by the applicable open source license, a complete machine-readable copy of the source code corresponding to such code is available upon request. This offer is valid to anyone in receipt of this information and shall expire three years following the date of the final distribution of this product version by MarkLogic. To obtain such source code, send an email to legal@marklogic.com. Please specify the product and version for which you are requesting source code.
1212

13-
The following software may be included in this project (last updated September 17, 2021):
13+
The following software may be included in this project (last updated January 15, 2022):
1414

15-
1615
@angular-mdl/core 6.0.1
1716
Attribution Statements
1817
http://mseemann.io/angular2-mdl/
@@ -554,6 +553,17 @@ Copyright (C) 2017, The Apache Software Foundation
554553
License Text (http://spdx.org/licenses/Apache-2.0)
555554
Made available under the Apache License 2.0. See Appendix for full text.
556555

556+
Source materials are available for download at: https://github.com/apache/httpcomponents-client
557+
Apache HttpComponents™ HttpClient 4.5.13
558+
Attribution Statements
559+
http://hc.apache.org/httpcomponents-client
560+
561+
Copyright Statements
562+
Copyright (C) 2021, The Apache Software Foundation
563+
564+
License Text (http://www.apache.org/licenses/LICENSE-2.0.txt)
565+
Made available under the Apache License 2.0. See Appendix for full text.
566+
557567
Source materials are available for download at: https://github.com/apache/httpcomponents-client
558568
Apache HttpComponents™ HttpClient 4.5.3
559569
Attribution Statements
@@ -667,7 +677,7 @@ License Text (http://spdx.org/licenses/Apache-2.0)
667677
Made available under the Apache License 2.0. See Appendix for full text.
668678

669679
Source materials are available for download at: https://github.com/apache/jena/tree/master/jena-iri
670-
Apache Log4j 2™ 2.11
680+
Apache Log4j 2™ 2.17.1
671681
Attribution Statements
672682
https://logging.apache.org/log4j/2.x/
673683

@@ -687,7 +697,7 @@ picocli (http://picocli.info)
687697
Copyright 2017 Remko Popma
688698

689699
Copyright Statements
690-
Copyright (C) 2018, The Apache Software Foundation
700+
Copyright (C) 2022, The Apache Software Foundation
691701

692702
License Text (http://spdx.org/licenses/Apache-2.0.html)
693703
Made available under the Apache License 2.0. See Appendix for full text.
@@ -1787,6 +1797,17 @@ License Text (http://spdx.org/licenses/MIT)
17871797
Made available under the MIT License. See Appendix for full text.
17881798

17891799
Source materials are available for download at: https://github.com/trentm/node-bunyan
1800+
Cascader
1801+
Attribution Statements
1802+
https://github.com/react-component/cascader
1803+
1804+
Copyright Statements
1805+
Copyright (c) 2014-present alipay.com
1806+
1807+
License Text (http://spdx.org/licenses/MIT)
1808+
Made available under the MIT License. See Appendix for full text.
1809+
1810+
Source materials are available for download at: https://github.com/react-component/cascader
17901811
Chai 4.2.0
17911812
Attribution Statements
17921813
https://www.chaijs.com/
@@ -1992,6 +2013,17 @@ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
19922013
OF THE POSSIBILITY OF SUCH DAMAGE.
19932014

19942015
Source materials are available for download at: https://github.com/dom4j/dom4j
2016+
duplexify
2017+
Attribution Statements
2018+
https://github.com/mafintosh/duplexify
2019+
2020+
Copyright Statements
2021+
Copyright (c) 2014 Mathias Buus
2022+
2023+
License Text (http://spdx.org/licenses/MIT)
2024+
Made available under the MIT License. See Appendix for full text.
2025+
2026+
Source materials are available for download at: https://github.com/mafintosh/duplexify
19952027
EasyMock 3.4
19962028
Attribution Statements
19972029
http://easymock.org/
@@ -2951,7 +2983,18 @@ Copyright ©2009 FasterXML, LLC
29512983
License Text (http://spdx.org/licenses/Apache-2.0)
29522984
Made available under the Apache License 2.0. See Appendix for full text.
29532985

2954-
Source materials are available for download at: http://github.com/FasterXML/jackson
2986+
Source materials are available for download at: https://github.com/FasterXML/jackson-annotations
2987+
Jackson Annotations 2.11.0
2988+
Attribution Statements
2989+
http://wiki.fasterxml.com/JacksonHome
2990+
2991+
Copyright Statements
2992+
Copyright ©2009 FasterXML, LLC
2993+
2994+
License Text (http://spdx.org/licenses/Apache-2.0)
2995+
Made available under the Apache License 2.0. See Appendix for full text.
2996+
2997+
Source materials are available for download at: https://github.com/FasterXML/jackson-annotations
29552998
Jackson Core 2.10.3
29562999
Attribution Statements
29573000
http://wiki.fasterxml.com/JacksonHome
@@ -5705,6 +5748,17 @@ Copyright (c) 2004-2007 QOS.ch. All rights reserved.
57055748
License Text (http://spdx.org/licenses/MIT)
57065749
Made available under the MIT License. See Appendix for full text.
57075750

5751+
Source materials are available for download at: https://github.com/qos-ch/slf4j/tree/master/slf4j-api
5752+
SLF4J 1.7.32
5753+
Attribution Statements
5754+
http://www.slf4j.org
5755+
5756+
Copyright Statements
5757+
Copyright (c) 2004-2007 QOS.ch. All rights reserved.
5758+
5759+
License Text (http://spdx.org/licenses/MIT)
5760+
Made available under the MIT License. See Appendix for full text.
5761+
57085762
Source materials are available for download at: https://github.com/qos-ch/slf4j/tree/master/slf4j-api
57095763
SockJS-client 1.3.0
57105764
Attribution Statements
@@ -5762,6 +5816,17 @@ License Text (http://spdx.org/licenses/Apache-2.0)
57625816
Made available under the Apache License 2.0. See Appendix for full text.
57635817

57645818
Source materials are available for download at: https://github.com/spring-projects/spring-framework
5819+
Stream to Array
5820+
Attribution Statements
5821+
https://github.com/stream-utils/stream-to-array#readme
5822+
5823+
Copyright Statements
5824+
Copyright (c) 2014 Jonathan Ong me@jongleberry.com
5825+
5826+
License Text (http://spdx.org/licenses/MIT)
5827+
Made available under the MIT License. See Appendix for full text.
5828+
5829+
Source materials are available for download at: https://github.com/stream-utils/stream-to-array#readme
57655830
Sunlight 1.22.0
57665831
Attribution Statements
57675832
http://sunlightjs.com/
@@ -6250,6 +6315,7 @@ Made available under the MIT License. See Appendix for full text.
62506315

62516316
Source materials are available for download at: https://github.com/angular/zone.js
62526317

6318+
62536319

62546320
Appendix
62556321

@@ -6575,14 +6641,14 @@ Creative Commons may be contacted at http://creativecommons.org/.
65756641
Do What The F*ck You Want To Public License
65766642
https://spdx.org/licenses/WTFPL.html
65776643

6578-
DO WHAT THE F*CK YOU WANT TO PUBLIC LICENSE
6644+
DO WHAT THE F*CK YOU WANT TO PUBLIC LICENSE
65796645
Version 2, December 2004
65806646

65816647
Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>
65826648

65836649
Everyone is permitted to copy and distribute verbatim or modified copies of this license document, and changing it is allowed as long as the name is changed.
65846650

6585-
DO WHAT THE F*CK YOU WANT TO PUBLIC LICENSE
6651+
DO WHAT THE F*CK YOU WANT TO PUBLIC LICENSE
65866652
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
65876653

65886654
0. You just DO WHAT THE F*CK YOU WANT TO.

gradle.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
group=com.marklogic
2-
version=5.5.1
3-
releaseVersion=5.5.1
2+
version=5.5.2
3+
releaseVersion=5.5.2
44
describedName=MarkLogic Java Client API
55
publishUrl=file:../marklogic-java/releases

marklogic-client-api-functionaltests/src/test/java/com/marklogic/client/functionaltest/TestDocumentFormat.java

Lines changed: 95 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626

2727
import javax.xml.parsers.ParserConfigurationException;
2828

29+
import com.marklogic.client.Transaction;
2930
import org.custommonkey.xmlunit.exceptions.XpathException;
3031
import org.junit.AfterClass;
3132
import org.junit.BeforeClass;
@@ -48,11 +49,95 @@ public class TestDocumentFormat extends BasicJavaClientREST {
4849
private static String[] fNames = { "TestDocumentFormat-1" };
4950

5051
@BeforeClass
51-
public static void setUp() throws Exception
52-
{
52+
public static void setUp() throws Exception {
5353
System.out.println("In setup");
54-
5554
configureRESTServer(dbName, fNames);
55+
// Create a user with minimal privs and test doc exists in a transaction.
56+
createRESTUser("userInTrans", "x", "rest-writer");
57+
}
58+
59+
@Test
60+
public void testExistsInTransMinPrivs() throws KeyManagementException, NoSuchAlgorithmException, IOException, ParserConfigurationException, SAXException, XpathException
61+
{
62+
System.out.println("Running testExistsInTransMinPrivs");
63+
DatabaseClient client1 = null;
64+
try {
65+
String filename = "json-original.json";
66+
String uri1 = "/DocExistsInTransMinimalPriv/";
67+
68+
// user with minimal privs.
69+
client1 = getDatabaseClient("userInTrans", "x", getConnType());
70+
71+
// create doc manager
72+
DocumentManager docMgr1 = client1.newDocumentManager();
73+
Transaction t1 = client1.openTransaction();
74+
75+
File file = new File("src/test/java/com/marklogic/client/functionaltest/data/" + filename);
76+
77+
// create a handle on the content
78+
FileHandle handle = new FileHandle(file);
79+
handle.set(file);
80+
81+
handle.setFormat(Format.JSON);
82+
83+
// create docIds
84+
String docId1 = uri1 + filename;
85+
docMgr1.write(docId1, handle);
86+
String expectedUri1 = uri1 + filename;
87+
88+
String docUri1 = docMgr1.exists(expectedUri1, t1).getUri();
89+
assertEquals("URI is not found", expectedUri1, docUri1);
90+
t1.rollback();
91+
}
92+
catch(Exception ex) {
93+
System.out.println(ex.getMessage());
94+
} finally {
95+
// release the clients
96+
if (client1 != null)
97+
client1.release();
98+
}
99+
}
100+
101+
@Test
102+
public void testExistsInTransWithPrivs() throws KeyManagementException, NoSuchAlgorithmException, IOException, ParserConfigurationException, SAXException, XpathException
103+
{
104+
System.out.println("Running testExistsInTransWithPrivs");
105+
DatabaseClient client2 = null;
106+
try {
107+
String filename = "json-original.json";
108+
String uri2 = "/DocExistsTransWithPrivs/";
109+
110+
// user with privs.
111+
client2 = getDatabaseClient("rest-writer", "x", getConnType());
112+
113+
// create doc manager
114+
DocumentManager docMgr2 = client2.newDocumentManager();
115+
Transaction t2 = client2.openTransaction();
116+
117+
File file = new File("src/test/java/com/marklogic/client/functionaltest/data/" + filename);
118+
119+
// create a handle on the content
120+
FileHandle handle = new FileHandle(file);
121+
handle.set(file);
122+
123+
handle.setFormat(Format.JSON);
124+
125+
// create docIds
126+
String docId2 = uri2 + filename;
127+
docMgr2.write(docId2, handle);
128+
129+
String expectedUri2 = uri2 + filename;
130+
String docUri2 = docMgr2.exists(expectedUri2, t2).getUri();
131+
assertEquals("URI is not found", expectedUri2, docUri2);
132+
t2.rollback();
133+
}
134+
catch(Exception ex) {
135+
System.out.println(ex.getMessage());
136+
} finally {
137+
// release the clients
138+
if (client2 != null)
139+
client2.release();
140+
}
56141
}
57142

58143
@Test
@@ -118,8 +203,7 @@ public void testJSONFormatOnXML() throws KeyManagementException, NoSuchAlgorithm
118203
String exception = "";
119204
String expectedException = "";
120205

121-
try
122-
{
206+
try {
123207
docMgr.write(docId, handle);
124208
} catch (Exception e) {
125209
exception = e.toString();
@@ -405,13 +489,11 @@ public void testXMLFormatOnBinary() throws KeyManagementException, NoSuchAlgorit
405489
String exception = "";
406490
String expectedException = "";
407491

408-
try
409-
{
492+
try {
410493
docMgr.write(docId, handle);
411494
} catch (Exception e) {
412495
exception = e.toString();
413496
}
414-
415497
boolean isExceptionThrown = exception.contains(expectedException);
416498
assertTrue("Exception is not thrown", isExceptionThrown);
417499

@@ -447,8 +529,7 @@ public void testJSONFormatOnBinary() throws KeyManagementException, NoSuchAlgori
447529
String exception = "";
448530
String expectedException = "";
449531

450-
try
451-
{
532+
try {
452533
docMgr.write(docId, handle);
453534
} catch (Exception e) {
454535
exception = e.toString();
@@ -489,8 +570,7 @@ public void testTextFormatOnBinary() throws KeyManagementException, NoSuchAlgori
489570
String exception = "";
490571
String expectedException = "";
491572

492-
try
493-
{
573+
try {
494574
docMgr.write(docId, handle);
495575
} catch (Exception e) {
496576
exception = e.toString();
@@ -601,8 +681,7 @@ public void testJSONFormatOnText() throws KeyManagementException, NoSuchAlgorith
601681
String exception = "";
602682
String expectedException = "";
603683

604-
try
605-
{
684+
try {
606685
docMgr.write(docId, handle);
607686
} catch (Exception e) {
608687
exception = e.toString();
@@ -667,19 +746,14 @@ public void testNegativeJSONFormatWithDOMHandle() throws KeyManagementException,
667746

668747
Document readDoc = expectedXMLDocument(filename);
669748

670-
// File file = new
671-
// File("src/test/java/com/marklogic/client/functionaltest/data/" +
672-
// filename);
673-
674749
// create a handle on the content
675750
DOMHandle handle = new DOMHandle();
676751
handle.set(readDoc);
677752

678753
String exception = "";
679754
String expectedException = "java.lang.IllegalArgumentException: DOMHandle supports the XML format only";
680755

681-
try
682-
{
756+
try {
683757
handle.setFormat(Format.JSON);
684758
} catch (IllegalArgumentException e) {
685759
exception = e.toString();
@@ -697,5 +771,6 @@ public static void tearDown() throws Exception
697771
{
698772
System.out.println("In tear down");
699773
cleanupRESTServer(dbName, fNames);
774+
deleteRESTUser("userInTrans");
700775
}
701776
}

marklogic-client-api-functionaltests/src/test/java/com/marklogic/client/functionaltest/TestOpticOnLexicons.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,7 @@ public void testJoinInnerWithInnerDocfromLexicons() throws KeyManagementExceptio
416416
assertEquals("Element 3 (myCity) in date incorrect", "1999-04-22", jsonInnerDocNodes.get(2).path("myCity.date").path("value").asText());
417417
assertEquals("Element 4 (myCity) in date incorrect", "2006-06-23", jsonInnerDocNodes.get(3).path("myCity.date").path("value").asText());
418418

419-
// Verify lasst result, since records are ordered.
419+
// Verify last result, since records are ordered.
420420
assertEquals("Element 5 (myCity) in date incorrect", "2007-01-01", jsonInnerDocNodes.get(4).path("myCity.date").path("value").asText());
421421
assertEquals("Element 5 (myCity) in URI1 incorrect", "/optic/lexicon/test/doc1.json", jsonInnerDocNodes.get(4).path("myCity.uri1").path("value").asText());
422422
assertEquals("Element 5 (myCity) in distance incorrect", "50.4", jsonInnerDocNodes.get(4).path("myCity.distance").path("value").asText());

0 commit comments

Comments
 (0)