Return-Path: X-Original-To: apmail-maven-dev-archive@www.apache.org Delivered-To: apmail-maven-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C7C26173CC for ; Wed, 6 May 2015 18:20:03 +0000 (UTC) Received: (qmail 80937 invoked by uid 500); 6 May 2015 18:20:03 -0000 Delivered-To: apmail-maven-dev-archive@maven.apache.org Received: (qmail 80872 invoked by uid 500); 6 May 2015 18:20:03 -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 80854 invoked by uid 99); 6 May 2015 18:20:03 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 May 2015 18:20:03 +0000 X-ASF-Spam-Status: No, hits=3.2 required=5.0 tests=HTML_MESSAGE,SPF_SOFTFAIL X-Spam-Check-By: apache.org Received-SPF: softfail (athena.apache.org: transitioning domain of andreas.gudian@gmail.com does not designate 54.191.145.13 as permitted sender) Received: from [54.191.145.13] (HELO mx1-us-west.apache.org) (54.191.145.13) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 May 2015 18:19:57 +0000 Received: from mail-wi0-f172.google.com (mail-wi0-f172.google.com [209.85.212.172]) by mx1-us-west.apache.org (ASF Mail Server at mx1-us-west.apache.org) with ESMTPS id 69D8B22F74 for ; Wed, 6 May 2015 18:19:36 +0000 (UTC) Received: by widdi4 with SMTP id di4so212625089wid.0 for ; Wed, 06 May 2015 11:17:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:cc:content-type; bh=9T1ZLeLvr+h+1JJhbcdaFjW+VdhiVyC9zAn3BY5PVoM=; b=Hn5Uf5fnc1tRjg/POvFR03s7yRmdEm2eb2H5363sa/s1oE7O/c1nqS1lzr1TMoCjrr FyqFuTSChwYQ7Xs6ZawxiSso2BnQmR7sA7uNNVwKEuLaN0YPcOJQfzlwG5T2cV+Fm8Wk CJ67FyXIJZHmjZpmDBNfRK/PIXdD+dY2cOmh2ivrSlqx5lfki4KfTcU5/xhecraPuPjA eU6vfjBcn14UeqUJsaO1f0edX0G33CSAQJPcsKf90FMImiynyL0lD0iYmXcBmd7CdxIf +M7YQg68uvDcfBu+Eu7E1Ff3nsAwvG3/ljr+z390NyiSk+8bpwsmS22Y//pm/cvsJNDQ +EEA== MIME-Version: 1.0 X-Received: by 10.194.95.2 with SMTP id dg2mr1277419wjb.53.1430936240063; Wed, 06 May 2015 11:17:20 -0700 (PDT) Received: by 10.28.218.77 with HTTP; Wed, 6 May 2015 11:17:20 -0700 (PDT) Date: Wed, 6 May 2015 20:17:20 +0200 Message-ID: Subject: Supported Toolchain JDK version in Surefire / was: surefire refactoring done From: Andreas Gudian To: Tibor Digana Cc: Kristian Rosenvold , Maven Developers List Content-Type: multipart/alternative; boundary=047d7bf0c02a490b1f05156dce56 X-Virus-Checked: Checked by ClamAV on apache.org --047d7bf0c02a490b1f05156dce56 Content-Type: text/plain; charset=UTF-8 Hi Tibor, wow, that's a lot of work you put in there! Great! As you also changed stuff in surefire-booter and I always wondered, I'm cc-ing dev@ with this question: Do we have any documentation on which JDKs we officially support to be used in a toolchain configuration? For quite a while now, surefire-booter and dependent modules were compiled with target=1.5 (AFAIK). So surefire would support executing tests with toolchain-support only if the toolchained JDK is at least 1.5. I think that is ok, but we should keep an eye on that when going towards 1.7 for most of the code in the future. Do we have other plugins with this kind of dependency? I would guess that the compiler plugin doesn't care, as it doesn't have any of its own code executed in the toolchain JVM. Andreas 2015-05-06 18:42 GMT+02:00 Tibor Digana : > Finished a big refactoring in surefire. > Basically the previous code looked like Java 1.4 - no generics, no > for-each, no var-args. > Now it's more type safe code. > > These are activities in SUREFIRE-1155: > > Java 5 for-each instead of Iterator > optimized loops > optimized branching > some conditions in if-else could not happen -> therefore was simplified > improved loops variables > optimized use of this pointer > using Java Generics instead of java.util.Properties > removed unnecessary cast > boolean instead of Boolean > isEmpty() instead of Collection#size() == 0 > removed unused code > resolved warnings shown by IntelliJ IDEA > use Arrays.asList( o ) to Collections.singletonList( o ) with single object > @SuppressWarnings where code generics cannot be improved > substitute Java 4 StringBuilder with String concatination for better code > clarity. Java Compilet 5 will compile to use StringBuilder in bytecode. > using ternary operator > added remark @todo use try-with-resources JDK7, search in all code > get rid of Class[] in Reflection and use var args > caught InvocationTargetException and use exception cause in rethrown > RuntimeException > > Cheers > --047d7bf0c02a490b1f05156dce56--