google-protobuf 4.28.0.rc.1-java → 4.28.0.rc.3-java

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of google-protobuf might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 818e8f6bcb18c04d61226d19aac9026df5b966b5571be6fa8e96ef883bd59785
4
- data.tar.gz: b5537f8aea29884c23c1b9de56d7625dc03df756e33616ef3f7b99814189fab9
3
+ metadata.gz: af2555a575401c9c465c5feb6db607044d03ba9bc7921fdc6ebdec54fd52d377
4
+ data.tar.gz: b37c9c96de35798410a3e47265b1da872fd5dcd2e9cef9a67ca2806c1da43480
5
5
  SHA512:
6
- metadata.gz: 9823f96bf1656d0e00c7edd0b780a60cb68fa01864aa375746af7983c69a3cce83d2ada73bc1396aa96e0880b68f71f741be484ff451f96347297e7fa2de2fc0
7
- data.tar.gz: d1db26f32418fa2012247c5f9b1d392cc96fa491d69b568947885e5ed11812045b52de08f595abe281a33c0980c5447363f01312d517f00eb4be7b945fef01c8
6
+ metadata.gz: 61d876d37a5860131ad526e21620395767ca93bae24cf657c70edaa3a9a3c939f3aeab264611abae05071bf985dbf3cf0b92fe2965dca34a62ca886b199143d2
7
+ data.tar.gz: 6cbc82e457871badcd536dc7a20ec748fea2ea4bad196777dfaafbb68e6a3f4bdd135f9ed643e1d90185557180cff35d65d04c0f0bd4830cec70fff17c5f8cc0
@@ -33,11 +33,18 @@ module Google
33
33
  return_value[:bool_val] = value
34
34
  when :string
35
35
  raise TypeError.new "Invalid argument for string field '#{name}' (given #{value.class})." unless value.is_a?(String) or value.is_a?(Symbol)
36
- begin
36
+ value = value.to_s if value.is_a?(Symbol)
37
+ if value.encoding == Encoding::UTF_8
38
+ unless value.valid_encoding?
39
+ # TODO:
40
+ # For now we only warn for this case. We will remove the
41
+ # warning and throw an exception below in the 30.x release
42
+ warn "String is invalid UTF-8. This will be an error in a future version."
43
+ # raise Encoding::InvalidByteSequenceError.new "String is invalid UTF-8"
44
+ end
45
+ string_value = value
46
+ else
37
47
  string_value = value.to_s.encode("UTF-8")
38
- rescue Encoding::UndefinedConversionError
39
- # TODO - why not include the field name here?
40
- raise Encoding::UndefinedConversionError.new "String is invalid UTF-8"
41
48
  end
42
49
  return_value[:str_val][:size] = string_value.bytesize
43
50
  return_value[:str_val][:data] = Google::Protobuf::FFI.arena_malloc(arena, string_value.bytesize)
Binary file
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-protobuf
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.28.0.rc.1
4
+ version: 4.28.0.rc.3
5
5
  platform: java
6
6
  authors:
7
7
  - Protobuf Authors
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-07-11 00:00:00.000000000 Z
11
+ date: 2024-08-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement
@@ -192,7 +192,7 @@ homepage: https://developers.google.com/protocol-buffers
192
192
  licenses:
193
193
  - BSD-3-Clause
194
194
  metadata:
195
- source_code_uri: https://github.com/protocolbuffers/protobuf/tree/v4.28.0-rc1/ruby
195
+ source_code_uri: https://github.com/protocolbuffers/protobuf/tree/v4.28.0-rc3/ruby
196
196
  post_install_message:
197
197
  rdoc_options: []
198
198
  require_paths: