...
| Code Block | ||||
|---|---|---|---|---|
| ||||
String myString = DateFormat.getDateInstance(DateFormat.MEDIUM, Locale.US).format(rightNow.getTime()); /* ...restRest of code unchanged... */ |
Compliant Solution (Bypass Locale)
...
| Code Block | ||||
|---|---|---|---|---|
| ||||
if (rightNow.get(Calendar.MONTH) == Calendar.JUNE) {
/* ...restRest of code unchanged... */
|
Risk Assessment
Failure to specify the appropriate locale when using locale-dependent methods on local-dependent data without specifying the appropriate locale may result in unexpected behavior.
...