Skip to content

Commit

Permalink
Fix Java 8.
Browse files Browse the repository at this point in the history
  • Loading branch information
J08nY committed Mar 26, 2024
1 parent 593a5e7 commit 96f21cc
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ private KeyAgreementTest(KeyAgreementTestable ka, TestCallback<KeyAgreementTesta
}

public static KeyAgreementTest match(KeyAgreementTestable ka, byte[] expectedSecret) {
return new KeyAgreementTest(ka, new TestCallback<>() {
return new KeyAgreementTest(ka, new TestCallback<KeyAgreementTestable>() {
@Override
public Result apply(KeyAgreementTestable ka) {
if (Arrays.equals(ka.getSecret(), expectedSecret)) {
Expand All @@ -28,7 +28,7 @@ public Result apply(KeyAgreementTestable ka) {
}

public static KeyAgreementTest expect(KeyAgreementTestable ka, Result.ExpectedValue expected) {
return new KeyAgreementTest(ka, new TestCallback<>() {
return new KeyAgreementTest(ka, new TestCallback<KeyAgreementTestable>() {
@Override
public Result apply(KeyAgreementTestable keyAgreementTestable) {
Result.Value value = Result.Value.fromExpected(expected, keyAgreementTestable.ok(), keyAgreementTestable.error());
Expand All @@ -38,7 +38,7 @@ public Result apply(KeyAgreementTestable keyAgreementTestable) {
}

public static KeyAgreementTest expectError(KeyAgreementTestable ka, Result.ExpectedValue expected) {
return new KeyAgreementTest(ka, new TestCallback<>() {
return new KeyAgreementTest(ka, new TestCallback<KeyAgreementTestable>() {
@Override
public Result apply(KeyAgreementTestable keyAgreementTestable) {
Result.Value value = Result.Value.fromExpected(expected, keyAgreementTestable.ok(), false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ private KeyGeneratorTest(KeyGeneratorTestable kg, TestCallback<KeyGeneratorTesta
}

public static KeyGeneratorTest expect(KeyGeneratorTestable kg, Result.ExpectedValue expected) {
return new KeyGeneratorTest(kg, new TestCallback<>() {
return new KeyGeneratorTest(kg, new TestCallback<KeyGeneratorTestable>() {
@Override
public Result apply(KeyGeneratorTestable keyGenerationTestable) {
Result.Value value = Result.Value.fromExpected(expected, keyGenerationTestable.ok(), keyGenerationTestable.error());
Expand All @@ -23,7 +23,7 @@ public Result apply(KeyGeneratorTestable keyGenerationTestable) {
}

public static KeyGeneratorTest expectError(KeyGeneratorTestable kg, Result.ExpectedValue expected) {
return new KeyGeneratorTest(kg, new TestCallback<>() {
return new KeyGeneratorTest(kg, new TestCallback<KeyGeneratorTestable>() {
@Override
public Result apply(KeyGeneratorTestable keyGenerationTestable) {
Result.Value value = Result.Value.fromExpected(expected, keyGenerationTestable.ok(), false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public class PerformanceTest extends SimpleTest<BaseTestable> {
private final String desc;

private PerformanceTest(BaseTestable testable, int count, String desc) {
super(testable, new TestCallback<>() {
super(testable, new TestCallback<BaseTestable>() {
@Override
public Result apply(BaseTestable testable) {
return new Result(Result.Value.SUCCESS);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ private SignatureTest(SignatureTestable sig, TestCallback<SignatureTestable> cal
}

public static SignatureTest expect(SignatureTestable kg, Result.ExpectedValue expected) {
return new SignatureTest(kg, new TestCallback<>() {
return new SignatureTest(kg, new TestCallback<SignatureTestable>() {
@Override
public Result apply(SignatureTestable signatureTestable) {
Result.Value value = Result.Value.fromExpected(expected, signatureTestable.ok(), signatureTestable.error());
Expand All @@ -23,7 +23,7 @@ public Result apply(SignatureTestable signatureTestable) {
}

public static SignatureTest expectError(SignatureTestable kg, Result.ExpectedValue expected) {
return new SignatureTest(kg, new TestCallback<>() {
return new SignatureTest(kg, new TestCallback<SignatureTestable>() {
@Override
public Result apply(SignatureTestable signatureTestable) {
Result.Value value = Result.Value.fromExpected(expected, signatureTestable.ok(), false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ protected void runTests() throws Exception {
ECPublicKey ecpub = ECUtil.toPublicKey(EC_Store.getInstance().getObject(EC_Key.Public.class, openssl_bug.getOneKey()));
KeyAgreement ka = kaIdent.getInstance(cfg.selected.getProvider());
KeyAgreementTestable testable = new KeyAgreementTestable(ka, ecpriv, ecpub);
Test ecdh = KeyAgreementTest.function(testable, new TestCallback<>() {
Test ecdh = KeyAgreementTest.function(testable, new TestCallback<KeyAgreementTestable>() {
@Override
public Result apply(KeyAgreementTestable testable) {
if (!testable.ok()) {
Expand Down

0 comments on commit 96f21cc

Please sign in to comment.