Allon Murienik 485929e626 CSV-252: Clean up exception handling (#50)
* CSV-252: Clean up assertions using assertThrows

As a followup to commit e2f0a4d8a83a41eaa984086636a3712c682307ea that
introduced JUnit Jupiter to the project, this patch leverages the new
Assertions#assertThrows method to clean up tests for expected
exceptions.

Instead of the somewhat clunky structure common in JUnit 4 tests:

```
try {
    someMethod();
    fail("SomeException should be thrown");
} catch (SomeException e) {
    // Expected...

    // Possibly some assertion on e
}
```

JUnit Jupiter allows the following elegant syntax:

```
SomeException e = assertThrows(SomeException.class, () -> someMethod());
// Possibly some assertions on e
```

* CSV-252: Remove redundant throws clauses from tests
2019-10-06 08:16:08 -04:00
2016-07-30 08:15:58 -07:00
2014-03-28 17:09:20 +00:00
2019-06-01 17:20:20 -04:00
2012-09-11 18:51:54 +00:00
2019-06-01 17:20:20 -04:00
2019-06-01 17:20:20 -04:00
2019-07-04 10:00:21 -04:00

Apache Commons CSV

Build Status Coverage Status Maven Central Javadocs

The Apache Commons CSV library provides a simple interface for reading and writing CSV files of various types.

Documentation

More information can be found on the Apache Commons CSV homepage. The Javadoc can be browsed. Questions related to the usage of Apache Commons CSV should be posted to the user mailing list.

Where can I get the latest release?

You can download source and binaries from our download page.

Alternatively you can pull it from the central Maven repositories:

<dependency>
  <groupId>org.apache.commons</groupId>
  <artifactId>commons-csv</artifactId>
  <version>1.7</version>
</dependency>

Contributing

We accept Pull Requests via GitHub. The developer mailing list is the main channel of communication for contributors. There are some guidelines which will make applying PRs easier for us:

  • No tabs! Please use spaces for indentation.
  • Respect the code style.
  • Create minimal diffs - disable on save actions like reformat source code or organize imports. If you feel the source code should be reformatted create a separate PR for this change.
  • Provide JUnit tests for your changes and make sure your changes don't break any existing tests by running mvn clean test.

If you plan to contribute on a regular basis, please consider filing a contributor license agreement. You can learn more about contributing via GitHub in our contribution guidelines.

License

This code is under the Apache Licence v2.

See the NOTICE.txt file for required notices and attributions.

Donations

You like Apache Commons CSV? Then donate back to the ASF to support the development.

Additional Resources

Description
Apache Commons CSV
Readme 45 MiB
Languages
Java 99.8%
Shell 0.2%