File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
src/main/java/io/papermc/asm/util Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 88import java .util .Set ;
99import java .util .function .Predicate ;
1010import org .checkerframework .checker .nullness .qual .Nullable ;
11+ import org .objectweb .asm .Type ;
1112
1213public final class DescriptorUtils {
1314
1415 public static ClassDesc fromOwner (final String owner ) {
15- return ClassDesc .ofDescriptor ("L" + owner + ";" );
16+ return ClassDesc .ofDescriptor (Type . getObjectType ( owner ). getDescriptor () );
1617 }
1718
1819 public static String toOwner (final ClassDesc desc ) {
19- final String descriptor = desc .descriptorString ();
20- return descriptor .substring (1 , descriptor .length () - 1 );
20+ return Type .getType (desc .descriptorString ()).getInternalName ();
2121 }
2222
2323 public static ClassDesc desc (final Class <?> clazz ) {
You can’t perform that action at this time.
0 commit comments