[ 
https://issues.apache.org/jira/browse/MCOMPILER-325?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16365910#comment-16365910
 ] 

Jake Robb edited comment on MCOMPILER-325 at 2/15/18 4:55 PM:
--------------------------------------------------------------

Nope, I'm using Java 8. 8u144 for my testing, but I've also verified the 
problem with 8u152. What makes you think I'm using 7?

This morning, I discovered that the thing missing from my example was 
<fork>true</fork>. With that enabled, I get the same behavior from my test as 
we saw in Bamboo. I've updated my test accordingly.

I also discovered that MCOMPILER-308 already reports that issue. This can 
remain closed; I have linked it as a duplicate.


was (Author: jakerobb):
Nope, I'm using Java 8. 8u144 for my testing, but I've also verified the 
problem with 8u152. What makes you think I'm using 7?

This morning, I discovered that the thing missing from my example was 
<fork>true</fork>. With that enabled, I get the same behavior from my test as 
we saw in Bamboo. I've updated my test accordingly.

I also discovered that MCOMPILER-308 already reports that issue. This can 
remain closed, but should be marked instead as a duplicate.

> StackOverflowError from javac is not reflected in output when fork=true
> -----------------------------------------------------------------------
>
>                 Key: MCOMPILER-325
>                 URL: https://issues.apache.org/jira/browse/MCOMPILER-325
>             Project: Maven Compiler Plugin
>          Issue Type: Bug
>    Affects Versions: 3.7.0
>            Reporter: Jake Robb
>            Assignee: Robert Scholte
>            Priority: Minor
>
> Context: 
> [https://stackoverflow.com/questions/48775213/maven-compilation-error-without-any-errors-from-the-compiler]
> If the Java code being compiled contains a chain of method calls that is too 
> long to fit in javac's stack, javac will throw a StackOverflowError and exit.
> The resulting output indicates that javac errored, but does not show the SOE, 
> nor which source file caused it. (It'd be nice if it actually pointed out the 
> problem, but that's on javac, not on the Maven plugin.)
> For more recent versions of the plugin, if {{verbose=true}}, the plugin 
> output includes the files being compiled as they go, and so the last file 
> output is helpful, but it still doesn't indicate what went wrong. -X and -e 
> args to Maven are also not helpful.
> In my case, the failure occurred using default settings for stack size (I 
> think it's 1MB) when compiling a test case that chained together 673 builder 
> methods, e.g.
> {code:java}
> return new 
> MyBuilder().foo(a1).foo(a2).foo(...).foo(a672).foo(a673).build();{code}
> I assume this problem is not unique to StackOverflowErrors and would affect 
> any thrown Error from javac.
> The plugin should be updated to capture javac's error output and include it 
> when applicable.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to