Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

weird problems

 
Shiva.Om Kumar
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am making minor changes into existing code, using JDK 1.4 with weblogic,

having "while" loop, an iterator is created from existing ArrayList of objects, having 1 object.
But it does not come inside while loop, I debug it, I checked iterator, on very first time, it shows size=1 & position=1.
I replaced it with basic "for" loop and it started working good.
Now if I promote this code, I can't justify this change.

today I am having weird problem with "switch" statement, it comes to matched "case" and instead of following statements of that "case", it executes statements under "default" case.
I can't justify my step if changed it with if-else.... I meant there is no harm but why I did this, how can I justify...
 
Paul Clapham
Sheriff
Pie
Posts: 20750
30
Eclipse IDE Firefox Browser MySQL Database
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Those all indicate that there is something wrong with your code. You only think they are "weird problems" because you haven't spent enough time in debugging. It's extremely likely that they are very ordinary problems.

However... you didn't post any of that code. Were you interested in having people on the forum help you solve the problems? If so, we can't do that without seeing the code.
 
Shiva.Om Kumar
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Paul Clapham wrote:Those all indicate that there is something wrong with your code. You only think they are "weird problems" because you haven't spent enough time in debugging. It's extremely likely that they are very ordinary problems.

However... you didn't post any of that code. Were you interested in having people on the forum help you solve the problems? If so, we can't do that without seeing the code.

Yeh... I was sure I am making some stupid mistake, I figured out, process was not updating war with latest jar... SORRY for trouble...
 
Paul Clapham
Sheriff
Pie
Posts: 20750
30
Eclipse IDE Firefox Browser MySQL Database
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There you go... it was a very ordinary problem after all.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic