This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Now that the FeedReader sources are available in trunk, a developer needs to go through it VERY carefully and make sure that the code is 100% correct. There've been various comments on dev@apisupport about parts of the code that are not quite right, for example: (1) Closing of streams (i.e, do str.close() after str.writeObject(f) in the RssNode.AddRssAction). This was suggested by Rich in the finally block: finally { if (lock != null) lock.releaseLock(); if (str != null) str.close(); } 2. Cleaning of Window Component template will lead to changes in FeedReader. For example, someone pointed out that the following variables are not used: private RequestProcessor.Task nodeSetterTask; private final Object NODE_SETTER_LOCK = new Object(); 3. Some of the comments by Rich in his code indicate that the code being commented is not quite complete. For example, one comment is "//Should never happen - no reason for it to fail above" and Jesse, in the mailing list, says that an assertion should be used here. } catch (IntrospectionException e) { throw new AssertionError(e); } 4. Jesse also wrote that this is unsafe and that XMLUtil.toElementContent or return new Node[0] should be used instead: return "<font color='red'>" + ex.getMessage() + "</font>"; <b>The bottom line is that even though I could try and tweak the code myself, that would not be a good idea at all. I am not a developer. A developer needs to go through everything in this sample, before Beta preferably, to make sure that everything is exactly how we want users to code this application.</b>
One more thing: Please DIFF all/any changes to FeedReader code and send those diffs to me -- we must remember to keep the tutorial and the sources synchronized.
number 2. is fixed already.
Agreed with Honza and Peter, this is no more stopper for Beta.
Agreed with Honza, this should definitely be done for FCS, but not for Beta. But I'll do number 2 for Beta. Downgrading to P2.
i'll check this
items 1,2 and 4 done. number 3 I didn't understand. Apart from that, the code in feedreader seemed reasonable to me. But I'm not an expert on normative, correct code. close the issue or reasign back to Jesse? Checking in samples/feedreader-suite/FeedReader/src/org/myorg/feedreader/RssNode.java; /cvs/apisupport/samples/feedreader-suite/FeedReader/src/org/myorg/feedreader/RssNode.java,v <-- RssNode.java new revision: 1.2; previous revision: 1.1 done
I will handle #3 (at least in this case), change handling of #4, and go through other stuff.
committed Up-To-Date 1.3 apisupport/samples/feedreader-suite/FeedReader/src/org/myorg/feedreader/RssNode.java
Various bug fixes, cleanups, simplifications, and stylistic edits too numerous to list individually. committed * Up-To-Date 1.2 apisupport/samples/feedreader-suite/FeedReader/src/org/myorg/feedreader/Bundle.properties committed * Up-To-Date 1.2 apisupport/samples/feedreader-suite/FeedReader/src/org/myorg/feedreader/Feed.java committed * Up-To-Date 1.2 apisupport/samples/feedreader-suite/FeedReader/src/org/myorg/feedreader/FeedAction.java committed * Up-To-Date 1.3 apisupport/samples/feedreader-suite/FeedReader/src/org/myorg/feedreader/FeedTopComponent.java committed * Up-To-Date 1.4 apisupport/samples/feedreader-suite/FeedReader/src/org/myorg/feedreader/RssNode.java committed * Up-To-Date 1.2 apisupport/samples/feedreader-suite/branding/core/core.jar/org/netbeans/core/startup/Bundle.properties committed * Up-To-Date 1.3 apisupport/samples/feedreader-suite/branding/modules/org-netbeans-core-windows.jar/org/netbeans/core/windows/resources/layer.xml committed * Up-To-Date 1.4 apisupport/samples/feedreader-suite/nbproject/project.properties
Created attachment 27060 [details] Diff of changes