scala-ide/scala-ide — pull request #773 by sschaef (2014-08-26 21:24:18+00:00)
Title: Fix AIOOBE in `ScalaWordFinder`

The execption could occur because an arbitrary seq can be passed to the
method `findWord` and not just some special wrappers that are defined in
the overloaded alternatives. Because there were also no offset checks the
result would have been completely useless if this method would have
succeeded without an exception.

Therefore, this commit introduces offset checks and returns `null` if the
offset is invalid (Option can't be returned because this is an API method).

Another change is that `findWord` doesn't accept a `Seq` anymore, but an
`IndexedSeq`. Otherwise a passed linked list would result in an
inefficient implementation.

The last change is that invalid points in `ScalaPresentationCompiler` in
method `eclipseProblem` don't even call the `findWord` method anymore.

Last but not least, I didn't want to stop my save actions from adding
`override` keywords where it was necessary.

Fixes #1002238