From 6099607843af9054f0d29943b1ab9391a66c1a23 Mon Sep 17 00:00:00 2001 From: Robert Kesterson Date: Fri, 28 Jul 2023 17:30:41 -0400 Subject: [PATCH] Updated for code review of PR 2717 --- cp.txt | 1 - .../model/ComponentProperty.java | 4 +- .../persistence/ComponentQueryManager.java | 8 ++-- .../v1/ComponentPropertyResource.java | 8 ++-- .../upgrade/v490/v490Updater.java | 43 ------------------- 5 files changed, 9 insertions(+), 55 deletions(-) delete mode 100644 cp.txt delete mode 100644 src/main/java/org/dependencytrack/upgrade/v490/v490Updater.java diff --git a/cp.txt b/cp.txt deleted file mode 100644 index 432a9a2162..0000000000 --- a/cp.txt +++ /dev/null @@ -1 +0,0 @@ -/Users/rkesters/.m2/repository/us/springett/alpine-common/2.2.1/alpine-common-2.2.1.jar:/Users/rkesters/.m2/repository/org/slf4j/slf4j-api/1.7.36/slf4j-api-1.7.36.jar:/Users/rkesters/.m2/repository/org/apache/commons/commons-lang3/3.12.0/commons-lang3-3.12.0.jar:/Users/rkesters/.m2/repository/com/fasterxml/jackson/core/jackson-annotations/2.14.1/jackson-annotations-2.14.1.jar:/Users/rkesters/.m2/repository/io/micrometer/micrometer-registry-prometheus/1.9.4/micrometer-registry-prometheus-1.9.4.jar:/Users/rkesters/.m2/repository/io/prometheus/simpleclient_common/0.15.0/simpleclient_common-0.15.0.jar:/Users/rkesters/.m2/repository/us/springett/alpine-model/2.2.1/alpine-model-2.2.1.jar:/Users/rkesters/.m2/repository/org/datanucleus/datanucleus-api-jdo/6.0.1/datanucleus-api-jdo-6.0.1.jar:/Users/rkesters/.m2/repository/org/datanucleus/datanucleus-core/6.0.3/datanucleus-core-6.0.3.jar:/Users/rkesters/.m2/repository/org/datanucleus/javax.jdo/3.2.1/javax.jdo-3.2.1.jar:/Users/rkesters/.m2/repository/javax/transaction/javax.transaction-api/1.3/javax.transaction-api-1.3.jar:/Users/rkesters/.m2/repository/org/glassfish/corba/glassfish-corba-omgapi/4.2.2/glassfish-corba-omgapi-4.2.2.jar:/Users/rkesters/.m2/repository/org/glassfish/jersey/ext/jersey-bean-validation/2.38/jersey-bean-validation-2.38.jar:/Users/rkesters/.m2/repository/org/glassfish/hk2/external/jakarta.inject/2.6.1/jakarta.inject-2.6.1.jar:/Users/rkesters/.m2/repository/org/glassfish/jersey/core/jersey-server/2.38/jersey-server-2.38.jar:/Users/rkesters/.m2/repository/jakarta/validation/jakarta.validation-api/2.0.2/jakarta.validation-api-2.0.2.jar:/Users/rkesters/.m2/repository/org/hibernate/validator/hibernate-validator/6.2.4.Final/hibernate-validator-6.2.4.Final.jar:/Users/rkesters/.m2/repository/org/jboss/logging/jboss-logging/3.4.1.Final/jboss-logging-3.4.1.Final.jar:/Users/rkesters/.m2/repository/com/fasterxml/classmate/1.5.1/classmate-1.5.1.jar:/Users/rkesters/.m2/repository/jakarta/el/jakarta.el-api/3.0.3/jakarta.el-api-3.0.3.jar:/Users/rkesters/.m2/repository/org/glassfish/jakarta.el/3.0.4/jakarta.el-3.0.4.jar:/Users/rkesters/.m2/repository/us/springett/alpine-infra/2.2.1/alpine-infra-2.2.1.jar:/Users/rkesters/.m2/repository/org/apache/commons/commons-collections4/4.4/commons-collections4-4.4.jar:/Users/rkesters/.m2/repository/org/datanucleus/datanucleus-rdbms/6.0.3/datanucleus-rdbms-6.0.3.jar:/Users/rkesters/.m2/repository/com/zaxxer/HikariCP/5.0.1/HikariCP-5.0.1.jar:/Users/rkesters/.m2/repository/org/javassist/javassist/3.29.2-GA/javassist-3.29.2-GA.jar:/Users/rkesters/.m2/repository/io/jsonwebtoken/jjwt/0.9.1/jjwt-0.9.1.jar:/Users/rkesters/.m2/repository/us/springett/alpine-server/2.2.1/alpine-server-2.2.1.jar:/Users/rkesters/.m2/repository/commons-io/commons-io/2.11.0/commons-io-2.11.0.jar:/Users/rkesters/.m2/repository/org/glassfish/jersey/core/jersey-client/2.38/jersey-client-2.38.jar:/Users/rkesters/.m2/repository/org/glassfish/jersey/containers/jersey-container-servlet/2.38/jersey-container-servlet-2.38.jar:/Users/rkesters/.m2/repository/org/glassfish/jersey/containers/jersey-container-servlet-core/2.38/jersey-container-servlet-core-2.38.jar:/Users/rkesters/.m2/repository/org/glassfish/jersey/media/jersey-media-json-jackson/2.38/jersey-media-json-jackson-2.38.jar:/Users/rkesters/.m2/repository/org/glassfish/jersey/ext/jersey-entity-filtering/2.38/jersey-entity-filtering-2.38.jar:/Users/rkesters/.m2/repository/com/fasterxml/jackson/module/jackson-module-jaxb-annotations/2.13.3/jackson-module-jaxb-annotations-2.13.3.jar:/Users/rkesters/.m2/repository/org/glassfish/jersey/media/jersey-media-multipart/2.38/jersey-media-multipart-2.38.jar:/Users/rkesters/.m2/repository/org/jvnet/mimepull/mimepull/1.9.15/mimepull-1.9.15.jar:/Users/rkesters/.m2/repository/org/glassfish/jersey/inject/jersey-hk2/2.38/jersey-hk2-2.38.jar:/Users/rkesters/.m2/repository/org/glassfish/hk2/hk2-locator/2.6.1/hk2-locator-2.6.1.jar:/Users/rkesters/.m2/repository/org/glassfish/hk2/external/aopalliance-repackaged/2.6.1/aopalliance-repackaged-2.6.1.jar:/Users/rkesters/.m2/repository/org/glassfish/hk2/hk2-api/2.6.1/hk2-api-2.6.1.jar:/Users/rkesters/.m2/repository/org/glassfish/hk2/hk2-utils/2.6.1/hk2-utils-2.6.1.jar:/Users/rkesters/.m2/repository/javax/xml/bind/jaxb-api/2.3.1/jaxb-api-2.3.1.jar:/Users/rkesters/.m2/repository/com/sun/xml/bind/jaxb-core/2.3.0.1/jaxb-core-2.3.0.1.jar:/Users/rkesters/.m2/repository/com/sun/xml/bind/jaxb-impl/2.3.6/jaxb-impl-2.3.6.jar:/Users/rkesters/.m2/repository/javax/json/javax.json-api/1.1.4/javax.json-api-1.1.4.jar:/Users/rkesters/.m2/repository/org/glassfish/javax.json/1.1.4/javax.json-1.1.4.jar:/Users/rkesters/.m2/repository/io/swagger/swagger-jersey2-jaxrs/1.6.9/swagger-jersey2-jaxrs-1.6.9.jar:/Users/rkesters/.m2/repository/io/swagger/swagger-jaxrs/1.6.9/swagger-jaxrs-1.6.9.jar:/Users/rkesters/.m2/repository/io/swagger/swagger-core/1.6.9/swagger-core-1.6.9.jar:/Users/rkesters/.m2/repository/com/fasterxml/jackson/dataformat/jackson-dataformat-yaml/2.14.0/jackson-dataformat-yaml-2.14.0.jar:/Users/rkesters/.m2/repository/io/swagger/swagger-models/1.6.9/swagger-models-1.6.9.jar:/Users/rkesters/.m2/repository/io/swagger/swagger-annotations/1.6.9/swagger-annotations-1.6.9.jar:/Users/rkesters/.m2/repository/org/reflections/reflections/0.10.2/reflections-0.10.2.jar:/Users/rkesters/.m2/repository/org/yaml/snakeyaml/1.33/snakeyaml-1.33.jar:/Users/rkesters/.m2/repository/com/h2database/h2/2.1.214/h2-2.1.214.jar:/Users/rkesters/.m2/repository/org/mindrot/jbcrypt/0.4/jbcrypt-0.4.jar:/Users/rkesters/.m2/repository/com/nimbusds/oauth2-oidc-sdk/10.7.1/oauth2-oidc-sdk-10.7.1.jar:/Users/rkesters/.m2/repository/com/github/stephenc/jcip/jcip-annotations/1.0-1/jcip-annotations-1.0-1.jar:/Users/rkesters/.m2/repository/com/nimbusds/content-type/2.2/content-type-2.2.jar:/Users/rkesters/.m2/repository/net/minidev/json-smart/2.4.10/json-smart-2.4.10.jar:/Users/rkesters/.m2/repository/net/minidev/accessors-smart/2.4.9/accessors-smart-2.4.9.jar:/Users/rkesters/.m2/repository/com/nimbusds/lang-tag/1.7/lang-tag-1.7.jar:/Users/rkesters/.m2/repository/com/nimbusds/nimbus-jose-jwt/9.30.2/nimbus-jose-jwt-9.30.2.jar:/Users/rkesters/.m2/repository/com/fasterxml/jackson/core/jackson-databind/2.14.1/jackson-databind-2.14.1.jar:/Users/rkesters/.m2/repository/com/fasterxml/jackson/jaxrs/jackson-jaxrs-base/2.14.1/jackson-jaxrs-base-2.14.1.jar:/Users/rkesters/.m2/repository/com/fasterxml/jackson/jaxrs/jackson-jaxrs-json-provider/2.14.1/jackson-jaxrs-json-provider-2.14.1.jar:/Users/rkesters/.m2/repository/com/fasterxml/jackson/datatype/jackson-datatype-jdk8/2.14.1/jackson-datatype-jdk8-2.14.1.jar:/Users/rkesters/.m2/repository/ch/qos/logback/logback-classic/1.2.11/logback-classic-1.2.11.jar:/Users/rkesters/.m2/repository/ch/qos/logback/logback-core/1.2.11/logback-core-1.2.11.jar:/Users/rkesters/.m2/repository/org/owasp/security-logging-common/1.1.7/security-logging-common-1.1.7.jar:/Users/rkesters/.m2/repository/org/owasp/security-logging-logback/1.1.7/security-logging-logback-1.1.7.jar:/Users/rkesters/.m2/repository/org/eclipse/microprofile/health/microprofile-health-api/3.1/microprofile-health-api-3.1.jar:/Users/rkesters/.m2/repository/org/owasp/encoder/encoder/1.2.3/encoder-1.2.3.jar:/Users/rkesters/.m2/repository/org/owasp/encoder/encoder-jsp/1.2.3/encoder-jsp-1.2.3.jar:/Users/rkesters/.m2/repository/com/sun/mail/jakarta.mail/1.6.7/jakarta.mail-1.6.7.jar:/Users/rkesters/.m2/repository/com/google/code/findbugs/jsr305/3.0.2/jsr305-3.0.2.jar:/Users/rkesters/.m2/repository/com/github/ben-manes/caffeine/caffeine/3.1.1/caffeine-3.1.1.jar:/Users/rkesters/.m2/repository/com/google/errorprone/error_prone_annotations/2.14.0/error_prone_annotations-2.14.0.jar:/Users/rkesters/.m2/repository/us/springett/cvss-calculator/1.4.1/cvss-calculator-1.4.1.jar:/Users/rkesters/.m2/repository/us/springett/owasp-risk-rating-calculator/1.0.1/owasp-risk-rating-calculator-1.0.1.jar:/Users/rkesters/.m2/repository/us/springett/cpe-parser/2.0.2/cpe-parser-2.0.2.jar:/Users/rkesters/.m2/repository/org/cyclonedx/cyclonedx-core-java/7.3.2/cyclonedx-core-java-7.3.2.jar:/Users/rkesters/.m2/repository/commons-codec/commons-codec/1.15/commons-codec-1.15.jar:/Users/rkesters/.m2/repository/com/fasterxml/jackson/dataformat/jackson-dataformat-xml/2.14.2/jackson-dataformat-xml-2.14.2.jar:/Users/rkesters/.m2/repository/com/networknt/json-schema-validator/1.0.77/json-schema-validator-1.0.77.jar:/Users/rkesters/.m2/repository/com/ethlo/time/itu/1.7.0/itu-1.7.0.jar:/Users/rkesters/.m2/repository/org/glassfish/jaxb/jaxb-runtime/2.3.6/jaxb-runtime-2.3.6.jar:/Users/rkesters/.m2/repository/jakarta/xml/bind/jakarta.xml.bind-api/2.3.3/jakarta.xml.bind-api-2.3.3.jar:/Users/rkesters/.m2/repository/org/glassfish/jaxb/txw2/2.3.6/txw2-2.3.6.jar:/Users/rkesters/.m2/repository/com/sun/istack/istack-commons-runtime/3.0.12/istack-commons-runtime-3.0.12.jar:/Users/rkesters/.m2/repository/com/sun/activation/jakarta.activation/1.2.2/jakarta.activation-1.2.2.jar:/Users/rkesters/.m2/repository/javax/activation/javax.activation-api/1.2.0/javax.activation-api-1.2.0.jar:/Users/rkesters/.m2/repository/org/json/json/20230227/json-20230227.jar:/Users/rkesters/.m2/repository/com/github/package-url/packageurl-java/1.4.1/packageurl-java-1.4.1.jar:/Users/rkesters/.m2/repository/org/apache/lucene/lucene-core/8.11.2/lucene-core-8.11.2.jar:/Users/rkesters/.m2/repository/org/apache/lucene/lucene-analyzers-common/8.11.2/lucene-analyzers-common-8.11.2.jar:/Users/rkesters/.m2/repository/org/apache/lucene/lucene-queryparser/8.11.2/lucene-queryparser-8.11.2.jar:/Users/rkesters/.m2/repository/org/apache/lucene/lucene-queries/8.11.2/lucene-queries-8.11.2.jar:/Users/rkesters/.m2/repository/org/apache/lucene/lucene-sandbox/8.11.2/lucene-sandbox-8.11.2.jar:/Users/rkesters/.m2/repository/io/pebbletemplates/pebble/3.2.0/pebble-3.2.0.jar:/Users/rkesters/.m2/repository/org/unbescape/unbescape/1.1.6.RELEASE/unbescape-1.1.6.RELEASE.jar:/Users/rkesters/.m2/repository/org/apache/httpcomponents/httpclient/4.5.14/httpclient-4.5.14.jar:/Users/rkesters/.m2/repository/org/apache/httpcomponents/httpcore/4.4.16/httpcore-4.4.16.jar:/Users/rkesters/.m2/repository/commons-logging/commons-logging/1.2/commons-logging-1.2.jar:/Users/rkesters/.m2/repository/oauth/signpost/signpost-core/2.1.1/signpost-core-2.1.1.jar:/Users/rkesters/.m2/repository/org/apache/httpcomponents/httpmime/4.5.14/httpmime-4.5.14.jar:/Users/rkesters/.m2/repository/com/fasterxml/woodstox/woodstox-core/6.5.0/woodstox-core-6.5.0.jar:/Users/rkesters/.m2/repository/org/codehaus/woodstox/stax2-api/4.2.1/stax2-api-4.2.1.jar:/Users/rkesters/.m2/repository/org/apache/maven/maven-artifact/3.9.1/maven-artifact-3.9.1.jar:/Users/rkesters/.m2/repository/org/codehaus/plexus/plexus-utils/3.5.1/plexus-utils-3.5.1.jar:/Users/rkesters/.m2/repository/com/microsoft/sqlserver/mssql-jdbc/11.2.3.jre17/mssql-jdbc-11.2.3.jre17.jar:/Users/rkesters/.m2/repository/mysql/mysql-connector-java/8.0.29/mysql-connector-java-8.0.29.jar:/Users/rkesters/.m2/repository/org/postgresql/postgresql/42.5.1/postgresql-42.5.1.jar:/Users/rkesters/.m2/repository/org/checkerframework/checker-qual/3.5.0/checker-qual-3.5.0.jar:/Users/rkesters/.m2/repository/xerces/xercesImpl/2.12.2/xercesImpl-2.12.2.jar:/Users/rkesters/.m2/repository/xml-apis/xml-apis/1.4.01/xml-apis-1.4.01.jar:/Users/rkesters/.m2/repository/org/apache/commons/commons-compress/1.23.0/commons-compress-1.23.0.jar:/Users/rkesters/.m2/repository/io/github/resilience4j/resilience4j-retry/2.0.2/resilience4j-retry-2.0.2.jar:/Users/rkesters/.m2/repository/io/github/resilience4j/resilience4j-core/2.0.2/resilience4j-core-2.0.2.jar:/Users/rkesters/.m2/repository/io/github/resilience4j/resilience4j-ratelimiter/2.0.2/resilience4j-ratelimiter-2.0.2.jar:/Users/rkesters/.m2/repository/io/github/resilience4j/resilience4j-micrometer/2.0.2/resilience4j-micrometer-2.0.2.jar:/Users/rkesters/.m2/repository/io/micrometer/micrometer-core/1.10.0/micrometer-core-1.10.0.jar:/Users/rkesters/.m2/repository/io/micrometer/micrometer-commons/1.10.0/micrometer-commons-1.10.0.jar:/Users/rkesters/.m2/repository/org/hdrhistogram/HdrHistogram/2.1.12/HdrHistogram-2.1.12.jar:/Users/rkesters/.m2/repository/org/latencyutils/LatencyUtils/2.0.3/LatencyUtils-2.0.3.jar:/Users/rkesters/.m2/repository/io/micrometer/micrometer-observation/1.10.0/micrometer-observation-1.10.0.jar:/Users/rkesters/.m2/repository/io/github/resilience4j/resilience4j-bulkhead/2.0.2/resilience4j-bulkhead-2.0.2.jar:/Users/rkesters/.m2/repository/io/github/resilience4j/resilience4j-circuitbreaker/2.0.2/resilience4j-circuitbreaker-2.0.2.jar:/Users/rkesters/.m2/repository/io/github/resilience4j/resilience4j-timelimiter/2.0.2/resilience4j-timelimiter-2.0.2.jar:/Users/rkesters/.m2/repository/org/slf4j/log4j-over-slf4j/2.0.7/log4j-over-slf4j-2.0.7.jar:/Users/rkesters/.m2/repository/junit/junit/4.13.2/junit-4.13.2.jar:/Users/rkesters/.m2/repository/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar:/Users/rkesters/.m2/repository/pl/pragmatists/JUnitParams/1.1.1/JUnitParams-1.1.1.jar:/Users/rkesters/.m2/repository/org/glassfish/jersey/test-framework/providers/jersey-test-framework-provider-grizzly2/2.38/jersey-test-framework-provider-grizzly2-2.38.jar:/Users/rkesters/.m2/repository/jakarta/servlet/jakarta.servlet-api/4.0.4/jakarta.servlet-api-4.0.4.jar:/Users/rkesters/.m2/repository/org/glassfish/jersey/test-framework/jersey-test-framework-core/2.38/jersey-test-framework-core-2.38.jar:/Users/rkesters/.m2/repository/org/glassfish/jersey/media/jersey-media-jaxb/2.38/jersey-media-jaxb-2.38.jar:/Users/rkesters/.m2/repository/org/glassfish/jersey/containers/jersey-container-grizzly2-http/2.38/jersey-container-grizzly2-http-2.38.jar:/Users/rkesters/.m2/repository/org/glassfish/grizzly/grizzly-http-server/2.4.4/grizzly-http-server-2.4.4.jar:/Users/rkesters/.m2/repository/org/glassfish/jersey/containers/jersey-container-grizzly2-servlet/2.38/jersey-container-grizzly2-servlet-2.38.jar:/Users/rkesters/.m2/repository/org/glassfish/grizzly/grizzly-http-servlet/2.4.4/grizzly-http-servlet-2.4.4.jar:/Users/rkesters/.m2/repository/org/junit/jupiter/junit-jupiter/5.9.1/junit-jupiter-5.9.1.jar:/Users/rkesters/.m2/repository/org/junit/jupiter/junit-jupiter-api/5.9.1/junit-jupiter-api-5.9.1.jar:/Users/rkesters/.m2/repository/org/opentest4j/opentest4j/1.2.0/opentest4j-1.2.0.jar:/Users/rkesters/.m2/repository/org/junit/platform/junit-platform-commons/1.9.1/junit-platform-commons-1.9.1.jar:/Users/rkesters/.m2/repository/org/apiguardian/apiguardian-api/1.1.2/apiguardian-api-1.1.2.jar:/Users/rkesters/.m2/repository/org/junit/jupiter/junit-jupiter-params/5.9.1/junit-jupiter-params-5.9.1.jar:/Users/rkesters/.m2/repository/org/junit/jupiter/junit-jupiter-engine/5.9.1/junit-jupiter-engine-5.9.1.jar:/Users/rkesters/.m2/repository/org/junit/platform/junit-platform-engine/1.9.1/junit-platform-engine-1.9.1.jar:/Users/rkesters/.m2/repository/org/hamcrest/hamcrest/2.2/hamcrest-2.2.jar:/Users/rkesters/.m2/repository/org/glassfish/jersey/connectors/jersey-grizzly-connector/2.38/jersey-grizzly-connector-2.38.jar:/Users/rkesters/.m2/repository/org/glassfish/grizzly/grizzly-http-client/1.16/grizzly-http-client-1.16.jar:/Users/rkesters/.m2/repository/org/glassfish/grizzly/grizzly-websockets/2.4.4/grizzly-websockets-2.4.4.jar:/Users/rkesters/.m2/repository/org/glassfish/grizzly/grizzly-framework/2.4.4/grizzly-framework-2.4.4.jar:/Users/rkesters/.m2/repository/org/glassfish/grizzly/grizzly-http/2.4.4/grizzly-http-2.4.4.jar:/Users/rkesters/.m2/repository/org/glassfish/grizzly/connection-pool/2.4.4/connection-pool-2.4.4.jar:/Users/rkesters/.m2/repository/org/glassfish/jersey/core/jersey-common/2.38/jersey-common-2.38.jar:/Users/rkesters/.m2/repository/jakarta/annotation/jakarta.annotation-api/1.3.5/jakarta.annotation-api-1.3.5.jar:/Users/rkesters/.m2/repository/org/glassfish/hk2/osgi-resource-locator/1.0.3/osgi-resource-locator-1.0.3.jar:/Users/rkesters/.m2/repository/jakarta/ws/rs/jakarta.ws.rs-api/2.1.6/jakarta.ws.rs-api-2.1.6.jar:/Users/rkesters/.m2/repository/org/mockito/mockito-core/5.1.1/mockito-core-5.1.1.jar:/Users/rkesters/.m2/repository/net/bytebuddy/byte-buddy/1.12.22/byte-buddy-1.12.22.jar:/Users/rkesters/.m2/repository/net/bytebuddy/byte-buddy-agent/1.12.22/byte-buddy-agent-1.12.22.jar:/Users/rkesters/.m2/repository/org/objenesis/objenesis/3.3/objenesis-3.3.jar:/Users/rkesters/.m2/repository/com/github/tomakehurst/wiremock-jre8/2.35.0/wiremock-jre8-2.35.0.jar:/Users/rkesters/.m2/repository/org/eclipse/jetty/jetty-server/9.4.49.v20220914/jetty-server-9.4.49.v20220914.jar:/Users/rkesters/.m2/repository/javax/servlet/javax.servlet-api/4.0.1/javax.servlet-api-4.0.1.jar:/Users/rkesters/.m2/repository/org/eclipse/jetty/jetty-http/9.4.49.v20220914/jetty-http-9.4.49.v20220914.jar:/Users/rkesters/.m2/repository/org/eclipse/jetty/jetty-io/9.4.49.v20220914/jetty-io-9.4.49.v20220914.jar:/Users/rkesters/.m2/repository/org/eclipse/jetty/jetty-servlet/9.4.49.v20220914/jetty-servlet-9.4.49.v20220914.jar:/Users/rkesters/.m2/repository/org/eclipse/jetty/jetty-security/9.4.49.v20220914/jetty-security-9.4.49.v20220914.jar:/Users/rkesters/.m2/repository/org/eclipse/jetty/jetty-util-ajax/9.4.49.v20220914/jetty-util-ajax-9.4.49.v20220914.jar:/Users/rkesters/.m2/repository/org/eclipse/jetty/jetty-servlets/9.4.49.v20220914/jetty-servlets-9.4.49.v20220914.jar:/Users/rkesters/.m2/repository/org/eclipse/jetty/jetty-continuation/9.4.49.v20220914/jetty-continuation-9.4.49.v20220914.jar:/Users/rkesters/.m2/repository/org/eclipse/jetty/jetty-util/9.4.49.v20220914/jetty-util-9.4.49.v20220914.jar:/Users/rkesters/.m2/repository/org/eclipse/jetty/jetty-webapp/9.4.49.v20220914/jetty-webapp-9.4.49.v20220914.jar:/Users/rkesters/.m2/repository/org/eclipse/jetty/jetty-xml/9.4.49.v20220914/jetty-xml-9.4.49.v20220914.jar:/Users/rkesters/.m2/repository/org/eclipse/jetty/jetty-proxy/9.4.49.v20220914/jetty-proxy-9.4.49.v20220914.jar:/Users/rkesters/.m2/repository/org/eclipse/jetty/jetty-client/9.4.49.v20220914/jetty-client-9.4.49.v20220914.jar:/Users/rkesters/.m2/repository/org/eclipse/jetty/http2/http2-server/9.4.49.v20220914/http2-server-9.4.49.v20220914.jar:/Users/rkesters/.m2/repository/org/eclipse/jetty/http2/http2-common/9.4.49.v20220914/http2-common-9.4.49.v20220914.jar:/Users/rkesters/.m2/repository/org/eclipse/jetty/http2/http2-hpack/9.4.49.v20220914/http2-hpack-9.4.49.v20220914.jar:/Users/rkesters/.m2/repository/org/eclipse/jetty/jetty-alpn-server/9.4.49.v20220914/jetty-alpn-server-9.4.49.v20220914.jar:/Users/rkesters/.m2/repository/org/eclipse/jetty/jetty-alpn-java-server/9.4.49.v20220914/jetty-alpn-java-server-9.4.49.v20220914.jar:/Users/rkesters/.m2/repository/org/eclipse/jetty/jetty-alpn-openjdk8-server/9.4.49.v20220914/jetty-alpn-openjdk8-server-9.4.49.v20220914.jar:/Users/rkesters/.m2/repository/org/eclipse/jetty/jetty-alpn-java-client/9.4.49.v20220914/jetty-alpn-java-client-9.4.49.v20220914.jar:/Users/rkesters/.m2/repository/org/eclipse/jetty/jetty-alpn-client/9.4.49.v20220914/jetty-alpn-client-9.4.49.v20220914.jar:/Users/rkesters/.m2/repository/org/eclipse/jetty/jetty-alpn-openjdk8-client/9.4.49.v20220914/jetty-alpn-openjdk8-client-9.4.49.v20220914.jar:/Users/rkesters/.m2/repository/com/google/guava/guava/31.1-jre/guava-31.1-jre.jar:/Users/rkesters/.m2/repository/com/google/guava/failureaccess/1.0.1/failureaccess-1.0.1.jar:/Users/rkesters/.m2/repository/com/google/guava/listenablefuture/9999.0-empty-to-avoid-conflict-with-guava/listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar:/Users/rkesters/.m2/repository/com/google/j2objc/j2objc-annotations/1.3/j2objc-annotations-1.3.jar:/Users/rkesters/.m2/repository/com/fasterxml/jackson/core/jackson-core/2.13.4/jackson-core-2.13.4.jar:/Users/rkesters/.m2/repository/org/apache/httpcomponents/client5/httpclient5/5.1.3/httpclient5-5.1.3.jar:/Users/rkesters/.m2/repository/org/apache/httpcomponents/core5/httpcore5/5.1.3/httpcore5-5.1.3.jar:/Users/rkesters/.m2/repository/org/apache/httpcomponents/core5/httpcore5-h2/5.1.3/httpcore5-h2-5.1.3.jar:/Users/rkesters/.m2/repository/org/xmlunit/xmlunit-core/2.9.0/xmlunit-core-2.9.0.jar:/Users/rkesters/.m2/repository/org/xmlunit/xmlunit-legacy/2.9.0/xmlunit-legacy-2.9.0.jar:/Users/rkesters/.m2/repository/org/xmlunit/xmlunit-placeholders/2.9.0/xmlunit-placeholders-2.9.0.jar:/Users/rkesters/.m2/repository/net/javacrumbs/json-unit/json-unit-core/2.36.0/json-unit-core-2.36.0.jar:/Users/rkesters/.m2/repository/com/jayway/jsonpath/json-path/2.7.0/json-path-2.7.0.jar:/Users/rkesters/.m2/repository/org/ow2/asm/asm/9.4/asm-9.4.jar:/Users/rkesters/.m2/repository/net/sf/jopt-simple/jopt-simple/5.0.4/jopt-simple-5.0.4.jar:/Users/rkesters/.m2/repository/com/github/jknack/handlebars/4.3.1/handlebars-4.3.1.jar:/Users/rkesters/.m2/repository/com/github/jknack/handlebars-helpers/4.3.1/handlebars-helpers-4.3.1.jar:/Users/rkesters/.m2/repository/commons-fileupload/commons-fileupload/1.4/commons-fileupload-1.4.jar:/Users/rkesters/.m2/repository/com/github/stefanbirkner/system-rules/1.19.0/system-rules-1.19.0.jar:/Users/rkesters/.m2/repository/org/assertj/assertj-core/3.23.1/assertj-core-3.23.1.jar:/Users/rkesters/.m2/repository/net/javacrumbs/json-unit/json-unit-assertj/2.37.0/json-unit-assertj-2.37.0.jar:/Users/rkesters/.m2/repository/net/javacrumbs/json-unit/json-unit-json-path/2.37.0/json-unit-json-path-2.37.0.jar:/Users/rkesters/.m2/repository/org/mock-server/mockserver-netty/5.15.0/mockserver-netty-5.15.0.jar:/Users/rkesters/.m2/repository/org/mock-server/mockserver-client-java/5.15.0/mockserver-client-java-5.15.0.jar:/Users/rkesters/.m2/repository/org/mock-server/mockserver-core/5.15.0/mockserver-core-5.15.0.jar:/Users/rkesters/.m2/repository/com/lmax/disruptor/3.4.4/disruptor-3.4.4.jar:/Users/rkesters/.m2/repository/io/netty/netty-codec-socks/4.1.86.Final/netty-codec-socks-4.1.86.Final.jar:/Users/rkesters/.m2/repository/io/netty/netty-handler-proxy/4.1.86.Final/netty-handler-proxy-4.1.86.Final.jar:/Users/rkesters/.m2/repository/com/jcraft/jzlib/1.1.3/jzlib-1.1.3.jar:/Users/rkesters/.m2/repository/com/fasterxml/uuid/java-uuid-generator/4.1.0/java-uuid-generator-4.1.0.jar:/Users/rkesters/.m2/repository/org/bouncycastle/bcprov-jdk18on/1.72/bcprov-jdk18on-1.72.jar:/Users/rkesters/.m2/repository/org/bouncycastle/bcpkix-jdk18on/1.72/bcpkix-jdk18on-1.72.jar:/Users/rkesters/.m2/repository/org/bouncycastle/bcutil-jdk18on/1.72/bcutil-jdk18on-1.72.jar:/Users/rkesters/.m2/repository/org/apache/velocity/velocity-engine-scripting/2.3/velocity-engine-scripting-2.3.jar:/Users/rkesters/.m2/repository/org/apache/velocity/velocity-engine-core/2.3/velocity-engine-core-2.3.jar:/Users/rkesters/.m2/repository/org/apache/velocity/tools/velocity-tools-generic/3.1/velocity-tools-generic-3.1.jar:/Users/rkesters/.m2/repository/commons-beanutils/commons-beanutils/1.9.4/commons-beanutils-1.9.4.jar:/Users/rkesters/.m2/repository/commons-collections/commons-collections/3.2.2/commons-collections-3.2.2.jar:/Users/rkesters/.m2/repository/org/apache/commons/commons-digester3/3.2/commons-digester3-3.2.jar:/Users/rkesters/.m2/repository/com/github/cliftonlabs/json-simple/3.0.2/json-simple-3.0.2.jar:/Users/rkesters/.m2/repository/com/samskivert/jmustache/1.15/jmustache-1.15.jar:/Users/rkesters/.m2/repository/io/swagger/parser/v3/swagger-parser/2.1.10/swagger-parser-2.1.10.jar:/Users/rkesters/.m2/repository/io/swagger/parser/v3/swagger-parser-v2-converter/2.1.10/swagger-parser-v2-converter-2.1.10.jar:/Users/rkesters/.m2/repository/io/swagger/swagger-parser/1.0.64/swagger-parser-1.0.64.jar:/Users/rkesters/.m2/repository/io/swagger/swagger-compat-spec-parser/1.0.64/swagger-compat-spec-parser-1.0.64.jar:/Users/rkesters/.m2/repository/com/github/java-json-tools/json-schema-validator/2.2.14/json-schema-validator-2.2.14.jar:/Users/rkesters/.m2/repository/com/github/java-json-tools/jackson-coreutils-equivalence/1.0/jackson-coreutils-equivalence-1.0.jar:/Users/rkesters/.m2/repository/com/github/java-json-tools/json-schema-core/1.2.14/json-schema-core-1.2.14.jar:/Users/rkesters/.m2/repository/com/github/java-json-tools/uri-template/0.10/uri-template-0.10.jar:/Users/rkesters/.m2/repository/org/mozilla/rhino/1.7.7.2/rhino-1.7.7.2.jar:/Users/rkesters/.m2/repository/com/sun/mail/mailapi/1.6.2/mailapi-1.6.2.jar:/Users/rkesters/.m2/repository/joda-time/joda-time/2.10.5/joda-time-2.10.5.jar:/Users/rkesters/.m2/repository/com/googlecode/libphonenumber/libphonenumber/8.11.1/libphonenumber-8.11.1.jar:/Users/rkesters/.m2/repository/com/github/java-json-tools/json-patch/1.13/json-patch-1.13.jar:/Users/rkesters/.m2/repository/com/github/java-json-tools/msg-simple/1.2/msg-simple-1.2.jar:/Users/rkesters/.m2/repository/com/github/java-json-tools/btf/1.3/btf-1.3.jar:/Users/rkesters/.m2/repository/com/github/java-json-tools/jackson-coreutils/2.0/jackson-coreutils-2.0.jar:/Users/rkesters/.m2/repository/io/swagger/core/v3/swagger-models/2.2.8/swagger-models-2.2.8.jar:/Users/rkesters/.m2/repository/io/swagger/parser/v3/swagger-parser-core/2.1.10/swagger-parser-core-2.1.10.jar:/Users/rkesters/.m2/repository/io/swagger/parser/v3/swagger-parser-v3/2.1.10/swagger-parser-v3-2.1.10.jar:/Users/rkesters/.m2/repository/io/swagger/core/v3/swagger-core/2.2.8/swagger-core-2.2.8.jar:/Users/rkesters/.m2/repository/com/fasterxml/jackson/datatype/jackson-datatype-jsr310/2.14.0/jackson-datatype-jsr310-2.14.0.jar:/Users/rkesters/.m2/repository/io/swagger/core/v3/swagger-annotations/2.2.8/swagger-annotations-2.2.8.jar:/Users/rkesters/.m2/repository/org/apache/commons/commons-text/1.10.0/commons-text-1.10.0.jar:/Users/rkesters/.m2/repository/io/github/classgraph/classgraph/4.8.154/classgraph-4.8.154.jar:/Users/rkesters/.m2/repository/io/prometheus/simpleclient/0.16.0/simpleclient-0.16.0.jar:/Users/rkesters/.m2/repository/io/prometheus/simpleclient_tracer_otel/0.16.0/simpleclient_tracer_otel-0.16.0.jar:/Users/rkesters/.m2/repository/io/prometheus/simpleclient_tracer_common/0.16.0/simpleclient_tracer_common-0.16.0.jar:/Users/rkesters/.m2/repository/io/prometheus/simpleclient_tracer_otel_agent/0.16.0/simpleclient_tracer_otel_agent-0.16.0.jar:/Users/rkesters/.m2/repository/io/prometheus/simpleclient_httpserver/0.16.0/simpleclient_httpserver-0.16.0.jar:/Users/rkesters/.m2/repository/io/netty/netty-buffer/4.1.86.Final/netty-buffer-4.1.86.Final.jar:/Users/rkesters/.m2/repository/io/netty/netty-codec/4.1.86.Final/netty-codec-4.1.86.Final.jar:/Users/rkesters/.m2/repository/io/netty/netty-codec-http/4.1.86.Final/netty-codec-http-4.1.86.Final.jar:/Users/rkesters/.m2/repository/io/netty/netty-codec-http2/4.1.86.Final/netty-codec-http2-4.1.86.Final.jar:/Users/rkesters/.m2/repository/io/netty/netty-common/4.1.86.Final/netty-common-4.1.86.Final.jar:/Users/rkesters/.m2/repository/io/netty/netty-handler/4.1.86.Final/netty-handler-4.1.86.Final.jar:/Users/rkesters/.m2/repository/io/netty/netty-resolver/4.1.86.Final/netty-resolver-4.1.86.Final.jar:/Users/rkesters/.m2/repository/io/netty/netty-transport-native-unix-common/4.1.86.Final/netty-transport-native-unix-common-4.1.86.Final.jar:/Users/rkesters/.m2/repository/io/netty/netty-transport/4.1.86.Final/netty-transport-4.1.86.Final.jar:/Users/rkesters/.m2/repository/io/netty/netty-tcnative-boringssl-static/2.0.56.Final/netty-tcnative-boringssl-static-2.0.56.Final.jar:/Users/rkesters/.m2/repository/io/netty/netty-tcnative-classes/2.0.56.Final/netty-tcnative-classes-2.0.56.Final.jar:/Users/rkesters/.m2/repository/io/netty/netty-tcnative-boringssl-static/2.0.56.Final/netty-tcnative-boringssl-static-2.0.56.Final-linux-x86_64.jar:/Users/rkesters/.m2/repository/io/netty/netty-tcnative-boringssl-static/2.0.56.Final/netty-tcnative-boringssl-static-2.0.56.Final-linux-aarch_64.jar:/Users/rkesters/.m2/repository/io/netty/netty-tcnative-boringssl-static/2.0.56.Final/netty-tcnative-boringssl-static-2.0.56.Final-osx-x86_64.jar:/Users/rkesters/.m2/repository/io/netty/netty-tcnative-boringssl-static/2.0.56.Final/netty-tcnative-boringssl-static-2.0.56.Final-osx-aarch_64.jar:/Users/rkesters/.m2/repository/io/netty/netty-tcnative-boringssl-static/2.0.56.Final/netty-tcnative-boringssl-static-2.0.56.Final-windows-x86_64.jar \ No newline at end of file diff --git a/src/main/java/org/dependencytrack/model/ComponentProperty.java b/src/main/java/org/dependencytrack/model/ComponentProperty.java index 51625adb32..15c68f48f7 100644 --- a/src/main/java/org/dependencytrack/model/ComponentProperty.java +++ b/src/main/java/org/dependencytrack/model/ComponentProperty.java @@ -37,10 +37,10 @@ import java.io.Serializable; /** - * User-defined key/value model for individual projects. + * User-defined key/value model for individual components. * * @author Steve Springett - * @since 3.0.0 + * @since 4.9.0 */ @PersistenceCapable(table = "COMPONENT_PROPERTY") @Unique(name="COMPONENT_PROPERTY_KEYS_IDX", members={"component", "groupName", "propertyName"}) diff --git a/src/main/java/org/dependencytrack/persistence/ComponentQueryManager.java b/src/main/java/org/dependencytrack/persistence/ComponentQueryManager.java index 24da0058cd..bb3d8de3bf 100644 --- a/src/main/java/org/dependencytrack/persistence/ComponentQueryManager.java +++ b/src/main/java/org/dependencytrack/persistence/ComponentQueryManager.java @@ -45,8 +45,6 @@ import javax.jdo.JDOObjectNotFoundException; import javax.jdo.PersistenceManager; import javax.jdo.Query; -import javax.json.Json; -import javax.json.JsonValue; import org.datanucleus.exceptions.NucleusObjectNotFoundException; import org.dependencytrack.event.IndexEvent; import org.dependencytrack.model.Component; @@ -245,7 +243,7 @@ public PaginatedResult getComponents(final Project project, final boolean includ final PackageURL purl = component.getPurl(); if (purl != null) { final RepositoryType type = RepositoryType.resolve(purl); - if (type != RepositoryType.UNSUPPORTED) { + if ( RepositoryType.UNSUPPORTED != type) { final RepositoryMetaComponent repoMetaComponent = getRepositoryMetaComponent(type, purl.getNamespace(), purl.getName()); component.setRepositoryMeta(repoMetaComponent); } @@ -356,7 +354,7 @@ public PaginatedResult getComponents(final Project project, final boolean includ final PackageURL purl = component.getPurl(); if (purl != null) { final RepositoryType type = RepositoryType.resolve(purl); - if (type != RepositoryType.UNSUPPORTED) { + if (RepositoryType.UNSUPPORTED != type) { final RepositoryMetaComponent repoMetaComponent = getRepositoryMetaComponent(type, purl.getNamespace(), purl.getName()); component.setRepositoryMeta(repoMetaComponent); } @@ -677,7 +675,7 @@ private void preprocessACLs(final Query query, final String inputFilt transientComponent.setExpandDependencyGraph(entry.getValue().isExpandDependencyGraph()); if (transientComponent.getPurl() != null) { final RepositoryType type = RepositoryType.resolve(transientComponent.getPurl()); - if (type != RepositoryType.UNSUPPORTED) { + if (RepositoryType.UNSUPPORTED != type) { final RepositoryMetaComponent repoMetaComponent = getRepositoryMetaComponent(type, transientComponent.getPurl().getNamespace(), transientComponent.getPurl().getName()); if (repoMetaComponent != null) { RepositoryMetaComponent transientRepoMetaComponent = new RepositoryMetaComponent(); diff --git a/src/main/java/org/dependencytrack/resources/v1/ComponentPropertyResource.java b/src/main/java/org/dependencytrack/resources/v1/ComponentPropertyResource.java index 4c19883ce6..875105a8ed 100644 --- a/src/main/java/org/dependencytrack/resources/v1/ComponentPropertyResource.java +++ b/src/main/java/org/dependencytrack/resources/v1/ComponentPropertyResource.java @@ -48,10 +48,10 @@ import io.swagger.annotations.Authorization; /** - * JAX-RS resources for processing ProjectProperties + * JAX-RS resources for processing component * * @author Steve Springett - * @since 3.4.0 + * @since 4.9.0 */ @Path("/v1/component/{uuid}/property") @Api(value = "componentProperty", authorizations = @Authorization(value = "X-Api-Key")) @@ -104,7 +104,7 @@ public Response getProperties( @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) @ApiOperation( - value = "Creates a new project property", + value = "Creates a new component property", response = ComponentProperty.class, code = 201 ) @@ -149,7 +149,7 @@ public Response createProperty( return Response.status(Response.Status.CONFLICT).entity("A property with the specified component/group/name combination already exists.").build(); } } else { - return Response.status(Response.Status.FORBIDDEN).entity("Access to the specified project is forbidden").build(); + return Response.status(Response.Status.FORBIDDEN).entity("Access to the specified component is forbidden").build(); } } else { return Response.status(Response.Status.NOT_FOUND).entity("The component could not be found.").build(); diff --git a/src/main/java/org/dependencytrack/upgrade/v490/v490Updater.java b/src/main/java/org/dependencytrack/upgrade/v490/v490Updater.java deleted file mode 100644 index 8c20e9f2da..0000000000 --- a/src/main/java/org/dependencytrack/upgrade/v490/v490Updater.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * This file is part of Dependency-Track. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * SPDX-License-Identifier: Apache-2.0 - * Copyright (c) Steve Springett. All Rights Reserved. - */ -package org.dependencytrack.upgrade.v490; - -import alpine.common.logging.Logger; -import alpine.persistence.AlpineQueryManager; -import alpine.server.upgrade.AbstractUpgradeItem; - -import java.sql.Connection; -import java.sql.PreparedStatement; - -import static org.dependencytrack.model.ConfigPropertyConstants.SCANNER_SNYK_API_VERSION; - -public class v490Updater extends AbstractUpgradeItem { - - private static final Logger LOGGER = Logger.getLogger(v490Updater.class); - - @Override - public String getSchemaVersion() { - return "4.9.0"; - } - - @Override - public void executeUpgrade(final AlpineQueryManager alpineQueryManager, final Connection connection) throws Exception { - LOGGER.info("HOOOO"); - } -}