> @@ -33,8 +33,8 @@
> @Singleton
> public class BlockIdValidator extends Validator<String> {
> @Override
> - public void validate(@Nullable String s) throws IllegalArgumentException {
> - if (s.length() > 64)
> + public void validate(String s) throws IllegalArgumentException {
Remember that the lack of @Nullable does not prevent anyone from making a call
to this function with a null value. Whether the code itself does anything with
null is besides the point (except when a tool infers the nullability of a
parameter).
@Nullable used for static analysis and sometimes used by an ioc container for
injection (which is not the case here).
I'd keep the @Nullable out; because it at least lets the ide alert developers
to when they may be doing something terribly wrong (like passing an invalid
argument to a function whose only purpose is to throw IllegalStateExceptions if
a null occurs).
In any case; I'll just do whatever you want - because honestly this is not a
very useful or interesting problem.
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/66/files#r5178105