Community
Participate
Working Groups
Attribute lists (and maybe single-valued attributes?) can contain "null", however, EMF Compare uses ImmutableLists... that do not accept the null values. This causes NPEs to be thrown and needs to be investigated further. One such NPE would be : java.lang.NullPointerException at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:187) at com.google.common.collect.SingletonImmutableList.<init>(SingletonImmutableList.java:41) at com.google.common.collect.ImmutableList.copyFromCollection(ImmutableList.java:284) at com.google.common.collect.ImmutableList.copyOf(ImmutableList.java:256) at com.google.common.collect.ImmutableList.copyOf(ImmutableList.java:217) at org.eclipse.emf.compare.utils.DiffUtil.longestCommonSubsequence(DiffUtil.java:168) at org.eclipse.emf.compare.utils.DiffUtil.longestCommonSubsequence(DiffUtil.java:211) at org.eclipse.emf.compare.diff.DefaultDiffEngine.computeMultiValuedFeatureDifferencesTwoWay(DefaultDiffEngine.java:655)
Nulls are a valid value of the attribute lists. An easy fix is to convert the Iterable into a Collection and change the use of ImmutableList here for Collections.unmodifiableList()
Review has been proposed: https://git.eclipse.org/r/23848
Fixed with https://git.eclipse.org/r/#/c/23848/