* @return Action for verifying the object, or {@code null} if the server
* doesn't support or require verification
*/
- public Response.@Nullable Action getVerifyAction(AnyLongObjectId id);
+ public @Nullable Response.Action getVerifyAction(AnyLongObjectId id);
/**
* Get size of an object
package org.eclipse.jgit.annotations;
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.LOCAL_VARIABLE;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+
import java.lang.annotation.Documented;
-import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
*/
@Documented
@Retention(RetentionPolicy.CLASS)
-@Target(ElementType.TYPE_USE)
+@Target({ FIELD, METHOD, PARAMETER, LOCAL_VARIABLE })
public @interface NonNull {
// marker annotation with no members
}
package org.eclipse.jgit.annotations;
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.LOCAL_VARIABLE;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+
import java.lang.annotation.Documented;
-import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
*/
@Documented
@Retention(RetentionPolicy.RUNTIME)
-@Target(ElementType.TYPE_USE)
+@Target({ FIELD, METHOD, PARAMETER, LOCAL_VARIABLE })
public @interface Nullable {
// marker annotation with no members
}
* @return error condition or null.
* @since 4.2
*/
- public ObjectChecker.@Nullable ErrorType getErrorType() {
+ @Nullable
+ public ObjectChecker.ErrorType getErrorType() {
return errorType;
}
}
}
/** @return error type of the corruption. */
- public ObjectChecker.@Nullable ErrorType getErrorType() {
+ @Nullable
+ public ObjectChecker.ErrorType getErrorType() {
return errorType;
}
}
}
}
- static ObjectChecker.@Nullable ErrorType parse(String key) {
+ @Nullable
+ static ObjectChecker.ErrorType parse(String key) {
return errors.get(toLowerCase(key));
}