Skip to content

Commit

Permalink
Fixed APIs implementation.
Browse files Browse the repository at this point in the history
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
  • Loading branch information
sbordet committed Oct 11, 2023
1 parent 57bea80 commit fdae470
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -123,14 +123,6 @@ public interface BayeuxContext {
*/
Object getSessionAttribute(String name);

/**
* Access the ServletContext (if any) init parameter.
*
* @param name the init parameter name
* @return The attribute value
*/
String getContextInitParameter(String name);

/**
* @return the application context path
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,6 @@ public Object getSessionAttribute(String name) {
return session != null ? session.getAttribute(name) : null;
}

@Override
public String getContextInitParameter(String name) {
return getServletContext().getInitParameter(name);
}

private ServletContext getServletContext() {
return request.getServletContext();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,12 @@ public List<String> getHeaderValues(String name) {

@Override
public String getParameter(String name) {
throw new UnsupportedOperationException("REMOVE API?");
return Request.extractQueryParameters(request).getValue(name);
}

@Override
public List<String> getParameterValues(String name) {
throw new UnsupportedOperationException("REMOVE API?");
return Request.extractQueryParameters(request).getValues(name);
}

@Override
Expand Down Expand Up @@ -99,11 +99,6 @@ public Object getSessionAttribute(String name) {
return session == null ? null : session.getAttribute(name);
}

@Override
public String getContextInitParameter(String name) {
throw new UnsupportedOperationException("REMOVE API?");
}

@Override
public String getContextPath() {
return request.getContext().getContextPath();
Expand All @@ -116,7 +111,7 @@ public String getURL() {

@Override
public List<Locale> getLocales() {
throw new UnsupportedOperationException("REMOVE API?");
return Request.getLocales(request);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,11 +143,6 @@ public Object getSessionAttribute(String name) {
return null;
}

@Override
public String getContextInitParameter(String name) {
return null;
}

@Override
public String getContextPath() {
return contextPath;
Expand Down

0 comments on commit fdae470

Please sign in to comment.