GeeCON Prague 2014*
The moose likes Java in General and the fly likes weird problems Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Java in General
Bookmark "weird problems" Watch "weird problems" New topic
Author

weird problems

Shiva.Om Kumar
Ranch Hand

Joined: Jun 14, 2010
Posts: 68
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
Bartender

Joined: Oct 14, 2005
Posts: 18570
    
    8

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

Joined: Jun 14, 2010
Posts: 68
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
Bartender

Joined: Oct 14, 2005
Posts: 18570
    
    8

There you go... it was a very ordinary problem after all.
 
GeeCON Prague 2014
 
subject: weird problems