Skip to content

Commit

Permalink
java 8 refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
benfortuna committed May 18, 2019
1 parent bcdd542 commit 3887122
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/net/fortuna/ical4j/model/Component.java
Expand Up @@ -202,8 +202,8 @@ public final <T extends Property> T getProperty(final String name) {
* @return the first matching property in the property list with the specified name
* @throws ConstraintViolationException when a property is not found
*/
protected final Property getRequiredProperty(String name) throws ConstraintViolationException {
Property p = getProperties().getProperty(name);
protected final <T extends Property> T getRequiredProperty(String name) throws ConstraintViolationException {
T p = getProperties().getProperty(name);
if (p == null) {
throw new ConstraintViolationException(String.format("Missing %s property", name));
}
Expand Down

0 comments on commit 3887122

Please sign in to comment.