3 ms·
There is a difference between changing internals by doing things outside the system (OS level, hardware level) and changing things with perfectly legal and corr
by weinzierl 6y ago
There is a difference between changing internals by doing things outside the system (OS level, hardware level) and changing things with perfectly legal and correct code.
- MaxBarraclough 6y agoI'm not convinced it's legal and correct. You're going to risk breaking internal JVM optimisations like string interning. Whether it's specifically against the letter of the law I'm not sure, but I imagine the Java specification doesn't have much to say about the behaviour of a JVM after someone messes with its internals. That is to say, very roughly speaking, you're likely flirting with what C programmers call undefined behaviour, which is to say, it's likely not legal and correct. https://stackoverflow.com/a/6932880/ https://stackoverflow.com/a/6932880/