TICS Coding Standard Viewer 
TIOBE Software Quality Framework
Print-friendly version
©TIOBE Software www.tiobe.com
 
TIOBE - Java Coding Standard
Search

Rule:  StrictException7Checked automatically with code checker

Synopsis:A catch statement that catches an exception only to rethrow it should be avoided
Language:Java
Severity Level:3
Category:StrictException


Description:
Catch blocks that merely rethrow a caught exception only add to code size and runtime complexity.
public class Foo {
   void bar() {
    try {
    // do something
    }  catch (SomeException se) {
       throw se;
    }
   }
  }