[ https://issues.apache.org/jira/browse/CSV-319?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ruiqi Dong closed CSV-319. -------------------------- Resolution: Not A Problem > CSVException constructor JavaDoc should document potential > NullPointerException > ------------------------------------------------------------------------------- > > Key: CSV-319 > URL: https://issues.apache.org/jira/browse/CSV-319 > Project: Commons CSV > Issue Type: Improvement > Affects Versions: 1.14.0 > Reporter: Ruiqi Dong > Priority: Minor > Original Estimate: 0.5h > Remaining Estimate: 0.5h > > The {{CSVException}} constructor uses {{String.format()}} internally but its > JavaDoc doesn't document the exceptions that can be thrown when invalid > arguments are provided. Current JavaDoc: > {code:java} > /** > * Constructs a new instance with a formatted message. > * > * @param format A {@link Formatter} format string. > * @param args See {@link String#format(String, Object...)}. > * @throws IllegalFormatException See {@link String#format(String, > Object...)}. > */ {code} > *Issue:* A {{NullPointerException}} will be thrown if the format parameter is > null > *Test case demonstrating the behavior:* > {code:java} > @Test > void testCSVExceptionThrowsNPEWithNullFormat() { > // This throws NullPointerException but is not documented > assertThrows(NullPointerException.class, > () -> new CSVException(null, "arg")); > }{code} > -- This message was sent by Atlassian Jira (v8.20.10#820010)