1
0
Fork 0
mirror of https://github.com/pgpainless/pgpainless.git synced 2024-11-26 06:12:06 +01:00

ProviderFactory: Provide default implementation of _getProviderName()

This commit is contained in:
Paul Schaub 2023-06-05 19:30:02 +02:00
parent 96da3db2b8
commit 41d734f2db
Signed by: vanitasvitae
GPG key ID: 62BEE9264BF17311
3 changed files with 4 additions and 9 deletions

View file

@ -20,8 +20,4 @@ public final class BouncyCastleProviderFactory extends ProviderFactory {
return provider; return provider;
} }
@Override
public String _getProviderName() {
return _getProvider().getName();
}
} }

View file

@ -19,7 +19,10 @@ public abstract class ProviderFactory {
private static ProviderFactory FACTORY; private static ProviderFactory FACTORY;
protected abstract Provider _getProvider(); protected abstract Provider _getProvider();
protected abstract String _getProviderName();
protected String _getProviderName() {
return _getProvider().getName();
}
public static void setFactory(ProviderFactory factory) { public static void setFactory(ProviderFactory factory) {
ProviderFactory.FACTORY = factory; ProviderFactory.FACTORY = factory;

View file

@ -25,10 +25,6 @@ public class ProviderFactoryTest {
return provider; return provider;
} }
@Override
protected String _getProviderName() {
return provider.getName();
}
}; };
@Test @Test