evernat commented on Bug JENKINS-15736

In my opinion, this issue is critical since it affects all Jenkins core and installed plugins.

Based on the code, there is at least one line in the plugin which causes this issue and it is easy to fix:
https://github.com/jenkinsci/performance-plugin/blob/master/src/main/java/hudson/plugins/performance/AbstractReport.java#L21

In fact, the method Locale.setDefault(...) must never be called by the plugin.

I suggest to change the constructor of AbstractReport from

public AbstractReport() {
  if (Stapler.getCurrentRequest() != null) {
    Locale.setDefault(Stapler.getCurrentRequest().getLocale());
  }
  percentFormat = new DecimalFormat("0.0");
  dataFormat = new DecimalFormat("#,###");
}

to

public AbstractReport() {
  final Locale locale;
  if (Stapler.getCurrentRequest() != null) {
    locale = Stapler.getCurrentRequest().getLocale();
  } else {
    locale = Locale.getDefault();
  }
  percentFormat = new DecimalFormat("0.0", DecimalFormatSymbols.getInstance(locale));
  dataFormat = new DecimalFormat("#,###", DecimalFormatSymbols.getInstance(locale));
}
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira

--
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to