-
Notifications
You must be signed in to change notification settings - Fork 61
add workaround to jdk bug https://bugs.openjdk.java.net/browse/JDK-8210649 found via https://issues.apache.org/jira/browse/MCOMPILER-346 add IT test from https://github.com/basil/MCOMPILER-346-mre #196
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Conversation
…10649 found via https://issues.apache.org/jira/browse/MCOMPILER-346 add IT test from https://github.com/basil/MCOMPILER-346-mre Signed-off-by: Olivier Lamy <olamy@apache.org>
Signed-off-by: Olivier Lamy <olamy@apache.org>
Signed-off-by: Olivier Lamy <olamy@apache.org>
Signed-off-by: Olivier Lamy <olamy@apache.org>
… it as it was not extensible here... :) Signed-off-by: Olivier Lamy <olamy@apache.org>
...exus-compiler-javac/src/main/java/org/codehaus/plexus/compiler/javac/JavaxToolsCompiler.java
Outdated
Show resolved
Hide resolved
@@ -111,14 +112,14 @@ public CompilerResult compileInProcess( String[] args, final CompilerConfigurati | |||
CompilerMessage.Kind.ERROR ); | |||
return new CompilerResult( false, Collections.singletonList( message ) ); | |||
} | |||
final String sourceEncoding = config.getSourceEncoding(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yup removing useless final
@@ -57,7 +58,7 @@ protected JavaCompiler newJavaCompiler() | |||
return ToolProvider.getSystemJavaCompiler(); | |||
} | |||
|
|||
private List<JavaCompiler> JAVA_COMPILERS = new CopyOnWriteArrayList<>(); | |||
private final List<JavaCompiler> JAVA_COMPILERS = new CopyOnWriteArrayList<>(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a class field used in a synchronized block, this is the place where final
is important and it was not there
|
||
public interface InProcessCompiler { | ||
public interface InProcessCompiler extends LogEnabled { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had to change that to be able to get logger.
The only usage of this in project is a manual construction of the only implementation available here and I bump version number.
import java.util.concurrent.CopyOnWriteArrayList; | ||
|
||
/** | ||
* @author Olivier Lamy | ||
* @author <a href="mailto:david.lloyd@redhat.com">David M. Lloyd</a> | ||
* @since 2.0 | ||
*/ | ||
@Component( role = Compiler.class ) | ||
public class JavaxToolsCompiler implements InProcessCompiler | ||
@Component( role = InProcessCompiler.class ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not a change but fix a bug to be able to use dependency injection for this...
it was simply wrong for very long but the only usage was new JavaxToolsCompiler()
:)
Signed-off-by: Olivier Lamy olamy@apache.org