Skip to content

Commit

Permalink
jetty#7880 Fix NPEs.
Browse files Browse the repository at this point in the history
  • Loading branch information
markslater committed Apr 15, 2022
1 parent 708553d commit 9ffd2bf
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ private CompressedContentFormat[] parsePrecompressedFormats(String precompressed
String encoding = setting[0].trim();
String extension = setting[1].trim();
ret.add(new CompressedContentFormat(encoding, extension));
if (gzip && !ret.contains(CompressedContentFormat.GZIP))
if (gzip == Boolean.TRUE && !ret.contains(CompressedContentFormat.GZIP))
ret.add(CompressedContentFormat.GZIP);
}
}
Expand All @@ -331,7 +331,7 @@ else if (precompressed != null)
ret.add(CompressedContentFormat.GZIP);
}
}
else if (gzip)
else if (gzip == Boolean.TRUE)
{
// gzip handling is for backwards compatibility with older Jetty
ret.add(CompressedContentFormat.GZIP);
Expand Down

0 comments on commit 9ffd2bf

Please sign in to comment.