| Summary: | Null pointer exception in InternalTransformationExecutor::doLoad | ||
|---|---|---|---|
| Product: | [Modeling] QVTo | Reporter: | Alexis Muller <Alexis.Muller> |
| Component: | Engine | Assignee: | Sergey Boyko <serg.boyko2011> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | serg.boyko2011 |
| Version: | unspecified | ||
| Target Milestone: | 3.0 M6 | ||
| Hardware: | PC | ||
| OS: | Linux | ||
| Whiteboard: | |||
(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(); |
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();