| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -255,9 +255,9 @@ public PackerConfig() | |||
| 255 | 255 | ||
| 256 | 256 | private PackerConfig(PackerConfig copy) | |
| 257 | 257 | { | |
| 258 | - this.smallStringOptimizationThreshold = smallStringOptimizationThreshold; | ||
| 259 | - this.bufferFlushThreshold = bufferFlushThreshold; | ||
| 260 | - this.bufferSize = bufferSize; | ||
| 258 | + this.smallStringOptimizationThreshold = copy.smallStringOptimizationThreshold; | ||
| 259 | + this.bufferFlushThreshold = copy.bufferFlushThreshold; | ||
| 260 | + this.bufferSize = copy.bufferSize; | ||
| 261 | 261 | } | |
| 262 | 262 | ||
| 263 | 263 | @Override | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -48,6 +48,28 @@ class MessagePackTest extends MessagePackSpec { | |||
| 48 | 48 | } | |
| 49 | 49 | ||
| 50 | 50 | "MessagePack" should { | |
| 51 | + | ||
| 52 | + "clone packer config" in { | ||
| 53 | + val config = new PackerConfig().withBufferSize(10).withBufferFlushThreshold(32 * 1024).withSmallStringOptimizationThreshold(142) | ||
| 54 | + val copy = config.clone() | ||
| 55 | + | ||
| 56 | + copy shouldBe config | ||
| 57 | + } | ||
| 58 | + | ||
| 59 | + "clone unpacker config" in { | ||
| 60 | + val config = new UnpackerConfig() | ||
| 61 | + .withBufferSize(1) | ||
| 62 | + .withActionOnMalformedString(CodingErrorAction.IGNORE) | ||
| 63 | + .withActionOnUnmappableString(CodingErrorAction.REPORT) | ||
| 64 | + .withAllowReadingBinaryAsString(false) | ||
| 65 | + .withStringDecoderBufferSize(34) | ||
| 66 | + .withStringSizeLimit(4324) | ||
| 67 | + | ||
| 68 | + val copy = config.clone() | ||
| 69 | + copy shouldBe config | ||
| 70 | + } | ||
| 71 | + | ||
| 72 | + | ||
| 51 | 73 | "detect fixint values" in { | |
| 52 | 74 | ||
| 53 | 75 | for (i <- 0 until 0x79) { | |
| Back | FazBrowse Home | New Git URL |
0 commit comments