[OpenMap Users] OpenMap Bug

From: Monte Philip V NPRI <MontePV_at_Npt.NUWC.Navy.Mil>
Date: Tue, 02 May 2006 10:58:11 -0400

One of our developers found this:
 
OMGraphicList.findAll(int x, int y, float limit) throws null pointer exception.
 
This is because it uses OMGraphicList.findAllTest(int x, int y, float limit, boolean resetSelect, OMGraphicList addTo,OMGeometry omg, OMDist omd)
 
which calls OMGraphicList.findClosestTest(OMDist current, int index,OMGeometry graphic, int x, int y, float limit, boolean resetSelect) which returns null when graphic is not visible. This normal operation null return value is not properly tested for in findAllTest leading to the exception.
 
Solution: change line 1223 of OMGraphicList.java (openmap 4.6.3) from
            if (omd.omg == null) {
to
            if ((omd==null)||(omd.omg == null)) {
 
 
 

Philip V. Monte


Software Engineer
Code 2514, Warfare Interoperability Branch
NAVSEA Warfare Centers Division Newport
(401) 832-5325

 

 



--
[To unsubscribe to this list send an email to "majdart_at_bbn.com"
with the following text in the BODY of the message "unsubscribe openmap-users"]
Received on Tue May 02 2006 - 11:04:41 EDT

This archive was generated by hypermail 2.3.0 : Tue Mar 28 2017 - 23:25:07 EDT