convert T param in power to final in java

This commit is contained in:
jacekpoz 2024-05-10 22:03:41 +02:00
parent 4e952bd117
commit e659fcd51a
Signed by: poz
SSH key fingerprint: SHA256:JyLeVWE4bF3tDnFeUpUaJsPsNlJyBldDGV/dIKSLyN8
2 changed files with 2 additions and 2 deletions

View file

@ -72,7 +72,7 @@ public class DHSetup<T extends IGF> implements IDHSetup<T> {
* raises `a` to the power of `b`
*/
@Override
public T power(T a, long b) {
public T power(final T a, long b) {
T aCopy = this.constructor.apply(new GF.Params(a.getCharacteristic(), a.getValue()));
T res = this.constructor.apply(new GF.Params(a.getCharacteristic(), a.getValue()));
while (b > 0) {

View file

@ -10,5 +10,5 @@ public interface IDHSetup<T> {
/*
* raises `a` to the power of `b`
*/
public T power(T a, long b);
public T power(final T a, long b);
}