Closed GoogleCodeExporter closed 9 years ago
(Reported by estaub2).
I would consider Primitives.bytes() but leave the *8 to the caller for bits.
The question is who would use it and why?
Original comment by kevinb@google.com
on 28 Jul 2011 at 8:35
>> who would use it and why?
It might be used by anyone who needs to rapidly hard-allocate space for
primitives and needs to do it in a generic way - possibly driven by reflection,
for instance. While nio makes this less frequently needed, with
Byte/Char/...*Buffer, et al, it's still sometimes necessary - for instance,
when byte-ordering is important. It's possible that this kind of low-level
code is either too rare or outside the Guava "sweet spot" - it was just a
thought!
If it does seem worth doing, I'd extend the original suggestion to handle the
"dummy" classes returned by reflection for unwrapped primitives, as well as the
wrappers - both "long.class" and "Long.class".
Original comment by esta...@comcast.net
on 28 Jul 2011 at 11:02
Original comment by fry@google.com
on 10 Dec 2011 at 4:13
Original comment by fry@google.com
on 16 Feb 2012 at 7:17
Original comment by kevinb@google.com
on 30 May 2012 at 7:43
Original comment by kevinb@google.com
on 22 Jun 2012 at 6:16
This issue has been migrated to GitHub.
It can be found at https://github.com/google/guava/issues/<id>
Original comment by cgdecker@google.com
on 1 Nov 2014 at 4:15
Original comment by cgdecker@google.com
on 1 Nov 2014 at 4:18
Original comment by cgdecker@google.com
on 3 Nov 2014 at 9:09
Original issue reported on code.google.com by
fry@google.com
on 28 Jul 2011 at 5:30