THRIFT-5553: use newer gradle API (#2561)
Prepare for moving to Gradle 7 by removing use of older Gradle directives
(except the use of maven; the transition to maven-publish is not included here)
diff --git a/tutorial/java/src/JavaClient.java b/tutorial/java/src/JavaClient.java
index 2e35d41..bd0a155 100644
--- a/tutorial/java/src/JavaClient.java
+++ b/tutorial/java/src/JavaClient.java
@@ -47,11 +47,11 @@
/*
* Similar to the server, you can use the parameters to setup client parameters or
* use the default settings. On the client side, you will need a TrustStore which
- * contains the trusted certificate along with the public key.
- * For this example it's a self-signed cert.
+ * contains the trusted certificate along with the public key.
+ * For this example it's a self-signed cert.
*/
TSSLTransportParameters params = new TSSLTransportParameters();
- params.setTrustStore("../../lib/java/test/.truststore", "thrift", "SunX509", "JKS");
+ params.setTrustStore("../../lib/java/test/resources/.truststore", "thrift", "SunX509", "JKS");
/*
* Get a client transport instead of a server transport. The connection is opened on
* invocation of the factory method, no need to specifically call open()
@@ -67,7 +67,7 @@
transport.close();
} catch (TException x) {
x.printStackTrace();
- }
+ }
}
private static void perform(Calculator.Client client) throws TException
diff --git a/tutorial/java/src/JavaServer.java b/tutorial/java/src/JavaServer.java
index 788473a..026889d 100644
--- a/tutorial/java/src/JavaServer.java
+++ b/tutorial/java/src/JavaServer.java
@@ -47,7 +47,7 @@
public void run() {
simple(processor);
}
- };
+ };
Runnable secure = new Runnable() {
public void run() {
secure(processor);
@@ -81,19 +81,19 @@
/*
* Use TSSLTransportParameters to setup the required SSL parameters. In this example
* we are setting the keystore and the keystore password. Other things like algorithms,
- * cipher suites, client auth etc can be set.
+ * cipher suites, client auth etc can be set.
*/
TSSLTransportParameters params = new TSSLTransportParameters();
// The Keystore contains the private key
- params.setKeyStore("../../lib/java/test/.keystore", "thrift", null, null);
+ params.setKeyStore("../../lib/java/test/resources/.keystore", "thrift", null, null);
/*
* Use any of the TSSLTransportFactory to get a server transport with the appropriate
* SSL configuration. You can use the default settings if properties are set in the command line.
* Ex: -Djavax.net.ssl.keyStore=.keystore and -Djavax.net.ssl.keyStorePassword=thrift
- *
+ *
* Note: You need not explicitly call open(). The underlying server socket is bound on return
- * from the factory class.
+ * from the factory class.
*/
TServerTransport serverTransport = TSSLTransportFactory.getServerSocket(9091, 0, null, params);
TServer server = new TSimpleServer(new Args(serverTransport).processor(processor));