From 427e060633fe894e71d4b8cf366b04539d9fdba2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B0=D0=BD=D0=B4=D1=8A?= =?UTF-8?q?=D1=80=20=D0=9A=D1=83=D1=80=D1=82=D0=B0=D0=BA=D0=BE=D0=B2?= Date: Thu, 4 Jan 2024 10:47:11 +0200 Subject: [PATCH] Fix compiler warnings in pde apitools tasks --- .../pde/api/tools/internal/tasks/APIToolsAnalysisTask.java | 5 +++-- .../tools/internal/tasks/AnalysisReportConversionTask.java | 6 +++--- .../api/tools/internal/tasks/MissingRefProblemsTask.java | 4 ++-- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/apitools/org.eclipse.pde.api.tools/src_ant/org/eclipse/pde/api/tools/internal/tasks/APIToolsAnalysisTask.java b/apitools/org.eclipse.pde.api.tools/src_ant/org/eclipse/pde/api/tools/internal/tasks/APIToolsAnalysisTask.java index 579b752625..e14243d3a1 100644 --- a/apitools/org.eclipse.pde.api.tools/src_ant/org/eclipse/pde/api/tools/internal/tasks/APIToolsAnalysisTask.java +++ b/apitools/org.eclipse.pde.api.tools/src_ant/org/eclipse/pde/api/tools/internal/tasks/APIToolsAnalysisTask.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2008, 2018 IBM Corporation and others. + * Copyright (c) 2008, 2024 IBM Corporation and others. * * This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 @@ -563,7 +563,8 @@ private IApiFilterStore getFilterStore(String name) { * @return an element that contains all the api problem nodes or null if an * error occurred */ - private void insertAPIProblems(Element root, Document document, List problems, ProblemCounter counter) throws CoreException { + private void insertAPIProblems(Element root, Document document, List problems, + ProblemCounter counter) { Element apiProblems = document.createElement(IApiXmlConstants.ELEMENT_API_PROBLEMS); root.appendChild(apiProblems); Element element = null; diff --git a/apitools/org.eclipse.pde.api.tools/src_ant/org/eclipse/pde/api/tools/internal/tasks/AnalysisReportConversionTask.java b/apitools/org.eclipse.pde.api.tools/src_ant/org/eclipse/pde/api/tools/internal/tasks/AnalysisReportConversionTask.java index 030e9c142f..b4ce49b9f5 100644 --- a/apitools/org.eclipse.pde.api.tools/src_ant/org/eclipse/pde/api/tools/internal/tasks/AnalysisReportConversionTask.java +++ b/apitools/org.eclipse.pde.api.tools/src_ant/org/eclipse/pde/api/tools/internal/tasks/AnalysisReportConversionTask.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2008, 2018 IBM Corporation and others. + * Copyright (c) 2008, 2024 IBM Corporation and others. * * This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 @@ -307,7 +307,7 @@ private void dumpIndexEntry(int i, PrintWriter writer, Summary summary) { /** * Write out the index file */ - private void dumpIndexFile(File reportsRoot, Summary[] summaries, Summary allNonApiBundleSummary) { + private void dumpIndexFile(Summary[] summaries, Summary allNonApiBundleSummary) { File htmlFile = new File(this.htmlReportsLocation, "index.html"); //$NON-NLS-1$ try (PrintWriter writer = new PrintWriter(new BufferedWriter(new FileWriter(htmlFile)))) { if (allNonApiBundleSummary != null) { @@ -469,7 +469,7 @@ public void execute() throws BuildException { if (!summariesList.isEmpty() || nonApiBundleSummary != null) { Summary[] summaries = new Summary[summariesList.size()]; summariesList.toArray(summaries); - dumpIndexFile(reportsRoot, summaries, nonApiBundleSummary); + dumpIndexFile(summaries, nonApiBundleSummary); } } } catch (SAXException | IOException e) { diff --git a/apitools/org.eclipse.pde.api.tools/src_ant/org/eclipse/pde/api/tools/internal/tasks/MissingRefProblemsTask.java b/apitools/org.eclipse.pde.api.tools/src_ant/org/eclipse/pde/api/tools/internal/tasks/MissingRefProblemsTask.java index 5e3e8a4873..344888576f 100644 --- a/apitools/org.eclipse.pde.api.tools/src_ant/org/eclipse/pde/api/tools/internal/tasks/MissingRefProblemsTask.java +++ b/apitools/org.eclipse.pde.api.tools/src_ant/org/eclipse/pde/api/tools/internal/tasks/MissingRefProblemsTask.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2018 IBM Corporation and others. + * Copyright (c) 2011, 2024 IBM Corporation and others. * * This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 @@ -358,7 +358,7 @@ public void reportNotSearched(Set notSearchedList) { /** * Adds {@link IApiProblem}s to the given document and root */ - private void insertAPIProblems(Element root, Document document, List problems) throws CoreException { + private void insertAPIProblems(Element root, Document document, List problems) { Element apiProblems = document.createElement(IApiXmlConstants.ELEMENT_API_PROBLEMS); root.appendChild(apiProblems); Element element = null;