Skip to content

Commit 0a6e604

Browse files
committed
Removed factory methods that have been broken since 4.2.0
These don't work because they don't provide a security context. And since the 4.2.0 release and a change to OkHttpServices on 2019-01-07 that made a security context required, they haven't worked. I was going to deprecate them initially, but in the event that a pre 4.2.0 user upgrades directly to 6.1.0, I think a compile time error would be far better than waiting for either method to fail at runtime (and both are guaranteed to fail).
1 parent e5977c1 commit 0a6e604

File tree

3 files changed

+2
-53
lines changed

3 files changed

+2
-53
lines changed

marklogic-client-api-functionaltests/src/test/java/com/marklogic/client/fastfunctest/TestDatabaseAuthentication.java

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -51,25 +51,6 @@ public void teardown() throws Exception {
5151
setAuthenticationAndDefaultUser(restServerName, originalServerAuthentication, "nobody");
5252
}
5353

54-
@Test
55-
public void testAuthenticationNone()
56-
{
57-
System.out.println("Running testAuthenticationNone");
58-
if (!IsSecurityEnabled()) {
59-
setAuthenticationAndDefaultUser(restServerName, "application-level", "rest-admin");
60-
// connect the client
61-
StringBuilder str = new StringBuilder();
62-
try {
63-
// This does not need to specify basePath since it's expected to fail
64-
DatabaseClientFactory.newClient(getRestServerHostName(), getRestServerPort());
65-
} catch (Exception ex) {
66-
str.append(ex.getMessage());
67-
}
68-
assertEquals( "makeSecurityContext should only be called with BASIC or DIGEST Authentication",
69-
str.toString().trim());
70-
}
71-
}
72-
7354
@Test
7455
public void testAuthenticationBasic() throws IOException
7556
{

marklogic-client-api/src/main/java/com/marklogic/client/DatabaseClientFactory.java

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1258,37 +1258,6 @@ public static DatabaseClient newClient(Function<String, Object> propertySource)
12581258
return new DatabaseClientPropertySource(propertySource).newClient();
12591259
}
12601260

1261-
/**
1262-
* Creates a client to access the database by means of a REST server
1263-
* without any authentication. Such clients can be convenient for
1264-
* experimentation but should not be used in production.
1265-
*
1266-
* @param host the host with the REST server
1267-
* @param port the port for the REST server
1268-
* @return a new client for making database requests
1269-
*/
1270-
static public DatabaseClient newClient(String host, int port) {
1271-
return newClient(host, port, null, null, null, null, null, null);
1272-
}
1273-
1274-
/**
1275-
* Creates a client to access the database by means of a REST server
1276-
* without any authentication. Such clients can be convenient for
1277-
* experimentation but should not be used in production.
1278-
*
1279-
* A data service interface can only call an endpoint for the configured content database
1280-
* of the appserver. You cannot specify the database when constructing a client for working
1281-
* with a data service.
1282-
*
1283-
* @param host the host with the REST server
1284-
* @param port the port for the REST server
1285-
* @param database the database to access (default: configured database for the REST server)
1286-
* @return a new client for making database requests
1287-
*/
1288-
static public DatabaseClient newClient(String host, int port, String database) {
1289-
return newClient(host, port, database, null, null, null, null, null);
1290-
}
1291-
12921261
/**
12931262
* Creates a client to access the database by means of a REST server.
12941263
*

marklogic-client-api/src/main/java/com/marklogic/client/eval/ServerEvaluationCall.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
* for a server-side {@link #xquery xquery} or {@link #javascript javascript} eval or
3030
* invoke ({@link #modulePath modulePath}) call. ServerEvaluationCall also
3131
* conveniently has the eval* methods which execute those calls and return the
32-
* results. You must call one and only one of the following methods: xquery,
32+
* results. You must call one and only one of the following methods: xquery,
3333
* javascript, or modulePath. The xquery
3434
* and javascript methods initialize this call for server-side eval and accept
3535
* source code as a String or a TextWriteHandle (in case you are streaming the
@@ -89,8 +89,7 @@
8989
* }</pre>
9090
*
9191
* <p>Each call can be executed within a {@link #transaction transaction}, within a
92-
* {@link DatabaseClientFactory#newClient(String, int, String) particular database},
93-
* and with particular {@link #namespaceContext namespaces} available for expansion
92+
* particular database, and with particular {@link #namespaceContext namespaces} available for expansion
9493
* of prefixed variable names.</p>
9594
*
9695
* <p>Each call can be executed with only one expected response of a particular {@link

0 commit comments

Comments
 (0)