Protobuf Team Bot
3ea774370a
Internal change
...
PiperOrigin-RevId: 578944754
1 year ago
Protobuf Team Bot
6b5d8db01f
Updating version.json and repo version numbers to: 25.0
1 year ago
Protobuf Team Bot
287374e5eb
Replace try-catch Blocks with assertThrows() in GeneratedMessageTest
...
PiperOrigin-RevId: 574887696
1 year ago
Protobuf Team Bot
ba1aab2baf
Updating version.json and repo version numbers to: 25.0-rc2
1 year ago
Protobuf Team Bot
896f3d8ced
Updating version.json and repo version numbers to: 25.0-rc1
1 year ago
Sandy Zhang
6889aed460
Check-in bootstrapped Java features for Bazel and CMake
...
PiperOrigin-RevId: 573014410
1 year ago
Mike Kruskal
58722b10c9
Internal change
...
PiperOrigin-RevId: 572987133
1 year ago
Kurt Alfred Kluever
833ded7298
Clean up assertions in `DurationsTest` and `TimestampsTest` a bit.
...
PiperOrigin-RevId: 572279223
1 year ago
Protobuf Team Bot
8f8513835c
Timestamps.parse: Add error handling for invalid hours/minutes in the timezone offset.
...
Before this CL, bad offsets result in a NumberFormatException (from parseLong) instead of the documented ParseException/IllegalArgumentException.
PiperOrigin-RevId: 572266056
1 year ago
Protobuf Team Bot
e5e7863189
Create the destination map bigger than the source map for MapFieldList.copy().
...
PiperOrigin-RevId: 570766040
1 year ago
Mike Kruskal
5b340ded2b
Specify proto2/proto3 defaults on feature specs.
...
This hooks up legacy proto2/proto3 editions, but prohibits them from being used in proto files. These will be hooked up directly to `syntax` declarations in a later change.
PiperOrigin-RevId: 570746314
1 year ago
Sandy Zhang
1f720d9d8a
Move Java runtime protos to correct OSS directory
...
PiperOrigin-RevId: 570129858
1 year ago
Protobuf Team Bot
e33e0d2ba5
Add `ABSL_ATTRIBUTE_LIFETIME_BOUND` attribute on generated oneof accessors.
...
This allows the compiler to statically detect use-after-free bugs.
PiperOrigin-RevId: 569504371
1 year ago
Sandy Zhang
30b6251dea
Automated rollback of commit 2a55706f9d
.
...
PiperOrigin-RevId: 569253919
1 year ago
Adam Cozzette
501ececd39
Reorganize upb file structure
...
This change moves almost everything in the `upb/` directory up one level, so
that for example `upb/upb/generated_code_support.h` becomes just
`upb/generated_code_support.h`. The only exceptions I made to this were that I
left `upb/cmake` and `upb/BUILD` where they are, mostly because that avoids
conflict with other files and the current locations seem reasonable for now.
The `python/` directory is a little bit of a challenge because we had to merge
the existing directory there with `upb/python/`. I made `upb/python/BUILD` into
the BUILD file for the merged directory, and it effectively loads the contents
of the other BUILD file via `python/build_targets.bzl`, but I plan to clean
this up soon.
PiperOrigin-RevId: 568651768
1 year ago
Mike Kruskal
65419eef0d
Flip the names of edition_enum and edition.
...
We will be using the enum edition from now on, and the string field will be removed ASAP.
PiperOrigin-RevId: 568554147
1 year ago
Protobuf Team Bot
b86b9ff337
Internal change.
...
PiperOrigin-RevId: 568232318
1 year ago
Sandy Zhang
81068e8e8c
Internal change
...
PiperOrigin-RevId: 566426899
1 year ago
Protobuf Team Bot
785c82dbde
Fix a bad cast in put<X>BuilderIfAbsent when already present due to using the result of put() directly (which is null if it currently has no value)
...
PiperOrigin-RevId: 565425310
1 year ago
Protobuf Team Bot
47cec39ab3
Fix a NPE in put<X>BuilderIfAbsent due to using the result of put() directly (which is null if it currently has no value)
...
PiperOrigin-RevId: 564509304
1 year ago
Joshua Haberman
2bea492185
Fixed pre-existing formatting problems.
...
The presubmit complains about these if you try to modify any of these files.
PiperOrigin-RevId: 564506598
1 year ago
Joshua Haberman
db20f5ffc9
Shorten our license headers into an abbreviated form that references LICENSE instead of including it in full.
...
PiperOrigin-RevId: 564013990
1 year ago
Joshua Haberman
7853a5e301
Shorten our license headers into an abbreviated form that references LICENSE instead of including it in full.
...
PiperOrigin-RevId: 563956563
1 year ago
Joshua Haberman
40d69fd51f
Shorten our license headers into an abbreviated form that references LICENSE instead of including it in full.
...
PiperOrigin-RevId: 563953121
1 year ago
Joshua Haberman
7e4fdf134d
Shorten our license headers into an abbreviated form that references LICENSE instead of including it in full.
...
PiperOrigin-RevId: 563894169
1 year ago
Joshua Haberman
638a860285
Shorten our license headers into an abbreviated form that references LICENSE instead of including it in full.
...
PiperOrigin-RevId: 563893662
1 year ago
Joshua Haberman
f78eaa9aa2
Shorten our license headers into an abbreviated form that references LICENSE instead of including it in full.
...
PiperOrigin-RevId: 563888947
1 year ago
Protobuf Team Bot
955d4ab0d6
Add MapFieldBuilder and change codegen to generate it and the put{field}BuilderIfAbsent method.
...
PiperOrigin-RevId: 563738402
1 year ago
Mike Kruskal
c23ae49776
Editions: Migrate edition strings to enum in Java code.
...
The edition specification in proto files will remain unchanged, but it will be immediately converted to an enum by the parser. This gives us more control over the valid set of editions and simplifies ordering (just an integer comparison now). We plan to release exactly one edition per year.
PiperOrigin-RevId: 563261375
1 year ago
Sandy Zhang
924a15200c
Add support for EDITIONS in Java and Java Lite syntax enum / bits.
...
PiperOrigin-RevId: 555522301
2 years ago
ericsalo
843b74e601
Main 202308091812 ( #13489 )
...
Closes #13489
COPYBARA_INTEGRATE_REVIEW=https://github.com/protocolbuffers/protobuf/pull/13489 from protocolbuffers:main-202308091812 e729f0bf5a
PiperOrigin-RevId: 555301642
2 years ago
Protobuf Team Bot
aba9a7f1a3
Internal change
...
PiperOrigin-RevId: 555251853
2 years ago
Protobuf Team Bot
093e258a71
Updating version.json and repo version numbers to: 24.0
2 years ago
Kurt Alfred Kluever
279d627b1e
Improve javadocs of `Timestamps.now()`.
...
PiperOrigin-RevId: 553183786
2 years ago
Protobuf Team Bot
3487ae0c01
Updating version.json and repo version numbers to: 24.0-rc3
2 years ago
Protobuf Team Bot
961779e164
Add ByteString.isNotEmpty Kotlin extension function.
...
PiperOrigin-RevId: 552833973
2 years ago
Adam Cozzette
43e1657cdf
Lower default Java text format recursion limit down to 100
...
This makes the limit consistent with how we handle this in binary format and in
other languages.
PiperOrigin-RevId: 552572322
2 years ago
Adam Cozzette
bca3bed137
Introduce recursion limit in Java text format parsing
...
This will make the text format parser reject inputs that have a nesting depth
greater than 150. We will soon lower this number down to 100 for consistency
with other implementations.
For use cases that rely on parsing deeply nested text protos, it is possible to
create a Parser with a custom recursion limit like this:
`TextFormat.Parser.newBuilder().setRecursionLimit(i).build()`.
PiperOrigin-RevId: 552543574
2 years ago
Adam Cozzette
7fb9287c45
Simplify Java text format parser
...
`ConsumeFieldValue()` has some special logic for handling Any fields, but this
does not seem to be necessary since `mergeField` can handle Any fields on its
own. This CL therefore deletes the Any-related logic from
`ConsumeFieldValue()`.
PiperOrigin-RevId: 552540364
2 years ago
Protobuf Team Bot
004f54af8f
Consider the protobuf.Any invalid if typeUrl.split("/") returns an empty array.
...
Currently this corner case (discovered by fuzzing) is not considered. The code throws `ArrayIndexOutOfBoundsException` which can escape `protobuf.toString()` method.
PiperOrigin-RevId: 550514062
2 years ago
Protobuf Team Bot
6630e9fa56
Remove all lambdas from MapFieldBuilder
...
PiperOrigin-RevId: 550030591
2 years ago
Protobuf Team Bot
3ee67038e5
Add MapFieldBuilder to support a later change to codegen.
...
PiperOrigin-RevId: 549711661
2 years ago
Protobuf Team Bot
034ec9d9f6
Updating version.json and repo version numbers to: 24.0-rc2
2 years ago
Protobuf Team Bot
e38dcafc7c
Prepare `osgi.bzl` for `java_output.source_jars` API change
...
PiperOrigin-RevId: 548984919
2 years ago
Protobuf Team Bot
ac3cad9445
Protobuf's Linakge Monitor check to use a local test BOM rather than google-cloud-shared-dependencies
...
PiperOrigin-RevId: 547882989
2 years ago
Protobuf Team Bot
b1f92b768b
Protobuf's Linakge Monitor check to use a local test BOM rather than google-cloud-shared-dependencies
...
PiperOrigin-RevId: 547882989
2 years ago
Sandy Zhang
d6157f7c7e
Mark `FieldDescriptor.hasOptionalKeyword()` as deprecated.
...
This API will be removed in a future breaking change.
PiperOrigin-RevId: 547505900
2 years ago
Protobuf Team Bot
05835e374d
Updating version.json and repo version numbers to: 24.0-rc1
2 years ago
Sandy Zhang
b6b86e21fb
Mark OneofDescriptor.isSynthetic() deprecated.
...
This API will be removed in a future breaking change.
PiperOrigin-RevId: 546004442
2 years ago
Sandy Zhang
137e9b57a8
Migrate away from `OneofDescriptor.isSynthetic()`
...
PiperOrigin-RevId: 544416186
2 years ago