| ▲ | agilob 3 days ago | |
> Integers from -127 <-> 127 The cache can be extended on startup with env var `java.lang.Integer.IntegerCache.high ` https://github.com/openjdk/jdk/blob/cc278dbb8a1ca0754d584270... | ||
| ▲ | pwagland 3 days ago | parent [-] | |
That is a nice piece piece of knowledge! We have an Integer cache in our product, and the only reason that it hangs around is that it caches 0..1024 instead of -127..128. By setting this value, we could simplify our code, ever so slightly. | ||