Skip to content

Commit

Permalink
Catch some unchecked exceptions when suppressing invalid properties
Browse files Browse the repository at this point in the history
  • Loading branch information
benfortuna committed Mar 3, 2023
1 parent 46e6283 commit 6c715bf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Expand Up @@ -159,7 +159,7 @@ public void endProperty(String name) throws URISyntaxException, ParseException,
Property property;
try {
property = propertyBuilder.build();
} catch (URISyntaxException | ParseException | IOException e) {
} catch (URISyntaxException | ParseException | IOException | IllegalArgumentException e) {
if (context.isSupressInvalidProperties()) {
LOG.warn("Suppressing invalid property", e);
return;
Expand Down
Expand Up @@ -90,6 +90,9 @@ class DefaultContentHandlerTest extends Specification {
contentHandler.parameter('value', 'DATE')
contentHandler.propertyValue('20181213T120000Z')
contentHandler.endProperty('dtend')
contentHandler.startProperty('geo')
contentHandler.propertyValue('')
contentHandler.endProperty('geo')
contentHandler.endComponent('vevent')
contentHandler.endCalendar()

Expand Down

0 comments on commit 6c715bf

Please sign in to comment.