Bug 17536 - NPE in compare
Summary: NPE in compare
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Compare (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows XP
: P1 critical (vote)
Target Milestone: 2.0 F2   Edit
Assignee: Dani Megert CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-05-23 19:35 EDT by Peter Burka CLA
Modified: 2002-06-03 10:35 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Burka CLA 2002-05-23 19:35:21 EDT
Build F1

After exiting Eclipse, I noticed that the following exception had been logged 
in my .log file.

Note that the NPE occurred inside of a synthetic method. Disassemby reveals 
that this method gets a field named 
org.eclipse.compare.EditionSelectionDialog$Pair.fItem out of its argument. 
Presumably, therefore, the argument was null. This should show up in code as 
someone accessing this field in selectPreviousEdition().


!ENTRY org.eclipse.ui 4 0 May 23, 2002 15:55:25.780
!MESSAGE java.lang.NullPointerException
!STACK 0
java.lang.NullPointerException

Stack trace:
   java/lang/Throwable.<init>()V
   java/lang/Throwable.<init>(Ljava/lang/String;)V
   java/lang/NullPointerException.<init>(Ljava/lang/String;)V
   org/eclipse/compare/EditionSelectionDialog$Pair.access$0
(Lorg/eclipse/compare/EditionSelectionDialog$Pair;)
Lorg/eclipse/compare/ITypedElement;
   org/eclipse/compare/EditionSelectionDialog.selectPreviousEdition
(Lorg/eclipse/compare/ITypedElement;
[Lorg/eclipse/compare/ITypedElement;Ljava/lang/Object;)
Lorg/eclipse/compare/ITypedElement;
   org/eclipse/jdt/internal/ui/compare/JavaReplaceWithEditionAction.run
(Lorg/eclipse/jface/action/IAction;)V
   org/eclipse/ui/internal/PluginAction.runWithEvent
(Lorg/eclipse/swt/widgets/Event;)V
   org/eclipse/jface/action/ActionContributionItem.handleWidgetSelection
(Lorg/eclipse/swt/widgets/Event;)V
   org/eclipse/jface/action/ActionContributionItem.handleWidgetEvent
(Lorg/eclipse/swt/widgets/Event;)V
   org/eclipse/jface/action/ActionContributionItem.access$0
(Lorg/eclipse/jface/action/ActionContributionItem;Lorg/eclipse/swt/widgets/Even
t;)V
   org/eclipse/jface/action/ActionContributionItem$ActionListener.handleEvent
(Lorg/eclipse/swt/widgets/Event;)V
   org/eclipse/swt/widgets/EventTable.sendEvent
(Lorg/eclipse/swt/widgets/Event;)V
   org/eclipse/swt/widgets/Widget.sendEvent(Lorg/eclipse/swt/widgets/Event;)V
   org/eclipse/swt/widgets/Display.runDeferredEvents()Z
   org/eclipse/swt/widgets/Display.readAndDispatch()Z
   org/eclipse/ui/internal/Workbench.runEventLoop()V
   org/eclipse/ui/internal/Workbench.run(Ljava/lang/Object;)Ljava/lang/Object;
   org/eclipse/core/internal/boot/InternalBootLoader.run
(Ljava/lang/String;Ljava/net/URL;Ljava/lang/String;
[Ljava/lang/String;Ljava/lang/Runnable;)Ljava/lang/Object;
   org/eclipse/core/boot/BootLoader.run
(Ljava/lang/String;Ljava/net/URL;Ljava/lang/String;
[Ljava/lang/String;Ljava/lang/Runnable;)Ljava/lang/Object;
   java/lang/reflect/AccessibleObject.invokeL(Ljava/lang/Object;
[Ljava/lang/Object;)Ljava/lang/Object;
   java/lang/reflect/Method.invoke(Ljava/lang/Object;[Ljava/lang/Object;)
Ljava/lang/Object;
   org/eclipse/core/launcher/Main.basicRun([Ljava/lang/String;)
Ljava/lang/Object;
   org/eclipse/core/launcher/Main.run([Ljava/lang/String;)Ljava/lang/Object;
   org/eclipse/core/launcher/Main.main([Ljava/lang/String;)V
Comment 1 Andre Weinand CLA 2002-05-27 10:56:29 EDT
fixed for 20020528
Comment 2 Erich Gamma CLA 2002-06-02 17:49:44 EDT
pls verify
Comment 3 Dani Megert CLA 2002-06-03 05:38:41 EDT
Need to clear resolution due to bugzilla bug (it changed the resolution to NEW)
Comment 4 Dani Megert CLA 2002-06-03 05:41:40 EDT
Marking bug as fixed again (due to bugzilla bug)
Comment 5 Dani Megert CLA 2002-06-03 10:35:15 EDT
Verified in F2 build: temp variable is now protected against NPE