summaryrefslogtreecommitdiffstats
path: root/src/java/com
diff options
context:
space:
mode:
authorKenneth Russel <[email protected]>2009-06-18 19:55:20 +0000
committerKenneth Russel <[email protected]>2009-06-18 19:55:20 +0000
commitec3bd3ad5760566d6d2ecd7795255d9a2456a855 (patch)
tree3e1f58756484f576cc27e39e084c7585f415147c /src/java/com
parenta735ced8d984b66c1628d1b8b97b61365629e22a (diff)
Workaround for flaky MessageFormat implementation in order to support1.0b06-maint
statements with braces in prologues and epilogues git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/../svn-server-sync/gluegen/branches/1.0b06-maint@153 a78bb65f-1512-4460-ba86-f6dc96a7bf27
Diffstat (limited to 'src/java/com')
-rw-r--r--src/java/com/sun/gluegen/JavaMethodBindingEmitter.java10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/java/com/sun/gluegen/JavaMethodBindingEmitter.java b/src/java/com/sun/gluegen/JavaMethodBindingEmitter.java
index 8629371..6b46367 100644
--- a/src/java/com/sun/gluegen/JavaMethodBindingEmitter.java
+++ b/src/java/com/sun/gluegen/JavaMethodBindingEmitter.java
@@ -377,8 +377,14 @@ public class JavaMethodBindingEmitter extends FunctionEmitter
if (code != null) {
String[] argumentNames = argumentNameArray();
for (Iterator iter = code.iterator(); iter.hasNext(); ) {
- MessageFormat fmt = new MessageFormat((String) iter.next());
- writer.println(" " + fmt.format(argumentNames));
+ String str = (String) iter.next();
+ try {
+ MessageFormat fmt = new MessageFormat(str);
+ writer.println(" " + fmt.format(argumentNames));
+ } catch (IllegalArgumentException e) {
+ // (Poorly) handle case where prologue / epilogue contains blocks of code with braces
+ writer.println(" " + str);
+ }
}
}
}