Skip to content
This repository was archived by the owner on Oct 23, 2024. It is now read-only.
This repository was archived by the owner on Oct 23, 2024. It is now read-only.

当 @type 的前缀为一个autotype白名单时会发生 null point #3109

@czjxy881

Description

@czjxy881

复现方式

image

public class TestFastJson {
    public static void main(String[] args) {
        ParserConfig.getGlobalInstance().addAccept("test");
        JSON.parseObject("{\"@type\":\"testxx\",\"dogName\":\"dog1001\"}", Dog.class);
    }
    public static class Dog  {
        public String dogName;
    }
}

原因

image
此处没有判断 clazz 是否为 null

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions