Skip to main content

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

Interesting... if you have a testcase to reproduce this, I'd be curious to
see it. It smells like our bug.
If a type is referred to in the signature of a method, it should be
sufficient to use a corresponding import...



                                                                                                                             
                      Chris Grindstaff                                                                                       
                      <chrisg@appliedReas        To:       jdt-core-dev@xxxxxxxxxxx                                          
                      oning.com>                 cc:                                                                         
                      Sent by:                   Subject:  Re[2]: [jdt-core-dev] Re: What should Eclipse compiler default    
                      jdt-core-dev-admin@         settings be ?                                                              
                      eclipse.org                                                                                            
                                                                                                                             
                                                                                                                             
                      10/17/2002 07:33 PM                                                                                    
                      Please respond to                                                                                      
                      jdt-core-dev                                                                                           
                                                                                                                             
                                                                                                                             





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

_______________________________________________
jdt-core-dev mailing list
jdt-core-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/jdt-core-dev






Back to the top