Issue #1624 Temporary fix for NullPointerException.

Former-commit-id: f507d23fed [formerly f95a402347ae45ad133206bfea796b240decf0a6]
Former-commit-id: fea6b44036
This commit is contained in:
Jonathan Sanchez 2013-02-15 12:31:21 -06:00
parent 38bbca4895
commit 1486022395

View file

@ -43,6 +43,7 @@ import com.vividsolutions.jts.geom.Polygon;
* 10/26/2012 DR 15479 Qinglu Lin Added removeDuplicateCoordinate().
* 12/06/2012 DR 15559 Qinglu Lin Added computeSlope(), computeCoordinate(),
* and adjustPolygon().
* Feb 15, 2013 1624 jsanchez Fix NullPointerException in removeDuplicateCoordinate.
*
* </pre>
*
@ -127,6 +128,10 @@ public class WarngenUIState {
* warningPolygon. History 10-26-2012 Qinglu Lin DR15479 Created.
*/
private static Polygon removeDuplicateCoordinate(Polygon polygon) {
if (polygon == null) {
return null;
}
Coordinate[] verts = polygon.getCoordinates();
Set<Coordinate> coords = new LinkedHashSet<Coordinate>();
for (Coordinate c : verts)