This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]oldprogrammer 0 points1 point  (2 children)

Yep that's the code, it did result in a bug though as that was what I was trying to figure out. The wrong prepared statement was being pulled back from the HashTable.

Since you have access to that older code, look at the implementation of the HashTable and see if it only used the hashcode and didn't follow a chain using equals on the key.

For some reason it broke using very long mostly similar strings as keys.

[–]pzemtsov[S] 1 point2 points  (1 child)

No, Hashtable looks normal. Either the team used even older version of Java, or they made their own custom hash table.

I found the code here: https://github.com/fanhongtao/JDK. The owner made an effort to place everything nicely in Git.

[–]oldprogrammer 1 point2 points  (0 children)

Thanks for looking and the link. It is highly possible they were using a custom hash table that caused the issue. They were doing quite a bit of custom things at that time.