Skip to content

Commit

Permalink
Rename method
Browse files Browse the repository at this point in the history
Issue: junit-team#3717
Signed-off-by: yongjunhong <[email protected]>
  • Loading branch information
YongGoose committed Nov 27, 2024
1 parent 3c95ac9 commit 624760b
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ public CachingJupiterConfiguration(JupiterConfiguration delegate) {
}

@Override
public Predicate<Class<? extends Extension>> createExtensionFilterByPatterns() {
return delegate.createExtensionFilterByPatterns();
public Predicate<Class<? extends Extension>> getFilterForAutoDetectedExtensions() {
return delegate.getFilterForAutoDetectedExtensions();
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public DefaultJupiterConfiguration(ConfigurationParameters configurationParamete
}

@Override
public Predicate<Class<? extends Extension>> createExtensionFilterByPatterns() {
public Predicate<Class<? extends Extension>> getFilterForAutoDetectedExtensions() {
Predicate<String> predicate = ClassNamePatternFilterUtils.includeMatchingClassNames(
getExtensionAutodetectionIncludePattern().orElse(ClassNamePatternFilterUtils.ALL_PATTERN)) //
.and(ClassNamePatternFilterUtils.excludeMatchingClassNames(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ public static MutableExtensionRegistry createRegistryWithDefaultExtensions(Jupit

private static void registerAutoDetectedExtensions(MutableExtensionRegistry extensionRegistry,
JupiterConfiguration configuration) {
Predicate<Class<? extends Extension>> filter = configuration.createExtensionFilterByPatterns();
Predicate<Class<? extends Extension>> filter = configuration.getFilterForAutoDetectedExtensions();

ServiceLoader<Extension> serviceLoader = ServiceLoader.load(Extension.class,
ClassLoaderUtils.getDefaultClassLoader());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ void newRegistryWithoutParentHasDefaultExtensions() {
void newRegistryWithoutParentHasDefaultExtensionsPlusAutodetectedExtensionsLoadedViaServiceLoader() {

when(configuration.isExtensionAutoDetectionEnabled()).thenReturn(true);
when(configuration.createExtensionFilterByPatterns()).thenReturn(__ -> true);
when(configuration.getFilterForAutoDetectedExtensions()).thenReturn(__ -> true);
registry = createRegistryWithDefaultExtensions(configuration);

List<Extension> extensions = registry.getExtensions(Extension.class);
Expand Down

0 comments on commit 624760b

Please sign in to comment.