Skip to content

Commit 902cdc3

Browse files
committed
nullness support for generic object
1 parent 45292f1 commit 902cdc3

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

changelog.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
11
CHANGELOG
22
=========
33

4-
## 1.2.2
4+
## 1.3.0
55
* Build updates and travis updates
6+
* Unified Workbench
7+
* `MaxValidator` The Max validator needs to better reflect that it can be less than or equal to the number to compare to <=
8+
* `MinValidator` The explanation needs to better reflect the min validator which is >=
9+
* Allow custom validators to be specified just by key and the payload to be passed in as validation data
10+
* `GenericObject` Should return `null` on non-existent keys instead of an exception if not we cannot validate nullness
611

712
## 1.2.1
813
* Dependency updates

modules/cbvalidation/models/GenericObject.cfc

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,12 @@ component{
2121

2222
// Process getters and setters
2323
any function onMissingMethod( required string missingMethodName, required struct missingMethodArguments ){
24-
2524
var key = replacenocase( arguments.missingMethodName, "get","");
2625

2726
if( structKeyExists( collection, key ) ){
2827
return collection[ key ];
2928
}
3029

31-
throw(message="The key requested '#key#' does not exist in the collection",
32-
detail="The valid keys are #structKeyList( collection )#",
33-
type="GenericObject.InvalidKey");
34-
30+
// Return null
3531
}
3632
}

0 commit comments

Comments
 (0)