wrldwzrd89
Member
In light of Veracity's notes that KoLmafia has code formatting standards I was unaware of in my other thread about code cleanup... I won't be formatting the code in my future patches.
Anyway, that being said, KoLmafia as it stands now has several compile errors that cause compilation with JDK 1.4 to fail (it silently succeeds with JDK 5 or newer, though - hence why this problem wasn't spotted earlier).
Attached is a small patch to fix the 3 problems:
There is no "StringBuilder" in Java 1.4 (solution: Replace with StringBuffer)
String.replace() expects two char arguments, not two Strings (solution: use String.replaceAll() instead)
Integer.valueOf(int) doesn't work in Java 1.4 (solution: since this is only called once with a constant, and Integer.valueOf(String) DOES exist, surround the constant with quotes)
Anyway, that being said, KoLmafia as it stands now has several compile errors that cause compilation with JDK 1.4 to fail (it silently succeeds with JDK 5 or newer, though - hence why this problem wasn't spotted earlier).
Attached is a small patch to fix the 3 problems:
There is no "StringBuilder" in Java 1.4 (solution: Replace with StringBuffer)
String.replace() expects two char arguments, not two Strings (solution: use String.replaceAll() instead)
Integer.valueOf(int) doesn't work in Java 1.4 (solution: since this is only called once with a constant, and Integer.valueOf(String) DOES exist, surround the constant with quotes)