[Yanel-dev] Constructor of RealManager class
Guillaume Déflache
guillaume.deflache at wyona.com
Thu Apr 9 12:28:01 CEST 2009
Hi!
Michael Wechner schrieb:
> Unfortunately the class
> src/core/java/org/wyona/yanel/core/map/RealmManager.java
>
> currently consumes a Yanel configuration instead a realms configuration,
> which I think doesn't make sense.
>
> I would like to change this, but it basically means an API change,
> whereas I don't see many places this being used and don't believe any
> third-party
> software is using this constructor and hence could be changed I guess
> without any backwards-compatibility issues.
>
> Also there is a method called getConfigurationFile which returns the
> yanel configuration instead the realms configuration, which is
> very misleading, but this method seems nowhere to be used and hence I
> set it to deprecated.
>
> Any objections that I change the above?
Well; we discussed that a bit already together, and I had finally found
the time to have a look at your recent changes in src/core, so here are
a few remarks:
1) Could you please use Collections and foreach loops instead of arrays?
2) Maybe we should also provided an InputStream-based API (with an
String containing an informative ID like the name of the original file)
in addition to the File-based one because files are hard to mock in
unit-tests; so better make sure we enable unit-testing while we are at
changing this!
Thus we should not allow access to the configuring file like in:
+ public File getConfigurationFile() {
+ return realmConfigFile;
+ }
...like we seems to do. I don't really understand why some configuration
classes e.g. RealmsContextConfig have both parsed configuration
properties and a (probably not-parsed-yet) configuration file as attributes.
Cheers,
Guillaume
More information about the Yanel-development
mailing list