diff --git a/build.gradle b/build.gradle index e9c7110..9c9bf89 100644 --- a/build.gradle +++ b/build.gradle @@ -6,11 +6,11 @@ plugins { id 'java-library' id 'checkstyle' id 'jacoco' - id "com.github.spotbugs" version "6.1.11" + id "com.github.spotbugs" version "6.4.8" id 'com.adarshr.test-logger' version '4.0.0' - id "com.github.ben-manes.versions" version "0.52.0" - id 'org.sonatype.gradle.plugins.scan' version '3.1.1' - id "org.sonarqube" version "6.2.0.5505" + id "com.github.ben-manes.versions" version "0.53.0" + id 'org.sonatype.gradle.plugins.scan' version '3.1.4' + id "org.sonarqube" version "7.2.3.7755" id 'com.vanniktech.maven.publish' version '0.31.0' } @@ -33,15 +33,15 @@ repositories { } dependencies { - spotbugs 'com.github.spotbugs:spotbugs:4.9.3' + spotbugs 'com.github.spotbugs:spotbugs:4.9.8' - api 'com.squareup.retrofit2:retrofit:2.11.0' - api 'com.squareup.retrofit2:converter-jackson:2.11.0' - api 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.19.1' + api 'com.squareup.retrofit2:retrofit:3.0.0' + api 'com.squareup.retrofit2:converter-jackson:3.0.0' + api 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.21.1' // retrofit will not update these dependencies to fix vulnerabilities api 'com.squareup.okhttp3:okhttp:4.12.0' - api 'com.squareup.okio:okio:3.11.0' + api 'com.squareup.okio:okio:3.16.4' testImplementation platform('org.junit:junit-bom:5.12.2') testImplementation 'org.junit.jupiter:junit-jupiter-api' @@ -49,7 +49,7 @@ dependencies { testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine' testRuntimeOnly 'org.junit.platform:junit-platform-launcher:1.12.2' - testImplementation 'org.assertj:assertj-core:3.27.3' + testImplementation 'org.assertj:assertj-core:3.27.7' testImplementation 'com.google.code.bean-matchers:bean-matchers:0.14' } @@ -157,6 +157,6 @@ mavenPublishing { } wrapper { - gradleVersion = '8.14' + gradleVersion = '9.4.0' distributionType = Wrapper.DistributionType.ALL } diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 1b33c55..d997cfc 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 6514f91..5be30bb 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.14-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-9.4.0-all.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/gradlew b/gradlew index 23d15a9..0262dcb 100644 --- a/gradlew +++ b/gradlew @@ -1,7 +1,7 @@ #!/bin/sh # -# Copyright © 2015-2021 the original authors. +# Copyright © 2015 the original authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -57,7 +57,7 @@ # Darwin, MinGW, and NonStop. # # (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# https://github.com/gradle/gradle/blob/b631911858264c0b6e4d6603d677ff5218766cee/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # within the Gradle project. # # You can find Gradle at https://github.com/gradle/gradle/. @@ -114,7 +114,6 @@ case "$( uname )" in #( NONSTOP* ) nonstop=true ;; esac -CLASSPATH="\\\"\\\"" # Determine the Java command to use to start the JVM. @@ -172,7 +171,6 @@ fi # For Cygwin or MSYS, switch paths to Windows format before running java if "$cygwin" || "$msys" ; then APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) - CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) JAVACMD=$( cygpath --unix "$JAVACMD" ) @@ -212,7 +210,6 @@ DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' set -- \ "-Dorg.gradle.appname=$APP_BASE_NAME" \ - -classpath "$CLASSPATH" \ -jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \ "$@" diff --git a/gradlew.bat b/gradlew.bat index db3a6ac..c4bdd3a 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -70,11 +70,10 @@ goto fail :execute @rem Setup the command line -set CLASSPATH= @rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %* +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %* :end @rem End local scope for the variables with windows NT shell diff --git a/src/main/java/com/imsweb/seerapi/client/SeerApi.java b/src/main/java/com/imsweb/seerapi/client/SeerApi.java index 45712a1..26d4e56 100644 --- a/src/main/java/com/imsweb/seerapi/client/SeerApi.java +++ b/src/main/java/com/imsweb/seerapi/client/SeerApi.java @@ -97,6 +97,7 @@ private SeerApi(String baseUrl, final String apiKey) { * Return the internal ObjectMapper * @return an Objectmapper */ + @SuppressWarnings("deprecation") static ObjectMapper getMapper() { ObjectMapper mapper = new ObjectMapper(); diff --git a/src/test/java/com/imsweb/seerapi/client/disease/DiseaseTest.java b/src/test/java/com/imsweb/seerapi/client/disease/DiseaseTest.java index 6efadbb..9762415 100644 --- a/src/test/java/com/imsweb/seerapi/client/disease/DiseaseTest.java +++ b/src/test/java/com/imsweb/seerapi/client/disease/DiseaseTest.java @@ -89,7 +89,7 @@ void testDiseaseById() throws IOException { Disease disease = _DISEASE.getById("latest", "51f6cf58e3e27c3994bd5408").execute().body(); assertNotNull(disease); - assertEquals("Pure erythroid leukemia", disease.getName()); + assertEquals("Acute erythroid leukemia (AEL)", disease.getName()); assertEquals(Disease.Type.HEMATO, disease.getType()); assertEquals("9840/3", disease.getIcdO3Morphology()); assertFalse(disease.getSamePrimaries().isEmpty()); @@ -115,7 +115,7 @@ void testDiseaseById() throws IOException { assertNull(disease.getObsoleteNewCode()); assertEquals(1, disease.getAbstractorNote().size()); assertEquals(2, disease.getTreatment().size()); - assertNull(disease.getGenetics()); + assertNotNull(disease.getGenetics()); assertFalse(disease.getAlternateName().isEmpty()); assertEquals("Acute erythemia [OBS]", disease.getAlternateName().get(0).getValue()); assertTrue(disease.getIcdO2Morphology().contains("9840/3")); @@ -138,7 +138,7 @@ void testDiseaseById() throws IOException { assertNotNull(disease.getTransformFrom()); assertNull(disease.getTransformTo()); assertNotNull(disease.getImmunophenotype()); - assertEquals("Bone marrow biopsy", disease.getDiagnosisMethod().get(0).getValue()); + assertEquals("Cytogenetics", disease.getDiagnosisMethod().get(0).getValue()); assertEquals("See abstractor notes", disease.getModuleId().get(0).getValue()); assertNull(disease.getBiomarkers()); assertNull(disease.getTreatmentText()); @@ -175,8 +175,8 @@ void testDiseaseSearch() throws IOException { assertNotNull(results); assertEquals(25, results.getCount().longValue()); - assertEquals(5, results.getTotal().longValue()); - assertEquals(5, results.getResults().size()); + assertEquals(7, results.getTotal().longValue()); + assertEquals(7, results.getResults().size()); assertEquals(Collections.singletonList("basophilic"), results.getTerms()); search.setSiteCategory("BAD_VALUE"); @@ -211,8 +211,8 @@ void testDiseaseSearch() throws IOException { assertNotNull(results); assertEquals(25, results.getCount().longValue()); - assertEquals(6, results.getTotal().longValue()); - assertEquals(6, results.getResults().size()); + assertEquals(8, results.getTotal().longValue()); + assertEquals(8, results.getResults().size()); assertEquals(Collections.singletonList("basophilic"), results.getTerms()); } diff --git a/src/test/java/com/imsweb/seerapi/client/ndc/NdcTest.java b/src/test/java/com/imsweb/seerapi/client/ndc/NdcTest.java index 5133619..3d61ed2 100644 --- a/src/test/java/com/imsweb/seerapi/client/ndc/NdcTest.java +++ b/src/test/java/com/imsweb/seerapi/client/ndc/NdcTest.java @@ -43,7 +43,7 @@ void testNdcByCode() throws IOException { assertThat(product.getDosageFormName()).isEqualTo("CAPSULE"); assertThat(product.getRouteName()).containsExactly("ORAL"); assertThat(product.getStartMarketingDate()).isEqualTo("20021126"); - assertThat(product.getEndMarketingDate()).isNull(); + assertThat(product.getEndMarketingDate()).isEqualTo("20270731"); assertThat(product.getMarketingCategoryName()).isEqualTo("NDA"); assertThat(product.getApplicationNumber()).isEqualTo("NDA021411"); assertThat(product.getLabelerName()).isEqualTo("Eli Lilly and Company");