google-protobuf 4.28.0.rc.1-java → 4.28.0.rc.2-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: 2fcb3ed9298cd0a500eb0e97cd86d03490e595922399cefa8d42abcc3bca195e
4
+ data.tar.gz: 1101b07f920525258833ed4a0056515151cebb787ef762904961740d4efed7b0
5
5
  SHA512:
6
- metadata.gz: 9823f96bf1656d0e00c7edd0b780a60cb68fa01864aa375746af7983c69a3cce83d2ada73bc1396aa96e0880b68f71f741be484ff451f96347297e7fa2de2fc0
7
- data.tar.gz: d1db26f32418fa2012247c5f9b1d392cc96fa491d69b568947885e5ed11812045b52de08f595abe281a33c0980c5447363f01312d517f00eb4be7b945fef01c8
6
+ metadata.gz: e619f0f74e6e738205c830d94594f049bcad17e195d5698db7200909b6c24710eeb4eb6eff220dc27b51ee706e488ef49018cfb6dda98f6471dd87cd4bf855d4
7
+ data.tar.gz: 8b0b36f1431fb7075fcae1f6056da590462d7b8109ecbe6abf3241e703cf8904f8186df19967e060ae735c0586bfd1f7773d53bec78f2151be411565e2220045
@@ -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.2
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-07 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-rc2/ruby
196
196
  post_install_message:
197
197
  rdoc_options: []
198
198
  require_paths: