Skip to content

Commit 5636c2f

Browse files
#965 - Remove the exposed serialize method as it is not necessary
1 parent c8cbd40 commit 5636c2f

File tree

4 files changed

+1
-14
lines changed

4 files changed

+1
-14
lines changed

marklogic-client-api/src/main/java/com/marklogic/client/impl/OkHttpServices.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -2983,7 +2983,7 @@ public <R extends UrisReadHandle> R uris(RequestLogger reqlog, Transaction trans
29832983
qtextMessage = " and string query \"" + text + "\"";
29842984
}
29852985
if (qdef instanceof RawCtsQueryDefinition) {
2986-
String structure = ((RawCtsQueryDefinition) qdef).serialize();
2986+
String structure = qdef instanceof RawQueryDefinitionImpl.CtsQuery ? ((RawQueryDefinitionImpl.CtsQuery) qdef).serialize() : "";
29872987
logger.debug("Query uris with raw cts query {}{}", structure, qtextMessage);
29882988

29892989
CtsQueryWriteHandle input = ((RawCtsQueryDefinition) qdef).getHandle();

marklogic-client-api/src/main/java/com/marklogic/client/impl/RawQueryDefinitionImpl.java

-1
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,6 @@ public CtsQuery(CtsQueryWriteHandle handle, String optionsName) {
9898
setOptionsName(optionsName);
9999
}
100100

101-
@Override
102101
public String serialize() {
103102
if (getHandle() == null) return "";
104103
return HandleAccessor.contentAsString(getHandle());

marklogic-client-api/src/main/java/com/marklogic/client/query/RawCtsQueryDefinition.java

-7
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,4 @@ public interface RawCtsQueryDefinition extends QueryDefinition, ValueQueryDefini
6161
* @return the query definition.
6262
*/
6363
RawCtsQueryDefinition withHandle(CtsQueryWriteHandle handle);
64-
65-
/**
66-
* Returns the Cts query definition as a serialized XML or JSON string.
67-
*
68-
* @return The serialized definition.
69-
*/
70-
String serialize();
7164
}

marklogic-client-api/src/test/java/com/marklogic/client/test/RawCtsQueryDefinitionTest.java

-5
Original file line numberDiff line numberDiff line change
@@ -234,12 +234,7 @@ public void testRawCtsQueryFromFileHandle() throws Exception {
234234

235235
assertXpathEvaluatesTo("1", "string(//*[local-name()='result'][last()]//@*[local-name()='index'])", resultDoc);
236236
assertXpathEvaluatesTo("0026", "string(//*[local-name()='result'][1]//*[local-name()='id' or local-name()='highlight'])", resultDoc);
237-
if(query instanceof RawCtsQueryDefinition && HandleAccessor.isResendable(((RawCtsQueryDefinition) query).getHandle())) {
238-
String str = ((RawCtsQueryDefinition)query).serialize();
239-
assertTrue(str.trim().contains(ctsQueryAsString.trim()));
240-
}
241237
}
242-
243238
}
244239

245240
@Test

0 commit comments

Comments
 (0)