You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by kw...@apache.org on 2021/11/26 15:03:08 UTC
[sling-org-apache-sling-testing-osgi-mock] branch feature/SLING-8073 created (now 0d992f0)
This is an automated email from the ASF dual-hosted git repository.
kwin pushed a change to branch feature/SLING-8073
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-testing-osgi-mock.git.
at 0d992f0 SLING-8073 update reflections library to 0.10.2
This branch includes the following new commits:
new 0d992f0 SLING-8073 update reflections library to 0.10.2
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
[sling-org-apache-sling-testing-osgi-mock] 01/01: SLING-8073 update reflections library to 0.10.2
Posted by kw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
kwin pushed a commit to branch feature/SLING-8073
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-testing-osgi-mock.git
commit 0d992f06c4181d9419bd3b73850db3d7bdfb2f37
Author: Konrad Windszus <kw...@apache.org>
AuthorDate: Fri Nov 26 15:59:49 2021 +0100
SLING-8073 update reflections library to 0.10.2
improves logging and exception handling
---
core/pom.xml | 10 +++++-----
.../org/apache/sling/testing/mock/osgi/OsgiMetadataUtil.java | 7 ++-----
2 files changed, 7 insertions(+), 10 deletions(-)
diff --git a/core/pom.xml b/core/pom.xml
index 9b00c6b..4e74579 100644
--- a/core/pom.xml
+++ b/core/pom.xml
@@ -90,15 +90,11 @@
<dependency>
<groupId>org.reflections</groupId>
<artifactId>reflections</artifactId>
- <version>0.9.12</version>
+ <version>0.10.2</version>
<scope>compile</scope>
<!-- exclude all optional dependencies -->
<exclusions>
<exclusion>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-api</artifactId>
- </exclusion>
- <exclusion>
<groupId>dom4j</groupId>
<artifactId>dom4j</artifactId>
</exclusion>
@@ -114,6 +110,10 @@
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
</exclusion>
+ <exclusion>
+ <groupId>org.jboss</groupId>
+ <artifactId>jboss-vfs</artifactId>
+ </exclusion>
</exclusions>
</dependency>
diff --git a/core/src/main/java/org/apache/sling/testing/mock/osgi/OsgiMetadataUtil.java b/core/src/main/java/org/apache/sling/testing/mock/osgi/OsgiMetadataUtil.java
index 673a146..e094d10 100644
--- a/core/src/main/java/org/apache/sling/testing/mock/osgi/OsgiMetadataUtil.java
+++ b/core/src/main/java/org/apache/sling/testing/mock/osgi/OsgiMetadataUtil.java
@@ -52,7 +52,7 @@ import org.osgi.framework.Filter;
import org.osgi.framework.InvalidSyntaxException;
import org.osgi.framework.ServiceReference;
import org.reflections.Reflections;
-import org.reflections.scanners.ResourcesScanner;
+import org.reflections.scanners.Scanners;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.w3c.dom.Document;
@@ -74,9 +74,6 @@ final class OsgiMetadataUtil {
static {
DOCUMENT_BUILDER_FACTORY = DocumentBuilderFactory.newInstance();
DOCUMENT_BUILDER_FACTORY.setNamespaceAware(true);
-
- // suppress log entries from Reflections library
- Reflections.log = null;
}
private static final XPathFactory XPATH_FACTORY = XPathFactory.newInstance();
@@ -156,7 +153,7 @@ final class OsgiMetadataUtil {
}
// get all OSGI-INF/*.xml files from classpath
- Reflections reflections = new Reflections(METADATA_PATH, new ResourcesScanner());
+ Reflections reflections = new Reflections(METADATA_PATH, Scanners.Resources);
Pattern xmlFilesPattern = Pattern.compile("^.*\\.xml$");
Set<String> paths = reflections.getResources(xmlFilesPattern);