[mapguide-trac] #457: SWIG string conversion for Java may not work
on all JVMs
MapGuide Open Source
trac_mapguide at osgeo.org
Sun Feb 24 21:42:47 EST 2008
#457: SWIG string conversion for Java may not work on all JVMs
----------------------------+-----------------------------------------------
Reporter: tomfukushima | Owner:
Type: defect | Status: new
Priority: medium | Milestone: 2.1
Component: General | Version: 2.0.0
Severity: major | Keywords:
External_id: |
----------------------------+-----------------------------------------------
A pitfalls page from java.sun.com indicates that JNI native strings are
not null terminated.
http://java.sun.com/docs/books/jni/html/pitfalls.html
The current SWIG translation from Java to C++ assumes that they are. If
this is true, the Java API should be completely unusable. However, Tomcat
does seem to work just fine. Different JVMs may also behave differently.
The offending code is the autogenerated string handling going from Java ->
C++. It can be easily fixed and will affect all CREFSTRING arguments in
the API.
--
Ticket URL: <http://trac.osgeo.org/mapguide/ticket/457>
MapGuide Open Source <http://mapguide.osgeo.org/>
MapGuide Open Source Internals
More information about the mapguide-trac
mailing list