From bd478b4eb9a59207990803292d304cc3de7f249f Mon Sep 17 00:00:00 2001
From: pluresideas <26636262+pluresideas@users.noreply.github.com>
Date: Sun, 16 Aug 2020 11:12:51 -0500
Subject: [PATCH 1/2] #37 - Limitation: Encapsulated objects with exposed
mutators can mutate their state
---
README.md | 4 ++++
src/main/java/com/jcabi/immutable/Array.java | 2 ++
src/main/java/com/jcabi/immutable/ArrayMap.java | 2 ++
src/main/java/com/jcabi/immutable/ArraySet.java | 2 ++
src/main/java/com/jcabi/immutable/ArraySortedSet.java | 2 ++
src/site/apt/index.apt.vm | 4 ++++
6 files changed, 16 insertions(+)
diff --git a/README.md b/README.md
index 517e55e..4fe9d19 100644
--- a/README.md
+++ b/README.md
@@ -14,6 +14,10 @@ More details are here: [immutable.jcabi.com](http://immutable.jcabi.com/index.ht
This module contains truly immutable collections of objects, including
`Array`, `ArraySet`, and `ArrayMap`.
+## Limitation
+
+Encapsulated objects with exposed mutators can mutate their state.
+
## Questions?
If you have any questions about the framework, or something doesn't work as expected,
diff --git a/src/main/java/com/jcabi/immutable/Array.java b/src/main/java/com/jcabi/immutable/Array.java
index 5283bd9..bef728b 100644
--- a/src/main/java/com/jcabi/immutable/Array.java
+++ b/src/main/java/com/jcabi/immutable/Array.java
@@ -45,6 +45,8 @@
*
This class is truly immutable. This means that it never changes
* its encapsulated values and is annotated with {@code @Immutable}
* annotation.
+ *
+ * Limitation: Encapsulated objects with exposed mutators can mutate their state.
*
* @param Value key type
* @author Yegor Bugayenko (yegor@tpc2.com)
diff --git a/src/main/java/com/jcabi/immutable/ArrayMap.java b/src/main/java/com/jcabi/immutable/ArrayMap.java
index 091dbeb..2b99afc 100644
--- a/src/main/java/com/jcabi/immutable/ArrayMap.java
+++ b/src/main/java/com/jcabi/immutable/ArrayMap.java
@@ -51,6 +51,8 @@
* This class is truly immutable. This means that it never changes
* its encapsulated values and is annotated with {@code @Immutable}
* annotation.
+ *
+ * Limitation: Encapsulated objects with exposed mutators can mutate their state.
*
* @param Map key type
* @param Value key type
diff --git a/src/main/java/com/jcabi/immutable/ArraySet.java b/src/main/java/com/jcabi/immutable/ArraySet.java
index 6926443..db0f473 100644
--- a/src/main/java/com/jcabi/immutable/ArraySet.java
+++ b/src/main/java/com/jcabi/immutable/ArraySet.java
@@ -45,6 +45,8 @@
* This class is truly immutable. This means that it never changes
* its encapsulated values and is annotated with {@code @Immutable}
* annotation.
+ *
+ * Limitation: Encapsulated objects with exposed mutators can mutate their state.
*
* @param Value key type
* @author Yegor Bugayenko (yegor@tpc2.com)
diff --git a/src/main/java/com/jcabi/immutable/ArraySortedSet.java b/src/main/java/com/jcabi/immutable/ArraySortedSet.java
index 5774052..2cc95c0 100644
--- a/src/main/java/com/jcabi/immutable/ArraySortedSet.java
+++ b/src/main/java/com/jcabi/immutable/ArraySortedSet.java
@@ -47,6 +47,8 @@
* This class is truly immutable. This means that it never changes
* its encapsulated values and is annotated with {@code @Immutable}
* annotation.
+ *
+ * Limitation: Encapsulated objects with exposed mutators can mutate their state.
*
* @param Value key type
* @author Yegor Bugayenko (yegor@tpc2.com)
diff --git a/src/site/apt/index.apt.vm b/src/site/apt/index.apt.vm
index b6934af..cef2851 100644
--- a/src/site/apt/index.apt.vm
+++ b/src/site/apt/index.apt.vm
@@ -69,6 +69,10 @@ Immutable Collections
+--
+Limitation
+
+ Encapsulated objects with exposed mutators can mutate their state.
+
* Cutting Edge Version
If you want to use current version of the product, you can do it with
From 4b305faf81a0285661dd735b666ad0b925e0c444 Mon Sep 17 00:00:00 2001
From: pluresideas <26636262+pluresideas@users.noreply.github.com>
Date: Sun, 16 Aug 2020 11:29:52 -0500
Subject: [PATCH 2/2] fixed errors reported by
com.qulice:qulice-maven-plugin:0.12:check
---
src/main/java/com/jcabi/immutable/Array.java | 3 ++-
src/main/java/com/jcabi/immutable/ArrayMap.java | 3 ++-
src/main/java/com/jcabi/immutable/ArraySet.java | 3 ++-
src/main/java/com/jcabi/immutable/ArraySortedSet.java | 3 ++-
4 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/src/main/java/com/jcabi/immutable/Array.java b/src/main/java/com/jcabi/immutable/Array.java
index bef728b..8c3a535 100644
--- a/src/main/java/com/jcabi/immutable/Array.java
+++ b/src/main/java/com/jcabi/immutable/Array.java
@@ -46,7 +46,8 @@
* its encapsulated values and is annotated with {@code @Immutable}
* annotation.
*
- * Limitation: Encapsulated objects with exposed mutators can mutate their state.
+ * Limitation:
+ * Encapsulated objects with exposed mutators can mutate their state.
*
* @param Value key type
* @author Yegor Bugayenko (yegor@tpc2.com)
diff --git a/src/main/java/com/jcabi/immutable/ArrayMap.java b/src/main/java/com/jcabi/immutable/ArrayMap.java
index 2b99afc..2def010 100644
--- a/src/main/java/com/jcabi/immutable/ArrayMap.java
+++ b/src/main/java/com/jcabi/immutable/ArrayMap.java
@@ -52,7 +52,8 @@
* its encapsulated values and is annotated with {@code @Immutable}
* annotation.
*
- * Limitation: Encapsulated objects with exposed mutators can mutate their state.
+ * Limitation:
+ * Encapsulated objects with exposed mutators can mutate their state.
*
* @param Map key type
* @param Value key type
diff --git a/src/main/java/com/jcabi/immutable/ArraySet.java b/src/main/java/com/jcabi/immutable/ArraySet.java
index db0f473..e86045a 100644
--- a/src/main/java/com/jcabi/immutable/ArraySet.java
+++ b/src/main/java/com/jcabi/immutable/ArraySet.java
@@ -46,7 +46,8 @@
* its encapsulated values and is annotated with {@code @Immutable}
* annotation.
*
- * Limitation: Encapsulated objects with exposed mutators can mutate their state.
+ * Limitation:
+ * Encapsulated objects with exposed mutators can mutate their state.
*
* @param Value key type
* @author Yegor Bugayenko (yegor@tpc2.com)
diff --git a/src/main/java/com/jcabi/immutable/ArraySortedSet.java b/src/main/java/com/jcabi/immutable/ArraySortedSet.java
index 2cc95c0..f0778c9 100644
--- a/src/main/java/com/jcabi/immutable/ArraySortedSet.java
+++ b/src/main/java/com/jcabi/immutable/ArraySortedSet.java
@@ -48,7 +48,8 @@
* its encapsulated values and is annotated with {@code @Immutable}
* annotation.
*
- * Limitation: Encapsulated objects with exposed mutators can mutate their state.
+ * Limitation:
+ * Encapsulated objects with exposed mutators can mutate their state.
*
* @param Value key type
* @author Yegor Bugayenko (yegor@tpc2.com)