From f06b023ebfa4ce22a58e6548b817264dbb6eea61 Mon Sep 17 00:00:00 2001 From: "Balaji, Ramya (rb111y)" Date: Mon, 19 Mar 2018 12:50:52 -0400 Subject: Code changes to fix Exception Reverted changes to method name in Transaction.java to getuId() as this caused incorrect attributes to be added to the generated JSON. Added unit test to ensure this works as expected in the future. Issue-ID: APPC-760 Change-Id: I07adcda0b5f04bd00efc113b94c68f48af13ad78 Signed-off-by: Balaji, Ramya (rb111y) --- .../src/main/java/org/onap/appc/flow/controller/data/Transaction.java | 4 ++-- .../java/org/onap/appc/flow/controller/executorImpl/RestExecutor.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'appc-config/appc-flow-controller/provider/src/main/java') diff --git a/appc-config/appc-flow-controller/provider/src/main/java/org/onap/appc/flow/controller/data/Transaction.java b/appc-config/appc-flow-controller/provider/src/main/java/org/onap/appc/flow/controller/data/Transaction.java index 2eb75ff7a..327028f00 100644 --- a/appc-config/appc-flow-controller/provider/src/main/java/org/onap/appc/flow/controller/data/Transaction.java +++ b/appc-config/appc-flow-controller/provider/src/main/java/org/onap/appc/flow/controller/data/Transaction.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * ONAP : APPC * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2017-18 AT&T Intellectual Property. All rights reserved. * ============================================================================= * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -77,7 +77,7 @@ public class Transaction { private String status = "PENDING"; - public String getId() { + public String getuId() { return uId; } diff --git a/appc-config/appc-flow-controller/provider/src/main/java/org/onap/appc/flow/controller/executorImpl/RestExecutor.java b/appc-config/appc-flow-controller/provider/src/main/java/org/onap/appc/flow/controller/executorImpl/RestExecutor.java index 2f64a21c6..d18f2a3e2 100644 --- a/appc-config/appc-flow-controller/provider/src/main/java/org/onap/appc/flow/controller/executorImpl/RestExecutor.java +++ b/appc-config/appc-flow-controller/provider/src/main/java/org/onap/appc/flow/controller/executorImpl/RestExecutor.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * ONAP : APPC * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2017-18 AT&T Intellectual Property. All rights reserved. * ============================================================================= * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -65,7 +65,7 @@ public class RestExecutor implements FlowExecutorInterface { HTTPSProperties.PROPERTY_HTTPS_PROPERTIES, new HTTPSProperties(getHostnameVerifier(), sslContext)); client = createClient(defaultClientConfig); - client.addFilter(new HTTPBasicAuthFilter(transaction.getId(), transaction.getPswd())); + client.addFilter(new HTTPBasicAuthFilter(transaction.getuId(), transaction.getPswd())); WebResource webResource = client.resource(new URI(transaction.getExecutionEndPoint())); webResource.setProperty("Content-Type", "application/json;charset=UTF-8"); -- cgit 1.2.3-korg