From 371f680ba0d9e715f7f2b145324627d8db96ac34 Mon Sep 17 00:00:00 2001 From: Michael Bayne Date: Sun, 4 Feb 2007 00:54:46 +0000 Subject: [PATCH] Prevent digester from freaking out on java_location. --- src/java/com/threerings/getdown/data/Application.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/java/com/threerings/getdown/data/Application.java b/src/java/com/threerings/getdown/data/Application.java index 4a3105e..3bdfa11 100644 --- a/src/java/com/threerings/getdown/data/Application.java +++ b/src/java/com/threerings/getdown/data/Application.java @@ -401,7 +401,14 @@ public class Application throw (IOException) new IOException(err).initCause(e); } } - _javaLocation = (String)cdata.get("java_location"); + + // this is a little weird, but when we're run from the digester, we see a String[] which + // contains java locations for all platforms which we can't grok, but the digester doesn't + // need to know about that; when we're run in a real application there will be only one! + Object javaloc = cdata.get("java_location"); + if (javaloc instanceof String) { + _javaLocation = (String)javaloc; + } // clear our arrays as we may be reinitializing _codes.clear();