Github user onealj commented on a diff in the pull request:

    https://github.com/apache/commons-imaging/pull/27#discussion_r127632776
  
    --- Diff: 
src/test/java/org/apache/commons/imaging/formats/jpeg/segments/JfifSegmentTest.java
 ---
    @@ -0,0 +1,35 @@
    +package org.apache.commons.imaging.formats.jpeg.segments;
    +
    +import org.junit.Test;
    +
    +import static org.junit.Assert.assertEquals;
    +import static org.junit.Assert.fail;
    +
    +/**
    + * Unit tests for class {@link JfifSegment}.
    + *
    + * @date 13.07.2017
    + * @see JfifSegment
    + *
    + **/
    +public class JfifSegmentTest{
    +
    +
    +  @Test
    +  public void testCreatesJfifSegment() {
    +
    +      byte[] byteArray = new byte[25];
    +      JfifSegment jfifSegment = null;
    +
    +      try {
    +        jfifSegment = new JfifSegment((-2275), byteArray);
    +        fail("Expecting exception: Exception");
    +      } catch(Throwable e) {
    --- End diff --
    
    Any reason why you want to catch all Throwables (Errors and Exceptions) 
instead of the usual Exceptions?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org

Reply via email to