From commits-return-58317-apmail-maven-commits-archive=maven.apache.org@maven.apache.org Sat Dec 19 15:05:27 2015 Return-Path: X-Original-To: apmail-maven-commits-archive@www.apache.org Delivered-To: apmail-maven-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D5ACE18462 for ; Sat, 19 Dec 2015 15:05:27 +0000 (UTC) Received: (qmail 95783 invoked by uid 500); 19 Dec 2015 15:05:26 -0000 Delivered-To: apmail-maven-commits-archive@maven.apache.org Received: (qmail 95717 invoked by uid 500); 19 Dec 2015 15:05:26 -0000 Mailing-List: contact commits-help@maven.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@maven.apache.org Delivered-To: mailing list commits@maven.apache.org Received: (qmail 95708 invoked by uid 99); 19 Dec 2015 15:05:26 -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, 19 Dec 2015 15:05:26 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 7CC2CE0063; Sat, 19 Dec 2015 15:05:26 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: tibordigana@apache.org To: commits@maven.apache.org Date: Sat, 19 Dec 2015 15:05:26 -0000 Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: [1/2] maven-surefire git commit: [SUREFIRE] refactoring Repository: maven-surefire Updated Branches: refs/heads/master a717b0cb4 -> 63963d676 [SUREFIRE] refactoring Project: http://git-wip-us.apache.org/repos/asf/maven-surefire/repo Commit: http://git-wip-us.apache.org/repos/asf/maven-surefire/commit/57662e59 Tree: http://git-wip-us.apache.org/repos/asf/maven-surefire/tree/57662e59 Diff: http://git-wip-us.apache.org/repos/asf/maven-surefire/diff/57662e59 Branch: refs/heads/master Commit: 57662e590f5208ab7816cdb5b151557eab2d68d1 Parents: a717b0c Author: Tibor17 Authored: Thu Dec 17 21:57:33 2015 +0100 Committer: Tibor17 Committed: Thu Dec 17 21:57:33 2015 +0100 ---------------------------------------------------------------------- .../org/apache/maven/surefire/booter/LazyTestsToRun.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/57662e59/surefire-booter/src/main/java/org/apache/maven/surefire/booter/LazyTestsToRun.java ---------------------------------------------------------------------- diff --git a/surefire-booter/src/main/java/org/apache/maven/surefire/booter/LazyTestsToRun.java b/surefire-booter/src/main/java/org/apache/maven/surefire/booter/LazyTestsToRun.java index c94f032..3a2eb26 100644 --- a/surefire-booter/src/main/java/org/apache/maven/surefire/booter/LazyTestsToRun.java +++ b/surefire-booter/src/main/java/org/apache/maven/surefire/booter/LazyTestsToRun.java @@ -23,9 +23,11 @@ import java.io.PrintStream; import java.util.Collections; import java.util.Iterator; -import org.apache.maven.surefire.util.ReflectionUtils; import org.apache.maven.surefire.util.TestsToRun; +import static org.apache.maven.surefire.booter.CommandReader.getReader; +import static org.apache.maven.surefire.util.ReflectionUtils.loadClass; + /** * A variant of TestsToRun that is provided with test class names * from an {@code System.in}. @@ -58,8 +60,7 @@ final class LazyTestsToRun private final class BlockingIterator implements Iterator> { - private final Iterator it = - CommandReader.getReader().getIterableClasses( originalOutStream ).iterator(); + private final Iterator it = getReader().getIterableClasses( originalOutStream ).iterator(); public boolean hasNext() { @@ -69,14 +70,13 @@ final class LazyTestsToRun public Class next() { String clazz = it.next(); - return ReflectionUtils.loadClass( Thread.currentThread().getContextClassLoader(), clazz ); + return loadClass( Thread.currentThread().getContextClassLoader(), clazz ); } public void remove() { throw new UnsupportedOperationException(); } - } /**