Uploaded image for project: 'Runtime'
  1. Runtime
  2. RUNTIME-4006

Saxing a view or group without a name produce an NPE

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 4.8.0, 4.7.11
    • 4.8.0
    • None
    • None
    • 4.8.0 M11

      If we have a built view without a name or a group without a name, when we call myView.toSAX(handler, context), we get an NPE (quietly the same for view without name):

      java.lang.NullPointerException: Cannot invoke "String.length()" because "string" is null
      at org.apache.xml.serializer.ToStream#writeAttrString:2167
      at org.apache.xml.serializer.ToStream#processAttributes:2146
      at org.apache.xml.serializer.ToStream#closeStartTag:2692
      at org.apache.xml.serializer.ToStream#startElement:1994
      at org.apache.xalan.transformer.TransformerIdentityImpl#startElement:1120
      at org.apache.cocoon.xml.AbstractXMLPipe#startElement:95
      at org.apache.cocoon.xml.XMLUtils#startElement:664
      at org.ametys.runtime.i18n.I18nizable#toSAX:42
      at org.ametys.core.util.XMLUtils#createI18nElementIfNotNull:80
      at org.ametys.runtime.model.SimpleViewItemGroup#toSAX:89
      at org.ametys.runtime.model.SimpleViewItemGroup#toSAX:94
      at org.ametys.runtime.model.View#toSAX:377
      [...]

            bmaurel Bérénice Maurel
            bmaurel Bérénice Maurel
            Bérénice Maurel Bérénice Maurel
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: