From 6c8a4634f28f50fbcebcc557316f6a24130527ee Mon Sep 17 00:00:00 2001 From: Simon Brandhof Date: Thu, 16 Aug 2012 18:16:43 +0200 Subject: [PATCH] Add tip for parsing KeyValueFormat format from ruby code --- .../src/main/java/org/sonar/api/utils/KeyValueFormat.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/utils/KeyValueFormat.java b/sonar-plugin-api/src/main/java/org/sonar/api/utils/KeyValueFormat.java index 6f004c963ba..0f6ebd7103c 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/utils/KeyValueFormat.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/utils/KeyValueFormat.java @@ -34,8 +34,10 @@ import java.text.SimpleDateFormat; import java.util.*; /** - * Formats and parses key/value pairs with the string representation : "key1=value1;key2=value2". Conversion - * of fields is supported and can be extended. + *

Formats and parses key/value pairs with the string representation : "key1=value1;key2=value2". Conversion + * of fields is supported and can be extended.

+ * + *

This format can easily be parsed with Ruby code: hash=Hash[*(my_string.split(';').map { |elt| elt.split('=') }.flatten)]

* * @since 1.10 */ -- 2.39.5