From 08198196464eba4953814905a6f7f9913f6f4192 Mon Sep 17 00:00:00 2001 From: jlerbsc Date: Wed, 21 Jun 2023 08:44:12 +0200 Subject: [PATCH] Second fix for sonar rule 's1130' throws declarations should not be superfluous. This fix is specific to constructor declarations. --- .../src/main/java/org/biojava/nbio/ronn/ORonn.java | 8 ++++---- .../src/main/java/org/biojava/nbio/ronn/ORonnModel.java | 2 +- .../nbio/structure/align/util/SynchronizedOutFile.java | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/biojava-protein-disorder/src/main/java/org/biojava/nbio/ronn/ORonn.java b/biojava-protein-disorder/src/main/java/org/biojava/nbio/ronn/ORonn.java index 7b5b5e7d1a..4d4245cfaf 100644 --- a/biojava-protein-disorder/src/main/java/org/biojava/nbio/ronn/ORonn.java +++ b/biojava-protein-disorder/src/main/java/org/biojava/nbio/ronn/ORonn.java @@ -81,8 +81,8 @@ public final class ORonn implements Callable { ORonn(final FastaSequence sequence, final ModelLoader mloader, - final InputParameters params) throws NumberFormatException, - IOException { + final InputParameters params) throws + IOException { this.sequence = sequence; this.mloader = mloader; out = params.getOutputWriter(); @@ -93,8 +93,8 @@ public final class ORonn implements Callable { timer = new Timer(TimeUnit.MILLISECONDS); } //This constructor is for API calls where the caller collects the results directly - ORonn(final FastaSequence sequence, final ModelLoader mloader) throws NumberFormatException, - IOException { + ORonn(final FastaSequence sequence, final ModelLoader mloader) throws +IOException { this.sequence = sequence; this.mloader = mloader; out = new PrintWriter(new NullOutputStream()); diff --git a/biojava-protein-disorder/src/main/java/org/biojava/nbio/ronn/ORonnModel.java b/biojava-protein-disorder/src/main/java/org/biojava/nbio/ronn/ORonnModel.java index a78e66f728..f3a5c187cb 100644 --- a/biojava-protein-disorder/src/main/java/org/biojava/nbio/ronn/ORonnModel.java +++ b/biojava-protein-disorder/src/main/java/org/biojava/nbio/ronn/ORonnModel.java @@ -169,7 +169,7 @@ private final float[] align(final int sResidue, final int dIndex) { } public ORonnModel(final String sequence, final Model model, - final float disorder) throws NumberFormatException { + final float disorder) { this.disorder_weight = disorder; this.model = model; query = sequence.toCharArray(); diff --git a/biojava-structure/src/main/java/org/biojava/nbio/structure/align/util/SynchronizedOutFile.java b/biojava-structure/src/main/java/org/biojava/nbio/structure/align/util/SynchronizedOutFile.java index 9d05773c25..2442807d11 100644 --- a/biojava-structure/src/main/java/org/biojava/nbio/structure/align/util/SynchronizedOutFile.java +++ b/biojava-structure/src/main/java/org/biojava/nbio/structure/align/util/SynchronizedOutFile.java @@ -43,7 +43,7 @@ public class SynchronizedOutFile { * @throws FileNotFoundException * @throws IOException */ - public SynchronizedOutFile(File f, boolean gzipCompress) throws FileNotFoundException, IOException{ + public SynchronizedOutFile(File f, boolean gzipCompress) throws IOException{ if ( f.isDirectory()) throw new FileNotFoundException("please provide a file and not a directory"); @@ -62,7 +62,7 @@ public SynchronizedOutFile(File f, boolean gzipCompress) throws FileNotFoundExce * * @param f */ - public SynchronizedOutFile(File f) throws FileNotFoundException, IOException{ + public SynchronizedOutFile(File f) throws IOException{ this(f,false);