aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/reception-plugins/src/main/java
diff options
context:
space:
mode:
authorJim Hahn <jrh3@att.com>2019-06-18 12:25:03 -0400
committerJim Hahn <jrh3@att.com>2019-06-18 12:25:03 -0400
commitd85174e9054bc63948ec6e07d8fc362e170402a9 (patch)
tree35d96c98d0780fa01e68427aeb3ef23df134c83b /plugins/reception-plugins/src/main/java
parentd784d71afce52687442c4753643280eae7cfe2ac (diff)
Fix junit tests in distribution
Sonar fix broke some of the junit tests for parameters; fixed those. Also fixed some checkstyle errors (e.g., unused imports). Change-Id: I76c57792b82b9c2ddd27bdbc35910e9b11d86ea5 Issue-ID: POLICY-1791 Signed-off-by: Jim Hahn <jrh3@att.com>
Diffstat (limited to 'plugins/reception-plugins/src/main/java')
-rw-r--r--plugins/reception-plugins/src/main/java/org/onap/policy/distribution/reception/handling/file/FileSystemReceptionHandler.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/plugins/reception-plugins/src/main/java/org/onap/policy/distribution/reception/handling/file/FileSystemReceptionHandler.java b/plugins/reception-plugins/src/main/java/org/onap/policy/distribution/reception/handling/file/FileSystemReceptionHandler.java
index df5302c0..77269bb0 100644
--- a/plugins/reception-plugins/src/main/java/org/onap/policy/distribution/reception/handling/file/FileSystemReceptionHandler.java
+++ b/plugins/reception-plugins/src/main/java/org/onap/policy/distribution/reception/handling/file/FileSystemReceptionHandler.java
@@ -2,6 +2,7 @@
* ============LICENSE_START=======================================================
* Copyright (C) 2018 Intel Corp. All rights reserved.
* Copyright (C) 2019 Nordix Foundation.
+ * Modifications Copyright (C) 2019 AT&T Intellectual Property.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -113,7 +114,6 @@ public class FileSystemReceptionHandler extends AbstractReceptionHandler {
* @param maxThread the max thread number
* @throws InterruptedException if it occurs
*/
- @SuppressWarnings("unchecked")
protected void startWatchService(final WatchService watcher,
final Path dir, int maxThread) throws InterruptedException {
WatchKey key;
@@ -137,6 +137,7 @@ public class FileSystemReceptionHandler extends AbstractReceptionHandler {
private void processFileEvents(Path dir, WatchKey key, ExecutorService pool) {
for (final WatchEvent<?> event : key.pollEvents()) {
+ @SuppressWarnings("unchecked")
final WatchEvent<Path> ev = (WatchEvent<Path>) event;
final Path fileName = ev.context();
pool.execute(() -> {