-
Notifications
You must be signed in to change notification settings - Fork 140
Add precondition check util #240
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| throw new IllegalArgumentException("key should be 32B, is: " + key.length + "B"); | ||
| } | ||
| checkNotNull(key, "null key passed"); | ||
| checkArgument(key.length == 32, "key should be 32B, is: " + key.length + "B"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| checkArgument(key.length == 32, "key should be 32B, is: " + key.length + "B"); | |
| checkArgument(key.length == 32, "key length should be 32 bytes, but is " + key.length + " bytes"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure what was wrong with the concise form, but didn't mind much the longer one so done that: dbdea4e just couldn't apply from GH as the 100 char limit was broken
| throw new IllegalArgumentException("key should be 32B, is: " + key.length + "B"); | ||
| } | ||
| checkNotNull(key, "null key passed"); | ||
| checkArgument(key.length == 32, "key length should be 32 bytes, but is " + |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: should -> must if we're failing people for it not being what we expect.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No description provided.