FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

core: Fix ClassCastException when array values is set as List by takezoe · Pull Request #794 · msgpack/msgpack-java · GitHub

core: Fix ClassCastException when array values is set as List - #794

Merged
xerial merged 1 commit into
msgpack:mainfrom
takezoe:fix-array-cast-error
Jan 21, 2024
Merged

core: Fix ClassCastException when array values is set as List#794
xerial merged 1 commit into
msgpack:mainfrom
takezoe:fix-array-cast-error

Conversation

takezoe commented Jan 19, 2024
edited
Loading

Copy link
Copy Markdown
Contributor
java.lang.ClassCastException: class [Ljava.lang.Object; cannot be cast to class [Lorg.msgpack.value.Value; ([Ljava.lang.Object; is in module java.base of loader 'bootstrap'; [Lorg.msgpack.value.Value; is in unnamed module of loader 'app')
        at org.msgpack.value.Variable$ArrayValueAccessor.array(Variable.java:890)
        at org.msgpack.value.Variable$ArrayValueAccessor.immutableValue(Variable.java:851)
        at org.msgpack.value.Variable$ArrayValueAccessor.immutableValue(Variable.java:832)
        at org.msgpack.value.Variable.immutableValue(Variable.java:1136)
        at org.msgpack.value.Variable.toJson(Variable.java:1161)

github-actions Bot added the bug label Jan 19, 2024
this.type = Type.LIST;
this.accessor = arrayAccessor;
this.objectValue = v.toArray();
this.objectValue = v.toArray(new Value[v.size()]);

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

ClassCastException occurs here:

public Value[] array()
{
return (Value[]) objectValue;
}

xerial merged commit 480fd73 into msgpack:main Jan 21, 2024
xerial changed the title Fix ClassCastException when array values is set as List core: Fix ClassCastException when array values is set as List Jan 21, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL