Hi,

with last push, both JDBCUserDatabase and XMLUserDatabase will not
allow empty or null wiki names on the getWikiNames() method.
Previously it was only not allowing null wiki names.

In XMLUserDatabase, the reasoning behind this change is that JDom
returns an empty string when querying for missing attributes, so
checking for null at getWikiNames was resulting in unreachable code.
Not sure if it's intended or a bug (seems to me like the second, as an
empty wiki name may repeat and doesn't male much sense), but this
change inlines with the logic of the UI on the registration form,
which mandates a not empty value for the wiki name. As for the
JDBCUserDatabase, the method seems to have been developed from the
former (there was a log message noting XMLUserDatabase instead of
JDBCUserDatabase on the null check), so the same change has been made
there.

Most probably this change will not affect anyone, either regular
JSPWiki or custom 3rd party code developers, but as it is a change in
the method behaviour, I've thought at least dropping a line here.

If it's desired, we can change the logic of the method to return the
login name if there is no wiki name, or whatever seems reasonable - I
came across that piece of code and thought of adjusting to what it
probably meant to do.


best regards,
juan pablo

Reply via email to