You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by da...@apache.org on 2016/09/06 18:54:18 UTC
svn commit: r1759485 -
/commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/jpeg/exif/MicrosoftTagTest.java
Author: damjan
Date: Tue Sep 6 18:54:18 2016
New Revision: 1759485
URL: http://svn.apache.org/viewvc?rev=1759485&view=rev
Log:
The MicrosoftTagTest fails on Jenkins, because it selects an image
apparently already containing XP tags and duplicates are a problem,
so delete the tags before adding them.
Modified:
commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/jpeg/exif/MicrosoftTagTest.java
Modified: commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/jpeg/exif/MicrosoftTagTest.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/jpeg/exif/MicrosoftTagTest.java?rev=1759485&r1=1759484&r2=1759485&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/jpeg/exif/MicrosoftTagTest.java (original)
+++ commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/jpeg/exif/MicrosoftTagTest.java Tue Sep 6 18:54:18 2016
@@ -97,10 +97,19 @@ public class MicrosoftTagTest extends Ex
root.removeField(TiffTagConstants.TIFF_TAG_IMAGE_DESCRIPTION);
root.removeField(TiffTagConstants.TIFF_TAG_ARTIST);
+ // Duplicates can be a problem:
+ root.removeField(MicrosoftTagConstants.EXIF_TAG_XPAUTHOR);
root.add(MicrosoftTagConstants.EXIF_TAG_XPAUTHOR, AUTHOR);
+
+ root.removeField(MicrosoftTagConstants.EXIF_TAG_XPCOMMENT);
root.add(MicrosoftTagConstants.EXIF_TAG_XPCOMMENT, COMMENT);
+
+ root.removeField(MicrosoftTagConstants.EXIF_TAG_XPSUBJECT);
root.add(MicrosoftTagConstants.EXIF_TAG_XPSUBJECT, SUBJECT);
+
+ root.removeField(MicrosoftTagConstants.EXIF_TAG_XPTITLE);
root.add(MicrosoftTagConstants.EXIF_TAG_XPTITLE, TITLE);
+
final ByteArrayOutputStream baos = new ByteArrayOutputStream();
rewriter.updateExifMetadataLossy(imageWithExif, baos, outputSet);
checkFields(baos.toByteArray());