Skip to content

Commit

Permalink
Merge pull request #10169 from RangerRick/ranger/jetty-npe-websocket-…
Browse files Browse the repository at this point in the history
…init

make sure that a ServiceLoader is retrieved before iterating
  • Loading branch information
joakime authored Aug 11, 2023
2 parents 88d70ca + 1327402 commit 490626e
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,12 @@ public abstract class ExtensionFactory implements Iterable<Class<? extends Exten
public ExtensionFactory()
{
availableExtensions = new HashMap<>();
Iterator<Extension> iterator = ServiceLoader.load(Extension.class).iterator();
final ServiceLoader sl = ServiceLoader.load(Extension.class);
if (sl == null)
{
return;
}
final Iterator<Extension> iterator = sl.iterator();
while (true)
{
try
Expand Down

0 comments on commit 490626e

Please sign in to comment.