Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(39)

Issue 37830044: Fix for issue 188 (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 9 months ago by eaftan
Modified:
10 years, 8 months ago
Reviewers:
cushon
Visibility:
Public.

Description

Fix for issue 188: error-prone fails when compiling something that uses an annotation processor.

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+138 lines, -1399 lines) Patch
M core/src/main/java/com/google/errorprone/ErrorProneCompiler.java View 4 chunks +15 lines, -29 lines 2 comments Download
M core/src/main/java/com/google/errorprone/ErrorReportingJavaCompiler.java View 2 chunks +44 lines, -0 lines 0 comments Download
M core/src/test/java/com/google/errorprone/CompilationTestHelper.java View 1 chunk +1 line, -1 line 0 comments Download
A + core/src/test/java/com/google/errorprone/ErrorProneCompilerIntegrationTest.java View 2 chunks +33 lines, -3 lines 0 comments Download
D core/src/test/java/com/google/errorprone/ErrorReportingJavaCompilerIntegrationTest.java View 1 chunk +0 lines, -157 lines 0 comments Download
M core/src/test/java/com/google/errorprone/bugpatterns/ProtoFieldNullComparisonTest.java View 1 chunk +1 line, -1 line 0 comments Download
A core/src/test/resources/com/google/errorprone/NullAnnotationProcessor.java View 1 chunk +42 lines, -0 lines 0 comments Download
A + core/src/test/resources/com/google/errorprone/UsesAnnotationProcessor.java View 2 chunks +4 lines, -2 lines 0 comments Download
A + core/src/test/resources/com/google/errorprone/bugpatterns/proto/ProtoTest.java View 0 chunks +-1 lines, --1 lines 0 comments Download
A + core/src/test/resources/com/google/errorprone/bugpatterns/proto/proto_test.proto View 0 chunks +-1 lines, --1 lines 0 comments Download
D core/src/test/resources/com/google/errorprone/proto/ProtoTest.java View 1 chunk +0 lines, -1194 lines 0 comments Download
D core/src/test/resources/com/google/errorprone/proto/proto_test.proto View 1 chunk +0 lines, -14 lines 0 comments Download

Messages

Total messages: 4
cushon
Sorry for the slow review. Looks good overall. https://codereview.appspot.com/37830044/diff/1/core/src/main/java/com/google/errorprone/ErrorProneCompiler.java File core/src/main/java/com/google/errorprone/ErrorProneCompiler.java (right): https://codereview.appspot.com/37830044/diff/1/core/src/main/java/com/google/errorprone/ErrorProneCompiler.java#newcode128 core/src/main/java/com/google/errorprone/ErrorProneCompiler.java:128: context.put(Scanner.class, ...
10 years, 9 months ago (2014-01-08 18:35:32 UTC) #1
eaftan
https://codereview.appspot.com/37830044/diff/1/core/src/main/java/com/google/errorprone/ErrorProneCompiler.java File core/src/main/java/com/google/errorprone/ErrorProneCompiler.java (right): https://codereview.appspot.com/37830044/diff/1/core/src/main/java/com/google/errorprone/ErrorProneCompiler.java#newcode128 core/src/main/java/com/google/errorprone/ErrorProneCompiler.java:128: context.put(Scanner.class, errorProneScanner); On 2014/01/08 18:35:33, cushon wrote: > Is ...
10 years, 9 months ago (2014-01-10 20:22:27 UTC) #2
cushon
> I originally thought so, but now I think maybe not. I moved that check ...
10 years, 9 months ago (2014-01-10 22:44:11 UTC) #3
eaftan
10 years, 9 months ago (2014-01-11 01:31:56 UTC) #4
You're right.  Fixed in rev 7ea45aa92ec6.


On Fri, Jan 10, 2014 at 2:44 PM, <cushon@google.com> wrote:

> I originally thought so, but now I think maybe not.  I moved that
>>
> check for
>
>> whether the Context already contains a Scanner to
>>
> ErrorReportingJavaCompiler,
>
>> and I thought that would always execute before this. But looking more
>>
> closely
>
>> that doesn't always seem to be true.  I'll add that check back in as
>>
> an || with
>
>> what I have there currently.
>>
>
> Context.put(...) throws an exception if the same key is added twice.
> Shouldn't we be checking that a scanner hasn't been added even when
> errorProneScanner != null?
>
> https://codereview.appspot.com/37830044/
>
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b