8168498: ExifGPSTagSet and ExifTIFFTagSet should use string literals for String constants
Summary: Change new String(byte[],CharSet) to a string literal.
Reviewed-by: prr
--- a/jdk/src/java.desktop/share/classes/javax/imageio/plugins/tiff/ExifGPSTagSet.java Thu Oct 20 14:21:46 2016 +0300
+++ b/jdk/src/java.desktop/share/classes/javax/imageio/plugins/tiff/ExifGPSTagSet.java Mon Oct 24 13:19:05 2016 -0700
@@ -55,9 +55,7 @@
*
* @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).
--- a/jdk/src/java.desktop/share/classes/javax/imageio/plugins/tiff/ExifTIFFTagSet.java Thu Oct 20 14:21:46 2016 +0300
+++ b/jdk/src/java.desktop/share/classes/javax/imageio/plugins/tiff/ExifTIFFTagSet.java Mon Oct 24 13:19:05 2016 -0700
@@ -71,9 +71,7 @@
*
* @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 @@
*
* @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,