Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parse and forward JavaC 'Note:' level messages #288

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -803,7 +803,7 @@ else if ( ( buffer.length() == 0 ) && line.startsWith( "warning: " ) )
}
else if ( ( buffer.length() == 0 ) && isNote( line ) )
{
// skip, JDK 1.5 telling us deprecated APIs are used but -Xlint:deprecation isn't set
errors.add( new CompilerMessage( line, CompilerMessage.Kind.NOTE ) );
}
else if ( ( buffer.length() == 0 ) && isMisc( line ) )
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,16 @@ public void testErrorMessage()
assertThat( compilerError.getEndLine(), is(7) );
}

@Test
public void testNoteMessage() throws IOException
{
String error = "Note: My fancy annotation processor info" + EOL;
List<CompilerMessage> messages = JavacCompiler.parseModernStream(0, new BufferedReader(new StringReader(error)));
assertThat(messages.size(), is(1));
assertThat(messages.get(0).isError(), is(false));
assertThat(messages.get(0).getMessage(), is("My fancy annotation processor info"));
}

@Test
public void testUnknownSymbolError()
{
Expand Down
Loading