commit | a3a02152242a09beae62da04fc2d28bb6ce09eb2 | [log] [tgz] |
---|---|---|
author | Johannes Faltermeier <jfaltermeier@eclipsesource.com> | Wed Aug 09 16:03:56 2017 +0200 |
committer | Johannes Faltermeier <jfaltermeier@eclipsesource.com> | Wed Aug 09 16:04:37 2017 +0200 |
tree | 31a24bc2efabbef4ba21c5bcbd7d7a4feff7c7e7 | |
parent | eab1549abbc301323a6438a7daddc909e4845724 [diff] |
Bug 520764 - MaterializingBackwardConverter.resolveLiteral does not handle null correctly * allow null Change-Id: Ie1a160f5a5e8687f997c5774a102edac8f1b20bd Signed-off-by: Johannes Faltermeier <jfaltermeier@eclipsesource.com>
diff --git a/plugins/org.eclipse.emf.edapt.migration/src/org/eclipse/emf/edapt/internal/migration/internal/MaterializingBackwardConverter.java b/plugins/org.eclipse.emf.edapt.migration/src/org/eclipse/emf/edapt/internal/migration/internal/MaterializingBackwardConverter.java index 23f1929..fe6276c 100644 --- a/plugins/org.eclipse.emf.edapt.migration/src/org/eclipse/emf/edapt/internal/migration/internal/MaterializingBackwardConverter.java +++ b/plugins/org.eclipse.emf.edapt.migration/src/org/eclipse/emf/edapt/internal/migration/internal/MaterializingBackwardConverter.java
@@ -56,6 +56,8 @@ .createFromString(targetEnum, value); } else if (Enumerator.class.isInstance(literal)) { return Enumerator.class.cast(literal); + } else if (literal == null) { + return null; } throw new IllegalArgumentException(MessageFormat.format( "Unexpected literal {0} of type {1} cannot be converted to an Enumerator", literal, literal.getClass())); //$NON-NLS-1$