From 8f717efced4f5ce75122a537589bc6717f6708be Mon Sep 17 00:00:00 2001 From: Kranti Parisa Date: Thu, 18 Dec 2014 11:08:41 -0800 Subject: [PATCH] fixing the typos in read me doc and test classes --- .gitignore | 1 + README.md | 2 +- .../net/openhft/chronicle/map/CHMUseCasesTest.java | 12 ++++++------ .../net/openhft/chronicle/map/SerializerTest.java | 6 +++--- 4 files changed, 11 insertions(+), 10 deletions(-) diff --git a/.gitignore b/.gitignore index 4e4647b1a..bd747a416 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ *.war *.ear *.iml +.idea* diff --git a/README.md b/README.md index 6dff79222..d804cac56 100644 --- a/README.md +++ b/README.md @@ -356,7 +356,7 @@ These methods let you provide the object which the data will be written to, but ``` java CharSequence using = new StringBuilder(); CharSequence myResult = map.getUsing("key", using); -// at this point the myString and myResult will both point to the same object +// at this point "using" and "myResult" will both point to the same object ``` The `map.getUsing()` method is similar to `map.get()`, but because Chronicle Map stores its data off diff --git a/src/test/java/net/openhft/chronicle/map/CHMUseCasesTest.java b/src/test/java/net/openhft/chronicle/map/CHMUseCasesTest.java index d5b83f8b1..21df87417 100644 --- a/src/test/java/net/openhft/chronicle/map/CHMUseCasesTest.java +++ b/src/test/java/net/openhft/chronicle/map/CHMUseCasesTest.java @@ -63,10 +63,10 @@ public class CHMUseCasesTest { } - static class PrefixStingFunction implements Function { + static class PrefixStringFunction implements Function { private final String prefix; - public PrefixStingFunction(@NotNull String prefix) { + public PrefixStringFunction(@NotNull String prefix) { this.prefix = prefix; } @@ -77,8 +77,8 @@ public class CHMUseCasesTest { @Override public boolean equals(Object obj) { - return obj instanceof PrefixStingFunction && - prefix.equals(((PrefixStingFunction) obj).prefix); + return obj instanceof PrefixStringFunction && + prefix.equals(((PrefixStringFunction) obj).prefix); } @Override @@ -121,8 +121,8 @@ public class CHMUseCasesTest { map.put("Hello", "World"); assertEquals("World", map.get("Hello")); - assertEquals("New World", map.getMapped("Hello", new PrefixStingFunction("New "))); - assertEquals(null, map.getMapped("No key", new PrefixStingFunction("New "))); + assertEquals("New World", map.getMapped("Hello", new PrefixStringFunction("New "))); + assertEquals(null, map.getMapped("No key", new PrefixStringFunction("New "))); } } diff --git a/src/test/java/net/openhft/chronicle/map/SerializerTest.java b/src/test/java/net/openhft/chronicle/map/SerializerTest.java index 3878037f6..ce7d73b28 100644 --- a/src/test/java/net/openhft/chronicle/map/SerializerTest.java +++ b/src/test/java/net/openhft/chronicle/map/SerializerTest.java @@ -34,15 +34,15 @@ import static org.junit.Assert.assertEquals; public class SerializerTest { @Test - public void testPrefixStingFunctionSerialization() throws Exception { + public void testPrefixStringFunctionSerialization() throws Exception { ByteBufferBytes b = new ByteBufferBytes(ByteBuffer.allocate(512)); - CHMUseCasesTest.PrefixStingFunction expected = new CHMUseCasesTest.PrefixStingFunction("New "); + CHMUseCasesTest.PrefixStringFunction expected = new CHMUseCasesTest.PrefixStringFunction("New "); b.writeObject(expected); b.clear(); - CHMUseCasesTest.PrefixStingFunction actual = b.readObject(CHMUseCasesTest.PrefixStingFunction.class); + CHMUseCasesTest.PrefixStringFunction actual = b.readObject(CHMUseCasesTest.PrefixStringFunction.class); assertEquals(expected, actual); }