[Minor] small code cleanup

added default constructor, instead of instantiating instance variables
at declaration
This commit is contained in:
Robert von Burg 2013-08-20 18:45:18 +02:00
parent 1430c9217b
commit 1c07555448
1 changed files with 11 additions and 3 deletions

View File

@ -82,11 +82,19 @@ public class ObjectFilter {
private final static Logger logger = LoggerFactory.getLogger(ObjectFilter.class);
private HashMap<Object, ObjectCache> cache = new HashMap<Object, ObjectCache>();
private HashSet<String> keySet = new HashSet<String>();
private static long id = ObjectCache.UNSET;
private final HashMap<Object, ObjectCache> cache;
private final HashSet<String> keySet;
/**
* Default constructor initializing the filter
*/
public ObjectFilter() {
this.cache = new HashMap<Object, ObjectCache>();
this.keySet = new HashSet<String>();
}
/**
* Register, under the given key, the addition of the given object.
* <p>