Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 338852

Summary: Some Javadoc and code clean up suggestions
Product: [WebTools] WTP Common Tools Reporter: Gary Karasiuk <karasiuk>
Component: wst.commonAssignee: Gary Karasiuk <karasiuk>
Status: RESOLVED FIXED QA Contact: Carl Anderson <ccc>
Severity: minor    
Priority: P3 CC: shr31223
Version: 3.2.3Flags: ccc: review+
Target Milestone: 3.2.4   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
a patch to make the code more readable
none
another small patch to improve the readability
none
more cleanup
none
final cleanup patch none

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.