KroArtem commented on a change in pull request #303: [wip] [MNG-6831] replace
anonymous classes by lambdas
URL: https://github.com/apache/maven/pull/303#discussion_r361658958
##########
File path:
maven-compat/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactResolver.java
##########
@@ -105,18 +105,12 @@ public DefaultArtifactResolver()
int threads = Integer.getInteger( "maven.artifact.threads", 5 );
if ( threads <= 1 )
{
- executor = new Executor()
- {
- public void execute( Runnable command )
- {
- command.run();
- }
- };
+ executor = Runnable::run;
}
else
{
executor = new ThreadPoolExecutor( threads, threads, 3,
TimeUnit.SECONDS,
- new
LinkedBlockingQueue<Runnable>(), new DaemonThreadCreator() );
Review comment:
Please decide whether to make a separate PR or not 😃
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services