Skip to content

Commit

Permalink
Clarify the fact that the behaviour of getDelegateAdapter depends on …
Browse files Browse the repository at this point in the history
…registration order.
  • Loading branch information
Dorvaryn committed Sep 3, 2015
1 parent b973887 commit 618343f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions gson/src/main/java/com/google/gson/Gson.java
Original file line number Diff line number Diff line change
Expand Up @@ -410,6 +410,10 @@ public <T> TypeAdapter<T> getAdapter(TypeToken<T> type) {
* System.out.println("Num JSON reads" + stats.numReads);
* System.out.println("Num JSON writes" + stats.numWrites);
* }</pre>
* Note that this call will skip all factories registered before {@code skipPast}. In case of
* multiple TypeAdapterFactories registered it is up to the caller of this function to insure
* that the order of registration does not prevent this method from reaching a factory they
* would expect to reply from this call.
* Note that since you can not override type adapter factories for String and Java primitive
* types, our stats factory will not count the number of String or primitives that will be
* read or written.
Expand Down

0 comments on commit 618343f

Please sign in to comment.