IntelliJ Community . InspectThisPlugin

 
InspectThisPlugin 

HOME INDEX SEARCH CHANGES GO  

Description.

Various inspections (empty block/statement, empty catch block, redundant interface modifiers, modified parameter).

Warning.

This plugin uses non-published IDEA API.

Downloads, Bugs, RFEs:

http://sourceforge.net/projects/tz-ip/

How to deploy.

  • Copy the jar file (e.g. InspectThis.jar) to the plugins directory ($IDEA_HOME/plugins).
  • Restart IDEA.

Empty catch block.

Screenshot: http://www.intellij.org/twiki/pub/Main/InspectThisPlugin/EmptyCatchBlock.jpg

Effective Java by Joshua Bloch ( http://java.sun.com/docs/books/effective/toc.html ). Item 47: Don't ignore exceptions. http://www.intellij.net/tracker/idea/viewSCR?publicId=9286 ("New inspection: look for 'swallowed' exceptions") http://www.intellij.net/tracker/idea/viewSCR?publicId=12189 ('"Yellow line" warning on empty catch clause')

There's no fix for this inspection. Possible manual fixes:

  • Add comment.
  • Throw some exception.
  • Log the exception.
  • Remove the catch block.

Redundant interface modifiers.

Screenshot: http://www.intellij.org/twiki/pub/Main/InspectThisPlugin/RedundantInterfaceModifier.jpg

JLS, "Chapter 9. Interfaces" ( http://java.sun.com/docs/books/jls/second_edition/html/interfaces.doc.html )

http://www.intellij.net/tracker/idea/viewSCR?publicId=7573 ("Redundant modifier warnings in interfaces")

The fix removes the modifiers.

Modified parameter.

Screenshot: http://www.intellij.org/twiki/pub/Main/InspectThisPlugin/ModifiedParameter.jpg

http://www.intellij.net/tracker/idea/viewSCR?publicId=7738 ("Warnings for modified parameters")

There's no fix for this inspection.

Empty block.

Screenshots:

http://www.intellij.org/twiki/pub/Main/InspectThisPlugin/EmptyBlock.jpg http://www.intellij.org/twiki/pub/Main/InspectThisPlugin/RedundantSemicolons.jpg

Empty blocks: then, else, finally, code block, try, synchronized, switch, static initializer, instance initializer. Also checks for empty statements and redundant semicolons ("; class A {;};").

Exceptions: loop (for, while, do while), if-else.

Fix available only for empty statements and redundant semicolons.

How to build.

  1. Specify the location of $idea.home in build.properties
  2. ant clean main.

History.

0.4 (#833) - Jun 24, 2003

  • RFE [ 759547 ] Checking for empty statements.
  • RFE [ 759608 ] Checking for redundant semicolons ("; class A {;};").

0.3 (#833) - Jun 23, 2003

  • Bug [ 758833 ] Misses some empty catch blocks: {}.
  • RFE [ 758983 ] Modified parameter inspection.
  • RFE [ 759313 ] Empty block inspection (then, else, finally, etc).

0.2 (#833) - Jun 22, 2003

  • RFE [ 758813 ] Redundant interface modifiers.

0.1 (#833) - Jun 22, 2003

  • RFE [ 758690 ] Empty catch block.

-- TimurZambalayev - Jun 22, 2003

IntelliJPluginWebForm
IntelliJPluginName: InspectThisPlugin
IntelliJPluginVersion: 0.4
IntelliJPluginVendor: TimurZambalayev
IntelliJPluginBinary: http://sourceforge.net/projects/tz-ip/
IntelliJPluginSource: http://sourceforge.net/projects/tz-ip/
IntelliJPluginClassification:
TopicClassification: IntelliJPluginPackage
TopicShortDescription: Various inspections (empty block, empty catch block, redundant interface modifiers, modified parameter).
TestedOnOS: OsWin2K
ShouldRunOnOS: AnyOS

Attachment: sort Action: Size: Date: Who: Comment:
EmptyCatchBlock.jpg action 56830 22 Jun 2003 - 17:26 TimurZambalayev  
RedundantInterfaceModifier.jpg action 70622 22 Jun 2003 - 18:06 TimurZambalayev  
ModifiedParameter.jpg action 64299 23 Jun 2003 - 17:05 TimurZambalayev  
EmptyBlock.jpg action 78390 23 Jun 2003 - 17:05 TimurZambalayev  
RedundantSemicolons.jpg action 70704 24 Jun 2003 - 18:49 TimurZambalayev  

e d i t a t t a c h r e f - b y d i f f s m o r e
Have ideas, requests, problems regarding this site? Send feedback.
Copyright © 2000-2003 by the contributing authors. All materials at intellij.org are the property of the contributing authors.