Again, it depends on how you look at it. At the very least, it carries
forward a java
best practice regarding arrays. Calling out of bounds array
indexes and
getting incorrect data, besides leading to incorrect results and
harder to
debug programs, is also a security issue, as bad data can lead to
program
crashes which put the runtime in a vulnerable state. If you heard the
phrase
buffer overflow in terms of security vulnerabilities, you were hearing
about
programs written in C or C++ where out of bounds array indexes may be
exploited by a cracker so as to hijack a process and run his malicious
code.
So the code to check indexes could be in Android because it's the
right thing to do and/or it could be in Android because the inability to call
data
from a bad index is a java specification and the behavior java
programmers
moving to Android would expect. Once you say that a bad index
cannot be
called you need to check every call and be sure it's correct. [ Reply to This | Parent | # ]
|