alibaba / alibaba/fastjson2

[QUESTION] 如何清理字节码动态生成的类的缓存?

Open
#3,673 1 comment 0 reactions 0 assignees View on GitHub
question
Dominant language
Java
Stars
4.4k
Forks
613
Avg merge
1d 22h
Merged PRs (30d)
6

Description

### 请描述您的问题
*使用动态加载机制,每次都会改一下ClassLoader 。第一次用A ClassLoader 内fastjson2 反序化 class时,会生成类并缓存起来,第二次用B ClassLoader时,进行反序化class ,会报错。 希望提供一个清理缓存类的工具类。

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the reported sequence: deserialize with one ClassLoader, then with a different ClassLoader, and observe the cache-related failure. Trace the bytecode-generated class cache involved in fastjson2 deserialization; done means a supported cleanup mechanism is defined and the second ClassLoader can deserialize successfully without the reported error.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.