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

resources.report.rules.pmd.SimpleDateFormatNeedsLocale.html Maven / Gradle / Ivy



SimpleDateFormatNeedsLocale

SimpleDateFormatNeedsLocale

Be sure to specify a Locale when creating SimpleDateFormat instances to ensure that locale-appropriate formatting is used.


//AllocationExpression
 [ClassOrInterfaceType[@Image='SimpleDateFormat']]
 [Arguments[@ArgumentCount=1]]

Example(s):

        
public class Foo {
  // Should specify Locale.US (or whatever)
  private SimpleDateFormat sdf = new SimpleDateFormat("pattern");
}
        




© 2015 - 2024 Weber Informatics LLC | Privacy Policy