Fix policycreation test
[policy/engine.git] / ONAP-PAP-REST / src / main / java / org / onap / policy / pap / xacml / rest / components / PolicyDbDaoTransactionInstance.java
index 67214ac..e694f7e 100644 (file)
@@ -2,7 +2,7 @@
  * ============LICENSE_START=======================================================
  * ONAP-PAP-REST
  * ================================================================================
- * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2019-2020 AT&T Intellectual Property. All rights reserved.
  * Modifications Copyright (C) 2019 Nordix Foundation.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
@@ -549,6 +549,9 @@ public class PolicyDbDaoTransactionInstance implements PolicyDbDaoTransaction {
 
             IOUtils.closeQuietly(policyXmlStream);
             if (PolicyDbDao.isJunit()) {
+                if (policyDataString != null) {
+                    logger.warn("isJUnit will overwrite policyDataString");
+                }
                 // Using parentPath object to set policy data.
                 policyDataString = policy.policyAdapter.getParentPath();
             }