[
https://issues.apache.org/jira/browse/DIRMINA-529?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12567439#action_12567439
]
Johannes Ulfkjær Jensen commented on DIRMINA-529:
-------------------------------------------------
Hi,
I am not sure I am allowed to paste code into this comment field so I will try
to describe another approach in words. Looking at the patch, it seems you can
get the actual Class object for free, so why not just identify-compare that to
the Class objects for the primitive types? You avoid the overhead of a native
call, and being pure java, I think (pure speculation) that the JIT would have
an easier time compiling it. This is obviously just an extreme mini
optimization (compared to the patch) but I thought I would chime in regardless
:)
> use isPrimitive() instead of comparing the string to a list of primitives
> -------------------------------------------------------------------------
>
> Key: DIRMINA-529
> URL: https://issues.apache.org/jira/browse/DIRMINA-529
> Project: MINA
> Issue Type: Improvement
> Components: Core
> Affects Versions: 2.0.0-M1
> Reporter: Stefan Ackermann
> Priority: Minor
> Attachments: mina-patch.txt
>
>
> isPrimitive is a native function and should be used to determine whether a
> class is primitive instead of comparing to a list of known primitive class
> names
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.