mirror of
https://github.com/PlaceholderAPI/PlaceholderAPI
synced 2024-11-18 00:46:55 +01:00
Removed nullcheck from hashcode, and moved it up the chain.
This commit is contained in:
parent
679ef90091
commit
252802dcbe
@ -367,19 +367,4 @@ public abstract class PlaceholderExpansion extends PlaceholderHook {
|
|||||||
public String getLink() {
|
public String getLink() {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public int hashCode() {
|
|
||||||
if (this.getIdentifier() == null) {
|
|
||||||
throw new NullPointerException("Identifier must not be null! Error occurred in: " + this.getClass().getName());
|
|
||||||
}
|
|
||||||
if (this.getAuthor() == null) {
|
|
||||||
throw new NullPointerException("Author must not be null! Error occurred in: " + this.getClass().getName());
|
|
||||||
}
|
|
||||||
if (this.getVersion() == null) {
|
|
||||||
throw new NullPointerException("Version must not be null! Error occurred in: " + this.getClass().getName());
|
|
||||||
}
|
|
||||||
|
|
||||||
return super.hashCode();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user