Skip to content

Commit faab19b

Browse files
committed
kennytv.dmg
1 parent 5edbc5e commit faab19b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Essentials/src/main/java/com/earth2me/essentials/ProviderFactory.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,12 @@ public ProviderFactory(final Essentials essentials) {
2525
}
2626

2727
public <P extends Provider> P get(final Class<P> providerClass) {
28-
if (!this.providers.containsKey(providerClass)) {
28+
final Provider provider = providers.get(providerClass);
29+
if (provider == null) {
2930
return null;
3031
}
3132
//noinspection unchecked
32-
return (P) providers.get(providerClass);
33+
return (P) provider;
3334
}
3435

3536
@SafeVarargs

0 commit comments

Comments
 (0)