Class JavaPropertiesHelper

java.lang.Object
org.sonar.java.checks.helpers.JavaPropertiesHelper

public class JavaPropertiesHelper extends Object
  • Method Details

    • retrievedPropertyDefaultValue

      @CheckForNull public static ExpressionTree retrievedPropertyDefaultValue(ExpressionTree expression)
      If the provided expression is an IdentifierTree or a MethodInvocationTree, it will check if it used to retrieve a property with a default value provided (using Properties.getProperty(String, String)).
      Parameters:
      expression -
      Returns:
      null The default value of the getProperty method invocation, or null if the expression is not of the expected kind or if is not used to retrieve a property with a default value. .