Commit graph

204 commits

Author SHA1 Message Date
Yann Massard
a16a8b517c #78 improve exception handling 2020-04-29 07:42:51 -04:00
David Renshaw
09eec64941 make Allocator public 2019-05-20 18:12:19 -04:00
David Renshaw
1d51317074 update benchmark to use scratch space if requested 2019-05-04 11:09:07 -04:00
David Renshaw
f00f02de77 make DefaultAllocator public and add a default constructor 2019-05-04 10:43:51 -04:00
David Renshaw
755114c1a3 implement scratch space reuse 2019-05-04 10:33:55 -04:00
David Renshaw
3c60400dae make SUGGESTED_FIRST_SEGMENT_WORDS the default 2019-05-04 09:33:09 -04:00
David Renshaw
0ff0cfa338 support custom allocators for builder segments 2019-05-04 09:33:09 -04:00
David Renshaw
c6762ff0f7 implement StructList.Builder.setWithCaveats() 2019-03-23 10:32:01 -04:00
David Renshaw
45fd638c7c add some @Override annotations 2019-03-16 08:49:10 -04:00
David Renshaw
6dcfa30e10 ArrayInputStream: return -1 on end-of-stream 2018-06-10 13:25:40 -04:00
David Renshaw
edcbf1f61c fix bug in ArrayInputStream.read() 2018-06-10 09:32:38 -04:00
David Renshaw
f4411ba2c7 implement asReader() for list types 2018-02-03 14:17:42 -05:00
Amer Banet
906bab78f9 Added pointer index check to StructReader._pointerFieldIsNull and StructBuilder._pointerFieldIsNull
This fixes an IndexOutOfBoundsException when checking for existence of later added fields which are only known on the receiver side (working with different schema versions)
2017-12-13 21:43:46 +01:00
David Renshaw
349d2bfde7 update method name is error string 2017-04-24 19:35:12 -04:00
David Renshaw
14237610fb Fix bug in double-far creation and add StructListUpgradeDoubleFar test. 2017-02-27 18:42:38 -05:00
David Renshaw
1fa0e7a806 DecodeException for unexpected FAR pointer in copyPointer() 2017-02-27 12:10:36 -05:00
David Renshaw
a344568fe8 Adjust error message for the case when copyPointer() hits a far pointer.
Malformed input can trigger this case and it does not indicate a bug
in the library.
2017-02-26 16:26:38 -05:00
David Renshaw
b27c5d685d Fix problem in transferPointer() that would have become a bug once orphans are implemented. See 4d4f831a3d 2016-01-12 22:25:35 -05:00
David Renshaw
0fecc0e9b4 Handle zero-sized struct in transferPointer(). 2015-12-16 21:55:03 -05:00
David Renshaw
98500483c9 bugfix: packed input reading was broken for runs longer than 128 words. 2015-09-19 16:11:16 -04:00
David Renshaw
252acd2b32 typo 2015-08-17 22:14:50 -04:00
David Renshaw
2127084a53 Update ByteBuffer.position() one last time before returning from Serialize.read(). 2015-08-17 22:13:06 -04:00
David Renshaw
7f13ed114a Some minor nitpicks. 2015-06-13 15:03:20 -07:00
Mark Raynsford
63c56646de
Implement computeSerializedSizeInWords for non-packed messages. Addresses #33. 2015-06-13 15:01:36 +00:00
David Renshaw
49a5c6ba64 Implementent MessageBuilder.getRoot() and MessageBuilder.setRoot(). 2015-06-11 22:40:30 -04:00
Ben Challenor
d2634a21d0 Support reading all segments from a single ByteBuffer, with tests
Sometimes it is desirable to read all segments from a single ByteBuffer,
e.g. if reading messages from a memory-mapped file.

Here we add such support, and add a test to check that the ByteBuffer
read behaves the same as the ReadableByteChannel read.
2015-05-03 19:04:07 +01:00
Ben Challenor
28fac634bc Idiomatic scala - remove explicit return 2015-05-03 15:43:09 +01:00
Ben Challenor
c601c6805f Idiomatic scala - override method with val 2015-05-03 15:42:26 +01:00
Ben Challenor
50f4fe9d51 Idiomatic Scala - remove semicolons
Note this means that a few newlines have to be added to eliminate
ambiguity.
2015-05-03 15:35:07 +01:00
Ben Challenor
2ec3b6b125 Rename Scala files to match class names 2015-05-03 15:05:41 +01:00
David Renshaw
717d977233 Fix integer overflow issues. 2015-04-20 21:10:52 -04:00
David Renshaw
0e8fe55593 Fix integer overflow bugs. 2015-03-08 20:39:44 -04:00
David Renshaw
2b1d5c201e Fix integer underflow bug. 2015-03-08 20:09:56 -04:00
David Renshaw
6cd61ff149 Prevent CPU amplification attack. 2015-03-03 10:46:42 -05:00
David Renshaw
a127b08191 add missing return statement 2015-03-03 09:44:04 -05:00
David Renshaw
8a06a595f6 stub package documentation 2015-01-29 10:33:45 -05:00
David Renshaw
855f635e50 finish implementation of followBuilderFars() 2014-11-18 08:49:02 -05:00
David Renshaw
9ba6f3970c finish implementation of transferPointer 2014-11-17 18:42:44 -05:00
David Renshaw
57f8a5cdfc struct field upgrades 2014-11-17 17:39:16 -05:00
David Renshaw
a5f234136f more support for struct list upgrades 2014-11-16 21:17:56 -05:00
David Renshaw
6174de6744 builder upgrade from List(Primitive) to List(Struct) 2014-11-16 19:06:35 -05:00
David Renshaw
00cc63dfe8 reading double far pointers 2014-11-16 14:14:15 -05:00
David Renshaw
fd3efb080e add a Zeroing test and fix some bugs 2014-11-09 16:32:51 -05:00
David Renshaw
a7d3175f60 finish zeroObject(). still needs tests 2014-11-09 13:36:24 -05:00
David Renshaw
2902b6c753 working on WireHelpers.zeroObject 2014-11-04 21:53:34 -05:00
David Renshaw
5f98572b7c setter method for constrained anypointer fields 2014-10-29 09:26:50 -04:00
David Renshaw
dabb9a6ee6 use wildcards 2014-10-28 19:43:25 -04:00
David Renshaw
a578dd1332 drat, this doesn't quite work 2014-10-28 18:23:51 -04:00
David Renshaw
20c20702e1 plugging things in 2014-10-28 15:54:40 -04:00
David Renshaw
4870faf255 init methods for generic fields 2014-10-28 12:51:01 -04:00