Skip to content

Commit

Permalink
Revert method removal for backwards compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
benfortuna committed Oct 26, 2021
1 parent 22b5f90 commit d0fb409
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions src/main/java/net/fortuna/ical4j/model/PropertyBuilder.java
Expand Up @@ -6,7 +6,7 @@
import java.io.IOException;
import java.net.URISyntaxException;
import java.text.ParseException;
import java.util.Collections;
import java.util.ArrayList;
import java.util.List;

/**
Expand All @@ -25,13 +25,26 @@ public class PropertyBuilder extends AbstractContentBuilder {
private ParameterList parameters = new ParameterList();

public PropertyBuilder() {
this(Collections.emptyList());
this(new ArrayList<>());
}

public PropertyBuilder(List<PropertyFactory<? extends Property>> factories) {
this.factories = factories;
}

/**
* Set the list of property factories supporting this builder instance.
* @param factories a list of property factories
* @return the builder instance
* @deprecated preference the constructor option for specifying factories
*/
@Deprecated
public PropertyBuilder factories(List<PropertyFactory<?>> factories) {
this.factories.clear();
this.factories.addAll(factories);
return this;
}

public PropertyBuilder name(String name) {
// property names are case-insensitive, but convert to upper case to simplify further processing
this.name = name.toUpperCase();
Expand Down

0 comments on commit d0fb409

Please sign in to comment.