[OpenSRF-GIT] OpenSRF branch rel_2_1 updated. osrf_rel_2_1_2-3-gcd1280c
Evergreen Git
git at git.evergreen-ils.org
Fri Dec 14 14:34:27 EST 2012
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "OpenSRF".
The branch, rel_2_1 has been updated
via cd1280c3e6a8981255762ad01c7dac4cf4c76da5 (commit)
from f38ce0fc261da8a7da6f25afb29285d23b9c4fae (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit cd1280c3e6a8981255762ad01c7dac4cf4c76da5
Author: Bill Erickson <berick at esilibrary.com>
Date: Thu Nov 1 09:41:52 2012 -0400
Safer casting in java config parsing
Java config parsing, in particular getString and getInt, no longer fail
when encountering a number value in the internl JSON->Map object.
Java does not allow the following cast:
String s = (String) someNumber;
Instead, rely on the object's toString() which is safe and guaranteed
to exist.
Signed-off-by: Bill Erickson <berick at esilibrary.com>
Signed-off-by: Jason Stephenson <jstephenson at mvlc.org>
Signed-off-by: Dan Scott <dscott at laurentian.ca>
diff --git a/src/java/org/opensrf/util/Config.java b/src/java/org/opensrf/util/Config.java
index ddac9c0..526d863 100644
--- a/src/java/org/opensrf/util/Config.java
+++ b/src/java/org/opensrf/util/Config.java
@@ -78,7 +78,7 @@ public class Config {
*/
public String getString(String path) throws ConfigException {
try {
- return (String) get(path);
+ return get(path).toString();
} catch(Exception e) {
throw new
ConfigException("No config string found at " + path);
-----------------------------------------------------------------------
Summary of changes:
src/java/org/opensrf/util/Config.java | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
hooks/post-receive
--
OpenSRF
More information about the opensrf-commits
mailing list