You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by GitBox <gi...@apache.org> on 2021/01/06 17:52:57 UTC
[GitHub] [maven-doxia] elharo commented on a change in pull request #35: [DOXIA-614] support source reference in doxia parser
elharo commented on a change in pull request #35:
URL: https://github.com/apache/maven-doxia/pull/35#discussion_r552855714
##########
File path: doxia-core/src/main/java/org/apache/maven/doxia/parser/AbstractParser.java
##########
@@ -101,7 +101,7 @@
/**
* {@inheritDoc}
*
- * @return a int.
+ * @return a int
Review comment:
I'd just delete this, if there's nothing more to say than the type
##########
File path: doxia-core/src/main/java/org/apache/maven/doxia/parser/AbstractParser.java
##########
@@ -117,7 +117,7 @@ public void setEmitComments( boolean emitComments )
/**
* <p>isEmitComments.</p>
*
- * @return a boolean.
+ * @return a boolean
Review comment:
ditto
##########
File path: doxia-core/src/main/java/org/apache/maven/doxia/Doxia.java
##########
@@ -41,24 +41,35 @@
* Parses the given source model using a parser with given id,
* and emits Doxia events into the given sink.
*
- * @param source not null reader that provides the source document.
- * You could use <code>newReader</code> methods from {@link org.codehaus.plexus.util.ReaderFactory}.
- * @param parserId Identifier for the parser to use.
- * @param sink A sink that consumes the Doxia events.
- * @throws org.apache.maven.doxia.parser.manager.ParserNotFoundException
- * if no parser could be found for the given id.
- * @throws org.apache.maven.doxia.parser.ParseException if the model could not be parsed.
+ * @param source not null reader that provides the source document
+ * @param parserId identifier for the parser to use
+ * @param sink a sink that consumes the Doxia events
+ * @throws ParserNotFoundException if no parser could be found for the given id
+ * @throws ParseException if the model could not be parsed
*/
void parse( Reader source, String parserId, Sink sink )
throws ParserNotFoundException, ParseException;
+ /**
+ * Parses the given source model using a parser with given id,
+ * and emits Doxia events into the given sink.
+ *
+ * @param source not null reader that provides the source document
+ * @param parserId identifier for the parser to use
+ * @param sink a sink that consumes the Doxia events
+ * @param reference string containing the reference to the source (e.g. filename)
+ * @throws ParserNotFoundException if no parser could be found for the given id
+ * @throws ParseException if the model could not be parsed
+ */
+ void parse( Reader source, String parserId, Sink sink, String reference )
Review comment:
probably doesn't matter a great deal, but adding methods to interfaces is not backwards compatible
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org