Menu

#4 Possible NullPointerException in TopologyValidationError

closed
nobody
None
5
2006-04-20
2006-02-01
No

JTS 1.7: The (currently not used) constructor

TopologyValidationError(int errorType)

leads to a NullPointerException, because ist delegates
with

this(errorType, null);

to

public TopologyValidationError(int errorType,
Coordinate pt)
{
this.errorType = errorType;
this.pt = (Coordinate) pt.clone();
}

where clone() will be invoked on the null Coordinate
pt.

Suggested fix: Remove the constructor, since it is not
used anyway.

Discussion

  • Dr JTS

    Dr JTS - 2006-02-13

    Logged In: YES
    user_id=1158312

    Good catch, Markus - thanks.

     
  • Markus Gebhard

    Markus Gebhard - 2006-04-12

    Logged In: YES
    user_id=680457

    This Bug seems to be fixed in JTS 1.7.1. It should be
    closed, shouldn't it?

     
  • Dr JTS

    Dr JTS - 2006-04-20
    • status: open --> closed
     
  • Dr JTS

    Dr JTS - 2006-04-20

    Logged In: YES
    user_id=1158312

    Fixed in 1.7.1

     

Log in to post a comment.

Auth0 Logo