Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 2024, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2025, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -95,12 +95,10 @@ private static SelectorProvider loadProviderFromProperty() {
try {
Class<?> clazz = Class.forName(cn, true, ClassLoader.getSystemClassLoader());
return (SelectorProvider) clazz.getConstructor().newInstance();
} catch (ClassNotFoundException |
NoSuchMethodException |
IllegalAccessException |
InvocationTargetException |
InstantiationException x) {
throw new ServiceConfigurationError(null, x);
} catch (Throwable t) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fix should have a regression test, based on the provided reproducer.
If it can't be implemented, then bug should have 'noreg-' label.

System.err.println("Invalid SelectorProvider specified: " + cn + ". Falling back to default provider.");
// Continue to load default provider
return null;
}
}

Expand Down