Skip to content

Commit

Permalink
address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
lashinijay committed Jan 23, 2025
1 parent f8704e8 commit 32c39df
Showing 1 changed file with 4 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -90,20 +90,8 @@ public class CustomCXFNonSpringJaxrsServlet extends CXFNonSpringServlet {
private static final String SPACE_PARAMETER_SPLIT_CHAR = "space";
private static final String JAXRS_APPLICATION_PARAM = "javax.ws.rs.Application";

private static final Map<String, String> systemPropMap = new HashMap<>();
private ClassLoader classLoader;
private Application application;

static {
systemPropMap.put("rest.api.admin.attachment.max.size", "10485760");
systemPropMap.put("rest.api.devportal.attachment.max.size", "10485760");
systemPropMap.put("rest.api.publisher.attachment.max.size", "10485760");
systemPropMap.put("rest.api.service.catalog.attachment.max.size", "10485760");
}

public CustomCXFNonSpringJaxrsServlet() {

}
private final Application application;

public CustomCXFNonSpringJaxrsServlet(Application app) {

Expand All @@ -116,6 +104,7 @@ public CustomCXFNonSpringJaxrsServlet(Application app, DestinationRegistry desti
this.application = app;
}

@Override
public void init(ServletConfig servletConfig) throws ServletException {

super.init(servletConfig);
Expand Down Expand Up @@ -197,8 +186,6 @@ protected void setExtensions(JAXRSServerFactoryBean bean, ServletConfig servletC
String systemPropValue = System.getProperty(propertyKey);
if (systemPropValue != null && !systemPropValue.isEmpty()) {
properties.put(key, systemPropValue);
} else {
properties.put(key, systemPropMap.get(propertyKey));
}
}
}
Expand Down Expand Up @@ -271,9 +258,9 @@ protected void setInterceptors(JAXRSServerFactoryBean bean, ServletConfig servle
}

if (!interceptors.isEmpty()) {
if ("jaxrs.outInterceptors".equals(paramName)) {
if (OUT_INTERCEPTORS_PARAM.equals(paramName)) {
bean.setOutInterceptors(interceptors);
} else if ("jaxrs.outFaultInterceptors".equals(paramName)) {
} else if (OUT_FAULT_INTERCEPTORS_PARAM.equals(paramName)) {
bean.setOutFaultInterceptors(interceptors);
} else {
bean.setInInterceptors(interceptors);
Expand Down

0 comments on commit 32c39df

Please sign in to comment.