Skip to content

Commit 4e9aad4

Browse files
Deleted unused NGRequest constructor
1 parent 05e0330 commit 4e9aad4

3 files changed

Lines changed: 3 additions & 16 deletions

File tree

ng-adaptor-jetty-servlet/src/main/java/ng/adaptor/jetty/NGServletAdaptor.java

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -133,13 +133,7 @@ private static NGRequest servletRequestToNGRequest( final HttpServletRequest sr
133133
throw new UncheckedIOException( "Failed to consume the HTTP request's inputstream", e );
134134
}
135135

136-
final NGRequest request = new NGRequest( sr.getMethod(), sr.getRequestURI(), sr.getProtocol(), headerMap( sr ), bos.toByteArray() );
137-
138-
// FIXME: Form value parsing should really happen within the request object, not in the adaptor // Hugi 2021-12-31
139-
request._setFormValues( formValuesFromServletRequest );
140-
141-
// FIXME: Cookie parsing should happen within the request object, not in the adaptor // Hugi 2021-12-31
142-
request._setCookieValues( cookieValues( sr.getCookies() ) );
136+
final NGRequest request = new NGRequest( sr.getMethod(), sr.getRequestURI(), sr.getProtocol(), headerMap( sr ), formValuesFromServletRequest, cookieValues( sr.getCookies() ), bos.toByteArray() );
143137

144138
return request;
145139
}

ng-appserver/src/main/java/ng/appserver/NGRequest.java

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -71,14 +71,6 @@ public NGRequest( final String method, final String uri, final String httpVersio
7171
setContentBytes( contentBytes );
7272
}
7373

74-
/**
75-
* FIXME: Old constructor that doesn't set formValues and cookieValues. It's role is a little unclear at the moment, since I'm still considering if having parsing of form values/cookie values in NGRequest makes sense // Hugi 2025-06-09
76-
*/
77-
@Deprecated
78-
public NGRequest( final String method, final String uri, final String httpVersion, final Map<String, List<String>> headers, final byte[] contentBytes ) {
79-
this( method, uri, httpVersion, headers, null, null, contentBytes );
80-
}
81-
8274
/**
8375
* @return The requests form values (query parameters)
8476
*/

ng-appserver/src/main/java/ng/xperimental/NGAdaptorRaw.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,8 @@ private static NGRequest requestFromInputStream( final InputStream stream ) {
205205
content = new byte[0];
206206
}
207207

208-
return new NGRequest( method, uri, httpVersion, headers, content );
208+
// FIXME: We're not parsing/passing in formValues or cookies // Hugi 2026-05-11
209+
return new NGRequest( method, uri, httpVersion, headers, null, null, content );
209210
}
210211
catch( final IOException e ) {
211212
throw new RuntimeException( e );

0 commit comments

Comments
 (0)