File: no_j2objc.patch

package info (click to toggle)
protobuf 3.25.7-1
  • links: PTS
  • area: main
  • in suites: experimental
  • size: 46,004 kB
  • sloc: cpp: 204,412; java: 88,198; ansic: 81,264; objc: 58,434; cs: 27,303; python: 22,841; php: 11,408; ruby: 8,637; pascal: 3,333; xml: 2,333; sh: 1,331; makefile: 538; lisp: 86; awk: 17
file content (43 lines) | stat: -rw-r--r-- 1,552 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
Description: Remove dependency on j2objc library
 It's not needed for Debian.
Author: Laszlo Boszormenyi (GCS) <gcs@debian.org>
Forwarded: not-needed
Last-Update: 2023-11-21

---

--- a/java/util/src/main/java/com/google/protobuf/util/Timestamps.java
+++ b/java/util/src/main/java/com/google/protobuf/util/Timestamps.java
@@ -15,7 +15,7 @@
 
 //import com.google.errorprone.annotations.CanIgnoreReturnValue;
 //import com.google.errorprone.annotations.CompileTimeConstant;
-import com.google.j2objc.annotations.J2ObjCIncompatible;
+//import com.google.j2objc.annotations.J2ObjCIncompatible;
 import com.google.protobuf.Duration;
 import com.google.protobuf.Timestamp;
 import java.io.Serializable;
@@ -356,7 +356,6 @@
    * @throws IllegalArgumentException if the year is before 1 CE or after 9999 CE
    */
   @SuppressWarnings("GoodTime") // this is a legacy conversion API
-  @J2ObjCIncompatible
   public static Timestamp fromDate(Date date) {
     if (date instanceof java.sql.Timestamp) {
       java.sql.Timestamp sqlTimestamp = (java.sql.Timestamp) date;
--- a/java/util/pom.xml
+++ b/java/util/pom.xml
@@ -27,11 +27,11 @@
       <artifactId>error_prone_annotations</artifactId>
       <version>2.5.1</version>
     </dependency>
-    <dependency>
+    <!--<dependency>
       <groupId>com.google.j2objc</groupId>
       <artifactId>j2objc-annotations</artifactId>
       <version>2.8</version>
-    </dependency>
+    </dependency>-->
     <dependency>
       <groupId>com.google.code.findbugs</groupId>
       <artifactId>jsr305</artifactId>