Skip to content

Refactor item to base64 serialization#5

Open
Dreeam-qwq wants to merge 1 commit intoAthlaeos:mainfrom
Dreeam-qwq:refactor/base64-encode-decode
Open

Refactor item to base64 serialization#5
Dreeam-qwq wants to merge 1 commit intoAthlaeos:mainfrom
Dreeam-qwq:refactor/base64-encode-decode

Conversation

@Dreeam-qwq
Copy link

snakeyaml deprecated the external util class Base64Coder since snakeyaml 2.3

It replaced it using Java's built-in Base64 util (java.util.Base64), which is better and more standard. So, for the consideration of the future, it is not appropriate to continue relying on snakeyaml's Base64Coder util class.

In here, I use Base64.getMimeDecoder() for the base64 decoding, to be compatible with old data stored in entity inventory's PDC that is using the old standard (the Base64Coder is using MIME type).
And use the basic Base64 encoder to encode the item.

Use MIME type decoder here to be compatible with the old serialization result stored in entity's inventory PDC.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant