This is an automated email from the ASF dual-hosted git repository.
jstastnycz pushed a commit to branch main
in repository
https://gitbox.apache.org/repos/asf/incubator-kie-kogito-runtimes.git
The following commit(s) were added to refs/heads/main by this push:
new 10ed87e790 incubator-kie-kogito-runtimes#3438: check if resources
folder path exists
10ed87e790 is described below
commit 10ed87e7904b16f5d1f2f8caae0f3184591da415
Author: jstastny-cz <[email protected]>
AuthorDate: Tue Mar 12 10:56:05 2024 +0100
incubator-kie-kogito-runtimes#3438: check if resources folder path exists
---
.../files/deployment/KogitoAddOnSourceFilesProcessor.java | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git
a/quarkus/addons/source-files/deployment/src/main/java/org/kie/kogito/addon/source/files/deployment/KogitoAddOnSourceFilesProcessor.java
b/quarkus/addons/source-files/deployment/src/main/java/org/kie/kogito/addon/source/files/deployment/KogitoAddOnSourceFilesProcessor.java
index e3641df6ae..8ab5587f56 100644
---
a/quarkus/addons/source-files/deployment/src/main/java/org/kie/kogito/addon/source/files/deployment/KogitoAddOnSourceFilesProcessor.java
+++
b/quarkus/addons/source-files/deployment/src/main/java/org/kie/kogito/addon/source/files/deployment/KogitoAddOnSourceFilesProcessor.java
@@ -87,11 +87,13 @@ class KogitoAddOnSourceFilesProcessor extends
OneOfCapabilityKogitoAddOnProcesso
for (File resourceFile : resourcePaths) {
Path resourcePath = resourceFile.toPath();
- try (Stream<Path> walkedPaths = Files.walk(resourcePath)) {
- walkedPaths.filter(this::isSourceFile)
- .map(resourcePath::relativize)
- .map(Path::toString)
- .forEach(sourceFiles::add);
+ if (Files.exists(resourcePath)) {
+ try (Stream<Path> walkedPaths = Files.walk(resourcePath)) {
+ walkedPaths.filter(this::isSourceFile)
+ .map(resourcePath::relativize)
+ .map(Path::toString)
+ .forEach(sourceFiles::add);
+ }
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]