https://bugzilla.redhat.com/show_bug.cgi?id=1446855
Description of problem: The code sample in section 2.9.3.2 (Registering An Interceptor) of JBoss EAP 7, Developming Web Services Applications is incorrect. https://access.redhat.com/documentation/en-us/red_hat_jboss_enterprise_application_platform/7.0/html/developing_web_services_applications/developing_jax_rs_web_services#resteasy_interceptors
The name of no-arg constructor is wrong.
The code sample is this:
"public class MyApp extends Application {
protected Set<Object> singletons = new HashSet<Object>();
public PubSubApplication()
{ singletons.add(new MyResource()); singletons.add(new MyProvider()); }"...But should be this:
"public class MyApp extends Application {
protected Set<Object> singletons = new HashSet<Object>();
public MyApp() { singletons.add(new MyResource()); singletons.add(new MyProvider()); }
"...
Version-Release number of selected component (if applicable): EAP 7, Developming Web Services Applications, documentation.
How reproducible: Read the code sample in the documentation
Steps to Reproduce:
1. Read documentation, section 2.9.3.2, third code sample
2.
3.
Actual results:
"public class MyApp extends Application {
protected Set<Object> singletons = new HashSet<Object>();
public PubSubApplication()
{ singletons.add(new MyResource()); singletons.add(new MyProvider()); }"...Expected results:
"public class MyApp extends Application {
protected Set<Object> singletons = new HashSet<Object>();
public MyApp() { singletons.add(new MyResource()); singletons.add(new MyProvider()); }
"...
Additional info:
Document URL:
https://access.redhat.com/documentation/en-us/red_hat_jboss_enterprise_application_platform/7.0/html/developing_web_services_applications/developing_jax_rs_web_services#resteasy_interceptors
Section Number and Name:
Describe the issue:
The name of no-arg constructor in documentation code sample is wrong.
Suggestions for improvement:
Change the name of no-arg constructor to match the class name.
Additional information:
- clones
-
JBEAP-10658 Developing Web Services Applications: Code sample incorrect: Constructor name wrong
- Closed