Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion org.omg.sysml/src/org/omg/sysml/adapter/FeatureAdapter.java
Original file line number Diff line number Diff line change
Expand Up @@ -822,7 +822,11 @@ protected void computeValueConnector() {
if (FeatureUtil.getValuationFor(target).isInitial()) {
Feature that = (Feature)getLibraryType("Base::things::that");
Feature startShot = (Feature)getLibraryType("Occurrences::Occurrence::startShot");
featuringTypes = Collections.singletonList(FeatureUtil.chainFeatures(that, startShot));
if (that != null && startShot != null) {
featuringTypes = Collections.singletonList(FeatureUtil.chainFeatures(that, startShot));
} else {
featuringTypes = target.getFeaturingType();
}
} else {
featuringTypes = target.getFeaturingType();
}
Expand Down
57 changes: 36 additions & 21 deletions org.omg.sysml/src/org/omg/sysml/util/OperandEList.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
package org.omg.sysml.util;

import java.util.Collection;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import java.util.ListIterator;
Expand Down Expand Up @@ -102,17 +103,17 @@ public int basicIndexOf(Object object) {

@Override
public int basicLastIndexOf(Object object) {
throw new UnsupportedOperationException();
return -1;
}

@Override
public boolean basicContains(Object object) {
throw new UnsupportedOperationException();
return false;
}

@Override
public boolean basicContainsAll(Collection<?> collection) {
throw new UnsupportedOperationException();
return false;
}

@Override
Expand All @@ -127,22 +128,22 @@ public NotificationChain basicAdd(Expression object, NotificationChain notificat

@Override
public List<Expression> basicList() {
throw new UnsupportedOperationException();
return Collections.emptyList();
}

@Override
public Iterator<Expression> basicIterator() {
throw new UnsupportedOperationException();
return Collections.emptyIterator();
}

@Override
public ListIterator<Expression> basicListIterator() {
throw new UnsupportedOperationException();
return Collections.emptyListIterator();
}

@Override
public ListIterator<Expression> basicListIterator(int i) {
throw new UnsupportedOperationException();
return Collections.emptyListIterator();
}

@Override
Expand Down Expand Up @@ -176,43 +177,53 @@ public boolean contains(Object o) {

@Override
public Iterator<Expression> iterator() {
throw new UnsupportedOperationException(); }
return Collections.emptyIterator();
}

@Override
public Object[] toArray() {
throw new UnsupportedOperationException(); }
throw new UnsupportedOperationException();
}

@Override
public <T> T[] toArray(T[] a) {
throw new UnsupportedOperationException(); }
throw new UnsupportedOperationException();
}

@Override
public boolean add(Expression e) {
throw new UnsupportedOperationException(); }
throw new UnsupportedOperationException();
}

@Override
public boolean containsAll(Collection<?> c) {
throw new UnsupportedOperationException(); }
return false;
}

@Override
public boolean addAll(Collection<? extends Expression> c) {
throw new UnsupportedOperationException(); }
throw new UnsupportedOperationException();
}

@Override
public boolean addAll(int index, Collection<? extends Expression> c) {
throw new UnsupportedOperationException(); }
throw new UnsupportedOperationException();
}

@Override
public boolean removeAll(Collection<?> c) {
throw new UnsupportedOperationException(); }
throw new UnsupportedOperationException();
}

@Override
public boolean retainAll(Collection<?> c) {
throw new UnsupportedOperationException(); }
throw new UnsupportedOperationException();
}

@Override
public Expression set(int index, Expression element) {
throw new UnsupportedOperationException(); }
throw new UnsupportedOperationException();
}

@Override
public void add(int index, Expression element) {
Expand All @@ -231,17 +242,21 @@ public int lastIndexOf(Object o) {

@Override
public ListIterator<Expression> listIterator() {
throw new UnsupportedOperationException(); }
return Collections.emptyListIterator();
}

@Override
public ListIterator<Expression> listIterator(int index) {
throw new UnsupportedOperationException(); }
throw new UnsupportedOperationException();
}

@Override
public List<Expression> subList(int fromIndex, int toIndex) {
throw new UnsupportedOperationException(); }
return Collections.emptyList();
}

@Override
public Expression basicGet(int index) {
throw new UnsupportedOperationException(); }
throw new UnsupportedOperationException();
}
}