Commit Graph

985 Commits

Author SHA1 Message Date
Inderjeet Singh
c53e255105 Fixed typo as mentioned in issue 565 2014-03-26 18:07:59 +00:00
Inderjeet Singh
edf66083e6 renamed @Adapt to @JsonAdapter 2014-03-26 17:59:54 +00:00
Inderjeet Singh
7f6a096030 renamed JsonAdapter annotation to Adapt annotation. 2014-03-09 23:08:54 +00:00
Inderjeet Singh
6e8d3cd65e Created threadsafe implementation of JsonAdapter invocation. Also fixed a bug where runtime generated typeadapters were being carried over from a toJson/fromJson call to the next. 2014-03-09 23:00:53 +00:00
Inderjeet Singh
e280ffd7e2 Fixed broken test to ensure that a field JsonAdapter annotation supersedes the class JsonAdapter annotation.
Added a map in Gson to keep track of TypeAdapters which are generated by Gson.
2014-03-09 08:36:24 +00:00
Inderjeet Singh
0922af5be6 removed invalid imports 2014-03-09 08:23:05 +00:00
Inderjeet Singh
67af0dd8f8 Added javadoc comment in JsonAdapter explaining the usage for fields.
Added a (broken) test the ensure a field annotation for JsonAdapter supersedes a class annotation.
2014-03-09 08:21:06 +00:00
Inderjeet Singh
f88eee094c removed some eclipse warnings 2014-03-09 07:33:08 +00:00
Inderjeet Singh
eaaa2a1b4f added functional tests for applying JsonAdapter annotation on Fields. 2014-03-09 07:31:02 +00:00
Inderjeet Singh
b9998e511f deleted support for the magic GSON_TYPE_ADAPTER field 2014-03-09 07:30:37 +00:00
Inderjeet Singh
bf549f0589 Added support for JsonAdapter annotation on fields 2014-03-09 07:28:04 +00:00
Inderjeet Singh
67d512ee7d Created a JsonAdapter annotation that can be applied to classes to indicate their TypeAdapter. 2014-03-08 22:37:19 +00:00
Inderjeet Singh
7c97ac2944 Updated Gson version to 2.3-SNAPSHOT since this is a new feature.
Added support for a magic field GSON_TYPE_ADAPTER in a class. This adapter is automatically invoked if present.
The field must be present in the class (not in any super-type), and must be strongly typed as TypeAdapter<T>.
2014-03-08 20:08:13 +00:00
Inderjeet Singh
b2a9d872db deleted redundant and invalid precondition. 2014-03-08 19:33:24 +00:00
Inderjeet Singh
c3d0f200b3 Fixed a bug where an inner static class was incorrectly marked as non-static while creating parameterized types. 2014-03-08 19:12:24 +00:00
Inderjeet Singh
b52f692ffa update various maven plugin versions 2014-03-08 17:30:15 +00:00
Inderjeet Singh
eb817e307f added snapshot repository in pom.xml 2013-09-03 17:49:15 +00:00
Inderjeet Singh
c235aa0c1b updated the id of the sonatype nexus staging repository. 2013-09-02 19:27:44 +00:00
Inderjeet Singh
2b95a4822b added distribution management section to pom 2013-09-01 23:42:08 +00:00
Jesse Wilson
1840466704 Fix a nasty bug where elements in LinkedHashTreeMap could be dropped.
The underlying problem is that the doubleCapacity function would drop the parent links when all nodes ended up on the same side in a doubling. This was caused by the fact that the AvlIterator was destructive on parent nodes, and we weren't putting them back together with the AvlBuilder. This removes an incorrect optimization and fixes the problem.

Also move LinkedHashTreeMap back into main from test.
2013-05-14 21:43:20 +00:00
Joel Leitch
d2b660570e 2.2.4 JavaDoc. 2013-05-13 21:45:29 +00:00
Joel Leitch
6f19060e14 [maven-release-plugin] prepare for next development iteration 2013-05-13 21:36:45 +00:00
Joel Leitch
b378548c5c [maven-release-plugin] prepare release gson-2.2.4 2013-05-13 21:36:39 +00:00
Joel Leitch
8834343861 Moving broken class to "test" package for now and disabling broken test. 2013-05-13 21:01:33 +00:00
Joel Leitch
2d5cab1b7b Fix hashing in LinkedHashTreeMap, but it still does not work :( 2013-05-13 20:40:07 +00:00
Joel Leitch
3f4bc4cd10 Remove unused import 2013-05-13 20:38:35 +00:00
Joel Leitch
e4508227c5 Added test to use BigDecimal to parse number when requesting it as a long. 2013-05-13 20:37:33 +00:00
Joel Leitch
f29d5bc37b Create a LinkedTreeMap based on the LinkedHashTreeMap; however, removed all the hashing from it as resorted to a single tree. The insertion order is still preserved. 2013-05-03 16:11:16 +00:00
Joel Leitch
7c9fd53c78 Fix test that expects an exception to fail if no exception is thrown 2013-05-03 15:34:58 +00:00
Joel Leitch
b88e0e9395 Test to expose edge doubling and rehashing bug in LinkedHashTreeMap. 2013-05-03 15:13:30 +00:00
Joel Leitch
8e8bb9c688 Added test for comments inside a string value. 2013-04-14 21:36:47 +00:00
Inderjeet Singh
93041211d1 2.2.3 javadocs 2013-04-12 21:51:58 +00:00
Inderjeet Singh
d831f42168 [maven-release-plugin] prepare for next development iteration 2013-04-12 21:31:10 +00:00
Inderjeet Singh
f002374e22 [maven-release-plugin] prepare release gson-2.2.3 2013-04-12 21:31:02 +00:00
Inderjeet Singh
16a21719ff updated maven plugin versions 2013-04-12 21:28:11 +00:00
Inderjeet Singh
6347e9b9c6 ensuring that LinkedHashTreeMap.contains() returns false when non-Comparable() keys are passed to it 2013-04-12 21:10:21 +00:00
Inderjeet Singh
6f0a6a4662 made inner classes static and final 2013-04-12 20:20:53 +00:00
Inderjeet Singh
ae034b5ca2 eliminated eclipse warnings by adding a default label to switch. 2013-04-12 20:14:50 +00:00
Inderjeet Singh
a3f11150cc removed more eclipse warnings 2013-04-12 20:12:12 +00:00
Inderjeet Singh
26016ca66e removed eclipse warnings, unused fields. Made inner classes static where possible. 2013-04-12 20:09:08 +00:00
Joel Leitch
70f9280cb6 Remove usage of StringPool as it appears to slow things down and avoid Java String intern for the common cases. 2013-04-08 18:36:23 +00:00
Joel Leitch
83e1f45653 Re-add non-comparable key tests to LinkedHashTreeMap. 2013-04-04 22:29:29 +00:00
Inderjeet Singh
c22ab9767d fixed https://code.google.com/p/google-gson/issues/detail?id=491 by adding OSGi entries for maven-source-plugin 2013-04-04 22:05:56 +00:00
Inderjeet Singh
edd6c19670 deleted unused enum and reordered imports 2013-04-04 21:40:05 +00:00
Joel Leitch
af6aa5f782 Use the LinkedHashTreeMap instead of LinkedTreeMap and delete the LinkedTreeMap version. 2013-04-04 21:31:23 +00:00
Inderjeet Singh
7d53113ebc fixed https://code.google.com/p/google-gson/issues/detail?id=509 by adding construction for EnumSet 2013-04-04 21:15:50 +00:00
Jesse Wilson
63142f621c Use the right method name in error messages.
Fixes issue 498.
2013-02-04 16:05:00 +00:00
Jesse Wilson
6a69c603c0 Permit serialization of "Class" fields, but only if they're null. 2013-02-04 15:52:51 +00:00
Joel Leitch
edf326e756 Tag member fields as transient since a LinkedHashMap is used for serialization. 2013-01-15 20:04:26 +00:00
Joel Leitch
5af92f1736 Additional changes to a map test with "null" string key. 2013-01-14 22:18:07 +00:00