usefulness / webp-imageio

Java ImageIO WebP support (includes ARM chips support)
Apache License 2.0
35 stars 5 forks source link

Migrate away from deprecated finalize() method in favour of a single `Cleaner`. Require Java 9 #120

Closed mateuszkwiecinski closed 1 year ago

mateuszkwiecinski commented 1 year ago

Fixes https://github.com/usefulness/webp-imageio/issues/91

github-actions[bot] commented 1 year ago

Jar size:

Jar size change: +985.0B (3.1MiB -> 3.1MiB)

Diffuse output:

OLD: diffuse-source-file
NEW: pull-request-artifact.jar

       │          compressed          │           uncompressed           
       ├──────────┬──────────┬────────┼───────────┬───────────┬──────────
 JAR   │ old      │ new      │ diff   │ old       │ new       │ diff     
───────┼──────────┼──────────┼────────┼───────────┼───────────┼──────────
 class │ 55.3 KiB │ 56.3 KiB │ +985 B │ 117.4 KiB │ 119.5 KiB │ +2.1 KiB 
 other │    3 MiB │    3 MiB │    0 B │   6.4 MiB │   6.4 MiB │      0 B 
───────┼──────────┼──────────┼────────┼───────────┼───────────┼──────────
 total │  3.1 MiB │  3.1 MiB │ +985 B │   6.5 MiB │   6.5 MiB │ +2.1 KiB 

 CLASSES │ old │ new │ diff        
─────────┼─────┼─────┼─────────────
 classes │  25 │  25 │  0 (+0 -0)  
 methods │ 638 │ 633 │ -5 (+9 -14) 
  fields │  67 │  68 │ +1 (+1 -0)
JAR ``` compressed │ uncompressed │ ──────────┬────────┼───────────┬──────────┤ size │ diff │ size │ diff │ path ──────────┼────────┼───────────┼──────────┼────────────────────────────────────────────────────────────────── 6.2 KiB │ +282 B │ 17.8 KiB │ +628 B │ ∆ com/luciad/imageio/webp/WebPWriteParam.class 3 KiB │ +208 B │ 5.9 KiB │ +474 B │ ∆ com/luciad/imageio/webp/WebPWrapper.class 2.8 KiB │ +155 B │ 7.9 KiB │ +349 B │ ∆ com/luciad/imageio/webp/WebPReadParam.class 2.1 KiB │ +129 B │ 4.5 KiB │ +298 B │ ∆ com/luciad/imageio/webp/CompressionType.class 5 KiB │ +92 B │ 9.6 KiB │ +142 B │ ∆ com/luciad/imageio/webp/internal/OsInfo.class 2.4 KiB │ -82 B │ 7.2 KiB │ -159 B │ ∆ com/luciad/imageio/webp/WebPEncoderOptions.class 1.5 KiB │ -81 B │ 3.9 KiB │ -159 B │ ∆ com/luciad/imageio/webp/WebPDecoderOptions.class 4.3 KiB │ +74 B │ 8.7 KiB │ +132 B │ ∆ com/luciad/imageio/webp/WebPReader.class 6 KiB │ +70 B │ 12.7 KiB │ +155 B │ ∆ com/luciad/imageio/webp/internal/NativeLoader.class 5.5 KiB │ +58 B │ 11.7 KiB │ +79 B │ ∆ com/luciad/imageio/webp/WebPWriter_Companion.class 1.4 KiB │ +55 B │ 2.2 KiB │ +185 B │ ∆ com/luciad/imageio/webp/internal/NativeLoader_cleanup_1.class 926 B │ +24 B │ 1.3 KiB │ +6 B │ ∆ com/luciad/imageio/webp/internal/VP8StatusCode_Companion.class 697 B │ +1 B │ 807 B │ 0 B │ ∆ com/luciad/imageio/webp/WebPWriteParam_WhenMappings.class 1.7 KiB │ -1 B │ 3.1 KiB │ 0 B │ ∆ com/luciad/imageio/webp/internal/NativeLoader_version_2.class 1.4 KiB │ -1 B │ 2.5 KiB │ 0 B │ ∆ com/luciad/imageio/webp/internal/VP8StatusCode.class 688 B │ +1 B │ 818 B │ 0 B │ ∆ com/luciad/imageio/webp/WebPReadParam_Companion.class 828 B │ +1 B │ 1.1 KiB │ 0 B │ ∆ com/luciad/imageio/webp/WebPWriteParam_Companion.class ──────────┼────────┼───────────┼──────────┼────────────────────────────────────────────────────────────────── 46.5 KiB │ +985 B │ 101.8 KiB │ +2.1 KiB │ (total) ```
CLASSES ``` METHODS: old │ new │ diff ─────┼─────┼───────────── 638 │ 633 │ -5 (+9 -14) + com.luciad.imageio.webp.WebPDecoderOptions run() + com.luciad.imageio.webp.WebPEncoderOptions run() + com.luciad.imageio.webp.WebPWrapper getCleaner() → Cleaner + java.lang.Iterable iterator() → Iterator + java.lang.invoke.StringConcatFactory makeConcatWithConstants(MethodHandles_Lookup, String, MethodType, String, Object[]) → CallSite + java.lang.ref.Cleaner create() → Cleaner + java.lang.ref.Cleaner register(Object, Runnable) → Cleaner_Cleanable + kotlin.collections.CollectionsKt collectionSizeOrDefault(Iterable, int) → int + kotlin.collections.CollectionsKt getOrNull(List, int) → Object - com.luciad.imageio.webp.WebPDecoderOptions close() - com.luciad.imageio.webp.WebPDecoderOptions finalize() - com.luciad.imageio.webp.WebPEncoderOptions close() - com.luciad.imageio.webp.WebPEncoderOptions finalize() - java.lang.Object finalize() - java.lang.StringBuilder () - java.lang.StringBuilder append(boolean) → StringBuilder - java.lang.StringBuilder append(char) → StringBuilder - java.lang.StringBuilder append(int) → StringBuilder - java.lang.StringBuilder append(Object) → StringBuilder - java.lang.StringBuilder append(String) → StringBuilder - java.lang.StringBuilder append(long) → StringBuilder - java.lang.StringBuilder toString() → String - kotlin.collections.ArraysKt getOrNull(Object[], int) → Object FIELDS: old │ new │ diff ─────┼─────┼──────────── 67 │ 68 │ +1 (+1 -0) + com.luciad.imageio.webp.WebPWrapper cleaner: Cleaner ```