File: 01-java8-compatibility.patch

package info (click to toggle)
libjson-java 2.4-3
  • links: PTS, VCS
  • area: main
  • in suites: buster, stretch
  • size: 720 kB
  • ctags: 1,160
  • sloc: java: 8,060; xml: 20; makefile: 15; sh: 7
file content (25 lines) | stat: -rw-r--r-- 883 bytes parent folder | download | duplicates (3)
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
Description: Uses the renamed method MultiKeyMap.removeMultiKey() introduced
 in libcommons-collections3-java 3.2.1-7 to solve a compatibility issue with
 Java 8.
Author: Emmanuel Bourg <ebourg@apache.org>
Forwarded: not-needed
--- a/net/sf/json/JsonConfig.java
+++ b/net/sf/json/JsonConfig.java
@@ -1364,7 +1364,7 @@
     */
    public void unregisterJsonValueProcessor( Class beanClass, Class propertyType ) {
       if( beanClass != null && propertyType != null ) {
-         beanTypeMap.remove( beanClass, propertyType );
+         beanTypeMap.removeMultiKey( beanClass, propertyType );
       }
    }
 
@@ -1377,7 +1377,7 @@
     */
    public void unregisterJsonValueProcessor( Class beanClass, String key ) {
       if( beanClass != null && key != null ) {
-         beanKeyMap.remove( beanClass, key );
+         beanKeyMap.removeMultiKey( beanClass, key );
       }
    }