diff options
| -rw-r--r-- | java/com/xagasoft/gats/GatsDictionary.java | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/java/com/xagasoft/gats/GatsDictionary.java b/java/com/xagasoft/gats/GatsDictionary.java index 3517b68..b04f02c 100644 --- a/java/com/xagasoft/gats/GatsDictionary.java +++ b/java/com/xagasoft/gats/GatsDictionary.java | |||
| @@ -203,9 +203,12 @@ public class GatsDictionary extends GatsObject implements Map<String,GatsObject> | |||
| 203 | * key specified does not appear in the GatsDictionary or is not the correct | 203 | * key specified does not appear in the GatsDictionary or is not the correct |
| 204 | * type you will get the expected exception. | 204 | * type you will get the expected exception. |
| 205 | */ | 205 | */ |
| 206 | public GatsDictionary getDict( String key ) | 206 | public GatsDictionary getDict( String key ) throws KeyNotFoundException |
| 207 | { | 207 | { |
| 208 | return (GatsDictionary)hValue.get( key ); | 208 | GatsDictionary ret = (GatsDictionary)hValue.get( key ); |
| 209 | if( ret == null ) | ||
| 210 | throw new KeyNotFoundException( this, key ); | ||
| 211 | return ret; | ||
| 209 | } | 212 | } |
| 210 | 213 | ||
| 211 | /** | 214 | /** |
| @@ -214,9 +217,12 @@ public class GatsDictionary extends GatsObject implements Map<String,GatsObject> | |||
| 214 | * key specified does not appear in the GatsDictionary or is not the correct | 217 | * key specified does not appear in the GatsDictionary or is not the correct |
| 215 | * type you will get the expected exception. | 218 | * type you will get the expected exception. |
| 216 | */ | 219 | */ |
| 217 | public GatsList getList( String key ) | 220 | public GatsList getList( String key ) throws KeyNotFoundException |
| 218 | { | 221 | { |
| 219 | return (GatsList)hValue.get( key ); | 222 | GatsList ret = (GatsList)hValue.get( key ); |
| 223 | if( ret == null ) | ||
| 224 | throw new KeyNotFoundException( this, key ); | ||
| 225 | return ret; | ||
| 220 | } | 226 | } |
| 221 | 227 | ||
| 222 | public void putAll( Map<? extends String, ? extends GatsObject> src ) | 228 | public void putAll( Map<? extends String, ? extends GatsObject> src ) |
