[OpenJDK 2D-Dev] [9] RFR JDK-8168498: ExifGPSTagSet and ExifTIFFTagSet should use string literals for String constants
Brian Burkhalter
brian.burkhalter at oracle.com
Fri Oct 21 19:18:44 UTC 2016
Please review this trivial change at your convenience:
Issue: https://bugs.openjdk.java.net/browse/JDK-8168498
Patch: [1]
Thanks,
Brian
[1] diff
--- a/src/java.desktop/share/classes/javax/imageio/plugins/tiff/ExifGPSTagSet.java
+++ b/src/java.desktop/share/classes/javax/imageio/plugins/tiff/ExifGPSTagSet.java
@@ -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 = "" + '2' + '2' + '0' + '0';
--- a/src/java.desktop/share/classes/javax/imageio/plugins/tiff/ExifTIFFTagSet.java
+++ b/src/java.desktop/share/classes/javax/imageio/plugins/tiff/ExifTIFFTagSet.java
@@ -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 = "" + '0' + '2' + '1' + '0';
/**
* 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 = "" + '0' + '2' + '2' + '0';
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/2d-dev/attachments/20161021/bc850d59/attachment.html>
More information about the 2d-dev
mailing list