summaryrefslogtreecommitdiffstats
path: root/src/java/com/sun
diff options
context:
space:
mode:
Diffstat (limited to 'src/java/com/sun')
-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);
+ }
}
}
}