Skip to content

Commit c4185ba

Browse files
author
Dennis Labordus
committed
Upgrade to JDK 17
Signed-off-by: Dennis Labordus <[email protected]>
1 parent 49e56e5 commit c4185ba

File tree

9 files changed

+30
-15
lines changed

9 files changed

+30
-15
lines changed

.github/workflows/build-project.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,11 @@ jobs:
3737
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
3838
restore-keys: ${{ runner.os }}-m2
3939

40-
- name: Set up JDK 1.11
40+
- name: Set up JDK 17
4141
uses: actions/[email protected]
4242
with:
4343
distribution: 'zulu'
44-
java-version: '11'
44+
java-version: '17'
4545

4646
- name: Create custom Maven Settings.xml
4747
uses: whelk-io/maven-settings-xml-action@v20

.github/workflows/release-project.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,11 @@ jobs:
4141
shell: bash
4242
# Extra the tagname form the git reference, value of GITHUB_REF will be something like refs/tags/<tag_name>.
4343
run: echo "##[set-output name=tagname;]$(echo ${GITHUB_REF##*/})"
44-
- name: Set up JDK 1.11
44+
- name: Set up JDK 17
4545
uses: actions/[email protected]
4646
with:
4747
distribution: 'zulu'
48-
java-version: '11'
48+
java-version: '17'
4949

5050
- name: Create custom Maven Settings.xml
5151
uses: whelk-io/maven-settings-xml-action@v20

.github/workflows/sonarcloud-analysis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,11 @@ jobs:
3030
with:
3131
fetch-depth: 0
3232

33-
- name: Set up JDK 1.11
33+
- name: Set up JDK 17
3434
uses: actions/[email protected]
3535
with:
3636
distribution: 'zulu'
37-
java-version: '11'
37+
java-version: '17'
3838
- name: Cache SonarCloud packages
3939
uses: actions/cache@v3
4040
with:
Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,18 @@
1-
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.1/apache-maven-3.8.1-bin.zip
2-
wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.4/apache-maven-3.8.4-bin.zip
18+
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar

pom.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@ SPDX-License-Identifier: Apache-2.0
1515

1616
<properties>
1717
<maven.compiler.parameters>true</maven.compiler.parameters>
18-
<maven.compiler.source>11</maven.compiler.source>
19-
<maven.compiler.target>11</maven.compiler.target>
18+
<maven.compiler.release>17</maven.compiler.release>
2019
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
2120
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
2221

service/src/main/java/org/lfenergy/compas/scl/auto/alignment/common/ElementUtil.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public static Stream<Element> getElementsStream(Element element, String tagName)
2424
.map(Element.class::cast);
2525
}
2626

27-
public static String getAttribute(Element element, String attributeName) {
27+
public static String getAttributeValue(Element element, String attributeName) {
2828
String value = element.getAttribute(attributeName);
2929
if (StringUtils.isNotBlank(value)) {
3030
return value;

service/src/main/java/org/lfenergy/compas/scl/auto/alignment/model/AbstractGenericEntity.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ protected Stream<Element> getElementsStream(String tagName) {
2525
}
2626

2727
protected String getAttribute(String attributeName) {
28-
return ElementUtil.getAttribute(element, attributeName);
28+
return ElementUtil.getAttributeValue(element, attributeName);
2929
}
3030

3131
protected double convertStringToDouble(Element element) {

service/src/main/java/org/lfenergy/compas/scl/auto/alignment/model/AbstractGenericNameEntity.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ protected AbstractGenericNameEntity(P parent, Element element) {
1212
}
1313

1414
public String getName() {
15-
return ElementUtil.getAttribute(getElement(), "name");
15+
return ElementUtil.getAttributeValue(getElement(), "name");
1616
}
1717

1818
@Override

service/src/test/java/org/lfenergy/compas/scl/auto/alignment/common/ElementUtilTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ void getElementsStream_WhenCalledWithSCLElement_ThenRetrieveTheSubstationElement
3030
void getAttribute_WhenCalledWithSCLElement_ThenRetrieveVersionAttributeFromSCLElement() throws IOException {
3131
var scl = readSCLElement(BASIC_SCD_FILENAME);
3232

33-
var result = ElementUtil.getAttribute(scl, "version");
33+
var result = ElementUtil.getAttributeValue(scl, "version");
3434
assertNotNull(result);
3535
assertEquals("2007", result);
3636
}
@@ -39,7 +39,7 @@ void getAttribute_WhenCalledWithSCLElement_ThenRetrieveVersionAttributeFromSCLEl
3939
void getAttribute_WhenCalledWithSCLElement_ThenRetrieveEmptyDummyAttributeFromSCLElementAsNull() throws IOException {
4040
var scl = readSCLElement(BASIC_SCD_FILENAME);
4141

42-
var result = ElementUtil.getAttribute(scl, "dummy");
42+
var result = ElementUtil.getAttributeValue(scl, "dummy");
4343
assertNull(result);
4444
}
4545
}

0 commit comments

Comments
 (0)