From 8049a73b6eeee2d1d59d984e655635316f848b83 Mon Sep 17 00:00:00 2001 From: Andrew Carbonetto Date: Fri, 5 Jul 2024 19:51:27 -0700 Subject: [PATCH] Java: Minor readme update (#1840) * Java: rename CreateClient to createClient --------- Signed-off-by: Andrew Carbonetto Co-authored-by: aaron-congo --- java/README.md | 6 ++---- java/examples/src/main/java/glide/examples/ExamplesApp.java | 3 +-- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/java/README.md b/java/README.md index e8627e6556..684a2c8e3c 100644 --- a/java/README.md +++ b/java/README.md @@ -176,8 +176,7 @@ public class Main { .useTLS(useSsl) .build(); - try { - Glide client = GlideClient.CreateClient(config).get(); + try (GlideClient client = GlideClient.createClient(config).get()) { System.out.println("PING: " + client.ping(gs("PING")).get()); System.out.println("PING(found you): " + client.ping( gs("found you")).get()); @@ -227,8 +226,7 @@ public class Main { .useTLS(useSsl) .build(); - try { - GlideClusterClient client = GlideClusterClient.CreateClient(config).get(); + try (GlideClusterClient client = GlideClusterClient.createClient(config).get()) { System.out.println("PING: " + client.ping(gs("PING")).get()); System.out.println("PING(found you): " + client.ping( gs("found you")).get()); diff --git a/java/examples/src/main/java/glide/examples/ExamplesApp.java b/java/examples/src/main/java/glide/examples/ExamplesApp.java index fdd189626c..4d8b660ff8 100644 --- a/java/examples/src/main/java/glide/examples/ExamplesApp.java +++ b/java/examples/src/main/java/glide/examples/ExamplesApp.java @@ -24,8 +24,7 @@ private static void runGlideExamples() { .useTLS(useSsl) .build(); - try { - RedisClient client = RedisClient.createClient(config).get(); + try (RedisClient client = RedisClient.createClient(config).get()) { System.out.println("PING: " + client.ping().get()); System.out.println("PING(found you): " + client.ping("found you").get());