EsriLayer setModel bug ?

21 views
Skip to first unread message

Bart Jourquin

unread,
Jun 17, 2020, 12:28:36 PM6/17/20
to openmap-users, Don Dietrick
Hi,

(Om 6b)

The code for the setModel(…) method in EsriLayer is written as:

        /**
* Sets the DbfTableModel
*
* @param model The DbfModel to set for this layer
*/
public void setModel(DbfTableModel model) {
if (_model != null) {
_model = model;
_list.putAttribute(DBF_ATTRIBUTE, model);
}
}

That means that it can only be used when no model is already set, but it cannot be used to set another model. Is this the intention ? Shouldn’t be 

public void setModel(DbfTableModel model) {
if (model != null) {
_model = model;
_list.putAttribute(DBF_ATTRIBUTEmodel);
}
}

(null test on parameter instead of class global private variable).

I cannot override the method as _model is private and not protected and there is not accessor to it….

Bart

Reply all
Reply to author
Forward
0 new messages