mirror of
https://github.com/pgpainless/pgpainless.git
synced 2024-10-31 17:45:58 +01:00
ProviderFactory: Provide default implementation of _getProviderName()
This commit is contained in:
parent
96da3db2b8
commit
41d734f2db
3 changed files with 4 additions and 9 deletions
|
@ -20,8 +20,4 @@ public final class BouncyCastleProviderFactory extends ProviderFactory {
|
|||
return provider;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String _getProviderName() {
|
||||
return _getProvider().getName();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,7 +19,10 @@ public abstract class ProviderFactory {
|
|||
private static ProviderFactory FACTORY;
|
||||
|
||||
protected abstract Provider _getProvider();
|
||||
protected abstract String _getProviderName();
|
||||
|
||||
protected String _getProviderName() {
|
||||
return _getProvider().getName();
|
||||
}
|
||||
|
||||
public static void setFactory(ProviderFactory factory) {
|
||||
ProviderFactory.FACTORY = factory;
|
||||
|
|
|
@ -25,10 +25,6 @@ public class ProviderFactoryTest {
|
|||
return provider;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String _getProviderName() {
|
||||
return provider.getName();
|
||||
}
|
||||
};
|
||||
|
||||
@Test
|
||||
|
|
Loading…
Reference in a new issue