I generated the report using http://pmd.sf.net/ and some Ruby code - I'll send it to you in another email.
That would be cool if we could autogenerate patches to fix this stuff. The console interface to PMD can generate a report like: ====================== c:\j2sdk1.4.1_01\src\java\awt\Component.java 44 No need to import a type that's in the same package c:\j2sdk1.4.1_01\src\java\awt\Cursor.java 9 No need to import a type that's in the same package c:\j2sdk1.4.1_01\src\java\awt\Cursor.java 10 No need to import a type that's in the same package c:\j2sdk1.4.1_01\src\java\awt\Cursor.java 11 No need to import a type that's in the same package c:\j2sdk1.4.1_01\src\java\awt\EventQueue.java 19 No need to import a type that's in the same package c:\j2sdk1.4.1_01\src\java\awt\FontMetrics.java 10 No need to import a type that's in the same package ====================== so it probably wouldn't be too hard to write a Perl or Ruby script to pull out the filenames and line numbers and scrub/diff the offending files.... Yours, Tom > -----Original Message----- > From: Dominique Devienne [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, November 20, 2002 3:23 PM > To: 'Jakarta General List' > Subject: RE: More fun with unused/duplicate/unnecessary > import statements > > > Being new to this particular list, may I inquire about the > info gathering > and reporting tools used? Checkstyle? Others? Thanks. > > Any chance to be able to auto-generate bumbled patches per > project fixing > the unused imports? > > Just asking ;-) --DD > > -----Original Message----- > From: Tom Copeland [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, November 20, 2002 2:17 PM > To: 'Jakarta General List' > Subject: More fun with unused/duplicate/unnecessary import statements > > Here's the same sort of report that I posted a couple weeks ago, but > this time it includes stuff like: > > ============ > package foo.bar; > import foo.bar.Baz; > public class Buz {} > ============ > > i.e., imports from the same package. Numbers are about the same.... > http://cvs.apache.org/~tcopeland/bad_imports_20_nov_02.htm Yours, Tom -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>