We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5edbc5e commit faab19bCopy full SHA for faab19b
Essentials/src/main/java/com/earth2me/essentials/ProviderFactory.java
@@ -25,11 +25,12 @@ public ProviderFactory(final Essentials essentials) {
25
}
26
27
public <P extends Provider> P get(final Class<P> providerClass) {
28
- if (!this.providers.containsKey(providerClass)) {
+ final Provider provider = providers.get(providerClass);
29
+ if (provider == null) {
30
return null;
31
32
//noinspection unchecked
- return (P) providers.get(providerClass);
33
+ return (P) provider;
34
35
36
@SafeVarargs
0 commit comments