Remove wildcards in the generic type
MODIFY
asciidoctorj-api/src/main/java/org/asciidoctor/ast/ContentPart.java
asciidoctorj-api/src/main/java/org/asciidoctor/ast/ContentPart.java
@@ -21,5 +21,5 @@ public interface ContentPart {
String getContent();
- List<? extends ContentPart> getParts();
+ List<ContentPart> getParts();
}

MODIFY
asciidoctorj-api/src/main/java/org/asciidoctor/ast/DocumentHeader.java
asciidoctorj-api/src/main/java/org/asciidoctor/ast/DocumentHeader.java
@@ -5,7 +5,7 @@ import java.util.Map;
public interface DocumentHeader {
- List<? extends Author> getAuthors();
+ List<Author> getAuthors();
Title getDocumentTitle();

MODIFY
asciidoctorj-api/src/main/java/org/asciidoctor/ast/StructuredDocument.java
asciidoctorj-api/src/main/java/org/asciidoctor/ast/StructuredDocument.java
@@ -10,7 +10,7 @@ import java.util.List;
*/
public interface StructuredDocument {
- List<? extends ContentPart> getParts();
+ List<ContentPart> getParts();
DocumentHeader getHeader();
@@ -48,7 +48,7 @@ public interface StructuredDocument {
* @return A list of ContentPart items that match the context if the
* context is not null or an empty collection.
*/
- List<? extends ContentPart> getPartsByContext(String context);
+ List<ContentPart> getPartsByContext(String context);
/**
* Return all parts that match specified style
@@ -57,7 +57,7 @@ public interface StructuredDocument {
* @return A list of ContentPart items that match the style if the
* style is not null or an empty collection.
*/
- List<? extends ContentPart> getPartsByStyle(String style);
+ List<ContentPart> getPartsByStyle(String style);
/**
* Return all parts that match specified role
@@ -66,5 +66,5 @@ public interface StructuredDocument {
* @return A list of ContentPart items that match the role if the
* role is not null or an empty collection.
*/
- List<? extends ContentPart> getPartsByRole(String role);
+ List<ContentPart> getPartsByRole(String role);
}

Remove wildcards in the generic type