Why does javac insert Objects.requireNonNull(this) for final fields?
Since the field is not only final, but a compile-time constant, it will not get accessed when being read, but the read gets replaced by the constant value itself, the iconst_5 instruction in your case. But the behavior of throwing a NullPointerException when dereferencing null, which would be implied when using a getfield instruction, must … Read more