[ checkstyle-Patches-2004776 ] Scope & SeverityLevel refactor

View: New views
1 Messages — Rating Filter:   Alert me  

[ checkstyle-Patches-2004776 ] Scope & SeverityLevel refactor

by SourceForge.net :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Patches item #2004776, was opened at 2008-06-28 14:17
Message generated for change (Comment added) made by oburn
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=397080&aid=2004776&group_id=29721

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
>Status: Closed
>Resolution: Fixed
Priority: 5
Private: No
Submitted By: Travis Schneeberger (tschneeberger)
>Assigned to: Oliver Burn (oburn)
Summary: Scope & SeverityLevel refactor

Initial Comment:
Oliver,

I done some general code cleanup/refactoring of the Scope & SeverityLevel classes.  These classes implemented the typesafe enum pattern.  I have now converted these classes over to official enums.  As a result these classes are much smaller because Serialization/Comparable support, etc is provided by the enum base class.

These classes are 100% API compatable with the old versions -- no other code changes are needed.

A couple things to note.  First, I left the method getName in both classes.  This method is now a little confusing because all enums contain a method called name.

Second, I left the getInstance method.  All enums already contain a static factory (valueOf method) but that method does not trim whitespace and is not case-insensitive.

Both of these things are probably ok but I thought they were worth mentioning.

Included are the two enum classes as well as new/updated junit tests.  Everything passed the GUMP test.  Let me know what you think.

Also, I have not heard anything on my last three patches for a couple of months.  I was wondering what you thought.  Specifically, I believe the updated AvoidStarImport check would be useful and is pretty straight forward.

Thanks,
Travis

----------------------------------------------------------------------

>Comment By: Oliver Burn (oburn)
Date: 2008-07-02 11:25

Message:
Logged In: YES
user_id=218824
Originator: NO

Thanks for the patch. I applied it the SVN, revision 2405.

I ended up refactoring it quite a bit when I read more into Enum. Got rid
of a lot of code.

----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=397080&aid=2004776&group_id=29721

-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
Checkstyle-devel mailing list
Checkstyle-devel@...
https://lists.sourceforge.net/lists/listinfo/checkstyle-devel
LightInTheBox - Buy quality products at wholesale price