...
We updated our code standards to Java 8 (actually, some were long due since Java 7), including:
Conversion to the easier to read constructs such as
switch
overString
sĀ s, the beautifulĀtry-with-resources
, the simplifiedfor-each
loops and compact multi-catch
statements.Switching to the better behaving
Collection.addAll
(instead of manual population ofList
s /Set
s) andString.join
(instead of manually createdfor
loops with booleans checking if it the first element)Note: We .Please note that we didn't go crazy with Lambda expressions - They actually : they bring very little benefit in the case of a very procedural process like Codehaus Cargo's (except perhaps for the XML-related parts where we do a lot of filtering), and in case something goes wrong the stack trace is very difficult to read when Lambda expressions are used...
While we did these updates, we also revised the Codehaus Cargo CI and enabled Java 6-based container tests. That implied further changes under the hood, for example changes in the version compatibility for the Cargo Samples Test Data modules. These obviously do not have much "visible" impact, yet enabled us to catch some long hidden bugs! See below...
Containers - Resin:
[CARGO-1530] We fixed the bug where the Resin 3.x container didn't work:
ResinRun
was being compiled to work with Java 7 onwards (since October 2018), yet due to incompatibilities betweencom.caucho.log.EnvironmentLogger
and the behaviour described in JDK-8015098, Resin 3.x doesn't run on Java 7 and above! We hence also build the Codehaus Cargo Resin container with Java 6 as the minimum version, while Java 8 remains the standard for all others.
...