Skip to content

Commit

Permalink
Fix NPE 2
Browse files Browse the repository at this point in the history
  • Loading branch information
ia3andy committed Jan 11, 2024
1 parent 9ba43c6 commit d5c0af7
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import jakarta.inject.Singleton;
import org.jboss.logging.Logger.Level;

import java.util.HashMap;
import java.util.Map;
import java.util.Optional;
import java.util.concurrent.TimeUnit;
Expand Down Expand Up @@ -72,7 +73,9 @@ public void track(String event, Map<String, Object> properties, String source, S
Level level = Level.DEBUG;
String hostName = config.hostname().orElse("code.quarkus.io");
if (analytics != null) {
Map<String, String> requestHeaders = Map.of("userAgent", fixedUserAgent, "referer", referer);
Map<String, String> requestHeaders = new HashMap<>();
requestHeaders.put("userAgent", fixedUserAgent);
requestHeaders.put("referer", referer);
Map<String, Object> props = Map.of(
"hostName", hostName,
"source", source,
Expand Down

0 comments on commit d5c0af7

Please sign in to comment.