kewur / poly2tri

Automatically exported from code.google.com/p/poly2tri
Other
0 stars 0 forks source link

Java findbugs - nullcheck of value previously dereferenced #102

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
The code does not run cleanly though FindBugs because of some bugs:

In org/poly2tri/triangulation/delaunay/sweep/DTSweep.java at lines 634, 789, 
the 'if(ot == null)' checks are made after 'ot' is dereferenced. This condition 
can never be true because a NullPointerException would be thrown on the lines 
before.

Original issue reported on code.google.com by d22...@gmail.com on 21 Jan 2015 at 12:03

GoogleCodeExporter commented 9 years ago
Yeah those two ot=null checks can be removed. I kept them just to be a reminder 
of where I had to add code if I wanted to include the filling of missing 
triangles during the constrained edge phase. Now the filling is done separately 
before the edge phase.

I should have commented out those ot=null tests when keeping them as a reminder.

Original comment by thahlen@gmail.com on 21 Jan 2015 at 1:21