Skip to content

Commit

Permalink
Simplified code
Browse files Browse the repository at this point in the history
  • Loading branch information
benfortuna committed Feb 27, 2020
1 parent 787ec71 commit 495ceeb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
Expand Up @@ -62,7 +62,7 @@ public abstract class CalendarParserFactory implements Supplier<CalendarParser>
private static Supplier<CalendarParser> instance;
static {
Optional<Supplier<CalendarParser>> property = Configurator.getObjectProperty(KEY_FACTORY_CLASS);
instance = property.orElse(() -> new CalendarParserImpl());
instance = property.orElse(CalendarParserImpl::new);
}

/**
Expand Down
5 changes: 2 additions & 3 deletions src/main/java/net/fortuna/ical4j/model/Calendar.java
Expand Up @@ -184,11 +184,10 @@ public Calendar(PropertyList p, ComponentList<CalendarComponent> c, Validator<Ca
* @throws ParseException where calendar parsing fails
* @throws URISyntaxException where an invalid URI string is encountered
*/
public Calendar(Calendar c) throws ParseException, IOException,
URISyntaxException {
public Calendar(Calendar c) throws ParseException, URISyntaxException {

this(new PropertyList(c.getProperties()),
new ComponentList<CalendarComponent>(c.getComponents()));
new ComponentList<>(c.getComponents()));
}

/**
Expand Down

0 comments on commit 495ceeb

Please sign in to comment.