Skip to content

Commit c931f34

Browse files
authored
fix ci and minor shacl caching fix (eclipse-rdf4j#5270)
2 parents a5291bb + 114ba62 commit c931f34

File tree

4 files changed

+13
-7
lines changed

4 files changed

+13
-7
lines changed

.github/workflows/develop-status.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
with:
2121
java-version: ${{ matrix.jdk }}
2222
- name: Cache local Maven repository
23-
uses: actions/cache@v2
23+
uses: actions/cache@v4
2424
with:
2525
path: ~/.m2/repository
2626
key: ${{ runner.os }}-jdk${{ matrix.jdk }}-maven-${{ hashFiles('**/pom.xml') }}

.github/workflows/main-status.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
with:
2121
java-version: ${{ matrix.jdk }}
2222
- name: Cache local Maven repository
23-
uses: actions/cache@v2
23+
uses: actions/cache@v4
2424
with:
2525
path: ~/.m2/repository
2626
key: ${{ runner.os }}-jdk${{ matrix.jdk }}-maven-${{ hashFiles('**/pom.xml') }}

.github/workflows/pr-verify.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
with:
1616
java-version: ${{ matrix.jdk }}
1717
- name: Cache local Maven repository
18-
uses: actions/cache@v2
18+
uses: actions/cache@v4
1919
with:
2020
path: ~/.m2/repository
2121
key: ${{ runner.os }}-jdk${{ matrix.jdk }}-maven-${{ hashFiles('**/pom.xml') }}
@@ -48,7 +48,7 @@ jobs:
4848
with:
4949
java-version: 11
5050
- name: Cache local Maven repository
51-
uses: actions/cache@v2
51+
uses: actions/cache@v4
5252
with:
5353
path: ~/.m2/repository
5454
key: ${{ runner.os }}-jdk11-maven-${{ hashFiles('**/pom.xml') }}
@@ -81,7 +81,7 @@ jobs:
8181
with:
8282
java-version: 11
8383
- name: Cache local Maven repository
84-
uses: actions/cache@v2
84+
uses: actions/cache@v4
8585
with:
8686
path: ~/.m2/repository
8787
key: ${{ runner.os }}-jdk11-maven-${{ hashFiles('**/pom.xml') }}
@@ -107,7 +107,7 @@ jobs:
107107
with:
108108
java-version: 11
109109
- name: Cache local Maven repository
110-
uses: actions/cache@v2
110+
uses: actions/cache@v4
111111
with:
112112
path: ~/.m2/repository
113113
key: ${{ runner.os }}-jdk11-maven-${{ hashFiles('**/pom.xml') }}
@@ -133,7 +133,7 @@ jobs:
133133
with:
134134
java-version: 11
135135
- name: Cache local Maven repository
136-
uses: actions/cache@v2
136+
uses: actions/cache@v4
137137
with:
138138
path: ~/.m2/repository
139139
key: ${{ runner.os }}-jdk11-maven-${{ hashFiles('**/pom.xml') }}

core/sail/shacl/src/main/java/org/eclipse/rdf4j/sail/shacl/ShaclSailValidationException.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
public class ShaclSailValidationException extends SailException implements ValidationException {
2626

2727
private final ValidationReport validationReport;
28+
private Model cachedModel = null;
2829

2930
ShaclSailValidationException(ValidationReport validationReport) {
3031
super("Failed SHACL validation");
@@ -36,6 +37,9 @@ public class ShaclSailValidationException extends SailException implements Valid
3637
*/
3738
@Override
3839
public Model validationReportAsModel() {
40+
if (cachedModel != null) {
41+
return cachedModel;
42+
}
3943
Model model = getValidationReport().asModel();
4044

4145
model.setNamespace(RSX.NS);
@@ -45,6 +49,8 @@ public Model validationReportAsModel() {
4549
model.setNamespace(RDF.NS);
4650
model.setNamespace(RDFS.NS);
4751

52+
cachedModel = model;
53+
4854
return model;
4955
}
5056

0 commit comments

Comments
 (0)