Class UnsynchronizedStaticFormatterRule

  • All Implemented Interfaces:
    net.sourceforge.pmd.lang.ast.AstVisitor, JavaVisitor, net.sourceforge.pmd.lang.rule.Rule, net.sourceforge.pmd.properties.PropertySource

    public class UnsynchronizedStaticFormatterRule
    extends AbstractJavaRulechainRule
    Using a Formatter (e.g. SimpleDateFormatter, DecimalFormatter) which is static can cause unexpected results when used in a multi-threaded environment. This rule will find static Formatters which are used in an unsynchronized manner.
    Author:
    Allan Caplan
    See Also:
    feature #226 Check for SimpleDateFormat as singleton?
    • Constructor Detail

      • UnsynchronizedStaticFormatterRule

        public UnsynchronizedStaticFormatterRule()