Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE]将JSONWriter.Context的configFilter 方法公开 #1481

Closed
leonchen83 opened this issue May 15, 2023 · 1 comment
Closed

[FEATURE]将JSONWriter.Context的configFilter 方法公开 #1481

leonchen83 opened this issue May 15, 2023 · 1 comment
Labels
enhancement New feature or request fixed
Milestone

Comments

@leonchen83
Copy link

请描述您的需求或者改进建议

对您想要需求或建议的清晰简洁的描述。

在fastjson2之前的版本,我们扩展了JSONWriter.Context将其public,代码如下

public class XWriterContext extends JSONWriter.Context {
	
	/**
	 * 
	 */
	public XWriterContext(ObjectWriterProvider provider) {
		super(provider);
	}
	
	public XWriterContext(ObjectWriterProvider provider, JSONWriter.Feature... features) {
		super(provider, features);
	}
	
	/**
	 * 
	 */
	@Override public void configFilter(Filter... filters) { super.configFilter(filters); }
}

现在fastjson2将JSONWriter.Context这个类加入了final关键字,我们无法扩展以上方法。既然final之后就不该是protected的方法,所以建议将其改为public

请描述你建议的实现方案

对您想要需求或建议的实现方案的详细描述。

//将下如方法public
protected void configFilter(Filter... filters) -> public void configFilter(Filter... filters)

描述您考虑过的替代方案

对您考虑过的任何替代解决方案或功能的描述。

附加信息

如果你还有其他需要提供的信息,可以在这里填写(可以提供截图、视频等)。

@leonchen83 leonchen83 added the enhancement New feature or request label May 15, 2023
@wenshao wenshao added this to the 2.0.32 milestone May 15, 2023
@wenshao wenshao added the fixed label May 15, 2023
@wenshao
Copy link
Member

wenshao commented May 16, 2023

@wenshao wenshao closed this as completed May 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request fixed
Projects
None yet
Development

No branches or pull requests

2 participants