Skip to content

Commit

Permalink
Merge pull request #239 from scala-steward/update/reflections-0.10.2
Browse files Browse the repository at this point in the history
Update reflections to 0.10.2
  • Loading branch information
mkurz authored May 11, 2022
2 parents 740216f + 692ae03 commit f39b0d2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ private static class Classpath {
* @return a set of types names satisfying the condition
*/
static Set<String> getTypes(Environment env, String packageName) {
return getReflections(env, packageName).getStore().keys(TypeElementsScanner.class.getSimpleName());
return getReflections(env, packageName).getStore().getOrDefault(TypeElementsScanner.class.getSimpleName(), Collections.emptyMap()).keySet();
}
private static Reflections getReflections(Environment env, String packageName) {
// This is not supposed to happen very often, but just when starting the application.
Expand All @@ -232,7 +232,7 @@ private static Reflections getReflections(Environment env, String packageName) {
private static ConfigurationBuilder getReflectionsConfiguration(String packageName, ClassLoader classLoader) {
return new ConfigurationBuilder()
.addUrls(ClasspathHelper.forPackage(packageName, classLoader))
.filterInputsBy(new FilterBuilder().include(FilterBuilder.prefix(packageName + ".")))
.filterInputsBy(new FilterBuilder().includePackage((packageName + ".").replace(".","\\.") + ".*"))
.setScanners(new TypeElementsScanner(), new TypeAnnotationsScanner(), new SubTypesScanner());
}

Expand Down
2 changes: 1 addition & 1 deletion project/Dependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ object Dependencies {
"com.typesafe.play" %% "play-guice" % Versions.play % Test,
"com.typesafe.play" %% "filters-helpers" % Versions.play % Test,
"com.typesafe.play" %% "play-test" % Versions.play % Test,
("org.reflections" % "reflections" % "0.9.12")
("org.reflections" % "reflections" % "0.10.2")
.exclude("com.google.code.findbugs", "annotations")
.classifier("")
)
Expand Down

0 comments on commit f39b0d2

Please sign in to comment.