You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Herve Boutemy (Jira)" <ji...@apache.org> on 2022/02/02 07:08:00 UTC
[jira] [Assigned] (MINDEXER-122) Add getName() to Record.EntryKey
[ https://issues.apache.org/jira/browse/MINDEXER-122?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Herve Boutemy reassigned MINDEXER-122:
--------------------------------------
Assignee: Sylwester Lachiewicz
> Add getName() to Record.EntryKey
> --------------------------------
>
> Key: MINDEXER-122
> URL: https://issues.apache.org/jira/browse/MINDEXER-122
> Project: Maven Indexer
> Issue Type: Improvement
> Reporter: Stephen Buergler
> Assignee: Sylwester Lachiewicz
> Priority: Trivial
> Fix For: 6.0.1
>
>
> Currently I'm doing this to pull the name field out of EntryKey
> {code:java}
> @SneakyThrows
> private static MethodHandle entryKeyNameField() {
> return MethodHandles.privateLookupIn(EntryKey.class, MethodHandles.lookup())
> .findGetter(EntryKey.class, "name", String.class);
> }
> private static final MethodHandle entryKeyNameField = entryKeyNameField();
> @SneakyThrows
> static String getName(EntryKey entryKey) {
> return (String) entryKeyNameField.invokeExact(entryKey);
> }
> {code}
> It would be nice if getName() was a method on EntryKey itself.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)