From fb6d1facdc3140cd7867bd5ab37a70d4a99ac99b Mon Sep 17 00:00:00 2001 From: leventov Date: Fri, 9 Oct 2015 16:25:19 +0300 Subject: [PATCH] Fix code example in MapEntryOperations javadoc (bad formatting, the code was not printed) --- .../chronicle/map/MapEntryOperations.java | 28 ++++++++++--------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/src/main/java/net/openhft/chronicle/map/MapEntryOperations.java b/src/main/java/net/openhft/chronicle/map/MapEntryOperations.java index 3d2d557b7..0f4403272 100644 --- a/src/main/java/net/openhft/chronicle/map/MapEntryOperations.java +++ b/src/main/java/net/openhft/chronicle/map/MapEntryOperations.java @@ -38,26 +38,27 @@ import org.jetbrains.annotations.NotNull; * implementation (i. e. a map that preserves the uniqueness of its values as well as that of * its keys), that includes two {@code ChronicleMaps}, the {@code MapEntryOperations}' methods return * type could be used to indicate if we were successful to lock both maps before performing - * the update:
{@code
+ * the update: 

  * enum DualLockSuccess {SUCCESS, FAIL}
  *
- * class BiMapEntryOperations implements MapEntryOperations {
- *     ChronicleMap reverse;
+ * class{@code BiMapEntryOperations}
+ *         implements{@code MapEntryOperations} {
+ *    {@code ChronicleMap} reverse;
  *
- *     public void setReverse(ChronicleMap reverse) {
+ *     public void{@code setReverse(ChronicleMap} reverse) {
  *         this.reverse = reverse;
  *     }
  *
- *     @Override
- *     public DualLockSuccess remove(@NotNull MapEntry entry) {
- *         try (ExternalMapQueryContext rq = reverse.queryContext(entry.value())) {
+ *    {@literal @}Override
+ *     public DualLockSuccess{@literal remove(@}NotNull{@code MapEntry} entry) {
+ *         try{@code (ExternalMapQueryContext} rq = reverse.queryContext(entry.value())) {
  *             if (!rq.updateLock().tryLock()) {
  *                 if (entry.context() instanceof MapQueryContext)
  *                     return FAIL;
  *                 throw new IllegalStateException("Concurrent modifications to reverse map " +
  *                         "during remove during iteration");
  *             }
- *             MapEntry reverseEntry = rq.entry();
+ *            {@code MapEntry} reverseEntry = rq.entry();
  *             if (reverseEntry != null) {
  *                 entry.doRemove();
  *                 reverseEntry.doRemove();
@@ -72,13 +73,14 @@ import org.jetbrains.annotations.NotNull;
  *     // ... other methods
  * }
  *
- * class BiMapMethods implements MapMethods {
- *     @Override
- *     public void remove(MapQueryContext q, ReturnValue returnValue) {
+ * class{@code BiMapMethods} implements{@code MapMethods} {
+ *    {@literal @}Override
+ *     public void{@code remove(MapQueryContext} q,
+ *            {@code ReturnValue} returnValue) {
  *         while (true) {
  *             q.updateLock().lock();
  *             try {
- *                 MapEntry entry = q.entry();
+ *                {@code MapEntry} entry = q.entry();
  *                 if (entry != null) {
  *                     returnValue.returnValue(entry.value());
  *                     if (q.remove(entry) == SUCCESS)
@@ -91,7 +93,7 @@ import org.jetbrains.annotations.NotNull;
  *     }
  *
  *     // ... other methods
- * }}
+ * }
* * @param the map key type * @param the map value type