mina-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stefan Ackermann" <st...@gmx.ch>
Subject use isPrimitive() instead of comparing the string to a list of primitives
Date Mon, 04 Feb 2008 13:09:41 GMT

This is not really a problem, but I noticed that on line 1612 of  
AbstractIOBuffer in the current trunk determining whether a class is  
primitive could be done nicer and faster with this:
                     String className = desc.getName();
                     if (primitiveTypeNames.contains(className)) {
          		  if (desc.forClass().isPrimitive()) {
isPrimitive is a native Function. Also if a new primitive Type were to be  
added, the code would still work.
It should do the same, I looked it up in the code.

Keep it up!

Stefan Ackermann,

View raw message