Performance: Class initializer may be 'static'
This commit is contained in:
parent
a35050b2e7
commit
830a227507
2 changed files with 2 additions and 2 deletions
|
@ -63,7 +63,7 @@ public class OsmAndFormatter {
|
||||||
private static final char WEST = 'W';
|
private static final char WEST = 'W';
|
||||||
private static final char EAST = 'E';
|
private static final char EAST = 'E';
|
||||||
|
|
||||||
{
|
static {
|
||||||
fixed2.setMinimumFractionDigits(2);
|
fixed2.setMinimumFractionDigits(2);
|
||||||
fixed1.setMinimumFractionDigits(1);
|
fixed1.setMinimumFractionDigits(1);
|
||||||
fixed1.setMinimumIntegerDigits(1);
|
fixed1.setMinimumIntegerDigits(1);
|
||||||
|
|
|
@ -23,7 +23,7 @@ public class SampleFormatter {
|
||||||
public final static float FEET_IN_ONE_METER = YARDS_IN_ONE_METER * 3f;
|
public final static float FEET_IN_ONE_METER = YARDS_IN_ONE_METER * 3f;
|
||||||
private static final DecimalFormat fixed2 = new DecimalFormat("0.00");
|
private static final DecimalFormat fixed2 = new DecimalFormat("0.00");
|
||||||
private static final DecimalFormat fixed1 = new DecimalFormat("0.0");
|
private static final DecimalFormat fixed1 = new DecimalFormat("0.0");
|
||||||
{
|
static {
|
||||||
fixed2.setMinimumFractionDigits(2);
|
fixed2.setMinimumFractionDigits(2);
|
||||||
fixed1.setMinimumFractionDigits(1);
|
fixed1.setMinimumFractionDigits(1);
|
||||||
fixed1.setMinimumIntegerDigits(1);
|
fixed1.setMinimumIntegerDigits(1);
|
||||||
|
|
Loading…
Reference in a new issue