mina-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tuure Laurinolli <tuure.laurino...@indagon.com>
Subject Re: IoBuffer getEnum/putEnum using signed values
Date Wed, 20 Feb 2008 21:23:54 GMT
Stuart Scott wrote:
> I noticed that the various getEnum/putEnum methods in IoBuffer use the
> signed values of the various data types. As Enums cannot have negative
> ordinals would it not be more useful to use the unsigned version of the
> data type?

What unsigned version would that be? There is only one unsigned integral 
data type in Java, and that is char (JLS 4.2.1). Also, handling shorter 
integral types in Java is tiresome, since they get cast to int as soon 
as you apply some operator to them (JLS 15.x).

View raw message