Hi Everyone,

while working on wfs-ng, I think I found a bug in the events system in gt-data.
This is my suggested change:
https://github.com/NielsCharlier/geotools/commit/af9df3e282d0ad70fbf463fa5e2b36225a53116a

In modules/library/data/src/main/java/org/geotools/data/store/ContentEntry.java , now it is:

for(ContentStateentry:state.values()){
if(entry==source){
continue;// no notificaiton required
}
for(FeatureListenerlistener:source.listeners){
try{
listener.changed(notification);
}
catch(Throwablet){
// problem issuing notification to an interested party
dataStore.LOGGER.log(Level.WARNING,"Problem issuing feature event "+notification,t);
}
}
}

I would assume it should be this:

   for(ContentStateentry:state.values()){
if(entry==source){
continue;// no notificaiton required
}
for(FeatureListenerlistener:*entry*.listeners){
try{
listener.changed(notification);
}
catch(Throwablet){
// problem issuing notification to an interested party
dataStore.LOGGER.log(Level.WARNING,"Problem issuing feature event "+notification,t);
}
}
}


Why loop over the entries otherwise? It seems to me my change makes more sense.

Kind Regards
Niels
------------------------------------------------------------------------------
Is your legacy SCM system holding you back? Join Perforce May 7 to find out:
• 3 signs your SCM is hindering your productivity
• Requirements for releasing software faster
• Expert tips and advice for migrating your SCM now
http://p.sf.net/sfu/perforce
_______________________________________________
GeoTools-Devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to