Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re[2]: [jdt-core-dev] Re: What should Eclipse compiler default settings be ?

Wednesday, October 16, 2002, 9:25:25 AM, Olivier Thomann wrote:

OT> I do believe that some warnings are useful to clean up some code.
OT> I am thinking about unused locals, unused imports, access to a
OT> static context through a non-static reference, access to synthetic
OT> methods. More warnings simply mean that the user might want to
OT> reconsider the corresponding pieces of code. Helping the user to
OT> write good code is also a task of a compiler, isn't it?

One of the problems that I've run into when using "Unused imports" is
it's very easy to have many cases of unused imports if you implement
an interface. It's not unusual to have methods defined on the interface
that contain arguments that you don't need, not to mention the adapter
style of implementing that contains no implementation.

Seems like there may need to be special cases to handle these. Something
along the lines of if the method's body is empty then exclude that
method from the unused import warning.

Or something along the lines of, if the method is implementing an
interface method then exclude it. Not ideal so I guess these would
need to be a preference too....

Have others been bothered by this?

Chris
-- 
Chris Grindstaff
chrisg@xxxxxxxxxxxxxxxxxxxx  |  www.appliedReasoning.com



Back to the top