Bug 15911

Summary: dbus-java: CreateInterface don't check for Java keywords
Product: dbus Reporter: Sveinung Kvilhaugsvik <sveinung84>
Component: javaAssignee: Matthew Johnson <dbus>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: Testcase taken from the Telepathy spec. (LGPL)

Description Sveinung Kvilhaugsvik 2008-05-12 10:02:09 UTC
Created attachment 16485 [details]
Testcase taken from the Telepathy spec. (LGPL)

CreateInterface doesn't check for Java keywords in variable names when it generates interfaces. Because of this, it will generate Java code that use reserved keywords like "new" as variable names if that is what the input calls them. The generated code will then have errors, since "new" is a reserved keyword.

Fast hack to workaround the problem: cat Generated.java | sed -e "s/new/theNew/g" > Generated.java
Comment 1 Matthew Johnson 2008-05-31 12:09:26 UTC
I've added name mangling for reserved words to CreateInterface. It'll be in the next release.

Thanks,
Matt

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.