The flag BoundsChecking#BOUNDS_CHECKING_ENABLED determines if boundary checking is enabled/disabled in vector/arrow buffer APIs.
It has significant performance implications, since boundary checking is a frequent operation.
This issue addresses 2 problems with the flag for boundary checking in Java API:
1. The flag can be determined by an environmental variable: ARROW_ENABLE_UNSAFE_MEMORY_ACCESS, in addition to the system properties. The system properties have higher priority than the environmental variable.
2. There is an old and a new system property for this flag. To disable boundary checking, both the old and new properties must be set to true, which is undesirable: