Uploaded image for project: 'Sling'
  1. Sling
  2. SLING-2104

UnsupportedOperationException in DefaultPortletPreferencesService.store

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • None
    • General
    • None

    Description

      Step to reproduce:

      • go in the edit mode of a portlet
      • remove one preference

      ==> result in this stacktrace
      Caused by: java.lang.UnsupportedOperationException: remove
      at org.apache.jackrabbit.core.LazyItemIterator.remove(LazyItemIterator.java:267)
      at org.apache.sling.portal.container.internal.services.DefaultPortletPreferencesService.store(DefaultPortletPreferencesService.java:242)
      at org.apache.pluto.container.impl.PortletPreferencesImpl.internalStore(PortletPreferencesImpl.java:278)
      at org.apache.pluto.container.impl.PortletPreferencesImpl.store(PortletPreferencesImpl.java:249)

      The problem is the #PropertyIterator.remove call that will call the remove of on of the implementation of PropertyIterator that is [0] in tihs case. From the API of [0]:

      public void remove()

      Specified by:
      remove in interface Iterator

      Throws:
      UnsupportedOperationException - always since removal is not implemented.

      [0] http://jackrabbit.apache.org/api/1.4/org/apache/jackrabbit/jcr2spi/LazyItemIterator.html

      Attachments

        1. SLING-2104.patch
          0.8 kB
          Antonio Sanso

        Activity

          People

            cziegeler Carsten Ziegeler
            asanso Antonio Sanso
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: