Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jsp-dev] Discussion on deprecating the ErrorData constructor without a queryString parameter

Hi,

Link to the ErrorData class: https://github.com/jakartaee/pages/blob/master/api/src/main/java/jakarta/servlet/jsp/ErrorData.java

Previous to the proposed Pages 4.0 updates there existed one constructor:

public ErrorData(Throwable throwable, int statusCode, String uri, String servletName)

Now, in 4.0, there are two, and for good reason since we want to take advantage of the new Servlet 6.1 jakarta.servlet.error.query_string attribute in the ErrorData class. The new constructor is:

public ErrorData(Throwable throwable, int statusCode, String uri, String servletName, String queryString)

I noticed that the existing constructor is now deprecated in Pages 4.0: @Deprecated(since = "4.0", forRemoval = true) and just calls through to the new constructor passing null for the queryString.

Why don't we keep both constructors if null is perfectly valid for the queryString?

Thanks,

Paul Nicolucci

Back to the top