Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
8268972: Add default impl for recent new Reporter.print method
Reviewed-by: prappo
  • Loading branch information
jonathan-gibbons committed Jun 25, 2021
1 parent 7ab1285 commit 44691cc3b003ee6769249b481fb9bf9c5afa6182
Showing 1 changed file with 9 additions and 1 deletion.
@@ -94,6 +94,12 @@ public interface Reporter {
* The positions are all 0-based character offsets from the beginning of content of the file.
* The positions should satisfy the relation {@code start <= pos <= end}.
*
* @implSpec
* This implementation always throws {@code UnsupportedOperationException}.
* The implementation provided by the {@code javadoc} tool to
* {@link Doclet#init(Locale, Reporter) initialize} a doclet
* overrides this implementation.
*
* @param kind the kind of diagnostic
* @param file the file
* @param start the beginning of the enclosing range
@@ -103,7 +109,9 @@ public interface Reporter {
*
* @since 17
*/
void print(Diagnostic.Kind kind, FileObject file, int start, int pos, int end, String message);
default void print(Diagnostic.Kind kind, FileObject file, int start, int pos, int end, String message) {
throw new UnsupportedOperationException();
}

/**
* Returns a writer that can be used to write non-diagnostic output,

1 comment on commit 44691cc

@openjdk-notifier
Copy link

@openjdk-notifier openjdk-notifier bot commented on 44691cc Jun 25, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.