From commits-return-17882-archive-asf-public=cust-asf.ponee.io@struts.apache.org Thu Apr 26 18:15:40 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id A629B180648 for ; Thu, 26 Apr 2018 18:15:39 +0200 (CEST) Received: (qmail 2190 invoked by uid 500); 26 Apr 2018 16:15:33 -0000 Mailing-List: contact commits-help@struts.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@struts.apache.org Delivered-To: mailing list commits@struts.apache.org Received: (qmail 2181 invoked by uid 99); 26 Apr 2018 16:15:33 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 26 Apr 2018 16:15:33 +0000 Received: by gitbox.apache.org (ASF Mail Server at gitbox.apache.org, from userid 33) id F2377852E0; Thu, 26 Apr 2018 16:15:32 +0000 (UTC) Date: Thu, 26 Apr 2018 16:15:32 +0000 To: "commits@struts.apache.org" Subject: [struts] branch support-2-3 updated: not fail if OS or JDK doesn't support jpeg MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Message-ID: <152475933291.12887.13010252557836790380@gitbox.apache.org> From: yasserzamani@apache.org X-Git-Host: gitbox.apache.org X-Git-Repo: struts X-Git-Refname: refs/heads/support-2-3 X-Git-Reftype: branch X-Git-Oldrev: afc8f20440f80564d48cb1cc9904c76e02e84aac X-Git-Newrev: 4db5cdc47385fa493d223fd1eee213870b555297 X-Git-Rev: 4db5cdc47385fa493d223fd1eee213870b555297 X-Git-NotificationType: ref_changed_plus_diff X-Git-Multimail-Version: 1.5.dev Auto-Submitted: auto-generated This is an automated email from the ASF dual-hosted git repository. yasserzamani pushed a commit to branch support-2-3 in repository https://gitbox.apache.org/repos/asf/struts.git The following commit(s) were added to refs/heads/support-2-3 by this push: new 4db5cdc not fail if OS or JDK doesn't support jpeg 4db5cdc is described below commit 4db5cdc47385fa493d223fd1eee213870b555297 Author: Yasser Zamani AuthorDate: Thu Apr 26 20:44:50 2018 +0430 not fail if OS or JDK doesn't support jpeg --- .../src/test/java/org/apache/struts2/dispatcher/ChartResultTest.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugins/jfreechart/src/test/java/org/apache/struts2/dispatcher/ChartResultTest.java b/plugins/jfreechart/src/test/java/org/apache/struts2/dispatcher/ChartResultTest.java index b4a09a0..dd760a0 100644 --- a/plugins/jfreechart/src/test/java/org/apache/struts2/dispatcher/ChartResultTest.java +++ b/plugins/jfreechart/src/test/java/org/apache/struts2/dispatcher/ChartResultTest.java @@ -33,6 +33,7 @@ import org.jfree.chart.ChartFactory; import org.jfree.chart.JFreeChart; import org.jfree.data.general.DefaultPieDataset; +import javax.imageio.ImageIO; import javax.servlet.ServletOutputStream; import javax.servlet.http.HttpServletResponse; import java.io.IOException; @@ -97,7 +98,9 @@ public class ChartResultTest extends StrutsTestCase { result.execute(actionInvocation); EasyMock.verify(responseMock); - assertTrue(os.isWritten()); + + boolean envSupportsJpeg = ImageIO.getImageWritersByFormatName("jpeg").hasNext(); + assertTrue(envSupportsJpeg ^ !os.isWritten()); } -- To stop receiving notification emails like this one, please contact yasserzamani@apache.org.