Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 91743 Details for
Bug 221115
[Examples] ArrayIndexOOBE in AbstractMatching.dist
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Fix
patch_221115_20080306.txt (text/plain), 1.50 KB, created by
Tomasz Zarna
on 2008-03-06 06:33:12 EST
(
hide
)
Description:
Fix
Filename:
MIME Type:
Creator:
Tomasz Zarna
Created:
2008-03-06 06:33:12 EST
Size:
1.50 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.compare.examples.xml >Index: src/org/eclipse/compare/examples/xml/AbstractMatching.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/AbstractMatching.java,v >retrieving revision 1.7 >diff -u -r1.7 AbstractMatching.java >--- src/org/eclipse/compare/examples/xml/AbstractMatching.java 16 May 2007 16:07:37 -0000 1.7 >+++ src/org/eclipse/compare/examples/xml/AbstractMatching.java 6 Mar 2008 11:29:09 -0000 >@@ -137,7 +137,7 @@ > > //unordered compare of subtrees > // TODO The dist method is order dependent but should not be >- int distance= dist(thisNode, otherNode); >+ int distance= dist(thisNode, thisIndex, otherNode, otherIndex); > return sameId || distance == 0; > } > return false; >@@ -253,13 +253,17 @@ > } > > abstract public void match(XMLNode LeftTree, XMLNode RightTree, boolean rightTreeIsAncestor, IProgressMonitor monitor); >- >+ > protected int dist(XMLNode x, XMLNode y) { >+ int ix= indexOfLN(x); >+ int iy= indexOfRN(y); >+ return dist(x, ix, y, iy); >+ } >+ >+ protected int dist(XMLNode x, int index_x, XMLNode y, int index_y) { > //System.out.println("dist( "+x.getSignature()+" , "+y.getSignature()+")"); > int ret= NO_ENTRY; > >- int index_x= indexOfLN(x); >- int index_y= indexOfRN(y); > if (fDT[index_x][index_y] != NO_ENTRY) return fDT[index_x][index_y]; > > if (isLeaf(x) && isLeaf(y)) {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 221115
:
91502
| 91743 |
91744