Commit Graph

25 Commits

Author SHA1 Message Date
Éamonn McManus
0864a02e86
Build on JDK 17 as well as 11. (#2198)
* Build on JDK 8 and 17 as well as 11.

* Remove JDK 8 for now.

`DefaultDateTypeAdapterTest` fails.

* Tweak javadoc to avoid warnings.

Mostly these are about using `<h3>` when the previous tag was `<h1>`,
and the like. This previous tag might be implicit (part of what javadoc
itself outputs rather than the HTML in doc comments).

Apparently JDK 11 puts method javadoc inside `<h2>` while JDK 11 puts it
inside `<h3>`. Or something like that. Anyway it doesn't appear to be
possible to use `<h3>` _or_ `<h4>` and please both.
2022-09-23 14:33:28 -07:00
Marcono1234
7f77ad4ff6
Replace $Gson$Preconditions.checkNotNull with Objects.requireNonNull (#2180)
* Replace $Gson$Preconditions.checkNotNull with Objects.requireNonNull

* Add back checkNotNull
2022-08-22 07:22:32 -07:00
Marcono1234
4dda4ec5ba
Use diamond operator when creating generic instances (#2104) 2022-04-17 15:27:21 -07:00
Marcono1234
49ddab9eeb
Add CodeQL GitHub code scanning workflow (#2076)
* Add CodeQL GitHub code scanning workflow

* Only compile main sources for code scanning

* Move test .proto  files to test sources

`annotations.proto` also seems to be only relevant for tests because the test
explicitly registers them as extensions. By default the Proto adapter does not
consider them.

* Address some code scanning findings

* Fix some more findings
2022-02-17 18:40:40 -08:00
Marcono1234
6b96a389cc
Put module-info.class into Multi-Release JAR folder (#2013)
* Put module-info.class into Multi-Release JAR folder

Uses ModiTect to place module-info.class under Multi-Release JAR folder
`META-INF/versions/9`.

* Adjust pom.xml to drop support for Java 6

* Change doclint setting

All Javadoc errors have been solved previously; doclint can now be enabled
without causing build failures.

* Improve README Java requirements
2022-01-01 12:44:39 -08:00
Marcono1234
6ffcdf3029
Fix Javadoc warnings and errors (#2040) 2021-12-26 15:30:21 -08:00
XinyuLiu5566
0313de8206
Some code suggestion from CodeGuru (#1988)
* change %s to %d

* secusity issue, add try-finally block

Co-authored-by: liuxinyu <xinyu6@illinois.edu>
2021-11-15 15:08:13 -08:00
Marcono1234
cc505e1b9f
Convert codegen, metrics and proto to Maven submodules (#2008)
* Convert codegen, metrics and proto to Maven submodules

* Fix import order
2021-11-07 08:42:08 -08:00
Éamonn McManus
4bb67483f9
Update dependencies in proto/pom.xml. (#1949)
Also use GeneratedMessageV3 rather than GeneratedMessage, consistent with recent versions of protoc.
2021-09-01 17:11:48 -07:00
Ori Schwartz
c744ccd51c avoid repeated calls to build() during deserialization by obtaining field types from the Message's defaultInstance (#1215) 2017-12-28 08:44:16 +05:30
Ori Schwartz
6e2fcdcaf2 Use Message instead of GeneratedMessage which is specific to protobuf v2. Message is a common superclass of both GeneratedMessage and GeneratedMessageV3. Also throw an exception to notify caller that DynamicMessage is not supprorted. (#1191) 2017-11-27 18:13:39 -08:00
Ori Schwartz
f0aa1118e9 Java protobuf uses lower camel for all field names. When using reflection to find the generic type of repeated fields, can't use the user specified formats for field name conversion. (#1119) 2017-09-17 23:46:52 -07:00
guptasourabh
8101ab74e9 list addition optimization (#1038)
* list addition optimization

* Optimized imports

Optimized imports
2017-03-16 21:16:38 -07:00
Nykolas Lima
2928b3ef97 handle explicit null values in JSON 2016-05-23 16:44:30 -03:00
Chris Conroy
7abeb16080 Thread safe method cache 2015-10-28 17:41:56 -04:00
Emmanuel Cron
e3fe3c9430 Moved the .gitignore file to a more appropriate place 2015-10-20 12:07:51 -07:00
Emmanuel Cron
1ffa2fb92a Added rebuilt tests for serialization with numbers 2015-10-06 17:03:48 -07:00
Emmanuel Cron
51458c6c80 Added .gitignore; generated folder does not need to be pushed 2015-10-06 17:02:12 -07:00
Emmanuel Cron
b395da26b7 Better javadoc 2015-10-06 16:57:13 -07:00
Emmanuel Cron
339c783b4a Updated the ProtoTypeAdapter to a version that works smoothly and supports field name/value customization.
- Lets you customize the proto field name serialization per field
    - Lets you use different cases for serialization (e.g. you could use UpperCamelCase for your proto field names and willing to serialize them using LowerHyphen)
    - Lets you choose to serialize enum values with their value (0, 1, 2, ...) instead of their name.
2015-10-06 16:20:37 -07:00
Inderjeet Singh
7f9762db63 Updated Maven dependencies and license notice in ProtoTypeAdapter. 2011-04-12 16:16:35 +00:00
Inderjeet Singh
cf02621275 removed unused import 2010-11-02 00:12:21 +00:00
Inderjeet Singh
2d7367364b Added additional functional tests involving complex protocol buffers, and protos with repeated fields.
Moved all the functional tests under a functional package.
2010-10-27 23:49:22 +00:00
Inderjeet Singh
6feb325044 Added a type adapter for serializing and deserializing protobufs 2010-10-27 23:06:26 +00:00
Inderjeet Singh
9b0e7f8b84 initial check-in for implementing support for protocol buffers in Gson 2010-09-14 17:59:04 +00:00