diff options
author | Marc R. Hoffmann <hoffmann@mountainminds.com> | 2013-02-24 10:41:25 +0100 |
---|---|---|
committer | Marc R. Hoffmann <hoffmann@mountainminds.com> | 2013-02-24 11:31:39 +0100 |
commit | 57f7cf06888f1e34f9ab2e3129c3d433826ecbe1 (patch) | |
tree | bc90430c6b7e3ecef0ffc148322386b194c9e827 | |
parent | 6396bb4769d9c044d38cebb126a81fc6cded8e01 (diff) | |
download | jacoco-57f7cf06888f1e34f9ab2e3129c3d433826ecbe1.tar.gz |
Fix JavaDoc problems reported by JDK 8.
24 files changed, 79 insertions, 13 deletions
diff --git a/jacoco-maven-plugin/src/org/jacoco/maven/BundleCreator.java b/jacoco-maven-plugin/src/org/jacoco/maven/BundleCreator.java index c70ad1d8..ba6a0e34 100644 --- a/jacoco-maven-plugin/src/org/jacoco/maven/BundleCreator.java +++ b/jacoco-maven-plugin/src/org/jacoco/maven/BundleCreator.java @@ -51,6 +51,7 @@ public final class BundleCreator { * the execution data. * @return the coverage data. * @throws IOException + * if class files can't be read */ public IBundleCoverage createBundle( final ExecutionDataStore executionDataStore) throws IOException { diff --git a/jacoco-maven-plugin/src/org/jacoco/maven/FileFilter.java b/jacoco-maven-plugin/src/org/jacoco/maven/FileFilter.java index 81b8a4df..25e30bdf 100644 --- a/jacoco-maven-plugin/src/org/jacoco/maven/FileFilter.java +++ b/jacoco-maven-plugin/src/org/jacoco/maven/FileFilter.java @@ -12,14 +12,14 @@ *******************************************************************************/ package org.jacoco.maven; -import org.apache.commons.collections.CollectionUtils; -import org.codehaus.plexus.util.FileUtils; -import org.codehaus.plexus.util.StringUtils; - import java.io.File; import java.io.IOException; import java.util.List; +import org.apache.commons.collections.CollectionUtils; +import org.codehaus.plexus.util.FileUtils; +import org.codehaus.plexus.util.StringUtils; + /** * A file filter using includes/excludes patterns. */ @@ -51,6 +51,7 @@ public class FileFilter { * the directory to scan * @return a list of files * @throws IOException + * if file system access fails */ @SuppressWarnings("unchecked") public List<String> getFileNames(final File directory) throws IOException { diff --git a/org.jacoco.ant/src/org/jacoco/ant/AbstractCoverageTask.java b/org.jacoco.ant/src/org/jacoco/ant/AbstractCoverageTask.java index b0dcdc5f..bbaf0b39 100644 --- a/org.jacoco.ant/src/org/jacoco/ant/AbstractCoverageTask.java +++ b/org.jacoco.ant/src/org/jacoco/ant/AbstractCoverageTask.java @@ -166,6 +166,7 @@ public class AbstractCoverageTask extends Task { * to when the output method is tcp client. Default is <code>6300</code> * * @param port + * port to bind to or connect to */ public void setPort(final int port) { agentOptions.setPort(port); diff --git a/org.jacoco.core/src/org/jacoco/core/analysis/Analyzer.java b/org.jacoco.core/src/org/jacoco/core/analysis/Analyzer.java index 156e94b2..9ebb4a8d 100644 --- a/org.jacoco.core/src/org/jacoco/core/analysis/Analyzer.java +++ b/org.jacoco.core/src/org/jacoco/core/analysis/Analyzer.java @@ -110,6 +110,7 @@ public class Analyzer { * @param input * stream to read class definition from * @throws IOException + * if the stream can't be read */ public void analyzeClass(final InputStream input) throws IOException { analyzeClass(new ClassReader(input)); @@ -123,6 +124,7 @@ public class Analyzer { * ZIP archive data * @return number of class files found * @throws IOException + * if the stream can't be read */ public int analyzeArchive(final InputStream input) throws IOException { final ZipInputStream zip = new ZipInputStream(input); @@ -147,6 +149,7 @@ public class Analyzer { * input data * @return number of class files found * @throws IOException + * if the stream can't be read */ public int analyzeAll(final InputStream input) throws IOException { final ContentTypeDetector detector = new ContentTypeDetector(input); @@ -170,6 +173,7 @@ public class Analyzer { * file or folder to look for class files * @return number of class files found * @throws IOException + * if the file can't be read */ public int analyzeAll(final File file) throws IOException { int count = 0; @@ -200,6 +204,7 @@ public class Analyzer { * entries * @return number of class files found * @throws IOException + * if a file can't be read */ public int analyzeAll(final String path, final File basedir) throws IOException { diff --git a/org.jacoco.core/src/org/jacoco/core/data/ExecutionDataReader.java b/org.jacoco.core/src/org/jacoco/core/data/ExecutionDataReader.java index e975ec2e..38d760c5 100644 --- a/org.jacoco.core/src/org/jacoco/core/data/ExecutionDataReader.java +++ b/org.jacoco.core/src/org/jacoco/core/data/ExecutionDataReader.java @@ -49,6 +49,7 @@ public class ExecutionDataReader { * Sets an listener for session information. * * @param visitor + * visitor to retrieve session info events */ public void setSessionInfoVisitor(final ISessionInfoVisitor visitor) { this.sessionInfoVisitor = visitor; @@ -58,6 +59,7 @@ public class ExecutionDataReader { * Sets an listener for execution data. * * @param visitor + * visitor to retrieve execution data events */ public void setExecutionDataVisitor(final IExecutionDataVisitor visitor) { this.executionDataVisitor = visitor; diff --git a/org.jacoco.core/src/org/jacoco/core/data/ExecutionDataWriter.java b/org.jacoco.core/src/org/jacoco/core/data/ExecutionDataWriter.java index 58bbe319..96b75d02 100644 --- a/org.jacoco.core/src/org/jacoco/core/data/ExecutionDataWriter.java +++ b/org.jacoco.core/src/org/jacoco/core/data/ExecutionDataWriter.java @@ -60,6 +60,7 @@ public class ExecutionDataWriter implements ISessionInfoVisitor, * Writes an file header to identify the stream and its protocol version. * * @throws IOException + * if the header can't be written */ private void writeHeader() throws IOException { out.writeByte(BLOCK_HEADER); @@ -71,6 +72,7 @@ public class ExecutionDataWriter implements ISessionInfoVisitor, * Flushes the underlying stream. * * @throws IOException + * if the underlying stream can't be flushed */ public void flush() throws IOException { out.flush(); diff --git a/org.jacoco.core/src/org/jacoco/core/internal/ContentTypeDetector.java b/org.jacoco.core/src/org/jacoco/core/internal/ContentTypeDetector.java index 7b76ffda..888876e3 100644 --- a/org.jacoco.core/src/org/jacoco/core/internal/ContentTypeDetector.java +++ b/org.jacoco.core/src/org/jacoco/core/internal/ContentTypeDetector.java @@ -45,6 +45,7 @@ public class ContentTypeDetector { * @param in * input to read the header from * @throws IOException + * if the stream can't be read */ public ContentTypeDetector(final InputStream in) throws IOException { if (in.markSupported()) { diff --git a/org.jacoco.core/src/org/jacoco/core/internal/data/CompactDataInput.java b/org.jacoco.core/src/org/jacoco/core/internal/data/CompactDataInput.java index c79fcad2..909f23a8 100644 --- a/org.jacoco.core/src/org/jacoco/core/internal/data/CompactDataInput.java +++ b/org.jacoco.core/src/org/jacoco/core/internal/data/CompactDataInput.java @@ -38,7 +38,7 @@ public class CompactDataInput extends DataInputStream { * * @return read value * @throws IOException - * might be thrown by the underlying stream + * if thrown by the underlying stream */ public int readVarInt() throws IOException { final int value = 0xFF & readByte(); @@ -53,6 +53,7 @@ public class CompactDataInput extends DataInputStream { * * @return boolean array * @throws IOException + * if thrown by the underlying stream */ public boolean[] readBooleanArray() throws IOException { final boolean[] value = new boolean[readVarInt()]; diff --git a/org.jacoco.core/src/org/jacoco/core/internal/data/CompactDataOutput.java b/org.jacoco.core/src/org/jacoco/core/internal/data/CompactDataOutput.java index 00733d0a..cd5d7062 100644 --- a/org.jacoco.core/src/org/jacoco/core/internal/data/CompactDataOutput.java +++ b/org.jacoco.core/src/org/jacoco/core/internal/data/CompactDataOutput.java @@ -41,6 +41,7 @@ public class CompactDataOutput extends DataOutputStream { * @param value * value to write * @throws IOException + * if thrown by the underlying stream */ public void writeVarInt(final int value) throws IOException { if ((value & 0xFFFFFF80) == 0) { @@ -58,6 +59,7 @@ public class CompactDataOutput extends DataOutputStream { * @param value * boolean array * @throws IOException + * if thrown by the underlying stream */ public void writeBooleanArray(final boolean[] value) throws IOException { writeVarInt(value.length); diff --git a/org.jacoco.core/src/org/jacoco/core/runtime/AgentOptions.java b/org.jacoco.core/src/org/jacoco/core/runtime/AgentOptions.java index 16b9b829..88c80986 100644 --- a/org.jacoco.core/src/org/jacoco/core/runtime/AgentOptions.java +++ b/org.jacoco.core/src/org/jacoco/core/runtime/AgentOptions.java @@ -82,8 +82,7 @@ public final class AgentOptions { public static final String DUMPONEXIT = "dumponexit"; /** - * Specifies the output mode. Default is - * <code>{@link OutputMode#file}</code>. + * Specifies the output mode. Default is {@link OutputMode#file}. * * @see OutputMode#file * @see OutputMode#tcpserver @@ -388,6 +387,7 @@ public final class AgentOptions { * or the port to connect to when output is <code>tcpclient</code> * * @param port + * port to listen on or connect to */ public void setPort(final int port) { validatePort(port); @@ -407,7 +407,8 @@ public final class AgentOptions { /** * Sets the hostname or IP address to listen to when output is - * <code>tcpserver</cose> or connect to when output is <code>tcpclient</code> + * <code>tcpserver</code> or connect to when output is + * <code>tcpclient</code> * * @param address * Hostname or IP address diff --git a/org.jacoco.core/src/org/jacoco/core/runtime/RemoteControlReader.java b/org.jacoco.core/src/org/jacoco/core/runtime/RemoteControlReader.java index 44243f91..f2702795 100644 --- a/org.jacoco.core/src/org/jacoco/core/runtime/RemoteControlReader.java +++ b/org.jacoco.core/src/org/jacoco/core/runtime/RemoteControlReader.java @@ -52,6 +52,7 @@ public class RemoteControlReader extends ExecutionDataReader { * Sets an listener for agent commands. * * @param visitor + * visitor to retrieve agent commands */ public void setRemoteCommandVisitor(final IRemoteCommandVisitor visitor) { this.remoteCommandVisitor = visitor; diff --git a/org.jacoco.report/src/org/jacoco/report/FileMultiReportOutput.java b/org.jacoco.report/src/org/jacoco/report/FileMultiReportOutput.java index c33061e4..2675bd35 100644 --- a/org.jacoco.report/src/org/jacoco/report/FileMultiReportOutput.java +++ b/org.jacoco.report/src/org/jacoco/report/FileMultiReportOutput.java @@ -31,6 +31,7 @@ public class FileMultiReportOutput implements IMultiReportOutput { * Creates a new instance for document output in the given base directory. * * @param basedir + * base directory */ public FileMultiReportOutput(final File basedir) { this.basedir = basedir; diff --git a/org.jacoco.report/src/org/jacoco/report/internal/AbstractGroupVisitor.java b/org.jacoco.report/src/org/jacoco/report/internal/AbstractGroupVisitor.java index b16b57d3..09dc0766 100644 --- a/org.jacoco.report/src/org/jacoco/report/internal/AbstractGroupVisitor.java +++ b/org.jacoco.report/src/org/jacoco/report/internal/AbstractGroupVisitor.java @@ -51,8 +51,11 @@ public abstract class AbstractGroupVisitor implements IReportGroupVisitor { * Called to handle the given bundle in a specific way. * * @param bundle + * analyzed bundle * @param locator + * source locator * @throws IOException + * if the report can't be written */ protected abstract void handleBundle(IBundleCoverage bundle, ISourceFileLocator locator) throws IOException; @@ -68,8 +71,10 @@ public abstract class AbstractGroupVisitor implements IReportGroupVisitor { * Called to handle a group with the given name in a specific way. * * @param name + * name of the group * @return created child group * @throws IOException + * if the report can't be written */ protected abstract AbstractGroupVisitor handleGroup(final String name) throws IOException; @@ -78,6 +83,7 @@ public abstract class AbstractGroupVisitor implements IReportGroupVisitor { * Must be called at the end of every group. * * @throws IOException + * if the report can't be written */ public final void visitEnd() throws IOException { finalizeLastChild(); @@ -88,6 +94,7 @@ public abstract class AbstractGroupVisitor implements IReportGroupVisitor { * Called to handle the end of this group in a specific way. * * @throws IOException + * if the report can't be written */ protected abstract void handleEnd() throws IOException; diff --git a/org.jacoco.report/src/org/jacoco/report/internal/html/HTMLGroupVisitor.java b/org.jacoco.report/src/org/jacoco/report/internal/html/HTMLGroupVisitor.java index d43f63bb..40261853 100644 --- a/org.jacoco.report/src/org/jacoco/report/internal/html/HTMLGroupVisitor.java +++ b/org.jacoco.report/src/org/jacoco/report/internal/html/HTMLGroupVisitor.java @@ -38,9 +38,13 @@ public class HTMLGroupVisitor extends AbstractGroupVisitor { * Create a new group handler. * * @param parent + * optional hierarchical parent * @param folder + * base folder for this group * @param context + * settings context * @param name + * group name */ public HTMLGroupVisitor(final ReportPage parent, final ReportOutputFolder folder, final IHTMLReportContext context, diff --git a/org.jacoco.report/src/org/jacoco/report/internal/html/page/BundlePage.java b/org.jacoco.report/src/org/jacoco/report/internal/html/page/BundlePage.java index d1eba0c1..39fedda1 100644 --- a/org.jacoco.report/src/org/jacoco/report/internal/html/page/BundlePage.java +++ b/org.jacoco.report/src/org/jacoco/report/internal/html/page/BundlePage.java @@ -34,10 +34,15 @@ public class BundlePage extends TablePage<ICoverageNode> { * Creates a new visitor in the given context. * * @param bundle + * coverage date for the bundle * @param parent + * optional hierarchical parent * @param locator + * source locator * @param folder + * base folder for this bundle * @param context + * settings context */ public BundlePage(final IBundleCoverage bundle, final ReportPage parent, final ISourceFileLocator locator, final ReportOutputFolder folder, diff --git a/org.jacoco.report/src/org/jacoco/report/internal/html/page/ClassPage.java b/org.jacoco.report/src/org/jacoco/report/internal/html/page/ClassPage.java index f80aa076..047856d6 100644 --- a/org.jacoco.report/src/org/jacoco/report/internal/html/page/ClassPage.java +++ b/org.jacoco.report/src/org/jacoco/report/internal/html/page/ClassPage.java @@ -31,11 +31,15 @@ public class ClassPage extends TablePage<IClassCoverage> { * Creates a new visitor in the given context. * * @param classNode + * coverage data for this class * @param parent + * optional hierarchical parent * @param sourcePage * corresponding source page or <code>null</code> * @param folder + * base folder to create this page in * @param context + * settings context */ public ClassPage(final IClassCoverage classNode, final ReportPage parent, final ILinkable sourcePage, final ReportOutputFolder folder, diff --git a/org.jacoco.report/src/org/jacoco/report/internal/html/page/GroupPage.java b/org.jacoco.report/src/org/jacoco/report/internal/html/page/GroupPage.java index 5d17e19f..2aae4d9a 100644 --- a/org.jacoco.report/src/org/jacoco/report/internal/html/page/GroupPage.java +++ b/org.jacoco.report/src/org/jacoco/report/internal/html/page/GroupPage.java @@ -25,9 +25,13 @@ public class GroupPage extends TablePage<ICoverageNode> { * Creates a new visitor in the given context. * * @param node + * corresponding coverage data * @param parent + * optional hierarchical parent * @param folder + * base folder to create this page in * @param context + * settings context */ public GroupPage(final ICoverageNode node, final ReportPage parent, final ReportOutputFolder folder, final IHTMLReportContext context) { diff --git a/org.jacoco.report/src/org/jacoco/report/internal/html/page/NodePage.java b/org.jacoco.report/src/org/jacoco/report/internal/html/page/NodePage.java index b6785756..c04e7d10 100644 --- a/org.jacoco.report/src/org/jacoco/report/internal/html/page/NodePage.java +++ b/org.jacoco.report/src/org/jacoco/report/internal/html/page/NodePage.java @@ -37,7 +37,7 @@ public abstract class NodePage<NodeType extends ICoverageNode> extends * @param parent * optional hierarchical parent * @param folder - * base folder to create this report in + * base folder to create this page in * @param context * settings context */ diff --git a/org.jacoco.report/src/org/jacoco/report/internal/html/page/PackagePage.java b/org.jacoco.report/src/org/jacoco/report/internal/html/page/PackagePage.java index c9ee80e2..e74244f5 100644 --- a/org.jacoco.report/src/org/jacoco/report/internal/html/page/PackagePage.java +++ b/org.jacoco.report/src/org/jacoco/report/internal/html/page/PackagePage.java @@ -36,10 +36,15 @@ public class PackagePage extends TablePage<IPackageCoverage> { * Creates a new visitor in the given context. * * @param node + * coverage data for this package * @param parent + * optional hierarchical parent * @param locator + * source locator * @param folder + * base folder to create this page in * @param context + * settings context */ public PackagePage(final IPackageCoverage node, final ReportPage parent, final ISourceFileLocator locator, final ReportOutputFolder folder, diff --git a/org.jacoco.report/src/org/jacoco/report/internal/html/page/ReportPage.java b/org.jacoco.report/src/org/jacoco/report/internal/html/page/ReportPage.java index e56b7d30..a993e1ce 100644 --- a/org.jacoco.report/src/org/jacoco/report/internal/html/page/ReportPage.java +++ b/org.jacoco.report/src/org/jacoco/report/internal/html/page/ReportPage.java @@ -68,6 +68,7 @@ public abstract class ReportPage implements ILinkable { * must be called at most once. * * @throws IOException + * if the page can't be written */ public void render() throws IOException { final HTMLDocument doc = new HTMLDocument( diff --git a/org.jacoco.report/src/org/jacoco/report/internal/html/page/SessionsPage.java b/org.jacoco.report/src/org/jacoco/report/internal/html/page/SessionsPage.java index 7cf0b86c..f67447fe 100644 --- a/org.jacoco.report/src/org/jacoco/report/internal/html/page/SessionsPage.java +++ b/org.jacoco.report/src/org/jacoco/report/internal/html/page/SessionsPage.java @@ -56,11 +56,17 @@ public class SessionsPage extends ReportPage { * Creates a new page page to display session information. * * @param sessionInfos + * session info objects * @param executionData + * execution data objects * @param index + * index for cross-linking * @param parent + * optional hierarchical parent * @param folder + * base folder to create this page in * @param context + * settings context */ public SessionsPage(final List<SessionInfo> sessionInfos, final Collection<ExecutionData> executionData, @@ -70,7 +76,7 @@ public class SessionsPage extends ReportPage { this.sessionInfos = sessionInfos; this.executionData = new ArrayList<ExecutionData>(executionData); this.index = index; - dateFormat = DateFormat.getDateTimeInstance(DateFormat.DEFAULT, + this.dateFormat = DateFormat.getDateTimeInstance(DateFormat.DEFAULT, DateFormat.DEFAULT, context.getLocale()); final ILanguageNames names = context.getLanguageNames(); Collections.sort(this.executionData, new Comparator<ExecutionData>() { diff --git a/org.jacoco.report/src/org/jacoco/report/internal/html/page/SourceFilePage.java b/org.jacoco.report/src/org/jacoco/report/internal/html/page/SourceFilePage.java index eda1d087..45ef7847 100644 --- a/org.jacoco.report/src/org/jacoco/report/internal/html/page/SourceFilePage.java +++ b/org.jacoco.report/src/org/jacoco/report/internal/html/page/SourceFilePage.java @@ -16,7 +16,7 @@ import static java.lang.String.format; import java.io.IOException; import java.io.Reader; -import org.jacoco.core.analysis.ISourceFileCoverage; +import org.jacoco.core.analysis.ISourceNode; import org.jacoco.report.internal.ReportOutputFolder; import org.jacoco.report.internal.html.HTMLElement; import org.jacoco.report.internal.html.IHTMLReportContext; @@ -26,7 +26,7 @@ import org.jacoco.report.internal.html.resources.Resources; * Page showing the content of a source file with numbered and highlighted * source lines. */ -public class SourceFilePage extends NodePage<ISourceFileCoverage> { +public class SourceFilePage extends NodePage<ISourceNode> { private final Reader sourceReader; @@ -36,13 +36,19 @@ public class SourceFilePage extends NodePage<ISourceFileCoverage> { * Creates a new page with given information. * * @param sourceFileNode + * coverage data for this source file * @param sourceReader + * reader for the source code * @param tabWidth + * number of character per tab * @param parent + * optional hierarchical parent * @param folder + * base folder for this page * @param context + * settings context */ - public SourceFilePage(final ISourceFileCoverage sourceFileNode, + public SourceFilePage(final ISourceNode sourceFileNode, final Reader sourceReader, final int tabWidth, final ReportPage parent, final ReportOutputFolder folder, final IHTMLReportContext context) { diff --git a/org.jacoco.report/src/org/jacoco/report/internal/html/page/TablePage.java b/org.jacoco.report/src/org/jacoco/report/internal/html/page/TablePage.java index 9a7b8986..c24435a6 100644 --- a/org.jacoco.report/src/org/jacoco/report/internal/html/page/TablePage.java +++ b/org.jacoco.report/src/org/jacoco/report/internal/html/page/TablePage.java @@ -55,6 +55,7 @@ public abstract class TablePage<NodeType extends ICoverageNode> extends * is rendered. * * @param item + * table item to add */ public void addItem(final ITableItem item) { items.add(item); diff --git a/org.jacoco.report/src/org/jacoco/report/internal/xml/XMLCoverageWriter.java b/org.jacoco.report/src/org/jacoco/report/internal/xml/XMLCoverageWriter.java index 3bc4cd00..990e3e43 100644 --- a/org.jacoco.report/src/org/jacoco/report/internal/xml/XMLCoverageWriter.java +++ b/org.jacoco.report/src/org/jacoco/report/internal/xml/XMLCoverageWriter.java @@ -40,6 +40,8 @@ public final class XMLCoverageWriter { * value of the name attribute * @return child element * @throws IOException + * if XML can't be written to the underlying output + * */ public static XMLElement createChild(final XMLElement parent, final String tagname, final String name) throws IOException { @@ -56,6 +58,7 @@ public final class XMLCoverageWriter { * @param element * container element for the bundle data * @throws IOException + * if XML can't be written to the underlying output */ public static void writeBundle(final IBundleCoverage bundle, final XMLElement element) throws IOException { @@ -113,6 +116,7 @@ public final class XMLCoverageWriter { * @param parent * container for the counter elements * @throws IOException + * if XML can't be written to the underlying output */ public static void writeCounters(final ICoverageNode node, final XMLElement parent) throws IOException { |