Bug 173486 - [Cleanup] Broken logic in FileDiagramDocumentProvider.handleElementContentChanged
Summary: [Cleanup] Broken logic in FileDiagramDocumentProvider.handleElementContentCha...
Status: NEW
Alias: None
Product: GMF-Runtime
Classification: Modeling
Component: General (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows XP
: P3 normal
Target Milestone: 2.1   Edit
Assignee: Anthony Hunter CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-02-08 11:53 EST by Ed Merks CLA
Modified: 2010-07-19 12:30 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 Ed Merks CLA 2007-02-08 11:53:49 EST
I was asked to try out the new-to-M5 JDT diagnostic that uses data flow analysis to detect null pointer exceptions that will happen at runtime.  It found a problem with this code:

  if (info == null && !(info.fDocument instanceof IDiagramDocument))
    return;

which almost certainly should be expressed using || not &&:

  if (info == null || !(info.fDocument instanceof IDiagramDocument))
    return;

So it's probably a good idea to preemtively fix this.
Comment 1 Richard Gronback CLA 2007-03-12 13:57:02 EDT
Changing component
Comment 2 Eclipse Webmaster CLA 2010-07-19 12:30:24 EDT
[GMF Restructure] Bug 319140 : product GMF and component
Runtime Diagram was the original product and component for this bug