summaryrefslogtreecommitdiffstats
path: root/src/java/com
diff options
context:
space:
mode:
authorKenneth Russel <[email protected]>2009-06-13 03:04:01 +0000
committerKenneth Russel <[email protected]>2009-06-13 03:04:01 +0000
commitc82e4d0112f88e9331c7589794387ee9df877442 (patch)
treeb22ab53bc55c8df88605b667dd178ad27ba6e68c /src/java/com
parentf3d18360dc11a0efc13f30a69753a286afb944c0 (diff)
Workaround for flaky MessageFormat implementation in order to supportJOGL_2_SANDBOX
statements with braces in prologues and epilogues git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/../svn-server-sync/gluegen/branches/JOGL_2_SANDBOX@145 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 d6d7977..d7fa7c4 100644
--- a/src/java/com/sun/gluegen/JavaMethodBindingEmitter.java
+++ b/src/java/com/sun/gluegen/JavaMethodBindingEmitter.java
@@ -416,8 +416,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);
+ }
}
}
}