8168498: ExifGPSTagSet and ExifTIFFTagSet should use string literals for String constants

Change new String(byte[],CharSet) to a string literal.

Reviewed-by: prr
This commit is contained in:
Brian Burkhalter 2016-10-24 13:19:05 -07:00
parent 64a2db9060
commit 82a75d6ce8
2 changed files with 3 additions and 9 deletions

View File

@ -55,9 +55,7 @@ public final class ExifGPSTagSet extends TIFFTagSet {
*
* @see #TAG_GPS_VERSION_ID
*/
public static final String GPS_VERSION_2_2 =
new String(new byte[] { '2', '2', '0', '0' },
StandardCharsets.US_ASCII);
public static final String GPS_VERSION_2_2 = "2200";
/**
* A tag indicating the North or South latitude (type ASCII, count = 2).

View File

@ -71,9 +71,7 @@ public final class ExifTIFFTagSet extends TIFFTagSet {
*
* @see #TAG_EXIF_VERSION
*/
public static final String EXIF_VERSION_2_1 =
new String(new byte[] { '0', '2', '1', '0' },
StandardCharsets.US_ASCII);
public static final String EXIF_VERSION_2_1 = "0210";
/**
* A value to be used with the "ExifVersion" tag to indicate Exif version
@ -82,9 +80,7 @@ public final class ExifTIFFTagSet extends TIFFTagSet {
*
* @see #TAG_EXIF_VERSION
*/
public static final String EXIF_VERSION_2_2 =
new String(new byte[] { '0', '2', '2', '0' },
StandardCharsets.US_ASCII);
public static final String EXIF_VERSION_2_2 = "0220";
/**
* A tag indicating the FlashPix version number (type UNDEFINED,