You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by cz...@apache.org on 2021/05/27 10:24:07 UTC

[sling-org-apache-sling-feature-extension-apiregions] branch master updated: SLING-10426 : Property name is not reported for configuration validation violations

This is an automated email from the ASF dual-hosted git repository.

cziegeler pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-feature-extension-apiregions.git


The following commit(s) were added to refs/heads/master by this push:
     new 43955ae  SLING-10426 : Property name is not reported for configuration validation violations
43955ae is described below

commit 43955ae54634caa2c6fc6f81015e7af41a6ff719
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Thu May 27 12:23:53 2021 +0200

    SLING-10426 : Property name is not reported for configuration validation violations
---
 .../extension/apiregions/analyser/CheckConfigurationApi.java        | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/main/java/org/apache/sling/feature/extension/apiregions/analyser/CheckConfigurationApi.java b/src/main/java/org/apache/sling/feature/extension/apiregions/analyser/CheckConfigurationApi.java
index 7efedf3..f332d7c 100644
--- a/src/main/java/org/apache/sling/feature/extension/apiregions/analyser/CheckConfigurationApi.java
+++ b/src/main/java/org/apache/sling/feature/extension/apiregions/analyser/CheckConfigurationApi.java
@@ -65,7 +65,8 @@ public class CheckConfigurationApi implements AnalyserTask{
                 }
                 for(final Map.Entry<String, PropertyValidationResult> propEntry : entry.getValue().getPropertyResults().entrySet()) {
                     for(final String warn : propEntry.getValue().getWarnings()) {
-                        context.reportConfigurationWarning(context.getFeature().getConfigurations().getConfiguration(entry.getKey()), warn);
+                        context.reportConfigurationWarning(context.getFeature().getConfigurations().getConfiguration(entry.getKey()), 
+                            "Property ".concat(propEntry.getKey()).concat(" - ").concat(warn));
                     }
                 }
                 if ( !entry.getValue().isValid() ) {
@@ -75,7 +76,8 @@ public class CheckConfigurationApi implements AnalyserTask{
                     for(final Map.Entry<String, PropertyValidationResult> propEntry : entry.getValue().getPropertyResults().entrySet()) {
                         if ( !propEntry.getValue().isValid() ) {
                             for(final String err : propEntry.getValue().getErrors()) {
-                                context.reportConfigurationError(context.getFeature().getConfigurations().getConfiguration(entry.getKey()), err);
+                                context.reportConfigurationError(context.getFeature().getConfigurations().getConfiguration(entry.getKey()), 
+                                    "Property ".concat(propEntry.getKey()).concat(" - ").concat(err));
                             }
                         }
                     }