Uploaded image for project: 'Pluto'
  1. Pluto
  2. PLUTO-496

When portlet.xml has resource-bundle defined with package containing empty messages.properties, it uses portlet-info title and short-title from portlet.xml, which is inconsistent with earlier versions of pluto

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.1.5
    • Fix Version/s: 3.0.0
    • Component/s: None
    • Labels:
      None
    • Environment:

      Description

      When portlet.xml has resource-bundle defined with a package containing an empty messages.properties file, it appears to use the portlet-info title and short-title from portlet.xml (tested with pluto 1.1.5 in uPortal 3.0.1).

      While that doesn't seem that bad, if it is ignoring an empty messages.properties file or ignoring the resource-bundle altogether and this is not compliant with the standard, that might be bad.

      Eric Dalquist of uPortal mentioned that this behavior, seemingly introduced somewhere between pluto 1.0.1-rc2 and pluto 1.1.5, could be a bug, since in earlier versions of pluto (tested with 1.0.1.-rc2 in uPortal 2.5.3.1 GA) it would fail to load if the the portlet's resource-bundle was defined with a package containing an empty messages.properties file, even if the title and short-title was defined in portlet-info.

      Here is the example portlet.xml that works with pluto 1.1.5 (even though maybe it shouldn't?) but doesn't work with pluto 1.0.1-rc2:
      (put an empty messages.properties file in the package that it defines as the resource-bundle, which in this example is jasig.portlet.helloworld.MyPortlet)

      <?xml version='1.0' encoding='UTF-8' ?>
      <portlet-app xmlns='http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd' version='1.0'>
      <portlet>
      <description>MyPortlet</description>
      <portlet-name>MyPortlet</portlet-name>
      <display-name>MyPortlet</display-name>
      <portlet-class>jasig.portlet.helloworld.MyPortlet</portlet-class>
      <expiration-cache>0</expiration-cache>
      <supports>
      <mime-type>text/html</mime-type>
      <portlet-mode>VIEW</portlet-mode>
      <portlet-mode>EDIT</portlet-mode>
      <portlet-mode>HELP</portlet-mode>
      </supports>
      <resource-bundle>jasig.portlet.helloworld.messages</resource-bundle>
      <portlet-info>
      <title>MyPortlet</title>
      <short-title>MyPortlet</short-title>
      </portlet-info>
      </portlet>
      </portlet-app>

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              garysweaver Gary S. Weaver
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: