We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c249198 commit 62a36dbCopy full SHA for 62a36db
activejdbc/src/main/java/org/javalite/activejdbc/ModelDelegate.java
@@ -47,8 +47,13 @@ static String[] toLowerCase(String[] arr) {
47
}
48
49
static void setNamesAndValues(Model m, Object... namesAndValues) {
50
+ if (namesAndValues.length % 2 == 1) {
51
+ throw new IllegalArgumentException("The number of arguments must be pair.");
52
+ }
53
for (int i = 0; i < namesAndValues.length - 1; i += 2) {
- if (namesAndValues[i] == null) throw new IllegalArgumentException("attribute names cannot be nulls");
54
+ if (namesAndValues[i] == null) {
55
+ throw new IllegalArgumentException("attribute names cannot be nulls");
56
57
m.set(namesAndValues[i].toString(), namesAndValues[i + 1]);
58
59
0 commit comments