aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-plugin-api
diff options
context:
space:
mode:
Diffstat (limited to 'sonar-plugin-api')
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/issue/Issue.java10
1 files changed, 8 insertions, 2 deletions
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/issue/Issue.java b/sonar-plugin-api/src/main/java/org/sonar/api/issue/Issue.java
index 314d704cba2..4ed5b6750c9 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/issue/Issue.java
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/issue/Issue.java
@@ -38,8 +38,14 @@ public interface Issue extends Serializable {
/**
* Maximum number of characters in the message.
- */
- int MESSAGE_MAX_SIZE = 4000;
+ * In theory it should be 4_000 UTF-8 characters but unfortunately
+ * Oracle DB does not support more than 4_000 bytes, even if column
+ * issues.message is created with type VARCHAR2(4000 CHAR).
+ * In order to have the same behavior on all databases, message
+ * is truncated to 4_000 / 3 (maximum bytes per UTF-8 character)
+ * = 1_333 characters.
+ */
+ int MESSAGE_MAX_SIZE = 1_333;
/**
* Default status when creating an issue.