From 931395d078f695924474dcbd7ee532a38fffabdc Mon Sep 17 00:00:00 2001 From: mariofusco Date: Mon, 23 Sep 2024 17:19:16 +0200 Subject: [PATCH] wip --- .../drools/decisiontable/DecisionTableProviderImpl.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drools-decisiontables/src/main/java/org/drools/decisiontable/DecisionTableProviderImpl.java b/drools-decisiontables/src/main/java/org/drools/decisiontable/DecisionTableProviderImpl.java index d4f42ae5a50..0cc404e43cd 100644 --- a/drools-decisiontables/src/main/java/org/drools/decisiontable/DecisionTableProviderImpl.java +++ b/drools-decisiontables/src/main/java/org/drools/decisiontable/DecisionTableProviderImpl.java @@ -79,10 +79,11 @@ public List loadFromInputStreamWithTemplates(Resource resource, } private String compileResource(Resource resource, DecisionTableConfiguration configuration) { - String resourcePath = resource.getSourcePath(); - return resourcePath == null ? - internalCompileResource(resource, configuration) : - compiledDtablesCache.computeIfAbsent(resourcePath, path -> internalCompileResource(resource, configuration)); + if (resource.getSourcePath() == null) { + return internalCompileResource(resource, configuration); + } + String resourceKey = resource.getSourcePath() + "?trimCell=" + configuration.isTrimCell() + "&worksheetName=" + configuration.getWorksheetName(); + return compiledDtablesCache.computeIfAbsent(resourceKey, path -> internalCompileResource(resource, configuration)); } private String internalCompileResource(Resource resource, DecisionTableConfiguration configuration) throws UncheckedIOException {