|
|
|
Re: IOOBE while dragging bendpoint [message #628834 is a reply to message #628793] |
Fri, 24 September 2010 11:22 |
Vijay Raj Messages: 608 Registered: July 2009 |
Senior Member |
|
|
The problem is in
public int getDistance2(Point pt) {
long i = pt.x - x;
long j = pt.y - y;
long result = i * i + j * j;
if (result > Integer.MAX_VALUE)
return Integer.MAX_VALUE;
return (int)result;
}
here if result becomes more then Integer.MAX_VALUE then the distance returned is Integer.MAX_VALUE
once it becomes MAX
points.getPoint(i).getDistance2(bp) < smallestDistance will be always false and bpIndex will reach to end of index of point list(in u r case there are only two point in the point list)
This should be a case of very long connection whose distance between first and last point would be more then int MAX..
hope this helps in reproducing the problem..
---------------------
why, mr. Anderson, why, why do you persist?
Because I Choose To.
Regards,
Vijay
|
|
|
|
|
Re: IOOBE while dragging bendpoint [message #629109 is a reply to message #629100] |
Mon, 27 September 2010 09:05 |
Vijay Raj Messages: 608 Registered: July 2009 |
Senior Member |
|
|
First of all does u r scanario include a long connection(long means very long)...
if yes then i think can be reproduced in logic example which has bendpoint connections...
---------------------
why, mr. Anderson, why, why do you persist?
Because I Choose To.
Regards,
Vijay
|
|
|
|
Powered by
FUDForum. Page generated in 0.02682 seconds