ContentEntry.notifiyFeatureEvent does not notify all listeners
--------------------------------------------------------------

                 Key: GEOT-3970
                 URL: https://jira.codehaus.org/browse/GEOT-3970
             Project: GeoTools
          Issue Type: Bug
          Components: data
    Affects Versions: 2.7.3
            Reporter: Sebastian Graca


I was investigating why my listeners are not getting notified about feature 
changes and came across notifiyFeatureEvent in 
org.geotools.data.store.ContentEntry class.
{code:java}
void notifiyFeatureEvent( ContentState source, FeatureEvent notification){
        for(ContentState entry : state.values() ){
           if( entry == source ) {
               continue;  // no notificaiton required               
           }
           for( FeatureListener listener : source.listeners ){
               try {
                   listener.changed( notification );
               }
               catch (Throwable t ){
                   // problem issuing notification to an interested party
                   dataStore.LOGGER.log( Level.WARNING, "Problem issuing 
feature event "+notification, t );
               }
           }
        }
{code}

The second for loop iterates always over source listeners (which doesn't change 
because source is mehtod paramters). It should iterate over entry listeners 
instead.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

------------------------------------------------------------------------------
Cloud Services Checklist: Pricing and Packaging Optimization
This white paper is intended to serve as a reference, checklist and point of 
discussion for anyone considering optimizing the pricing and packaging model 
of a cloud services business. Read Now!
http://www.accelacomm.com/jaw/sfnl/114/51491232/
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to