Skip to content

Commit

Permalink
fix: possible NPE if data has not been set yet
Browse files Browse the repository at this point in the history
(cherry picked from commit a04d600)
  • Loading branch information
stuartwdouglas authored and gsmet committed Jan 14, 2025
1 parent ff3c414 commit ef7d63e
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import java.nio.file.SimpleFileVisitor;
import java.nio.file.attribute.BasicFileAttributes;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashSet;
import java.util.List;
Expand Down Expand Up @@ -39,9 +40,9 @@ public class ResourceNotFoundData {

private String baseUrl;
private String httpRoot;
private List<RouteDescription> endpointRoutes;
private Set<String> staticRoots;
private List<AdditionalRouteDescription> additionalEndpoints;
private List<RouteDescription> endpointRoutes = Collections.emptyList();
private Set<String> staticRoots = Collections.emptySet();
private List<AdditionalRouteDescription> additionalEndpoints = Collections.emptyList();

public void setBaseUrl(String baseUrl) {
this.baseUrl = baseUrl;
Expand Down

0 comments on commit ef7d63e

Please sign in to comment.