cushon / issues-import

0 stars 0 forks source link

Subclassing class with @CheckReturn constructor crashes CheckReturnValue checker #178

Closed cushon closed 9 years ago

cushon commented 9 years ago

Original issue created by cpovirk@google.com on 2013-08-26 at 09:03 PM


private static class MyObject { @CheckReturnValue MyObject() {} }

...

new MyObject() {};

java.lang.StringIndexOutOfBoundsException: start > end at java.lang.AbstractStringBuilder.replace(AbstractStringBuilder.java:810) at java.lang.StringBuilder.replace(StringBuilder.java:266) at com.google.errorprone.fixes.AppliedFix$Applier.apply(AppliedFix.java:69) at com.google.errorprone.JavacErrorDescriptionListener.onDescribed(JavacErrorDescriptionListener.java:74) at com.google.errorprone.Scanner.reportMatch(Scanner.java:169) at com.google.errorprone.Scanner.evaluateMatch(Scanner.java:181)

I have a fix that I'll send shortly.

cushon commented 9 years ago

Original comment posted by eaftan@google.com on 2013-08-28 at 12:45 AM


(No comment entered for this change.)


Status: Started Owner: eaftan@google.com

cushon commented 9 years ago

Original comment posted by eaftan@google.com on 2013-08-30 at 06:01 PM


Fixed in rev 6642ef92e599.


Status: Fixed