All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.sonar.l10n.pmd.AvoidThrowingNewInstanceOfSameException.html Maven / Gradle / Ivy

There is a newer version: 5.1
Show newest version
Catch blocks that merely rethrow a caught exception wrapped inside a new instance of the same type only add to code size and runtime complexity. Example :
public class Foo {
  void bar() {
    try {
      // do something
    }  catch (SomeException se) {
      // harmless comment
      throw new SomeException(se);
    }
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy