jdmonin / JSettlers2

Java Settlers project home, downloads, and GPLv3 source code. To download the latest version as a JAR, see https://github.com/jdmonin/JSettlers2/releases/latest .
http://nand.net/jsettlers/
GNU General Public License v3.0
157 stars 63 forks source link

The Integer constructor has been deprecated in later versions of Java. #52

Closed colinwerner closed 5 years ago

colinwerner commented 5 years ago

According to the documentation, "Returns a Integer instance representing the specified int value. If a new Integer instance is not required, this method should generally be used in preference to the constructor Integer(int), as this method is likely to yield significantly better space and time performance by caching frequently requested values."

jdmonin commented 5 years ago

Good call, LGTM. Thank you!

jdmonin commented 5 years ago

Because this touched the bot classes, I also ran a quick integration-ish test of 9 robot-only games, which of course ran fine.

java -jar JSettlersServer.jar -Djsettlers.bots.botgames.total=9 -Djsettlers.bots.botgames.parallel=5 -Djsettlers.bots.fast_pause_percent=1