From 56c57fb5d59347004c33cbcd0a050b9fc5e5ea92 Mon Sep 17 00:00:00 2001 From: sonora Date: Wed, 17 Jun 2015 02:32:37 +0200 Subject: [PATCH] shorten code --- OsmAnd/src/net/osmand/plus/helpers/ColorDialogs.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/helpers/ColorDialogs.java b/OsmAnd/src/net/osmand/plus/helpers/ColorDialogs.java index 18a141520c..fe0ffd77aa 100644 --- a/OsmAnd/src/net/osmand/plus/helpers/ColorDialogs.java +++ b/OsmAnd/src/net/osmand/plus/helpers/ColorDialogs.java @@ -96,9 +96,8 @@ public class ColorDialogs { public static String colorToString(int color) { if ((0xFF000000 & color) == 0xFF000000) { - private final static String ZEROES = "000000"; //$NON-NLS-1$ - String c = Integer.toHexString(color & 0x00FFFFFF); //$NON-NLS-1$ - return "#" + c.length() <= 6 ? ZEROES.substring(c.length()) + c : c; //$NON-NLS-1$ + private String c = Integer.toHexString(color & 0x00FFFFFF); + return "#" + c.length() <= 6 ? "000000".substring(c.length()) + c : c; //$NON-NLS-1$ } else { return "#" + Integer.toHexString(color); //$NON-NLS-1$ }