mirror of
https://codeberg.org/PGPainless/sop-java.git
synced 2024-12-22 12:57:57 +01:00
Remove unused 'throws IOException' declarations
This commit is contained in:
parent
0aabfac695
commit
ed59c713eb
6 changed files with 10 additions and 13 deletions
|
@ -10,11 +10,10 @@ import sop.exception.SOPGPException;
|
||||||
import sop.external.ExternalSOP;
|
import sop.external.ExternalSOP;
|
||||||
import sop.operation.Armor;
|
import sop.operation.Armor;
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Properties;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Properties;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Implementation of the {@link Armor} operation using an external SOP binary.
|
* Implementation of the {@link Armor} operation using an external SOP binary.
|
||||||
|
@ -37,7 +36,7 @@ public class ArmorExternal implements Armor {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Ready data(InputStream data) throws SOPGPException.BadData, IOException {
|
public Ready data(InputStream data) throws SOPGPException.BadData {
|
||||||
return ExternalSOP.executeTransformingOperation(Runtime.getRuntime(), commandList, envList, data);
|
return ExternalSOP.executeTransformingOperation(Runtime.getRuntime(), commandList, envList, data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,7 +9,6 @@ import sop.exception.SOPGPException;
|
||||||
import sop.external.ExternalSOP;
|
import sop.external.ExternalSOP;
|
||||||
import sop.operation.Dearmor;
|
import sop.operation.Dearmor;
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -30,7 +29,7 @@ public class DearmorExternal implements Dearmor {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Ready data(InputStream data) throws SOPGPException.BadData, IOException {
|
public Ready data(InputStream data) throws SOPGPException.BadData {
|
||||||
return ExternalSOP.executeTransformingOperation(Runtime.getRuntime(), commandList, envList, data);
|
return ExternalSOP.executeTransformingOperation(Runtime.getRuntime(), commandList, envList, data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -54,13 +54,13 @@ public class DetachedVerifyExternal implements DetachedVerify {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public DetachedVerify cert(InputStream cert) throws SOPGPException.BadData, IOException {
|
public DetachedVerify cert(InputStream cert) throws SOPGPException.BadData {
|
||||||
this.certs.add(cert);
|
this.certs.add(cert);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public VerifySignatures signatures(InputStream signatures) throws SOPGPException.BadData, IOException {
|
public VerifySignatures signatures(InputStream signatures) throws SOPGPException.BadData {
|
||||||
this.signatures = signatures;
|
this.signatures = signatures;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
|
@ -93,7 +93,7 @@ public class EncryptExternal implements Encrypt {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Ready plaintext(InputStream plaintext)
|
public Ready plaintext(InputStream plaintext)
|
||||||
throws IOException, SOPGPException.KeyIsProtected {
|
throws SOPGPException.KeyIsProtected {
|
||||||
return ExternalSOP.executeTransformingOperation(Runtime.getRuntime(), commandList, envList, plaintext);
|
return ExternalSOP.executeTransformingOperation(Runtime.getRuntime(), commandList, envList, plaintext);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -62,7 +62,7 @@ public class InlineSignExternal implements InlineSign {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Ready data(InputStream data) throws IOException, SOPGPException.KeyIsProtected, SOPGPException.ExpectedText {
|
public Ready data(InputStream data) throws SOPGPException.KeyIsProtected, SOPGPException.ExpectedText {
|
||||||
return ExternalSOP.executeTransformingOperation(Runtime.getRuntime(), commandList, envList, data);
|
return ExternalSOP.executeTransformingOperation(Runtime.getRuntime(), commandList, envList, data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,7 +11,6 @@ import sop.Profile;
|
||||||
import sop.SOP;
|
import sop.SOP;
|
||||||
import sop.exception.SOPGPException;
|
import sop.exception.SOPGPException;
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.stream.Stream;
|
import java.util.stream.Stream;
|
||||||
|
|
||||||
|
@ -26,7 +25,7 @@ public class ListProfilesTest extends AbstractSOPTest {
|
||||||
|
|
||||||
@ParameterizedTest
|
@ParameterizedTest
|
||||||
@MethodSource("provideInstances")
|
@MethodSource("provideInstances")
|
||||||
public void listGenerateKeyProfiles(SOP sop) throws IOException {
|
public void listGenerateKeyProfiles(SOP sop) {
|
||||||
List<Profile> profiles = sop
|
List<Profile> profiles = sop
|
||||||
.listProfiles()
|
.listProfiles()
|
||||||
.generateKey();
|
.generateKey();
|
||||||
|
@ -36,7 +35,7 @@ public class ListProfilesTest extends AbstractSOPTest {
|
||||||
|
|
||||||
@ParameterizedTest
|
@ParameterizedTest
|
||||||
@MethodSource("provideInstances")
|
@MethodSource("provideInstances")
|
||||||
public void listEncryptProfiles(SOP sop) throws IOException {
|
public void listEncryptProfiles(SOP sop) {
|
||||||
List<Profile> profiles = sop
|
List<Profile> profiles = sop
|
||||||
.listProfiles()
|
.listProfiles()
|
||||||
.encrypt();
|
.encrypt();
|
||||||
|
@ -46,7 +45,7 @@ public class ListProfilesTest extends AbstractSOPTest {
|
||||||
|
|
||||||
@ParameterizedTest
|
@ParameterizedTest
|
||||||
@MethodSource("provideInstances")
|
@MethodSource("provideInstances")
|
||||||
public void listUnsupportedProfiles(SOP sop) throws IOException {
|
public void listUnsupportedProfiles(SOP sop) {
|
||||||
assertThrows(SOPGPException.UnsupportedProfile.class, () -> sop
|
assertThrows(SOPGPException.UnsupportedProfile.class, () -> sop
|
||||||
.listProfiles()
|
.listProfiles()
|
||||||
.subcommand("invalid"));
|
.subcommand("invalid"));
|
||||||
|
|
Loading…
Reference in a new issue