@SuppressWarnings({ "rawtypes", "unchecked" }) @Override public DataModelSource createSource( DataModelDefinition definition, TestContext context) throws IOException { try { return new SourceDataModelSource<>(definition, sourceProvider.open()); } catch (InterruptedException e) { throw (InterruptedIOException) new InterruptedIOException().initCause(e); } } @Override
@SuppressWarnings({ "unchecked", "rawtypes" }) @Override public <T> DataModelSource createSource(DataModelDefinition<T> definition, TestContext context) throws IOException { if (sourceType != null && definition.getModelClass() != sourceType) { throw new IOException(MessageFormat.format( Messages.getString("SourceDataModelSourceFactory.errorInconsistentDataType"), //$NON-NLS-1$ sourceType.getName(), definition.getModelClass().getName())); } try { return new SourceDataModelSource(definition, sourceProvider.open()); } catch (InterruptedException e) { throw (InterruptedIOException) new InterruptedIOException().initCause(e); } } }