From 1c772f10c9ce6d533d254ecb82800115b429a7bb Mon Sep 17 00:00:00 2001 From: Abhipsa Misra Date: Tue, 1 Sep 2020 18:08:23 -0700 Subject: [PATCH] revert async sample --- .../com/azure/digitaltwins/core/AsyncSample.java | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/AsyncSample.java b/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/AsyncSample.java index d1671a2006804..32762a1b61373 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/AsyncSample.java +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/samples/java/com/azure/digitaltwins/core/AsyncSample.java @@ -14,28 +14,19 @@ import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; -import com.nimbusds.jose.util.IOUtils; import reactor.core.publisher.Mono; -import java.io.IOException; -import java.io.InputStream; -import java.nio.charset.StandardCharsets; -import java.nio.file.Files; -import java.nio.file.Path; -import java.nio.file.Paths; import java.util.Arrays; import java.util.Random; import java.util.concurrent.Semaphore; import java.util.concurrent.TimeUnit; -import java.util.function.Consumer; -import java.util.stream.Stream; public class AsyncSample { private static final ObjectMapper mapper = new ObjectMapper(); private static final Random random = new Random(); - public static void main(String[] args) throws InterruptedException, IOException { + public static void main(String[] args) throws InterruptedException, JsonProcessingException { String tenantId = System.getenv("TENANT_ID"); String clientId = System.getenv("CLIENT_ID"); String clientSecret = System.getenv("CLIENT_SECRET"); @@ -72,8 +63,6 @@ public static void main(String[] args) throws InterruptedException, IOException .setCustomProperties("TemperatureUnit", "Celsius"); String dt_String = mapper.writeValueAsString(basicDigitalTwin); - System.out.println(">>>>" + dt_String); - Mono> sourceTwinWithResponseString = client.createDigitalTwinWithResponse(dtId_String, dt_String); sourceTwinWithResponseString.subscribe( result -> {