mirror of
https://github.com/PaperMC/Paper.git
synced 2025-02-05 15:11:28 +01:00
Improve annotation test on parameters
By: md_5 <git@md-5.net>
This commit is contained in:
parent
869f647744
commit
3455cde270
@ -60,7 +60,7 @@ public class VillagerCareerChangeEvent extends EntityEvent implements Cancellabl
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setCancelled(@NotNull boolean cancel) {
|
||||
public void setCancelled(boolean cancel) {
|
||||
cancelled = cancel;
|
||||
}
|
||||
|
||||
|
@ -18,7 +18,7 @@ public class TimeSkipEvent extends WorldEvent implements Cancellable {
|
||||
private final SkipReason skipReason;
|
||||
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);
|
||||
this.skipReason = skipReason;
|
||||
this.skipAmount = skipAmount;
|
||||
|
@ -74,7 +74,7 @@ public class AnnotationTest {
|
||||
List<ParameterNode> parameters = method.parameters;
|
||||
|
||||
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);
|
||||
String paramName = paramNode == null ? null : paramNode.name;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user