spotify / dns-java

DNS wrapper library that provides SRV lookup functionality
Apache License 2.0
206 stars 47 forks source link

Fix bug in previous patch for avoiding notifying for initial data #26

Closed spkrka closed 8 years ago

spkrka commented 8 years ago

Now we will instead return a specially constructed empty set that can be used to distinguish empty result from missing result.

There is a new method in ChangeNotifers that consumers can use to detect this.

I apologize for the hacky code, if the major version is ever bumped this should be revert so that the API can return an Optional<Set> instead, or avoid firing in ChangeNotifier.setListener(listener, true) if no change has ever happened

pettermahlen commented 8 years ago

What was the bug in the previous patch?