Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 367045

Summary: NPE in DeleteStatementValidator.validateTarget
Product: z_Archived Reporter: Will Smythe <smythew>
Component: EDTAssignee: Project Inbox <edt.mofmodel-inbox>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: jeffdouglas, pharmon, svihovec
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
EGL service with a lot of errors
none
Workspace log file none

Description Will Smythe CLA 2011-12-18 22:16:59 EST
Created attachment 208528 [details]
EGL service with a lot of errors

I imported the attached "bad" .egl source file (this was a service created in RBD that I brought into EWDT). It contains many, many errors. After touching and saving (note - not all errors fixed before save), I get the following exception:



java.lang.NullPointerException
	at org.eclipse.edt.compiler.internal.egl2mof.eglx.persistence.sql.validation.DeleteStatementValidator.validateTarget(DeleteStatementValidator.java:60)
	at org.eclipse.edt.compiler.internal.egl2mof.eglx.persistence.sql.validation.DeleteStatementValidator.validate(DeleteStatementValidator.java:51)
	at org.eclipse.edt.compiler.internal.egl2mof.eglx.persistence.sql.SQLActionStatementValidator.visit(SQLActionStatementValidator.java:27)
	at org.eclipse.edt.compiler.core.ast.DeleteStatement.accept(DeleteStatement.java:64)
	at org.eclipse.edt.compiler.internal.core.validation.AbstractStatementValidator.validateStatement(AbstractStatementValidator.java:18)
	at org.eclipse.edt.compiler.internal.core.validation.part.FunctionValidator.visit(FunctionValidator.java:643)
	at org.eclipse.edt.compiler.core.ast.DeleteStatement.accept(DeleteStatement.java:64)
	at org.eclipse.edt.compiler.internal.core.validation.part.FunctionValidator.postVisitStatement(FunctionValidator.java:540)
	at org.eclipse.edt.compiler.internal.core.validation.part.FunctionValidator.visit(FunctionValidator.java:945)
	at org.eclipse.edt.compiler.core.ast.TryStatement.accept(TryStatement.java:45)
	at org.eclipse.edt.compiler.core.ast.Node.acceptChildren(Node.java:83)
	at org.eclipse.edt.compiler.core.ast.NestedFunction.accept(NestedFunction.java:94)
	at org.eclipse.edt.compiler.internal.core.validation.part.FunctionContainerValidator.visit(FunctionContainerValidator.java:50)
	at org.eclipse.edt.compiler.internal.core.validation.part.ServiceValidator.visit(ServiceValidator.java:69)
	at org.eclipse.edt.compiler.core.ast.NestedFunction.accept(NestedFunction.java:89)
	at org.eclipse.edt.compiler.core.ast.Node.acceptChildren(Node.java:83)
	at org.eclipse.edt.compiler.core.ast.Service.accept(Service.java:48)
	at org.eclipse.edt.compiler.internal.core.builder.Compiler.compilePart(Compiler.java:375)
	at org.eclipse.edt.ide.core.internal.builder.AbstractProcessingQueue.level03Compile(AbstractProcessingQueue.java:157)
	at org.eclipse.edt.compiler.internal.core.builder.AbstractProcessingQueue.process(AbstractProcessingQueue.java:169)
	at org.eclipse.edt.compiler.internal.core.builder.AbstractProcessingQueue.process(AbstractProcessingQueue.java:152)
	at org.eclipse.edt.ide.core.internal.builder.AbstractBuilder.processParts(AbstractBuilder.java:99)
	at org.eclipse.edt.ide.core.internal.builder.AbstractBuilder.build(AbstractBuilder.java:136)
	at org.eclipse.edt.ide.core.internal.builder.Builder.cleanBuild(Builder.java:167)
	at org.eclipse.edt.ide.core.internal.builder.Builder.build(Builder.java:94)
Comment 1 Will Smythe CLA 2011-12-18 22:20:39 EST
Created attachment 208531 [details]
Workspace log file
Comment 2 Paul Harmon CLA 2012-01-17 14:10:35 EST
I have added a simple check in DeleteStatementValidator to prevent the NPE.
Comment 3 Will Smythe CLA 2012-02-21 08:02:30 EST
Verified.