-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make
RuntimeTypeAdapterFactory
recognize subclasses only conditiona…
…lly. (#2160) PR #2139 changed this factory so that if given a certain baseType, it will also recognize any subtype of that type. That is often the right thing to do, but it is a change in behaviour, and does in fact break at least one current client of this code. So instead we introduce a new `recognizeSubclasses()` method that triggers this behaviour. When the method is not called, we revert to the old behaviour of only recognizing instances of the exact class `baseType`.
- Loading branch information
1 parent
924c496
commit 2deb209
Showing
2 changed files
with
42 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters