Community
Participate
Working Groups
Eclipse 3.2 M3. Open this compilation unit. You will see same exception as below. I agree, that code is mad. :-) Notice, that code has error and this bug can be reproduced only if it has error, if I initialize "button" variable with "null" I will have no exceptions. package apps; import org.eclipse.swt.layout.GridLayout; import org.eclipse.swt.widgets.Display; import org.eclipse.swt.widgets.Shell; import org.eclipse.swt.SWT; import org.eclipse.swt.custom.CTabFolder; import org.eclipse.swt.custom.CTabItem; import org.eclipse.swt.layout.FormAttachment; import org.eclipse.swt.layout.FormData; import org.eclipse.swt.layout.FormLayout; import org.eclipse.swt.widgets.Button; import org.eclipse.swt.widgets.Combo; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Display; import org.eclipse.swt.widgets.Group; import org.eclipse.swt.widgets.Label; import org.eclipse.swt.widgets.List; import org.eclipse.swt.widgets.Shell; import org.eclipse.swt.widgets.Table; import org.eclipse.swt.widgets.Text; import com.swtdesigner.SWTResourceManager; public class Q { public void foo() { org.eclipse.swt.custom.CTabFolder tabFolder; org.eclipse.swt.layout.FormData formData; org.eclipse.swt.custom.CTabItem locationsTabItem; org.eclipse.swt.widgets.Composite composite; org.eclipse.swt.widgets.Group locationsGroup; org.eclipse.swt.layout.FormData formData_1; org.eclipse.swt.layout.FormData formData_2; org.eclipse.swt.widgets.Group editLocationGroup; org.eclipse.swt.layout.FormData formData_5; org.eclipse.swt.widgets.Label nameLabel; org.eclipse.swt.layout.FormData formData_6; org.eclipse.swt.layout.FormData formData_7; org.eclipse.swt.widgets.Label addressLabel; org.eclipse.swt.layout.FormData formData_8; org.eclipse.swt.layout.FormData formData_9; org.eclipse.swt.widgets.Label suiteLabel; org.eclipse.swt.layout.FormData formData_10; org.eclipse.swt.layout.FormData formData_11; org.eclipse.swt.widgets.Label cityLabel; org.eclipse.swt.layout.FormData formData_12; org.eclipse.swt.layout.FormData formData_13; org.eclipse.swt.widgets.Label stateLabel; org.eclipse.swt.layout.FormData formData_14; org.eclipse.swt.layout.FormData formData_15; org.eclipse.swt.widgets.Label zipcodeLabel; org.eclipse.swt.layout.FormData formData_16; org.eclipse.swt.layout.FormData formData_17; org.eclipse.swt.widgets.Label countryCodeLabel; org.eclipse.swt.layout.FormData formData_18; org.eclipse.swt.layout.FormData formData_19; org.eclipse.swt.widgets.Label areaCodeLabel; org.eclipse.swt.layout.FormData formData_20; org.eclipse.swt.layout.FormData formData_21; org.eclipse.swt.widgets.Label phoneLabel; org.eclipse.swt.layout.FormData formData_22; org.eclipse.swt.layout.FormData formData_23; org.eclipse.swt.widgets.Label descriptionLabel; org.eclipse.swt.layout.FormData formData_24; org.eclipse.swt.layout.FormData formData_25; org.eclipse.swt.widgets.Label directionsLabel; org.eclipse.swt.layout.FormData formData_26; org.eclipse.swt.layout.FormData formData_27; org.eclipse.swt.widgets.Button contactButton; org.eclipse.swt.layout.FormData formData_28; org.eclipse.swt.widgets.Button areaMapButton; org.eclipse.swt.layout.FormData formData_29; org.eclipse.swt.widgets.Button driveMapButton; org.eclipse.swt.layout.FormData formData_30; org.eclipse.swt.widgets.Label locCreated; org.eclipse.swt.layout.FormData formData_31; org.eclipse.swt.widgets.Button activeButton; org.eclipse.swt.layout.FormData formData_32; org.eclipse.swt.widgets.Label driveMapLabel; org.eclipse.swt.layout.FormData formData_4; org.eclipse.swt.layout.FormData formData_33; org.eclipse.swt.widgets.Button driveBrowseButton; org.eclipse.swt.layout.FormData formData_34; org.eclipse.swt.widgets.Label areaMapLabel; org.eclipse.swt.layout.FormData formData_35; org.eclipse.swt.layout.FormData formData_36; org.eclipse.swt.widgets.Button areaBrowseButton; org.eclipse.swt.layout.FormData formData_37; org.eclipse.swt.widgets.Button closeButton; org.eclipse.swt.layout.FormData formData_3; org.eclipse.swt.widgets.Button button; org.eclipse.swt.widgets.Text areaMap; org.eclipse.swt.widgets.Text driveMap; org.eclipse.swt.widgets.Text locDirections; org.eclipse.swt.widgets.Text locDescription; org.eclipse.swt.widgets.Text text; org.eclipse.swt.widgets.Text locAreaCode; org.eclipse.swt.widgets.Text locCountryCode; org.eclipse.swt.widgets.Text locZipCode; org.eclipse.swt.widgets.Combo locStateCombo; org.eclipse.swt.widgets.Text locCity; org.eclipse.swt.widgets.Text locSuite; org.eclipse.swt.widgets.Text locAddress; org.eclipse.swt.widgets.Text locName; org.eclipse.swt.widgets.List locList; button.setLayoutData(new FormData()); } } java.lang.NullPointerException at org.eclipse.jdt.internal.compiler.flow.UnconditionalFlowInfo.markAsDefinitelyNonNull(UnconditionalFlowInfo.java:571) at org.eclipse.jdt.internal.compiler.flow.UnconditionalFlowInfo.markAsDefinitelyNonNull(UnconditionalFlowInfo.java:590) at org.eclipse.jdt.internal.compiler.ast.Expression.checkNullStatus(Expression.java:493) at org.eclipse.jdt.internal.compiler.ast.MessageSend.analyseCode(MessageSend.java:44) at org.eclipse.jdt.internal.compiler.ast.MethodDeclaration.analyseCode(MethodDeclaration.java:84) at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.internalAnalyseCode(TypeDeclaration.java:718) at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.analyseCode(TypeDeclaration.java:269) at org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration.analyseCode(CompilationUnitDeclaration.java:106) at org.eclipse.jdt.internal.compiler.Compiler.resolve(Compiler.java:571) at org.eclipse.jdt.internal.compiler.Compiler.resolve(Compiler.java:607) at org.eclipse.jdt.internal.core.CompilationUnitProblemFinder.process(CompilationUnitProblemFinder.java:165) at org.eclipse.jdt.internal.core.CompilationUnitProblemFinder.process(CompilationUnitProblemFinder.java:214) at org.eclipse.jdt.internal.core.ReconcileWorkingCopyOperation.executeOperation(ReconcileWorkingCopyOperation.java:82) at org.eclipse.jdt.internal.core.JavaModelOperation.run(JavaModelOperation.java:724) at org.eclipse.jdt.internal.core.JavaModelOperation.runOperation(JavaModelOperation.java:783) at org.eclipse.jdt.internal.core.CompilationUnit.reconcile(CompilationUnit.java:1070) at org.eclipse.jdt.internal.ui.text.java.JavaReconcilingStrategy$1.run(JavaReconcilingStrategy.java:97) at org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java:1044) at org.eclipse.core.runtime.Platform.run(Platform.java:783) at org.eclipse.jdt.internal.ui.text.java.JavaReconcilingStrategy.reconcile(JavaReconcilingStrategy.java:82) at org.eclipse.jdt.internal.ui.text.java.JavaReconcilingStrategy.initialReconcile(JavaReconcilingStrategy.java:172) at org.eclipse.jdt.internal.ui.text.CompositeReconcilingStrategy.initialReconcile(CompositeReconcilingStrategy.java:114) at org.eclipse.jdt.internal.ui.text.JavaCompositeReconcilingStrategy.initialReconcile(JavaCompositeReconcilingStrategy.java:120) at org.eclipse.jface.text.reconciler.MonoReconciler.initialProcess(MonoReconciler.java:103) at org.eclipse.jdt.internal.ui.text.JavaReconciler.initialProcess(JavaReconciler.java:328) at org.eclipse.jface.text.reconciler.AbstractReconciler$BackgroundThread.run(AbstractReconciler.java:170)
I don't have access anymore to 3.2M3. Can you still reproduce with 3.2.1 or 3.3 builds? I could not reproduce in 3.3M2. Closing as REMIND.
I can not reproduce in 3.3M2 too.
Mark as CLOSED then. Thanks for your time.
As of now 'LATER' and 'REMIND' resolutions are no longer supported. Please reopen this bug if it is still valid for you.