Skip to content

It seems that there is a piece of wrong code in Chinese version document #1891

@fanofxiaofeng

Description

@fanofxiaofeng

In the Chinese version document file below code can be found

Image

To make it easier for discussion, I also copied that code below

ByteBuddy byteBuddy = new ByteBuddy();
byteBuddy.withNamingStrategy(new NamingStrategy.SuffixingRandom("suffix"));
DynamicType.Unloaded<?> dynamicType = byteBuddy.subclass(Object.class).make();

I tried in my local env and the code won't compile (the byte buddy version that I use is 1.18.7)

Image

But in the English version document
The code is different
Image

I also copied the code as follows

ByteBuddy byteBuddy = new ByteBuddy();
byteBuddy.with(new NamingStrategy.SuffixingRandom("suffix"));
DynamicType.Unloaded<?> dynamicType = byteBuddy.subclass(Object.class).make();

So I guess that code in the Chinese version document file is probably wrong

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions