Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 338852 - Some Javadoc and code clean up suggestions
Summary: Some Javadoc and code clean up suggestions
Status: RESOLVED FIXED
Alias: None
Product: WTP Common Tools
Classification: WebTools
Component: wst.common (show other bugs)
Version: 3.2.3   Edit
Hardware: PC Windows XP
: P3 minor (vote)
Target Milestone: 3.2.4   Edit
Assignee: Gary Karasiuk CLA
QA Contact: Carl Anderson CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-03 15:51 EST by Gary Karasiuk CLA
Modified: 2011-03-09 12:08 EST (History)
1 user (show)

See Also:
ccc: review+


Attachments
a patch to make the code more readable (9.61 KB, patch)
2011-03-03 15:53 EST, Gary Karasiuk CLA
no flags Details | Diff
another small patch to improve the readability (5.06 KB, patch)
2011-03-03 16:03 EST, Gary Karasiuk CLA
no flags Details | Diff
more cleanup (52.38 KB, patch)
2011-03-04 08:01 EST, Gary Karasiuk CLA
no flags Details | Diff
final cleanup patch (49.00 KB, patch)
2011-03-04 12:00 EST, Gary Karasiuk CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Gary Karasiuk CLA 2011-03-03 15:51:42 EST
As I was reading through the code I made some Javadoc corrections, and cleaned up some of the code to make it more readable.
Comment 1 Gary Karasiuk CLA 2011-03-03 15:53:40 EST
Created attachment 190308 [details]
a patch to make the code more readable
Comment 2 Gary Karasiuk CLA 2011-03-03 16:03:44 EST
Created attachment 190310 [details]
another small patch to improve the readability
Comment 3 Gary Karasiuk CLA 2011-03-04 08:01:53 EST
Created attachment 190376 [details]
more cleanup

Please hold off applying this patch, as I may be adding some more to it.

But I wanted to attach the clean up that I have done so far, so that you would have a chance to see the types of things that I would like to change.

I am trying to remove some of the "clutter". For example, the Java spec says that all primitive fields in an Interface are public static final, so there is no need to add these modifiers. 

Or when you are adding an int field to a class, the spec already says that it will be initialized to 0, so there is no need to add " = 0".

I've been checking if inner classes should be static or not. I've been adding final to the fields that should be final. And I have been adding new Javadoc, in particular I have been documenting the locking.
Comment 4 Gary Karasiuk CLA 2011-03-04 12:00:02 EST
Created attachment 190413 [details]
final cleanup patch

Here are a set of changes, that makes the code more readable. Could you commit these please. The changes should cause not any behavioral changes.

I was reviewing this area of the code because of all the deadlocks. While this doesn't fix any of the deadlocks, I hope it makes the code a bit more understandable.
Comment 5 Gary Karasiuk CLA 2011-03-09 12:08:57 EST
Patch released to 3.2.4 and HEAD.