Conditions | 2 |
Total Lines | 9 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 2 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | package io.mcarle.sciurus.cache.redis; |
||
14 | static ByteBuffer toByteBuffer(final RedisData redisData) { |
||
15 | try { |
||
16 | 1 | ByteArrayOutputStream baos = new ByteArrayOutputStream(); |
|
17 | 1 | ObjectOutputStream oos = new ObjectOutputStream(baos); |
|
18 | 1 | oos.writeObject(redisData); |
|
19 | 1 | oos.close(); |
|
20 | 1 | return ByteBuffer.wrap(baos.toByteArray()); |
|
21 | 1 | } catch (IOException e) { |
|
22 | 1 | throw new RuntimeException(e); |
|
23 | } |
||
43 |