From 5452e98384f0525786b28b890c9883ed40b5b1b3 Mon Sep 17 00:00:00 2001 From: Jesse McConnell Date: Thu, 13 Aug 2009 19:49:20 +0000 Subject: [PATCH] add some indicators of what is in the List, etc git-svn-id: svn+ssh://dev.eclipse.org/svnroot/rt/org.eclipse.jetty/jetty/trunk@717 7e9141cc-0065-0410-87d8-b60c137991c4 --- .../main/java/org/eclipse/jetty/util/Scanner.java | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/jetty-util/src/main/java/org/eclipse/jetty/util/Scanner.java b/jetty-util/src/main/java/org/eclipse/jetty/util/Scanner.java index 46099adae20..70b79f142d5 100644 --- a/jetty-util/src/main/java/org/eclipse/jetty/util/Scanner.java +++ b/jetty-util/src/main/java/org/eclipse/jetty/util/Scanner.java @@ -43,11 +43,11 @@ public class Scanner { private static int __scannerId=0; private int _scanInterval; - private List _listeners = Collections.synchronizedList(new ArrayList()); - private Map _prevScan = new HashMap(); - private Map _currentScan = new HashMap(); + private final List _listeners = Collections.synchronizedList(new ArrayList()); + private final Map _prevScan = new HashMap(); + private final Map _currentScan = new HashMap(); private FilenameFilter _filter; - private List _scanDirs; + private List _scanDirs; private volatile boolean _running = false; private boolean _reportExisting = true; private Timer _timer; @@ -110,6 +110,7 @@ public class Scanner * @param dir * @deprecated use setScanDirs(List dirs) instead */ + @Deprecated public void setScanDir (File dir) { _scanDirs = new ArrayList(); @@ -121,6 +122,7 @@ public class Scanner * @return * @deprecated use getScanDirs() instead */ + @Deprecated public File getScanDir () { return (_scanDirs==null?null:(File)_scanDirs.get(0)); @@ -228,6 +230,7 @@ public class Scanner { return new TimerTask() { + @Override public void run() { scan(); } }; } @@ -291,10 +294,10 @@ public class Scanner return; _currentScan.clear(); - Iterator itor = _scanDirs.iterator(); + Iterator itor = _scanDirs.iterator(); while (itor.hasNext()) { - File dir = (File)itor.next(); + File dir = itor.next(); if ((dir != null) && (dir.exists())) scanFile(dir, _currentScan);