Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1446855

Summary: EAP 7 documentation: Developing Web Services Applications: Code sample incorrect: Constructor name wrong
Product: [JBoss] JBoss Enterprise Application Platform 6 Reporter: Richard Robinson <rrobinso>
Component: DocumentationAssignee: Nidhi <nchaudha>
Status: CLOSED NOTABUG QA Contact:
Severity: low Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: eap-docs, nchaudha
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-05-02 09:55:19 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Richard Robinson 2017-04-29 21:30:19 UTC
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:

Comment 1 Nidhi 2017-05-02 09:55:19 UTC
Richard, thanks for reporting this error in the document.

Because this impacts EAP 7 documentation and not EAP 6, we should close this bug as <NOT A BUG>. We can track the required updates to EAP 7 documentation here:
https://issues.jboss.org/browse/JBEAP-10658.

I've added you as a watcher in the JIRA.