|
[
Permlink
| « Hide
]
Bernt M. Johnsen added a comment - 15/Feb/07 11:32 AM
Caused by a misinterpretion of the semantics of ClientThread. Fix available soon now.
Upluaded fix. Will commit as soon as derbyall *and* the Junit All suite is run.
V2: Silly typo in a comment in the first version......
... and with "Grant license....." ..... :-(
Committed revision 507920.
Fixed mistake introduced by the implementation of It's really helpful for the community if you could describe what the mistake was and how it was fixed.
Might indicate that better comments are needed in some code. Ok Dan. The original code was somewhat complex, few comments, had bad indentation (some lines with tabs and some with spaces), had nested ifs both with and without braces and used both break and return to exit the loop in run() (in this case, both had the same effect and terminated the thread). The changes I needed, made the code even more messy, so I decided to rewrite it. Due to the problems mentioned, I misinterpreted the original semantics. Lessons learned:
1) If the semantics is complex: Comment generoulsy 2) Use braces, especially important when if statements are nested (and layout is bad) 3) Use a proper and readable layout |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||