GitHub PushEvent at 2014-08-28 00:28:47
Repository: scala-ide
Actor: sschaef
Payload: {"shas":[["225587d39a624ac92b9d2ab6824452d7cc4aff22","1d6e1cf70ec6f9ab28d3ea4b27a49a77654d370e@antoras.de","Fix AIOOBE in `ScalaWordFinder`\n\nThe exception could occur because an arbitrary seq can be passed to the\nmethod `findWord` and not just some special wrappers that are defined in\nthe overloaded alternatives. Because there were also no offset checks the\nresult would have been completely useless if this method would have\nsucceeded without an exception.\n\nTherefore, this commit introduces offset checks and returns `None` if the\noffset is invalid. In order to return an `Option`, the API of `findWord`\nhad to change. This led to the removal of some AspectJ code, namely\n`HoverAspect` and `IScalaWordFinder`. I'm not entirely sure if the\nremoval of `HoverAspect` doesn't break anything. It is definitely not\nused in Scala hovers, because the Scala IDE has its own implementations.\nIt may be used by some Java hovers, but I couldn't find one that\nactually uses it. In the worst case this change means that some Scala\nelements are no longer shown in Java hovers.\n\nAnother change is that `findWord` doesn't accept a `Seq` anymore, but an\n`IndexedSeq`. Otherwise a passed linked list would result in an\ninefficient implementation.\n\nOne constructor parameter in `ScalaPresentationCompiler` had to change\nits name, because it would hide the super implementation otherwise,\nwhich can easily lead to a bug.\n\nLast but not least, I didn't want to stop my save actions from adding\n`override` keywords where it was necessary. `ScalaWordFinder` is also\ncompletely reformatted.\n\nFixes #1002238","Simon Schaefer",true]],"size":1,"ref":"refs/heads/t1002238-aioobe","head":"225587d39a624ac92b9d2ab6824452d7cc4aff22"}