Details
-
New Feature
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
None
Description
Now in DictionaryEncoder#encode it use reflection to pull out the set method and then set values.
Set values by reflection is not efficient and code structure is not elegant such as
Method setter = null;
for (Class<?> c : Arrays.asList(int.class, long.class)) {
try {
setter = indices.getClass().getMethod("setSafe", int.class, c);
break;
} catch (NoSuchMethodException e) {
// ignore
}
}
Implement a common interface for int vectors to directly get set method and set values seems a good choice.
Attachments
Issue Links
- links to