You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ss...@apache.org on 2021/12/16 17:17:41 UTC
[sling-org-apache-sling-caconfig-bnd-plugin] branch master updated: cosmetic: cleanup whitespaces
This is an automated email from the ASF dual-hosted git repository.
sseifert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-caconfig-bnd-plugin.git
The following commit(s) were added to refs/heads/master by this push:
new b66d884 cosmetic: cleanup whitespaces
b66d884 is described below
commit b66d8842bda026d6c4b237bce34b91aca4a23566
Author: Stefan Seifert <st...@users.noreply.github.com>
AuthorDate: Thu Dec 16 18:16:28 2021 +0100
cosmetic: cleanup whitespaces
---
.../bndplugin/ConfigurationClassScannerPlugin.java | 14 +++++++-------
.../sling/caconfig/bndplugin/GenerateHeaderTest.java | 8 ++++----
2 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/src/main/java/org/apache/sling/caconfig/bndplugin/ConfigurationClassScannerPlugin.java b/src/main/java/org/apache/sling/caconfig/bndplugin/ConfigurationClassScannerPlugin.java
index 1c39cb3..c71949f 100644
--- a/src/main/java/org/apache/sling/caconfig/bndplugin/ConfigurationClassScannerPlugin.java
+++ b/src/main/java/org/apache/sling/caconfig/bndplugin/ConfigurationClassScannerPlugin.java
@@ -39,11 +39,11 @@ import aQute.service.reporter.Reporter;
* All class names found are stored in a bundle header for processing them at runtime and reading their metadata.
*/
public class ConfigurationClassScannerPlugin implements AnalyzerPlugin, Plugin {
-
+
static final String CONFIGURATION_ANNOTATION_CLASS = "org.apache.sling.caconfig.annotation.Configuration";
-
+
static final String CONFIGURATION_CLASSES_HEADER = "Sling-ContextAware-Configuration-Classes";
-
+
private Reporter reporter;
@Override
@@ -58,7 +58,7 @@ public class ConfigurationClassScannerPlugin implements AnalyzerPlugin, Plugin {
@Override
public boolean analyzeJar(Analyzer analyzer) throws Exception {
-
+
// get all annotation classes from this project with Configuration annotation
Collection<String> classNames = getClassesWithAnnotation(CONFIGURATION_ANNOTATION_CLASS, analyzer);
@@ -66,11 +66,11 @@ public class ConfigurationClassScannerPlugin implements AnalyzerPlugin, Plugin {
if (!classNames.isEmpty()) {
analyzer.set(CONFIGURATION_CLASSES_HEADER, StringUtils.join(classNames, ","));
}
-
+
// we did not change any classes - no need to re-analyze
return false;
}
-
+
/**
* Get all classes that implement the given annotation via bnd Analyzer.
* @param analyzer Analyzer
@@ -93,5 +93,5 @@ public class ConfigurationClassScannerPlugin implements AnalyzerPlugin, Plugin {
}
return classNames;
}
-
+
}
diff --git a/src/test/java/org/apache/sling/caconfig/bndplugin/GenerateHeaderTest.java b/src/test/java/org/apache/sling/caconfig/bndplugin/GenerateHeaderTest.java
index aed0980..3ee5720 100644
--- a/src/test/java/org/apache/sling/caconfig/bndplugin/GenerateHeaderTest.java
+++ b/src/test/java/org/apache/sling/caconfig/bndplugin/GenerateHeaderTest.java
@@ -18,7 +18,7 @@
*/
package org.apache.sling.caconfig.bndplugin;
-import static org.apache.sling.caconfig.bndplugin.ConfigurationClassScannerPlugin.*;
+import static org.apache.sling.caconfig.bndplugin.ConfigurationClassScannerPlugin.CONFIGURATION_CLASSES_HEADER;
import org.junit.Test;
@@ -29,11 +29,11 @@ public class GenerateHeaderTest extends AbstractConfigurationClassScannerPlugin
@Test
public void testBuild() throws Exception {
Jar jar = builder.build();
-
- assertHeader(jar, CONFIGURATION_CLASSES_HEADER,
+
+ assertHeader(jar, CONFIGURATION_CLASSES_HEADER,
"dummy.example.pkg1.Config1",
"dummy.example.pkg1.Config2",
- "dummy.example.pkg1.sub1.Config3");
+ "dummy.example.pkg1.sub1.Config3");
}
}