Skip to content

[jni] Remove hack in findClass #3174

@liamappelbe

Description

@liamappelbe

As part of the extension type migration, I had to add this hack to findClass:

static JClassPtr findClass(String name) {
  // HACK:
  if (name.startsWith('L') && name.endsWith(';')) {
    name = name.substring(1, name.length - 1);
  }
  return using((arena) => _bindings.JniFindClass(name.toNativeChars(arena)))
      .checkedClassRef;
}

We should find all the places where the signature is being used for class lookup, and switch them over to pass only the class name.

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issueA good starting issue for contributors (issues with this label will appear in /contribute)lang-javaRelated to Java supportpackage:jnipackage:jnigen

    Type

    No type

    Projects

    Status

    No status

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions