[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: NEW ISSUE: Incorrect code in section 6.7.4 examples
Resending with correct subject line. -------- Original Message -------- Subject: Incorrect code in section 6.7.4 examples Date: Mon, 15 Sep 2008 22:17:13 +0100 From: Simon Nash <oasis@cjnash.com> To: sca-j@lists.oasis-open.org TARGET: Java Common Annotations and APIs, WD 04, section 6.7.4 DESCRIPTION: Incorrect code in section 6.7.4 examples 1. On line 556, the getCallback() call should say getService(). This is correct in line 548. 2. On line 567, the code shows the invocation of a static method ComponentContext.getRequestContext() This method isn't static and requires a ComponentContext instance that was set by injection. PROPOSAL: 1. Replace line 556 by: MyCallback myCallback = callback.getService(); 2. Replace lines 564 through 567 by: @Context ComponentContext context; public void someMethod() { MyCallback myCallback = context.getRequestContext().getCallback();
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]