When ResolvedJavaMethod.getCodeSize returns a value > 0, it is currently possible for ResolvedJavaMethod.getCode to return null (i.e. when the declaring class is not linked) which has confused many JVMCI API users and led to subtle bugs. Experience has shown that a value > 0 means callers expect getCode to not return null. It's about time to conform to this reasonable expectation. If the declaring class is not linked, getCodeSize should return -1.