Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jts-dev] Simple cast problem

That sounds very odd, try stepping through the code with a debugger…

I should also ask what version of Java you are using and if you are in an environment like OSGi that uses class loaders or a module system to isolate; it would be awkward if you had two versions of JTS in play. 

--
Jody Garnett


On Mon, Feb 12, 2024 at 2:33 AM SPDBA via jts-dev <jts-dev@xxxxxxxxxxx> wrote:
In my Java code I create a Geometry object that could be of any type.

I test that the Geometry us if type Polygon then do a cast. My code terminates with no exception thrown....

Geometry g = ......;
if ( g instanceof Polygon) {
   Polygon p = (Polygon) g;
   //Process polygon
}

Any help trying to work out what is going on appreciated.

Simon

39 Cliff View Drive, Allens Rivulet, 7150, Tasmania, Australia
(P) 03 62 396 397
(M) 0418 396 381
_______________________________________________
jts-dev mailing list
jts-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://dev.eclipse.org/mailman/listinfo/jts-dev

Back to the top