Class AvoidInlineConditionalsCheck

  • All Implemented Interfaces:
    Configurable, Contextualizable

    public class AvoidInlineConditionalsCheck
    extends AbstractCheck
    Detects inline conditionals.

    An example inline conditional is this:

     String a = getParameter("a");
     String b = (a==null || a.length<1) ? null : a.substring(1);
     
    Rationale: Some developers find inline conditionals hard to read, so their company's coding standards forbids them.
    Author:
    lkuehne