mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2026-10-05 19:28:25 +00:00
00f3fa38fixed JacksonMapper's JavaTypes and flagged the rest: "the same reflective pattern still backs JacksonMapper.fromJsonTo<T>, JsonMapperNip55 (NIP-55) and the NIP-46 bunker path ... untested and exposed the same way." All three are the same <clinit>-poisoning crash waiting for a device that has an external signer installed, or a bunker login. This removes the pattern from the codebase instead of from one file. * JacksonMapper.fromJsonTo<T> now reads with T::class.java. Erasure costs nothing here: checkRegistered() has already limited T to the ten registered classes and each is answered by a StdDeserializer bound to that exact Class, so Jackson never infers a type argument. This is the NIP-46 path — NostrConnectEvent, RemoteSignerManager, NostrConnectLoginUseCase. * JsonMapperNip55's reified fromJsonTo is replaced by four named entry points over precomputed JavaTypes. T::class.java could not stand in for all of them: List<IntentResult> erases to List and every element comes back a LinkedHashMap. constructCollectionType keeps the element type. * jacksonTypeRefOf() is deleted. I added it ine7d3bcdcas the one thing plain databind had no equivalent of; it turns out to be the one thing R8 full mode will not let us have. Nothing can reach for it again. * The three instrumented tests that used it read through JacksonMapper.eventListTypeInstance instead. Also adds zxingcpp to the reflection contract. main's `-keep class zxingcpp.**` arrived in this merge with no contract line, and it is the same JNI-by-name mechanism as ArtiNative: the .so exports Java_zxingcpp_BarcodeReader_readYBuffer, and a rename fails silently with no build error — the QR scanner simply never starts. Verified: 25/25 contract checks on a fresh playRelease assemble, and `grep -c TypeReference mapping.txt` is 0 — the class is shrunk out of the shipped DEX entirely, so nothing is left to construct one. Full ./gradlew test green, and all five affected source sets compile, instrumented ones included. Still unexercised on a device: NIP-55 signing and the NIP-46 bunker login. The crash mechanism is gone from the build, but these paths have never run minified. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DEoxktEZyTrAS33vVZBiwm