summaryrefslogtreecommitdiffstats
path: root/common-logging/src/main/java/org/onap/policy/common/logging/flexlogger/PropertyUtil.java
diff options
context:
space:
mode:
Diffstat (limited to 'common-logging/src/main/java/org/onap/policy/common/logging/flexlogger/PropertyUtil.java')
-rw-r--r--common-logging/src/main/java/org/onap/policy/common/logging/flexlogger/PropertyUtil.java29
1 files changed, 6 insertions, 23 deletions
diff --git a/common-logging/src/main/java/org/onap/policy/common/logging/flexlogger/PropertyUtil.java b/common-logging/src/main/java/org/onap/policy/common/logging/flexlogger/PropertyUtil.java
index 1bc57f01..86d119ea 100644
--- a/common-logging/src/main/java/org/onap/policy/common/logging/flexlogger/PropertyUtil.java
+++ b/common-logging/src/main/java/org/onap/policy/common/logging/flexlogger/PropertyUtil.java
@@ -362,12 +362,13 @@ public class PropertyUtil
* @param file the properties file
* @param notify if not null, this is a callback interface that was used for
* notifications of changes
+ * @throws IOException
*/
- public static void stopListening(File file, Listener listener)
+ public static void stopListening(File file, Listener listener) throws IOException
{
if (listener != null)
{
- ListenerRegistration reg = registrations.get(file);
+ ListenerRegistration reg = registrations.get(file.getCanonicalFile());
if (reg != null)
{
reg.removeListener(listener);
@@ -380,29 +381,11 @@ public class PropertyUtil
* @param fileName the properties file
* @param notify if not null, this is a callback interface that was used for
* notifications of changes
+ * @throws IOException
*/
- public static void stopListening(String fileName, Listener listener)
+ public static void stopListening(String fileName, Listener listener) throws IOException
{
stopListening(new File(fileName), listener);
}
-
- /* ============================================================ */
-
- // TEMPORARY - used to test callback interface
- public static class Test implements Listener
- {
- String name;
-
- public Test(String name)
- {
- this.name = name;
- }
-
- @Override
- public void propertiesChanged(Properties properties, Set<String> changedKeys)
- {
- System.out.println("Test(" + name + ")\nproperties = " + properties
- + "\nchangedKeys = " + changedKeys);
- }
- }
+
}