Community
Participate
Working Groups
ModelElementType.instantiate() method returns null if the type's implementation class is not found or cannot otherwise be instantiated. This makes it difficult to figure out the cause of the problem (missing type impl class) when calling code subsequently fails with a NullPointerException, often far from original instantiation. The instantiate method should instead throw an exception in this case. The exception message should include the name of the type that could not be instantiated.
Implemented the exception and a corresponding unit test TestMisc0001.
Verified in unit test.