Type |
Patch
|
Priority |
Normal
|
Assignee | |
RedmineID |
2825
|
Version |
tigase-server-7.1.0
|
Estimation |
1h
|
Issue Votes (0)
Watchers (0)
Type |
Patch
|
Priority |
Normal
|
Assignee | |
RedmineID |
2825
|
Version |
tigase-server-7.1.0
|
Estimation |
1h
|
as I was checking the source code of tigase, I find something strange, the code has inconsistencies. for example "getPublicData" in "NonAuthUserRepositoryImpl.java" returns null when the user doesn't exists. I think it can be a more consistant and uniform way for this, for example throwing an exception. beacause if user doesn't exist I can't find out user doesn't exists or default value returned(assume default value = null). there are some kinds of other inconsistencies, for example for "userExists" method of "UserRepository.java" there isn't any TigaseDBException in the exception list, so this method consider database problem as not existing username in implementation, that is not concise.
for the first problem I mentioned, I added a patch to do the correct behaviour.
patch.txt