Community
Participate
Working Groups
Build Identifier: I20100312-1448 In InternalTransformationExecutor::doLoad, when a transformation cannot be load it will allays do a null pointer exception. Here is an extract of the faulty code (line 257-264 on my version). I added a comment where the problem is and can be corrected. fTransformation = getTransformation(); if (fTransformation == null) { fLoadDiagnostic = new ExecutionDiagnosticImpl(Diagnostic.ERROR, ExecutionDiagnostic.TRANSFORMATION_LOAD_FAILED, NLS .bind(Messages.NotTransformationInUnitError, fURI)); /* At this line if fTransformation has been null it is still null. So checkIsExecutable(fTransformation) at next statement will do a null pointer exception. A simple return at this line correct the issue.*/ } ExecutionDiagnosticImpl validForExecution = checkIsExecutable(fTransformation); Reproducible: Always Steps to Reproduce: 1. Try to call loadTransformation on a qvt library unit. InternalTransformationExecutor te = new InternalTransformationExecutor(uri_lirary); te.loadTransformation();
(In reply to comment #0) Hi Alexis, Thank you for detailed description. Fixed. > Build Identifier: I20100312-1448 > > In InternalTransformationExecutor::doLoad, when a transformation cannot be load > it will allays do a null pointer exception. > > Here is an extract of the faulty code (line 257-264 on my version). > I added a comment where the problem is and can be corrected. > > fTransformation = getTransformation(); > if (fTransformation == null) { > fLoadDiagnostic = new ExecutionDiagnosticImpl(Diagnostic.ERROR, > ExecutionDiagnostic.TRANSFORMATION_LOAD_FAILED, NLS > .bind(Messages.NotTransformationInUnitError, fURI)); > > /* At this line if fTransformation has been null it is > still null. So checkIsExecutable(fTransformation) at next statement will do > a null pointer exception. > A simple return at this line correct the issue.*/ > } > > ExecutionDiagnosticImpl validForExecution = checkIsExecutable(fTransformation); > > Reproducible: Always > > Steps to Reproduce: > 1. Try to call loadTransformation on a qvt library unit. > > InternalTransformationExecutor te = > new InternalTransformationExecutor(uri_lirary); > te.loadTransformation();