Uploaded image for project: 'Content IO'
  1. Content IO
  2. CONTENTIO-119

Null value of common ancestors not tested

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 3.1.0
    • 3.1.0
    • None
    • 4.1 RC1

      In SynchronizableContentsCollectionMetadataProvider, two methods call the method ContentTypesHelper.getCommonAncestor which can return a null value.

      But the null value is ignored and is added to an ImmutableList which thrown an error like this :

      java.lang.NullPointerException: null value in entry: contentType=null
      	at com.google.common.collect.CollectPreconditions.checkEntryNotNull(CollectPreconditions.java:34)
      	at com.google.common.collect.ImmutableMap.entryOf(ImmutableMap.java:175)
      	at com.google.common.collect.ImmutableMap.of(ImmutableMap.java:123)
      	at org.ametys.plugins.contentio.synchronize.SynchronizableContentsCollectionMetadataProvider.getExternalAndLocalMetadata(SynchronizableContentsCollectionMetadataProvider.java:87)
      	at org.ametys.cms.content.external.ExternalizableMetadataProviderExtensionPoint.getExternalAndLocalMetadata(ExternalizableMetadataProviderExtensionPoint.java:45)
      	at org.ametys.cms.workflow.EditContentFunction.execute(EditContentFunction.java:318)
      [...]

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

              Created:
              Updated:
              Resolved: