diff --git a/azure-client-authentication/build.gradle b/azure-client-authentication/build.gradle
deleted file mode 100644
index 4a4dc2ec9b..0000000000
--- a/azure-client-authentication/build.gradle
+++ /dev/null
@@ -1,98 +0,0 @@
-buildscript {
- repositories {
- jcenter()
- }
- dependencies {
- classpath 'com.github.jengelman.gradle.plugins:shadow:1.2.2'
- }
-}
-
-apply plugin: 'java'
-apply plugin: 'checkstyle'
-
-version = '1.0.0-beta6-SNAPSHOT'
-
-checkstyle {
- toolVersion = "6.18"
- configFile = new File("$rootDir/src/client/Java/build-tools/src/main/resources/checkstyle.xml")
- configProperties = [samedir: "$rootDir/src/client/Java/build-tools/src/main/resources"]
- reportsDir = new File("$rootDir/src/client/Java/build-tools/reports")
-}
-
-dependencies {
- compile 'com.microsoft.azure:adal4j:1.1.2'
- compile 'com.microsoft.azure:azure-client-runtime:1.0.0-beta6-SNAPSHOT'
- testCompile 'junit:junit:4.12'
- testCompile 'junit:junit-dep:4.11'
- deployerJars "org.apache.maven.wagon:wagon-ftp:2.10"
-}
-
-uploadArchives {
- repositories {
- mavenDeployer {
- configuration = configurations.deployerJars
- snapshotRepository(url: "ftp://waws-prod-bay-005.ftp.azurewebsites.windows.net/site/wwwroot/") {
- authentication(userName: username, password: password)
- }
- repository(url: "file://$buildDir/repository")
- pom.setArtifactId "azure-client-authentication"
- pom.project {
- name 'Microsoft Azure AutoRest Authentication Library for Java'
- description 'This is the authentication library for AutoRest generated Azure Java clients.'
- url 'https://github.com/Azure/autorest'
-
- scm {
- url 'scm:git:https://github.com/Azure/AutoRest'
- connection 'scm:git:git://github.com/Azure/AutoRest.git'
- }
-
- licenses {
- license {
- name 'The MIT License (MIT)'
- url 'http://opensource.org/licenses/MIT'
- distribution 'repo'
- }
- }
-
- developers {
- developer {
- id 'microsoft'
- name 'Microsoft'
- }
- }
- }
- }
- }
-}
-
-test {
- testLogging {
- events "passed", "skipped", "failed", "standardError"
- }
-}
-
-javadoc {
- options.encoding = 'UTF-8'
-}
-
-task sourcesJar(type: Jar, dependsOn:classes) {
- classifier = 'sources'
- from sourceSets.main.allSource
-}
-
-task javadocJar(type: Jar, dependsOn: [javadoc]) {
- classifier = 'javadoc'
- from javadoc.destinationDir
-}
-
-artifacts {
- archives sourcesJar
- archives javadocJar
-}
-
-test {
- reports.getHtml()
- reports.html.destination = file("$rootDir/TestResults/JavaAzureRuntime")
-}
-
-tasks.compileJava.dependsOn 'clean'
diff --git a/azure-client-runtime/build.gradle b/azure-client-runtime/build.gradle
deleted file mode 100644
index d630c30868..0000000000
--- a/azure-client-runtime/build.gradle
+++ /dev/null
@@ -1,96 +0,0 @@
-buildscript {
- repositories {
- jcenter()
- }
- dependencies {
- classpath 'com.github.jengelman.gradle.plugins:shadow:1.2.2'
- }
-}
-
-apply plugin: 'java'
-apply plugin: 'checkstyle'
-
-version = '1.0.0-beta6-SNAPSHOT'
-
-checkstyle {
- toolVersion = "6.18"
- configFile = new File("$rootDir/src/client/Java/build-tools/src/main/resources/checkstyle.xml")
- configProperties = [samedir: "$rootDir/src/client/Java/build-tools/src/main/resources"]
- reportsDir = new File("$rootDir/src/client/Java/build-tools/reports")
-}
-
-dependencies {
- compile 'com.microsoft.rest:client-runtime:1.0.0-beta6-SNAPSHOT'
- testCompile 'junit:junit:4.12'
- testCompile 'junit:junit-dep:4.11'
- deployerJars "org.apache.maven.wagon:wagon-ftp:2.10"
-}
-
-uploadArchives {
- repositories {
- mavenDeployer {
- configuration = configurations.deployerJars
- snapshotRepository(url: "ftp://waws-prod-bay-005.ftp.azurewebsites.windows.net/site/wwwroot/") {
- authentication(userName: username, password: password)
- }
- pom.setArtifactId "azure-client-runtime"
- pom.project {
- name 'Microsoft Azure AutoRest Runtime for Java'
- description 'This is the client runtime for AutoRest generated Azure Java clients.'
- url 'https://github.com/Azure/autorest'
-
- scm {
- url 'scm:git:https://github.com/Azure/AutoRest'
- connection 'scm:git:git://github.com/Azure/AutoRest.git'
- }
-
- licenses {
- license {
- name 'The MIT License (MIT)'
- url 'http://opensource.org/licenses/MIT'
- distribution 'repo'
- }
- }
-
- developers {
- developer {
- id 'microsoft'
- name 'Microsoft'
- }
- }
- }
- }
- }
-}
-
-test {
- testLogging {
- events "passed", "skipped", "failed", "standardError"
- }
-}
-
-javadoc {
- options.encoding = 'UTF-8'
-}
-
-task sourcesJar(type: Jar, dependsOn:classes) {
- classifier = 'sources'
- from sourceSets.main.allSource
-}
-
-task javadocJar(type: Jar, dependsOn: [javadoc]) {
- classifier = 'javadoc'
- from javadoc.destinationDir
-}
-
-artifacts {
- archives sourcesJar
- archives javadocJar
-}
-
-test {
- reports.getHtml()
- reports.html.destination = file("$rootDir/TestResults/JavaAzureRuntime")
-}
-
-tasks.compileJava.dependsOn 'clean'
diff --git a/client-runtime/build.gradle b/client-runtime/build.gradle
deleted file mode 100644
index 0dc07e21cd..0000000000
--- a/client-runtime/build.gradle
+++ /dev/null
@@ -1,109 +0,0 @@
-buildscript {
- repositories {
- jcenter()
- }
- dependencies {
- classpath 'com.github.jengelman.gradle.plugins:shadow:1.2.2'
- }
-}
-
-apply plugin: 'java'
-apply plugin: 'com.github.johnrengelman.shadow'
-apply plugin: 'checkstyle'
-
-group = 'com.microsoft.rest'
-version = '1.0.0-beta6-SNAPSHOT'
-
-checkstyle {
- toolVersion = "6.18"
- configFile = new File("$rootDir/src/client/Java/build-tools/src/main/resources/checkstyle.xml")
- configProperties = [samedir: "$rootDir/src/client/Java/build-tools/src/main/resources"]
- reportsDir = new File("$rootDir/src/client/Java/build-tools/reports")
-}
-
-dependencies {
- compile 'com.google.guava:guava:18.0'
- compile 'com.squareup.retrofit2:retrofit:2.0.2'
- compile 'com.squareup.okhttp3:okhttp:3.3.1'
- compile 'com.squareup.okhttp3:logging-interceptor:3.3.1'
- compile 'com.squareup.okhttp3:okhttp-urlconnection:3.3.1'
- compile 'com.squareup.retrofit2:converter-jackson:2.0.2'
- compile 'com.squareup.retrofit2:adapter-rxjava:2.0.2'
- compile 'io.reactivex:rxjava:1.1.8'
- compile 'com.fasterxml.jackson.datatype:jackson-datatype-joda:2.7.2'
- compile 'org.apache.commons:commons-lang3:3.4'
- testCompile 'junit:junit:4.12'
- testCompile 'junit:junit-dep:4.11'
- deployerJars "org.apache.maven.wagon:wagon-ftp:2.10"
-}
-
-uploadArchives {
- repositories {
- mavenDeployer {
- configuration = configurations.deployerJars
- snapshotRepository(url: "ftp://waws-prod-bay-005.ftp.azurewebsites.windows.net/site/wwwroot/") {
- authentication(userName: username, password: password)
- }
- repository(url: "file://$buildDir/repository")
- pom.project {
- name 'Microsoft AutoRest Runtime for Java'
- description 'This is the client runtime for AutoRest generated Java clients.'
- url 'https://github.com/Azure/autorest'
-
- scm {
- url 'scm:git:https://github.com/Azure/AutoRest'
- connection 'scm:git:git://github.com/Azure/AutoRest.git'
- }
-
- licenses {
- license {
- name 'The MIT License (MIT)'
- url 'http://opensource.org/licenses/MIT'
- distribution 'repo'
- }
- }
-
- developers {
- developer {
- id 'microsoft'
- name 'Microsoft'
- }
- }
- }
- }
- }
-}
-
-test {
- testLogging {
- events "passed", "skipped", "failed", "standardError"
- }
-}
-
-javadoc {
- options.encoding = 'UTF-8'
-}
-
-task sourcesJar(type: Jar, dependsOn:classes) {
- classifier = 'sources'
- from sourceSets.main.allSource
-}
-
-task javadocJar(type: Jar, dependsOn: [javadoc]) {
- classifier = 'javadoc'
- from javadoc.destinationDir
-}
-
-artifacts {
- archives sourcesJar
- archives javadocJar
-}
-
-test {
- reports.getHtml()
- reports.html.destination = file("$rootDir/TestResults/JavaRuntime")
-}
-
-tasks.compileJava.dependsOn 'clean'
-
-println sourceSets.main.runtimeClasspath.asPath
diff --git a/client-runtime/src/main/java/com/microsoft/rest/Validator.java b/client-runtime/src/main/java/com/microsoft/rest/Validator.java
index 0beb543878..2d65603d4b 100644
--- a/client-runtime/src/main/java/com/microsoft/rest/Validator.java
+++ b/client-runtime/src/main/java/com/microsoft/rest/Validator.java
@@ -48,11 +48,11 @@ public static void validate(Object parameter) throws IllegalArgumentException {
}
if (parameterToken.isPrimitive()
|| parameterType.isEnum()
- || parameterToken.isAssignableFrom(LocalDate.class)
- || parameterToken.isAssignableFrom(DateTime.class)
- || parameterToken.isAssignableFrom(String.class)
- || parameterToken.isAssignableFrom(DateTimeRfc1123.class)
- || parameterToken.isAssignableFrom(Period.class)) {
+ || parameterToken.isSupertypeOf(LocalDate.class)
+ || parameterToken.isSupertypeOf(DateTime.class)
+ || parameterToken.isSupertypeOf(String.class)
+ || parameterToken.isSupertypeOf(DateTimeRfc1123.class)
+ || parameterToken.isSupertypeOf(Period.class)) {
return;
}
@@ -86,13 +86,13 @@ public static void validate(Object parameter) throws IllegalArgumentException {
} else {
try {
Class> propertyType = property.getClass();
- if (TypeToken.of(List.class).isAssignableFrom(propertyType)) {
+ if (TypeToken.of(List.class).isSupertypeOf(propertyType)) {
List> items = (List>) property;
for (Object item : items) {
Validator.validate(item);
}
}
- else if (TypeToken.of(Map.class).isAssignableFrom(propertyType)) {
+ else if (TypeToken.of(Map.class).isSupertypeOf(propertyType)) {
Map, ?> entries = (Map, ?>) property;
for (Map.Entry, ?> entry : entries.entrySet()) {
Validator.validate(entry.getKey());
diff --git a/pom.xml b/pom.xml
index 9975df9aa7..52c6b46f1c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -56,7 +56,7 @@
com.google.guava
guava
- 18.0
+ 20.0
com.squareup.retrofit2