Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 13FAA200CB8 for ; Sat, 1 Jul 2017 23:57:16 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 12D24160BF8; Sat, 1 Jul 2017 21:57:16 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 7D2F6160BDF for ; Sat, 1 Jul 2017 23:57:15 +0200 (CEST) Received: (qmail 51201 invoked by uid 500); 1 Jul 2017 21:57:14 -0000 Mailing-List: contact dev-help@maven.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Maven Developers List" Reply-To: "Maven Developers List" Delivered-To: mailing list dev@maven.apache.org Received: (qmail 51185 invoked by uid 99); 1 Jul 2017 21:57:14 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 01 Jul 2017 21:57:14 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 4A1F0DFBA2; Sat, 1 Jul 2017 21:57:12 +0000 (UTC) From: Tibor17 To: dev@maven.apache.org Reply-To: dev@maven.apache.org References: In-Reply-To: Subject: [GitHub] maven-surefire pull request #157: SUREFIRE-1383 dependenciesToScan Does Not ... Content-Type: text/plain Message-Id: <20170701215713.4A1F0DFBA2@git1-us-west.apache.org> Date: Sat, 1 Jul 2017 21:57:12 +0000 (UTC) archived-at: Sat, 01 Jul 2017 21:57:16 -0000 Github user Tibor17 commented on a diff in the pull request: https://github.com/apache/maven-surefire/pull/157#discussion_r125169778 --- Diff: maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java --- @@ -847,12 +847,33 @@ private DefaultScanResult scanDependencies() { try { + DefaultScanResult scanResult = new DefaultScanResult( Collections.EMPTY_LIST ); + + List dependenciesToScanList = new ArrayList( Arrays.asList( getDependenciesToScan() ) ); --- End diff -- No need to create two collections with `List dependenciesToScanList = new ArrayList( Arrays.asList( getDependenciesToScan() ) );` One modifiable collection can be with this code: `List dependenciesToScanList = new ArrayList();` `Collections.addAll( dependenciesToScanList, getDependenciesToScan() );` --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastructure@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org For additional commands, e-mail: dev-help@maven.apache.org