Skip to content

Commit

Permalink
Stage cannot be null if the application is running inside the browser…
Browse files Browse the repository at this point in the history
… via JPro
  • Loading branch information
besidev committed Jan 19, 2024
1 parent b5a6e37 commit 8014d7b
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ public interface HttpServer extends AutoCloseable {
* @throws HttpServerException if an error occurs
*/
static HttpServer create(@Nullable final Stage stage) throws HttpServerException {
if (WebAPI.isBrowser() && stage != null) {
if (WebAPI.isBrowser()) {
Objects.requireNonNull(stage, "Stage cannot be null");
WebAPI webAPI = WebAPI.getWebAPI(stage);
return new JProServerImpl(webAPI);
}
Expand Down

0 comments on commit 8014d7b

Please sign in to comment.