The following modifications are suggested to improve
resource usage. We were running out of file descriptors
in our process and these changes helped our application:
1. com.swabunga.spell.engine.Configuration.java:
create only one default static final
PropertyConfiguration instance (as a singleton) and
return it when the className is null:
public static final Configuration
getConfiguration(String className)
2. com.swabunga.spell.engine.PropertyConfiguration.java:
In the constructor and save() methods, close the
streams appropriately. Since they weren't explicitly
closed, the file descriptors would stay in use until
the finalizer closed the streams.