Duplicate message bundle names cause IllegalArgumentExceptions
--------------------------------------------------------------

                 Key: SHINDIG-847
                 URL: https://issues.apache.org/jira/browse/SHINDIG-847
             Project: Shindig
          Issue Type: Bug
          Components: Gadget Rendering Server (Java)
            Reporter: Adam Winer
            Priority: Critical
         Attachments: message-bundle.patch

A gadget using a message bundle containing the same name twice will fail to 
render, with the following exception:

java.lang.IllegalArgumentException: duplicate key: current_rank
       at 
com.google.common.collect.ImmutableMap$RegularImmutableMap.<init>(ImmutableMap.java:597)
       at 
com.google.common.collect.ImmutableMap$RegularImmutableMap.<init>(ImmutableMap.java:565)
       at 
com.google.common.collect.ImmutableMap$Builder.fromEntryList(ImmutableMap.java:214)
       at 
com.google.common.collect.ImmutableMap$Builder.build(ImmutableMap.java:200)
       at 
org.apache.shindig.gadgets.spec.MessageBundle.parseMessages(MessageBundle.java:142)
       at 
org.apache.shindig.gadgets.spec.MessageBundle.<init>(MessageBundle.java:60)
       at 
org.apache.shindig.gadgets.DefaultMessageBundleFactory.fetchBundle(DefaultMessageBundleFactory.java:144)

Gadgets shouldn't really be doing this, but in practice many are.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to