[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [jts-dev] Simple cast problem
|
Within the same Eclipse project I created a test class that uses
the same dependencies as used in the compilation.
Trivial I know...
private static void Geometry2Polygon( )
{
Geometry jtsGeom = null;
jtsGeom = JTSGeometry.fromWKT("POLYGON((0 0,10 0,10 10,
0 10, 0 0))");
Polygon poly = (Polygon) jtsGeom;
PrintGeometry.printJTSGeometry(poly);
}
And it works, ie it gets to my PrintGeometry method.
But the same few lines in the actual main code, when
deployed to SQL Developer, fails at that (Polygon) cast in that
method.
I have one other instance of this cast in thousands of lines of
code ... and it works....
All my other JTS dependent code in my extension work fine just
not this case.
Hmmmm... I'll keep digging.
regards
On 13/02/2024 2:04 pm, SPDBA via
jts-dev wrote:
I'll prepare something.
Thanks
Simon
39 Cliff View Drive, Allens
Rivulet, 7150, Tasmania, Australia
(P) 03 62 396 397
(M) 0418 396 381
On 13 Feb 2024, at 13:23, Martin Davis
via jts-dev <
jts-dev@xxxxxxxxxxx>
wrote:
If you can post reproducing code we can have a
closer look.
I've tried running with
jts-core-19.0.jar
Still fails.
Simon
39 Cliff View Drive, Allens Rivulet,
7150, Tasmania, Australia
(P) 03 62 396 397
(M) 0418 396 381
On 13 Feb 2024, at 09:57, SPDBA
via jts-dev <
jts-dev@xxxxxxxxxxx>
wrote:
I have print statements either
side.
After print never executes.
Code used to work (an unhelpful
thing to say) but the java versions etc (see other
email) are basically the same as before.
What gets me is that no exception
is thrown: the calling java class just terminates.
The application doesn't terminate, just the
action.
Simon
39 Cliff View Drive, Allens
Rivulet, 7150, Tasmania, Australia
(P) 03 62 396 397
(M) 0418 396 381
On 13 Feb 2024, at 08:54,
Martin Davis via jts-dev <
jts-dev@xxxxxxxxxxx>
wrote:
Is it possible the code just
terminates normally?
You could try adding print statements to
see exactly where the code terminates.
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
jts-dev mailing list
jts-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://dev.eclipse.org/mailman/listinfo/jts-dev
jts-dev mailing list
jts-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://dev.eclipse.org/mailman/listinfo/jts-dev
_______________________________________________
jts-dev mailing list
jts-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://dev.eclipse.org/mailman/listinfo/jts-dev
jts-dev mailing list
jts-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://dev.eclipse.org/mailman/listinfo/jts-dev
_______________________________________________
jts-dev mailing list
jts-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://dev.eclipse.org/mailman/listinfo/jts-dev
--
Simon Greener
39 Cliff View Drive, Allens Rivulet, 7150, Tasmania, Australia
(m) +61 418 396 391
(w) www.spdba.com.au
(m) simon@xxxxxxxxxxxx