diff options
author | Timoney, Dan (dt5972) <dtimoney@att.com> | 2019-04-02 10:23:20 -0700 |
---|---|---|
committer | Timoney, Dan (dt5972) <dtimoney@att.com> | 2019-04-02 10:23:20 -0700 |
commit | 889d1c06a63677ae78394320753fa1c05a491462 (patch) | |
tree | 74a8a78620251ee21ff79073490866854be7087f | |
parent | 6a91fa496b5464a9f96b43851968eee4c837d80c (diff) |
Resolve jersey conflict
Updated aai-service to use glassfish version of jersey. Note: there
might be additional work needed to handle host name verification
properly (jersey 2 handles that differently - see details
in jira)
Change-Id: I0bd6df2e0ebf222f730aa02e99d4b032fd492bef
Issue-ID: CCSDK-1192
Signed-off-by: Timoney, Dan (dt5972) <dtimoney@att.com>
-rwxr-xr-x | aai-service/provider/pom.xml | 8 | ||||
-rwxr-xr-x | aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/AAIService.java | 17 |
2 files changed, 13 insertions, 12 deletions
diff --git a/aai-service/provider/pom.xml b/aai-service/provider/pom.xml index e41553025..65a2a040e 100755 --- a/aai-service/provider/pom.xml +++ b/aai-service/provider/pom.xml @@ -74,12 +74,14 @@ <artifactId>jcl-over-slf4j</artifactId> </dependency> <dependency> - <groupId>com.sun.jersey</groupId> + <groupId>org.glassfish.jersey.core</groupId> <artifactId>jersey-client</artifactId> + <version>${jersey.version}</version> </dependency> <dependency> - <groupId>com.sun.jersey</groupId> - <artifactId>jersey-core</artifactId> + <groupId>org.glassfish.jersey.core</groupId> + <artifactId>jersey-common</artifactId> + <version>${jersey.version}</version> </dependency> <dependency> <groupId>org.apache.httpcomponents</groupId> diff --git a/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/AAIService.java b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/AAIService.java index d315f64b4..f83ff8ca6 100755 --- a/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/AAIService.java +++ b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/AAIService.java @@ -97,8 +97,6 @@ import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.introspect.JacksonAnnotationIntrospector; import com.fasterxml.jackson.databind.type.TypeFactory; import com.fasterxml.jackson.module.jaxb.JaxbAnnotationIntrospector; -import com.sun.jersey.api.client.config.DefaultClientConfig; -import com.sun.jersey.client.urlconnection.HTTPSProperties; public class AAIService extends AAIDeclarations implements AAIClient, SvcLogicResource { @@ -251,7 +249,7 @@ public class AAIService extends AAIDeclarations implements AAIClient, SvcLogicRe } if(keystorePath != null && keystorePassword != null && (new File(keystorePath)).exists()) { - DefaultClientConfig config = new DefaultClientConfig(); + //DefaultClientConfig config = new DefaultClientConfig(); //both jersey and HttpURLConnection can use this SSLContext ctx = null; try { @@ -280,12 +278,13 @@ public class AAIService extends AAIDeclarations implements AAIClient, SvcLogicRe if(null!=kmf) { ctx.init(kmf.getKeyManagers(), null, null); } - config.getProperties().put(HTTPSProperties.PROPERTY_HTTPS_PROPERTIES, new HTTPSProperties( new HostnameVerifier() { - @Override - public boolean verify( String s, SSLSession sslSession ) { - return ignoreCertificateHostError; - } - }, ctx)); + /* + * config.getProperties().put(HTTPSProperties.PROPERTY_HTTPS_PROPERTIES, new + * HTTPSProperties( new HostnameVerifier() { + * + * @Override public boolean verify( String s, SSLSession sslSession ) { return + * ignoreCertificateHostError; } }, ctx)); + */ CTX = ctx; LOG.debug("SSLContext created"); |