Skip to content

Commit

Permalink
#161: NullPointerException in javax.xml.ws.Service.<init>
Browse files Browse the repository at this point in the history
Signed-off-by: Lukas Jungmann <lukas.jungmann@oracle.com>
  • Loading branch information
lukasj committed Feb 19, 2021
1 parent 0d4fa9c commit a37443b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions api/src/main/java/jakarta/xml/ws/spi/FactoryFinder.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2005, 2020 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Distribution License v. 1.0, which is available at
Expand Down Expand Up @@ -71,7 +71,10 @@ static <T> T find(Class<T> factoryClass, String fallbackClassName) {

// handling Glassfish (platform specific default)
if (isOsgi()) {
return (T) lookupUsingOSGiServiceLoader(factoryId);
provider = (T) lookupUsingOSGiServiceLoader(factoryId);
if (provider != null) {
return provider;
}
}

if (fallbackClassName == null) {
Expand Down

0 comments on commit a37443b

Please sign in to comment.