summaryrefslogtreecommitdiffstats
path: root/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/event/impl/filecarrierplugin/FileCarrierTechnologyParameters.java
diff options
context:
space:
mode:
Diffstat (limited to 'services/services-engine/src/main/java/org/onap/policy/apex/service/engine/event/impl/filecarrierplugin/FileCarrierTechnologyParameters.java')
-rw-r--r--services/services-engine/src/main/java/org/onap/policy/apex/service/engine/event/impl/filecarrierplugin/FileCarrierTechnologyParameters.java17
1 files changed, 6 insertions, 11 deletions
diff --git a/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/event/impl/filecarrierplugin/FileCarrierTechnologyParameters.java b/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/event/impl/filecarrierplugin/FileCarrierTechnologyParameters.java
index 91551e57e..5071824ce 100644
--- a/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/event/impl/filecarrierplugin/FileCarrierTechnologyParameters.java
+++ b/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/event/impl/filecarrierplugin/FileCarrierTechnologyParameters.java
@@ -21,7 +21,6 @@
package org.onap.policy.apex.service.engine.event.impl.filecarrierplugin;
import java.io.File;
-
import org.onap.policy.apex.service.engine.event.impl.filecarrierplugin.consumer.ApexFileEventConsumer;
import org.onap.policy.apex.service.engine.event.impl.filecarrierplugin.producer.ApexFileEventProducer;
import org.onap.policy.apex.service.parameters.carriertechnology.CarrierTechnologyParameters;
@@ -235,9 +234,8 @@ public class FileCarrierTechnologyParameters extends CarrierTechnologyParameters
// Check if the file exists, the file should be a regular file and should be readable
if (theFile.exists()) {
validateExistingFile(result, absoluteFileName, theFile);
- }
- // The path to the file should exist and should be writable
- else {
+ } else {
+ // The path to the file should exist and should be writable
validateNewFileParent(result, absoluteFileName, theFile);
}
}
@@ -253,8 +251,7 @@ public class FileCarrierTechnologyParameters extends CarrierTechnologyParameters
// Check that the file is a regular file
if (!theFile.isFile()) {
result.setResult(FILE_NAME_TOKEN, ValidationStatus.INVALID, "is not a plain file");
- }
- else {
+ } else {
fileName = absoluteFileName;
if (!theFile.canRead()) {
@@ -274,12 +271,10 @@ public class FileCarrierTechnologyParameters extends CarrierTechnologyParameters
// Check that the parent of the file is a directory
if (!theFile.getParentFile().exists()) {
result.setResult(FILE_NAME_TOKEN, ValidationStatus.INVALID, "parent of file does not exist");
- }
- // Check that the parent of the file is a directory
- else if (!theFile.getParentFile().isDirectory()) {
+ } else if (!theFile.getParentFile().isDirectory()) {
+ // Check that the parent of the file is a directory
result.setResult(FILE_NAME_TOKEN, ValidationStatus.INVALID, "parent of file is not directory");
- }
- else {
+ } else {
fileName = absoluteFileName;
if (!theFile.getParentFile().canRead()) {