diff --git a/sdk/authorization/mgmt/pom.xml b/sdk/authorization/mgmt/pom.xml
index d99d1c323bcc..6420b3ab577c 100644
--- a/sdk/authorization/mgmt/pom.xml
+++ b/sdk/authorization/mgmt/pom.xml
@@ -51,11 +51,6 @@
azure-resourcemanager-resources
2.0.0-SNAPSHOT
-
- org.slf4j
- slf4j-simple
- test
-
org.junit.jupiter
junit-jupiter-engine
@@ -120,8 +115,8 @@
maven-compiler-plugin
3.8.1
- 1.8
- 1.8
+ 11
+ 11
true
true
@@ -130,6 +125,27 @@
+
+
+ org.apache.maven.plugins
+ maven-surefire-plugin
+ 3.0.0-M3
+
+ 1
+
+ **/Test*.java
+ **/*Test.java
+ **/*Tests.java
+ **/*TestCase.java
+
+
+ --patch-module com.azure.resourcemanager.resources=../../resources/mgmt/target/test-classes
+ --add-opens com.azure.resourcemanager.resources/com.azure.resourcemanager.resources.core=com.fasterxml.jackson.databind,com.azure.core
+ --add-exports com.azure.resourcemanager.resources/com.azure.resourcemanager.resources.core=ALL-UNNAMED,com.azure.resourcemanager.authorization
+ --add-reads com.azure.resourcemanager.resources=ALL-UNNAMED
+
+
+
diff --git a/sdk/authorization/mgmt/src/main/java/module-info.java b/sdk/authorization/mgmt/src/main/java/module-info.java
new file mode 100644
index 000000000000..3664561c1910
--- /dev/null
+++ b/sdk/authorization/mgmt/src/main/java/module-info.java
@@ -0,0 +1,15 @@
+module com.azure.resourcemanager.authorization {
+ requires transitive com.azure.core;
+ requires transitive com.azure.core.management;
+ requires com.azure.resourcemanager.resources;
+
+ exports com.azure.resourcemanager.authorization.models;
+ exports com.azure.resourcemanager.authorization;
+
+ opens com.azure.resourcemanager.authorization.models to
+ com.fasterxml.jackson.databind,
+ com.azure.core;
+ opens com.azure.resourcemanager.authorization.fluent.inner to
+ com.fasterxml.jackson.databind,
+ com.azure.core;
+}
diff --git a/sdk/management/pom.xml b/sdk/management/pom.xml
index a290e23ca8e7..5b72dc936f71 100644
--- a/sdk/management/pom.xml
+++ b/sdk/management/pom.xml
@@ -259,10 +259,10 @@
org.apache.maven.plugins
maven-compiler-plugin
- 3.1
+ 3.8.1
- 1.8
- 1.8
+ 11
+ 11
true
true
-Xlint:unchecked
@@ -274,7 +274,7 @@
maven-javadoc-plugin
3.1.1
- 1.8
+ 11
Azure SDK for Java Reference Documentation
Azure SDK for Java Reference Documentation
diff --git a/sdk/resources/mgmt/pom.xml b/sdk/resources/mgmt/pom.xml
index 0894610293ef..47356d174f6a 100644
--- a/sdk/resources/mgmt/pom.xml
+++ b/sdk/resources/mgmt/pom.xml
@@ -58,7 +58,6 @@
com.github.spotbugs
spotbugs-annotations
- true
org.slf4j
@@ -122,8 +121,8 @@
maven-compiler-plugin
3.8.1
- 1.8
- 1.8
+ 11
+ 11
true
true
diff --git a/sdk/resources/mgmt/src/main/java/com/azure/resourcemanager/AzureServiceClient.java b/sdk/resources/mgmt/src/main/java/com/azure/resourcemanager/AzureServiceClient.java
index db8fe10693d9..6abab6cfa537 100644
--- a/sdk/resources/mgmt/src/main/java/com/azure/resourcemanager/AzureServiceClient.java
+++ b/sdk/resources/mgmt/src/main/java/com/azure/resourcemanager/AzureServiceClient.java
@@ -28,7 +28,6 @@
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
-import javax.xml.bind.annotation.adapters.HexBinaryAdapter;
import java.io.IOException;
import java.lang.reflect.Type;
import java.net.NetworkInterface;
@@ -54,20 +53,6 @@ protected AzureServiceClient(HttpPipeline httpPipeline, AzureEnvironment environ
((AzureJacksonAdapter) serializerAdapter).serializer().registerModule(DateTimeDeserializer.getModule());
}
- /**
- * The default User-Agent header. Override this method to override the user agent.
- *
- * @return the user agent string.
- */
- public String userAgent() {
- return String.format("Azure-SDK-For-Java/%s OS:%s MacAddressHash:%s Java:%s",
- getClass().getPackage().getImplementationVersion(),
- OS,
- MAC_ADDRESS_HASH,
- JAVA_VERSION);
- }
-
- private static final String MAC_ADDRESS_HASH;
private static final String OS;
private static final String OS_NAME;
private static final String OS_VERSION;
@@ -78,22 +63,6 @@ public String userAgent() {
OS_NAME = System.getProperty("os.name");
OS_VERSION = System.getProperty("os.version");
OS = OS_NAME + "/" + OS_VERSION;
- String macAddress = "Unknown";
- try {
- Enumeration networks = NetworkInterface.getNetworkInterfaces();
- while (networks.hasMoreElements()) {
- NetworkInterface network = networks.nextElement();
- byte[] mac = network.getHardwareAddress();
-
- if (mac != null) {
- macAddress = getSha256(mac);
- break;
- }
- }
- } catch (Throwable t) {
- // It's okay ignore mac address hash telemetry
- }
- MAC_ADDRESS_HASH = macAddress;
String version = System.getProperty("java.version");
JAVA_VERSION = version != null ? version : "Unknown";
}
@@ -165,17 +134,6 @@ private Mono>> activationOperation(Mono extends Resp
return lroInit.flatMap(fluxSimpleResponse -> Mono.just(fluxSimpleResponse));
}
- private static String getSha256(byte[] bytes) {
- MessageDigest messageDigest;
- try {
- messageDigest = MessageDigest.getInstance("SHA-256");
- return new HexBinaryAdapter().marshal(messageDigest.digest(bytes));
- } catch (NoSuchAlgorithmException e) {
- e.printStackTrace();
- }
- return "Unknown";
- }
-
/**
* Gets the final result, or an error, based on last async poll response.
*
diff --git a/sdk/resources/mgmt/src/main/java/module-info.java b/sdk/resources/mgmt/src/main/java/module-info.java
new file mode 100644
index 000000000000..c28b0e1a1b6a
--- /dev/null
+++ b/sdk/resources/mgmt/src/main/java/module-info.java
@@ -0,0 +1,28 @@
+module com.azure.resourcemanager.resources {
+ requires transitive com.azure.core;
+ requires transitive com.azure.core.management;
+ requires com.github.spotbugs.annotations;
+
+ exports com.azure.resourcemanager.resources.fluentcore.collection;
+ exports com.azure.resourcemanager.resources.fluentcore.arm.collection;
+ exports com.azure.resourcemanager.resources.fluentcore.arm.models;
+ exports com.azure.resourcemanager.resources.fluentcore.model;
+ exports com.azure.resourcemanager;
+ exports com.azure.resourcemanager.resources.fluentcore.model.implementation;
+ exports com.azure.resourcemanager.resources.fluentcore.arm.collection.implementation;
+ exports com.azure.resourcemanager.resources.models;
+ exports com.azure.resourcemanager.resources.fluentcore.utils;
+ exports com.azure.resourcemanager.resources.fluentcore.profile;
+ exports com.azure.resourcemanager.resources.fluentcore.arm;
+ exports com.azure.resourcemanager.resources.fluentcore.arm.implementation;
+ exports com.azure.resourcemanager.resources.fluentcore.dag;
+ exports com.azure.resourcemanager.resources;
+ exports com.azure.resourcemanager.resources.fluent.inner;
+
+ opens com.azure.resourcemanager.resources.models to
+ com.fasterxml.jackson.databind,
+ com.azure.core;
+ opens com.azure.resourcemanager.resources.fluent.inner to
+ com.fasterxml.jackson.databind,
+ com.azure.core;
+}
diff --git a/sdk/resources/mgmt/src/test/java/com/azure/resourcemanager/resources/core/AuthFile.java b/sdk/resources/mgmt/src/test/java/com/azure/resourcemanager/resources/core/AuthFile.java
index 8810229e9c20..a3929e3ecf68 100644
--- a/sdk/resources/mgmt/src/test/java/com/azure/resourcemanager/resources/core/AuthFile.java
+++ b/sdk/resources/mgmt/src/test/java/com/azure/resourcemanager/resources/core/AuthFile.java
@@ -4,7 +4,6 @@
package com.azure.resourcemanager.resources.core;
import com.azure.core.credential.TokenCredential;
-import com.azure.core.implementation.TypeUtil;
import com.azure.core.management.AzureEnvironment;
import com.azure.core.management.serializer.AzureJacksonAdapter;
import com.azure.core.util.logging.ClientLogger;
@@ -21,7 +20,6 @@
import java.nio.file.Files;
import java.nio.file.Paths;
import java.util.HashMap;
-import java.util.Map;
import java.util.Properties;
/**
@@ -59,10 +57,10 @@ static AuthFile parse(File file) throws IOException {
AuthFile authFile;
if (isJsonBased(content)) {
authFile = ADAPTER.deserialize(content, AuthFile.class, SerializerEncoding.JSON);
- Map endpoints = ADAPTER.deserialize(content,
- TypeUtil.createParameterizedType(Map.class, String.class, String.class),
- SerializerEncoding.JSON);
- authFile.environment.endpoints().putAll(endpoints);
+// Map endpoints = ADAPTER.deserialize(content,
+// TypeUtil.createParameterizedType(Map.class, String.class, String.class),
+// SerializerEncoding.JSON);
+// authFile.environment.endpoints().putAll(endpoints);
} else {
// Set defaults
Properties authSettings = new Properties();
diff --git a/sdk/resources/mgmt/src/test/java/com/azure/resourcemanager/resources/core/RecordedHttpResponse.java b/sdk/resources/mgmt/src/test/java/com/azure/resourcemanager/resources/core/RecordedHttpResponse.java
index e70e0ea06d49..0c1e955da044 100644
--- a/sdk/resources/mgmt/src/test/java/com/azure/resourcemanager/resources/core/RecordedHttpResponse.java
+++ b/sdk/resources/mgmt/src/test/java/com/azure/resourcemanager/resources/core/RecordedHttpResponse.java
@@ -6,7 +6,6 @@
import com.azure.core.http.HttpHeaders;
import com.azure.core.http.HttpRequest;
import com.azure.core.http.HttpResponse;
-import com.azure.core.implementation.http.BufferedHttpResponse;
import com.azure.core.util.FluxUtil;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
@@ -77,7 +76,7 @@ public Mono getBodyAsString(Charset charset) {
}
@Override
- public BufferedHttpResponse buffer() {
- return new BufferedHttpResponse(this);
+ public HttpResponse buffer() {
+ return this;
}
}