mirror of
https://hub.spigotmc.org/stash/scm/spigot/bukkit.git
synced 2025-08-05 16:49:39 +00:00
Improve annotation test on parameters
This commit is contained in:
parent
3372e7b456
commit
f63d2b44ad
3 changed files with 3 additions and 3 deletions
|
@ -60,7 +60,7 @@ public class VillagerCareerChangeEvent extends EntityEvent implements Cancellabl
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setCancelled(@NotNull boolean cancel) {
|
public void setCancelled(boolean cancel) {
|
||||||
cancelled = cancel;
|
cancelled = cancel;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@ public class TimeSkipEvent extends WorldEvent implements Cancellable {
|
||||||
private final SkipReason skipReason;
|
private final SkipReason skipReason;
|
||||||
private long skipAmount;
|
private long skipAmount;
|
||||||
|
|
||||||
public TimeSkipEvent(@NotNull World world, @NotNull SkipReason skipReason, @NotNull long skipAmount) {
|
public TimeSkipEvent(@NotNull World world, @NotNull SkipReason skipReason, long skipAmount) {
|
||||||
super(world);
|
super(world);
|
||||||
this.skipReason = skipReason;
|
this.skipReason = skipReason;
|
||||||
this.skipAmount = skipAmount;
|
this.skipAmount = skipAmount;
|
||||||
|
|
|
@ -74,7 +74,7 @@ public class AnnotationTest {
|
||||||
List<ParameterNode> parameters = method.parameters;
|
List<ParameterNode> parameters = method.parameters;
|
||||||
|
|
||||||
for (int i = 0; i < paramTypes.length; i++) {
|
for (int i = 0; i < paramTypes.length; i++) {
|
||||||
if (mustBeAnnotated(paramTypes[i]) && !isWellAnnotated(method.invisibleParameterAnnotations == null ? null : method.invisibleParameterAnnotations[i])) {
|
if (mustBeAnnotated(paramTypes[i]) ^ isWellAnnotated(method.invisibleParameterAnnotations == null ? null : method.invisibleParameterAnnotations[i])) {
|
||||||
ParameterNode paramNode = parameters == null ? null : parameters.get(i);
|
ParameterNode paramNode = parameters == null ? null : parameters.get(i);
|
||||||
String paramName = paramNode == null ? null : paramNode.name;
|
String paramName = paramNode == null ? null : paramNode.name;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue