aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-ws-client/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'sonar-ws-client/src/test')
-rw-r--r--sonar-ws-client/src/test/java/org/sonar/wsclient/EmptyServlet.java2
-rw-r--r--sonar-ws-client/src/test/java/org/sonar/wsclient/MetricServlet.java2
-rw-r--r--sonar-ws-client/src/test/java/org/sonar/wsclient/ServerServlet.java2
-rw-r--r--sonar-ws-client/src/test/java/org/sonar/wsclient/SonarTest.java2
-rw-r--r--sonar-ws-client/src/test/java/org/sonar/wsclient/services/AbstractQueryTest.java2
-rw-r--r--sonar-ws-client/src/test/java/org/sonar/wsclient/services/DependencyQueryTest.java2
-rw-r--r--sonar-ws-client/src/test/java/org/sonar/wsclient/services/EventQueryTest.java2
-rw-r--r--sonar-ws-client/src/test/java/org/sonar/wsclient/services/MeasureTest.java2
-rw-r--r--sonar-ws-client/src/test/java/org/sonar/wsclient/services/MetricQueryTest.java2
-rw-r--r--sonar-ws-client/src/test/java/org/sonar/wsclient/services/PropertyCreateQueryTest.java2
-rw-r--r--sonar-ws-client/src/test/java/org/sonar/wsclient/services/PropertyDeleteQueryTest.java2
-rw-r--r--sonar-ws-client/src/test/java/org/sonar/wsclient/services/PropertyQueryTest.java2
-rw-r--r--sonar-ws-client/src/test/java/org/sonar/wsclient/services/ResourceQueryTest.java2
-rw-r--r--sonar-ws-client/src/test/java/org/sonar/wsclient/services/ResourceTest.java2
-rw-r--r--sonar-ws-client/src/test/java/org/sonar/wsclient/services/RuleQueryTest.java2
-rw-r--r--sonar-ws-client/src/test/java/org/sonar/wsclient/services/ServerQueryTest.java2
-rw-r--r--sonar-ws-client/src/test/java/org/sonar/wsclient/services/SourceQueryTest.java2
-rw-r--r--sonar-ws-client/src/test/java/org/sonar/wsclient/services/TimeMachineQueryTest.java2
-rw-r--r--sonar-ws-client/src/test/java/org/sonar/wsclient/services/UpdateCenterQueryTest.java2
-rw-r--r--sonar-ws-client/src/test/java/org/sonar/wsclient/services/UserPropertyCreateQueryTest.java2
-rw-r--r--sonar-ws-client/src/test/java/org/sonar/wsclient/services/UserPropertyDeleteQueryTest.java2
-rw-r--r--sonar-ws-client/src/test/java/org/sonar/wsclient/services/ViolationQueryTest.java2
-rw-r--r--sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/DependencyTreeUnmarshallerTest.java2
-rw-r--r--sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/DependencyUnmarshallerTest.java2
-rw-r--r--sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/EventUnmarshallerTest.java2
-rw-r--r--sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/JsonUtilsTest.java2
-rw-r--r--sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/MetricUnmarshallerTest.java2
-rw-r--r--sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/PluginUnmarshallerTest.java2
-rw-r--r--sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/PropertyUnmarshallerTest.java2
-rw-r--r--sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/ResourceUnmarshallerTest.java2
-rw-r--r--sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/RuleUnmarshallerTest.java2
-rw-r--r--sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/ServerUnmarshallerTest.java2
-rw-r--r--sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/SourceUnmarshallerTest.java6
-rw-r--r--sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/TimeMachineUnmarshallerTest.java2
-rw-r--r--sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/UnmarshallerTestCase.java2
-rw-r--r--sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/UnmarshallersTest.java2
-rw-r--r--sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/ViolationUnmarshallerTest.java2
-rw-r--r--sonar-ws-client/src/test/resources/sources/from_line_to_line.json2
-rw-r--r--sonar-ws-client/src/test/resources/sources/source.json2
39 files changed, 41 insertions, 41 deletions
diff --git a/sonar-ws-client/src/test/java/org/sonar/wsclient/EmptyServlet.java b/sonar-ws-client/src/test/java/org/sonar/wsclient/EmptyServlet.java
index d4c74cdb08b..741347a33bf 100644
--- a/sonar-ws-client/src/test/java/org/sonar/wsclient/EmptyServlet.java
+++ b/sonar-ws-client/src/test/java/org/sonar/wsclient/EmptyServlet.java
@@ -1,6 +1,6 @@
/*
* Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
* mailto:contact AT sonarsource DOT com
*
* Sonar is free software; you can redistribute it and/or
diff --git a/sonar-ws-client/src/test/java/org/sonar/wsclient/MetricServlet.java b/sonar-ws-client/src/test/java/org/sonar/wsclient/MetricServlet.java
index b81c6dcbfa3..f7060438e8a 100644
--- a/sonar-ws-client/src/test/java/org/sonar/wsclient/MetricServlet.java
+++ b/sonar-ws-client/src/test/java/org/sonar/wsclient/MetricServlet.java
@@ -1,6 +1,6 @@
/*
* Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
* mailto:contact AT sonarsource DOT com
*
* Sonar is free software; you can redistribute it and/or
diff --git a/sonar-ws-client/src/test/java/org/sonar/wsclient/ServerServlet.java b/sonar-ws-client/src/test/java/org/sonar/wsclient/ServerServlet.java
index 48cd7636977..2dce64af803 100644
--- a/sonar-ws-client/src/test/java/org/sonar/wsclient/ServerServlet.java
+++ b/sonar-ws-client/src/test/java/org/sonar/wsclient/ServerServlet.java
@@ -1,6 +1,6 @@
/*
* Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
* mailto:contact AT sonarsource DOT com
*
* Sonar is free software; you can redistribute it and/or
diff --git a/sonar-ws-client/src/test/java/org/sonar/wsclient/SonarTest.java b/sonar-ws-client/src/test/java/org/sonar/wsclient/SonarTest.java
index 5546dde1910..1794466a5e2 100644
--- a/sonar-ws-client/src/test/java/org/sonar/wsclient/SonarTest.java
+++ b/sonar-ws-client/src/test/java/org/sonar/wsclient/SonarTest.java
@@ -1,6 +1,6 @@
/*
* Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
* mailto:contact AT sonarsource DOT com
*
* Sonar is free software; you can redistribute it and/or
diff --git a/sonar-ws-client/src/test/java/org/sonar/wsclient/services/AbstractQueryTest.java b/sonar-ws-client/src/test/java/org/sonar/wsclient/services/AbstractQueryTest.java
index 4646b43ffe3..76e73b8832d 100644
--- a/sonar-ws-client/src/test/java/org/sonar/wsclient/services/AbstractQueryTest.java
+++ b/sonar-ws-client/src/test/java/org/sonar/wsclient/services/AbstractQueryTest.java
@@ -1,6 +1,6 @@
/*
* Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
* mailto:contact AT sonarsource DOT com
*
* Sonar is free software; you can redistribute it and/or
diff --git a/sonar-ws-client/src/test/java/org/sonar/wsclient/services/DependencyQueryTest.java b/sonar-ws-client/src/test/java/org/sonar/wsclient/services/DependencyQueryTest.java
index 291c3a00d6d..b19568040de 100644
--- a/sonar-ws-client/src/test/java/org/sonar/wsclient/services/DependencyQueryTest.java
+++ b/sonar-ws-client/src/test/java/org/sonar/wsclient/services/DependencyQueryTest.java
@@ -1,6 +1,6 @@
/*
* Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
* mailto:contact AT sonarsource DOT com
*
* Sonar is free software; you can redistribute it and/or
diff --git a/sonar-ws-client/src/test/java/org/sonar/wsclient/services/EventQueryTest.java b/sonar-ws-client/src/test/java/org/sonar/wsclient/services/EventQueryTest.java
index b3a4eb62270..332d1eb966b 100644
--- a/sonar-ws-client/src/test/java/org/sonar/wsclient/services/EventQueryTest.java
+++ b/sonar-ws-client/src/test/java/org/sonar/wsclient/services/EventQueryTest.java
@@ -1,6 +1,6 @@
/*
* Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
* mailto:contact AT sonarsource DOT com
*
* Sonar is free software; you can redistribute it and/or
diff --git a/sonar-ws-client/src/test/java/org/sonar/wsclient/services/MeasureTest.java b/sonar-ws-client/src/test/java/org/sonar/wsclient/services/MeasureTest.java
index a466a515484..1cb9a9b1dfc 100644
--- a/sonar-ws-client/src/test/java/org/sonar/wsclient/services/MeasureTest.java
+++ b/sonar-ws-client/src/test/java/org/sonar/wsclient/services/MeasureTest.java
@@ -1,6 +1,6 @@
/*
* Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
* mailto:contact AT sonarsource DOT com
*
* Sonar is free software; you can redistribute it and/or
diff --git a/sonar-ws-client/src/test/java/org/sonar/wsclient/services/MetricQueryTest.java b/sonar-ws-client/src/test/java/org/sonar/wsclient/services/MetricQueryTest.java
index 01eeaa93384..3b9690dc43d 100644
--- a/sonar-ws-client/src/test/java/org/sonar/wsclient/services/MetricQueryTest.java
+++ b/sonar-ws-client/src/test/java/org/sonar/wsclient/services/MetricQueryTest.java
@@ -1,6 +1,6 @@
/*
* Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
* mailto:contact AT sonarsource DOT com
*
* Sonar is free software; you can redistribute it and/or
diff --git a/sonar-ws-client/src/test/java/org/sonar/wsclient/services/PropertyCreateQueryTest.java b/sonar-ws-client/src/test/java/org/sonar/wsclient/services/PropertyCreateQueryTest.java
index c465af21b5e..9d1c321648a 100644
--- a/sonar-ws-client/src/test/java/org/sonar/wsclient/services/PropertyCreateQueryTest.java
+++ b/sonar-ws-client/src/test/java/org/sonar/wsclient/services/PropertyCreateQueryTest.java
@@ -1,6 +1,6 @@
/*
* Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
* mailto:contact AT sonarsource DOT com
*
* Sonar is free software; you can redistribute it and/or
diff --git a/sonar-ws-client/src/test/java/org/sonar/wsclient/services/PropertyDeleteQueryTest.java b/sonar-ws-client/src/test/java/org/sonar/wsclient/services/PropertyDeleteQueryTest.java
index d55babe0831..0c9b7484cd5 100644
--- a/sonar-ws-client/src/test/java/org/sonar/wsclient/services/PropertyDeleteQueryTest.java
+++ b/sonar-ws-client/src/test/java/org/sonar/wsclient/services/PropertyDeleteQueryTest.java
@@ -1,6 +1,6 @@
/*
* Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
* mailto:contact AT sonarsource DOT com
*
* Sonar is free software; you can redistribute it and/or
diff --git a/sonar-ws-client/src/test/java/org/sonar/wsclient/services/PropertyQueryTest.java b/sonar-ws-client/src/test/java/org/sonar/wsclient/services/PropertyQueryTest.java
index 66e6f6e3b29..4c1e5cc15f2 100644
--- a/sonar-ws-client/src/test/java/org/sonar/wsclient/services/PropertyQueryTest.java
+++ b/sonar-ws-client/src/test/java/org/sonar/wsclient/services/PropertyQueryTest.java
@@ -1,6 +1,6 @@
/*
* Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
* mailto:contact AT sonarsource DOT com
*
* Sonar is free software; you can redistribute it and/or
diff --git a/sonar-ws-client/src/test/java/org/sonar/wsclient/services/ResourceQueryTest.java b/sonar-ws-client/src/test/java/org/sonar/wsclient/services/ResourceQueryTest.java
index 6581518d4bf..6d9b506bbb4 100644
--- a/sonar-ws-client/src/test/java/org/sonar/wsclient/services/ResourceQueryTest.java
+++ b/sonar-ws-client/src/test/java/org/sonar/wsclient/services/ResourceQueryTest.java
@@ -1,6 +1,6 @@
/*
* Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
* mailto:contact AT sonarsource DOT com
*
* Sonar is free software; you can redistribute it and/or
diff --git a/sonar-ws-client/src/test/java/org/sonar/wsclient/services/ResourceTest.java b/sonar-ws-client/src/test/java/org/sonar/wsclient/services/ResourceTest.java
index 0d28f9cd1e1..cba51079c58 100644
--- a/sonar-ws-client/src/test/java/org/sonar/wsclient/services/ResourceTest.java
+++ b/sonar-ws-client/src/test/java/org/sonar/wsclient/services/ResourceTest.java
@@ -1,6 +1,6 @@
/*
* Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
* mailto:contact AT sonarsource DOT com
*
* Sonar is free software; you can redistribute it and/or
diff --git a/sonar-ws-client/src/test/java/org/sonar/wsclient/services/RuleQueryTest.java b/sonar-ws-client/src/test/java/org/sonar/wsclient/services/RuleQueryTest.java
index 92bcd40f30f..14ed894a277 100644
--- a/sonar-ws-client/src/test/java/org/sonar/wsclient/services/RuleQueryTest.java
+++ b/sonar-ws-client/src/test/java/org/sonar/wsclient/services/RuleQueryTest.java
@@ -1,6 +1,6 @@
/*
* Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
* mailto:contact AT sonarsource DOT com
*
* Sonar is free software; you can redistribute it and/or
diff --git a/sonar-ws-client/src/test/java/org/sonar/wsclient/services/ServerQueryTest.java b/sonar-ws-client/src/test/java/org/sonar/wsclient/services/ServerQueryTest.java
index e4ac4b68445..6f93db0171c 100644
--- a/sonar-ws-client/src/test/java/org/sonar/wsclient/services/ServerQueryTest.java
+++ b/sonar-ws-client/src/test/java/org/sonar/wsclient/services/ServerQueryTest.java
@@ -1,6 +1,6 @@
/*
* Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
* mailto:contact AT sonarsource DOT com
*
* Sonar is free software; you can redistribute it and/or
diff --git a/sonar-ws-client/src/test/java/org/sonar/wsclient/services/SourceQueryTest.java b/sonar-ws-client/src/test/java/org/sonar/wsclient/services/SourceQueryTest.java
index 51dfc9bd34b..710296c201f 100644
--- a/sonar-ws-client/src/test/java/org/sonar/wsclient/services/SourceQueryTest.java
+++ b/sonar-ws-client/src/test/java/org/sonar/wsclient/services/SourceQueryTest.java
@@ -1,6 +1,6 @@
/*
* Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
* mailto:contact AT sonarsource DOT com
*
* Sonar is free software; you can redistribute it and/or
diff --git a/sonar-ws-client/src/test/java/org/sonar/wsclient/services/TimeMachineQueryTest.java b/sonar-ws-client/src/test/java/org/sonar/wsclient/services/TimeMachineQueryTest.java
index 236e80a44eb..cd20be13f04 100644
--- a/sonar-ws-client/src/test/java/org/sonar/wsclient/services/TimeMachineQueryTest.java
+++ b/sonar-ws-client/src/test/java/org/sonar/wsclient/services/TimeMachineQueryTest.java
@@ -1,6 +1,6 @@
/*
* Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
* mailto:contact AT sonarsource DOT com
*
* Sonar is free software; you can redistribute it and/or
diff --git a/sonar-ws-client/src/test/java/org/sonar/wsclient/services/UpdateCenterQueryTest.java b/sonar-ws-client/src/test/java/org/sonar/wsclient/services/UpdateCenterQueryTest.java
index 633dbca9a17..c0d51e18191 100644
--- a/sonar-ws-client/src/test/java/org/sonar/wsclient/services/UpdateCenterQueryTest.java
+++ b/sonar-ws-client/src/test/java/org/sonar/wsclient/services/UpdateCenterQueryTest.java
@@ -1,6 +1,6 @@
/*
* Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
* mailto:contact AT sonarsource DOT com
*
* Sonar is free software; you can redistribute it and/or
diff --git a/sonar-ws-client/src/test/java/org/sonar/wsclient/services/UserPropertyCreateQueryTest.java b/sonar-ws-client/src/test/java/org/sonar/wsclient/services/UserPropertyCreateQueryTest.java
index b2e1f16353f..ad60316a29f 100644
--- a/sonar-ws-client/src/test/java/org/sonar/wsclient/services/UserPropertyCreateQueryTest.java
+++ b/sonar-ws-client/src/test/java/org/sonar/wsclient/services/UserPropertyCreateQueryTest.java
@@ -1,6 +1,6 @@
/*
* Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
* mailto:contact AT sonarsource DOT com
*
* Sonar is free software; you can redistribute it and/or
diff --git a/sonar-ws-client/src/test/java/org/sonar/wsclient/services/UserPropertyDeleteQueryTest.java b/sonar-ws-client/src/test/java/org/sonar/wsclient/services/UserPropertyDeleteQueryTest.java
index f29462123d6..4978ff2d739 100644
--- a/sonar-ws-client/src/test/java/org/sonar/wsclient/services/UserPropertyDeleteQueryTest.java
+++ b/sonar-ws-client/src/test/java/org/sonar/wsclient/services/UserPropertyDeleteQueryTest.java
@@ -1,6 +1,6 @@
/*
* Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
* mailto:contact AT sonarsource DOT com
*
* Sonar is free software; you can redistribute it and/or
diff --git a/sonar-ws-client/src/test/java/org/sonar/wsclient/services/ViolationQueryTest.java b/sonar-ws-client/src/test/java/org/sonar/wsclient/services/ViolationQueryTest.java
index 881a113aeb6..818ad935c3f 100644
--- a/sonar-ws-client/src/test/java/org/sonar/wsclient/services/ViolationQueryTest.java
+++ b/sonar-ws-client/src/test/java/org/sonar/wsclient/services/ViolationQueryTest.java
@@ -1,6 +1,6 @@
/*
* Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
* mailto:contact AT sonarsource DOT com
*
* Sonar is free software; you can redistribute it and/or
diff --git a/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/DependencyTreeUnmarshallerTest.java b/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/DependencyTreeUnmarshallerTest.java
index b96defeba12..b2d47e09e36 100644
--- a/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/DependencyTreeUnmarshallerTest.java
+++ b/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/DependencyTreeUnmarshallerTest.java
@@ -1,6 +1,6 @@
/*
* Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
* mailto:contact AT sonarsource DOT com
*
* Sonar is free software; you can redistribute it and/or
diff --git a/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/DependencyUnmarshallerTest.java b/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/DependencyUnmarshallerTest.java
index 1ad4d090a2a..cef3497e56d 100644
--- a/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/DependencyUnmarshallerTest.java
+++ b/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/DependencyUnmarshallerTest.java
@@ -1,6 +1,6 @@
/*
* Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
* mailto:contact AT sonarsource DOT com
*
* Sonar is free software; you can redistribute it and/or
diff --git a/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/EventUnmarshallerTest.java b/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/EventUnmarshallerTest.java
index b5c19029f0b..4fa2314fa46 100644
--- a/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/EventUnmarshallerTest.java
+++ b/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/EventUnmarshallerTest.java
@@ -1,6 +1,6 @@
/*
* Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
* mailto:contact AT sonarsource DOT com
*
* Sonar is free software; you can redistribute it and/or
diff --git a/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/JsonUtilsTest.java b/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/JsonUtilsTest.java
index ef2e1c3aaf0..d14fc150b38 100644
--- a/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/JsonUtilsTest.java
+++ b/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/JsonUtilsTest.java
@@ -1,6 +1,6 @@
/*
* Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
* mailto:contact AT sonarsource DOT com
*
* Sonar is free software; you can redistribute it and/or
diff --git a/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/MetricUnmarshallerTest.java b/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/MetricUnmarshallerTest.java
index 0eb4ff65fa7..333f78a4703 100644
--- a/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/MetricUnmarshallerTest.java
+++ b/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/MetricUnmarshallerTest.java
@@ -1,6 +1,6 @@
/*
* Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
* mailto:contact AT sonarsource DOT com
*
* Sonar is free software; you can redistribute it and/or
diff --git a/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/PluginUnmarshallerTest.java b/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/PluginUnmarshallerTest.java
index dc2391e8232..7a920dd3ec3 100644
--- a/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/PluginUnmarshallerTest.java
+++ b/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/PluginUnmarshallerTest.java
@@ -1,6 +1,6 @@
/*
* Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
* mailto:contact AT sonarsource DOT com
*
* Sonar is free software; you can redistribute it and/or
diff --git a/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/PropertyUnmarshallerTest.java b/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/PropertyUnmarshallerTest.java
index 9ffb0de4b8c..0a32fb793f8 100644
--- a/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/PropertyUnmarshallerTest.java
+++ b/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/PropertyUnmarshallerTest.java
@@ -1,6 +1,6 @@
/*
* Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
* mailto:contact AT sonarsource DOT com
*
* Sonar is free software; you can redistribute it and/or
diff --git a/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/ResourceUnmarshallerTest.java b/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/ResourceUnmarshallerTest.java
index acfda91f3e5..ef98b1a58e9 100644
--- a/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/ResourceUnmarshallerTest.java
+++ b/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/ResourceUnmarshallerTest.java
@@ -1,6 +1,6 @@
/*
* Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
* mailto:contact AT sonarsource DOT com
*
* Sonar is free software; you can redistribute it and/or
diff --git a/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/RuleUnmarshallerTest.java b/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/RuleUnmarshallerTest.java
index 6f75b766871..d2743dfee2f 100644
--- a/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/RuleUnmarshallerTest.java
+++ b/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/RuleUnmarshallerTest.java
@@ -1,6 +1,6 @@
/*
* Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
* mailto:contact AT sonarsource DOT com
*
* Sonar is free software; you can redistribute it and/or
diff --git a/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/ServerUnmarshallerTest.java b/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/ServerUnmarshallerTest.java
index c6936bc56a5..5be4a318096 100644
--- a/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/ServerUnmarshallerTest.java
+++ b/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/ServerUnmarshallerTest.java
@@ -1,6 +1,6 @@
/*
* Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
* mailto:contact AT sonarsource DOT com
*
* Sonar is free software; you can redistribute it and/or
diff --git a/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/SourceUnmarshallerTest.java b/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/SourceUnmarshallerTest.java
index b97d71c216f..857d0a936dc 100644
--- a/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/SourceUnmarshallerTest.java
+++ b/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/SourceUnmarshallerTest.java
@@ -1,6 +1,6 @@
/*
* Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
* mailto:contact AT sonarsource DOT com
*
* Sonar is free software; you can redistribute it and/or
@@ -35,7 +35,7 @@ public class SourceUnmarshallerTest extends UnmarshallerTestCase {
source = new SourceUnmarshaller().toModel(loadFile("/sources/source.json"));
assertThat(source.getLines().size(), is(236));
- assertThat(source.getLine(3), is(" * Copyright (C) 2009 SonarSource SA"));
+ assertThat(source.getLine(3), is(" * Copyright (C) 2008-2011 SonarSource"));
}
@Test
@@ -43,7 +43,7 @@ public class SourceUnmarshallerTest extends UnmarshallerTestCase {
Source source = new SourceUnmarshaller().toModel(loadFile("/sources/from_line_to_line.json"));
assertThat(source.getLines().size(), is(15));
assertThat(source.getLine(1), nullValue());
- assertThat(source.getLine(3), is(" * Copyright (C) 2009 SonarSource SA"));
+ assertThat(source.getLine(3), is(" * Copyright (C) 2008-2011 SonarSource"));
}
}
diff --git a/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/TimeMachineUnmarshallerTest.java b/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/TimeMachineUnmarshallerTest.java
index bad185a6b79..d900019bf72 100644
--- a/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/TimeMachineUnmarshallerTest.java
+++ b/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/TimeMachineUnmarshallerTest.java
@@ -1,6 +1,6 @@
/*
* Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
* mailto:contact AT sonarsource DOT com
*
* Sonar is free software; you can redistribute it and/or
diff --git a/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/UnmarshallerTestCase.java b/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/UnmarshallerTestCase.java
index b070e5b5d6e..ef5f03afa67 100644
--- a/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/UnmarshallerTestCase.java
+++ b/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/UnmarshallerTestCase.java
@@ -1,6 +1,6 @@
/*
* Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
* mailto:contact AT sonarsource DOT com
*
* Sonar is free software; you can redistribute it and/or
diff --git a/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/UnmarshallersTest.java b/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/UnmarshallersTest.java
index f37add54159..0f1e3094e9d 100644
--- a/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/UnmarshallersTest.java
+++ b/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/UnmarshallersTest.java
@@ -1,6 +1,6 @@
/*
* Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
* mailto:contact AT sonarsource DOT com
*
* Sonar is free software; you can redistribute it and/or
diff --git a/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/ViolationUnmarshallerTest.java b/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/ViolationUnmarshallerTest.java
index fd83fcca74b..614ed46b79f 100644
--- a/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/ViolationUnmarshallerTest.java
+++ b/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/ViolationUnmarshallerTest.java
@@ -1,6 +1,6 @@
/*
* Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
* mailto:contact AT sonarsource DOT com
*
* Sonar is free software; you can redistribute it and/or
diff --git a/sonar-ws-client/src/test/resources/sources/from_line_to_line.json b/sonar-ws-client/src/test/resources/sources/from_line_to_line.json
index c4c7ed00509..04f3ca9bd64 100644
--- a/sonar-ws-client/src/test/resources/sources/from_line_to_line.json
+++ b/sonar-ws-client/src/test/resources/sources/from_line_to_line.json
@@ -1 +1 @@
-[{"3":" * Copyright (C) 2009 SonarSource SA","4":" * mailto:contact AT sonarsource DOT com","5":" *","6":" * Sonar is free software; you can redistribute it and\/or","7":" * modify it under the terms of the GNU Lesser General Public","8":" * License as published by the Free Software Foundation; either","9":" * version 3 of the License, or (at your option) any later version.","10":" *","11":" * Sonar is distributed in the hope that it will be useful,","12":" * but WITHOUT ANY WARRANTY; without even the implied warranty of","13":" * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU","14":" * Lesser General Public License for more details.","15":" *","16":" * You should have received a copy of the GNU Lesser General Public","17":" * License along with Sonar; if not, write to the Free Software"}] \ No newline at end of file
+[{"3":" * Copyright (C) 2008-2011 SonarSource","4":" * mailto:contact AT sonarsource DOT com","5":" *","6":" * Sonar is free software; you can redistribute it and\/or","7":" * modify it under the terms of the GNU Lesser General Public","8":" * License as published by the Free Software Foundation; either","9":" * version 3 of the License, or (at your option) any later version.","10":" *","11":" * Sonar is distributed in the hope that it will be useful,","12":" * but WITHOUT ANY WARRANTY; without even the implied warranty of","13":" * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU","14":" * Lesser General Public License for more details.","15":" *","16":" * You should have received a copy of the GNU Lesser General Public","17":" * License along with Sonar; if not, write to the Free Software"}] \ No newline at end of file
diff --git a/sonar-ws-client/src/test/resources/sources/source.json b/sonar-ws-client/src/test/resources/sources/source.json
index 5042d43778e..d804cadf7d5 100644
--- a/sonar-ws-client/src/test/resources/sources/source.json
+++ b/sonar-ws-client/src/test/resources/sources/source.json
@@ -1 +1 @@
-[{"1":"\/*","2":" * Sonar, open source software quality management tool.","3":" * Copyright (C) 2009 SonarSource SA","4":" * mailto:contact AT sonarsource DOT com","5":" *","6":" * Sonar is free software; you can redistribute it and\/or","7":" * modify it under the terms of the GNU Lesser General Public","8":" * License as published by the Free Software Foundation; either","9":" * version 3 of the License, or (at your option) any later version.","10":" *","11":" * Sonar is distributed in the hope that it will be useful,","12":" * but WITHOUT ANY WARRANTY; without even the implied warranty of","13":" * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU","14":" * Lesser General Public License for more details.","15":" *","16":" * You should have received a copy of the GNU Lesser General Public","17":" * License along with Sonar; if not, write to the Free Software","18":" * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02","19":" *\/","20":"package org.sonar.api.utils;","21":"","22":"import com.google.common.collect.Multiset;","23":"import org.apache.commons.collections.Bag;","24":"import org.apache.commons.lang.StringUtils;","25":"import org.apache.commons.lang.math.NumberUtils;","26":"import org.sonar.api.rules.RulePriority;","27":"import org.slf4j.LoggerFactory;","28":"","29":"import java.util.HashMap;","30":"import java.util.Map;","31":"","32":"\/**","33":" * Util class to format key\/value data. Output is a string representation ready to be","34":" * injected into the database","35":" *","36":" * @since 1.10","37":" *\/","38":"public final class KeyValueFormat {","39":"","40":" private KeyValueFormat() {","41":" }","42":"","43":" \/**","44":" * Transforms a string with the following format : "key1=value1;key2=value2..."","45":" * into a Map<KEY, VALUE>. Requires to implement the transform(key,value) method","46":" *","47":" * @param data the input string","48":" * @param transformer the interface to implement","49":" * @return a Map of <key, value>","50":" *\/","51":" public static <KEY, VALUE> Map<KEY, VALUE> parse(String data, Transformer<KEY, VALUE> transformer) {","52":" Map<String, String> rawData = parse(data);","53":" Map<KEY, VALUE> map = new HashMap<KEY, VALUE>();","54":" for (Map.Entry<String, String> entry : rawData.entrySet()) {","55":" KeyValue<KEY, VALUE> keyVal = transformer.transform(entry.getKey(), entry.getValue());","56":" if (keyVal != null) {","57":" map.put(keyVal.getKey(), keyVal.getValue());","58":" }","59":" }","60":" return map;","61":" }","62":"","63":" \/**","64":" * Transforms a string with the following format : "key1=value1;key2=value2..."","65":" * into a Map<String,String>","66":" *","67":" * @param data the string to parse","68":" * @return a map","69":" *\/","70":" public static Map<String, String> parse(String data) {","71":" Map<String, String> map = new HashMap<String, String>();","72":" String[] pairs = StringUtils.split(data, ";");","73":" for (String pair : pairs) {","74":" String[] keyValue = StringUtils.split(pair, "=");","75":" String key = keyValue[0];","76":" String value = (keyValue.length == 2 ? keyValue[1] : "");","77":" map.put(key, value);","78":" }","79":" return map;","80":" }","81":"","82":" \/**","83":" * Transforms a map<KEY,VALUE> into a string with the format : "key1=value1;key2=value2..."","84":" *","85":" * @param map the map to transform","86":" * @return the formatted string","87":" *\/","88":" public static <KEY, VALUE> String format(Map<KEY, VALUE> map) {","89":" StringBuilder sb = new StringBuilder();","90":" boolean first = true;","91":" for (Map.Entry<?, ?> entry : map.entrySet()) {","92":" if (!first) {","93":" sb.append(";");","94":" }","95":" sb.append(entry.getKey().toString());","96":" sb.append("=");","97":" if (entry.getValue() != null) {","98":" sb.append(entry.getValue());","99":" }","100":" first = false;","101":" }","102":"","103":" return sb.toString();","104":" }","105":"","106":" \/**","107":" * @since 1.11","108":" * @deprecated use Multiset from google collections instead of commons-collections bags","109":" *\/","110":" public static String format(Bag bag) {","111":" return format(bag, 0);","112":" }","113":"","114":" \/**","115":" * @since 1.11","116":" * @deprecated use Multiset from google collections instead of commons-collections bags","117":" *\/","118":" public static String format(Bag bag, int var) {","119":" StringBuilder sb = new StringBuilder();","120":" boolean first = true;","121":" for (Object obj : bag.uniqueSet()) {","122":" if (!first) {","123":" sb.append(";");","124":" }","125":" sb.append(obj.toString());","126":" sb.append("=");","127":" sb.append(bag.getCount(obj) + var);","128":" first = false;","129":" }","130":"","131":" return sb.toString();","132":" }","133":"","134":" \/**","135":" * Transforms a Multiset<?> into a string with the format : "key1=count1;key2=count2..."","136":" *","137":" * @param set the set to transform","138":" * @return the formatted string","139":" *\/","140":" public static String format(Multiset<?> set) {","141":" StringBuilder sb = new StringBuilder();","142":" boolean first = true;","143":" for (Multiset.Entry<?> entry : set.entrySet()) {","144":" if (!first) {","145":" sb.append(";");","146":" }","147":" sb.append(entry.getElement().toString());","148":" sb.append("=");","149":" sb.append(entry.getCount());","150":" first = false;","151":" }","152":" return sb.toString();","153":" }","154":"","155":" \/**","156":" * Transforms a Object... into a string with the format : "object1=object2;object3=object4..."","157":" *","158":" * @param objects the object list to transform","159":" * @return the formatted string","160":" *\/","161":" public static String format(Object... objects) {","162":" StringBuilder sb = new StringBuilder();","163":" boolean first = true;","164":" if (objects != null) {","165":" for (int i = 0; i < objects.length; i++) {","166":" if (!first) {","167":" sb.append(";");","168":" }","169":" sb.append(objects[i++].toString());","170":" sb.append("=");","171":" sb.append(objects[i]);","172":" first = false;","173":" }","174":" }","175":" return sb.toString();","176":" }","177":"","178":" public interface Transformer<KEY, VALUE> {","179":" KeyValue<KEY, VALUE> transform(String key, String value);","180":" }","181":"","182":" \/**","183":" * Implementation of Transformer<String, Double>","184":" *\/","185":" public static class StringNumberPairTransformer implements Transformer<String, Double> {","186":"","187":" public KeyValue<String, Double> transform(String key, String value) {","188":" return new KeyValue<String, Double>(key, toDouble(value));","189":" }","190":" }","191":"","192":" \/**","193":" * Implementation of Transformer<Double, Double>","194":" *\/","195":" public static class DoubleNumbersPairTransformer implements Transformer<Double, Double> {","196":"","197":" public KeyValue<Double, Double> transform(String key, String value) {","198":" return new KeyValue<Double, Double>(toDouble(key), toDouble(value));","199":" }","200":" }","201":"","202":" \/**","203":" * Implementation of Transformer<Integer, Integer>","204":" *\/","205":" public static class IntegerNumbersPairTransformer implements Transformer<Integer, Integer> {","206":"","207":" public KeyValue<Integer, Integer> transform(String key, String value) {","208":" return new KeyValue<Integer, Integer>(toInteger(key), toInteger(value));","209":" }","210":" }","211":"","212":" \/**","213":" * Implementation of Transformer<RulePriority, Integer>","214":" *\/","215":" public static class RulePriorityNumbersPairTransformer implements Transformer<RulePriority, Integer> {","216":"","217":" public KeyValue<RulePriority, Integer> transform(String key, String value) {","218":" try {","219":" if (StringUtils.isBlank(value)) { value = "0"; }","220":" return new KeyValue<RulePriority, Integer>(RulePriority.valueOf(key.toUpperCase()), Integer.parseInt(value));","221":" }","222":" catch (Exception e) {","223":" LoggerFactory.getLogger(RulePriorityNumbersPairTransformer.class).warn("Property " + key + " has invalid value: " + value, e);","224":" return null;","225":" }","226":" }","227":" }","228":"","229":" private static Double toDouble(String value) {","230":" return StringUtils.isBlank(value) ? null : NumberUtils.toDouble(value);","231":" }","232":"","233":" private static Integer toInteger(String value) {","234":" return StringUtils.isBlank(value) ? null : NumberUtils.toInt(value);","235":" }","236":"}"}] \ No newline at end of file
+[{"1":"\/*","2":" * Sonar, open source software quality management tool.","3":" * Copyright (C) 2008-2011 SonarSource","4":" * mailto:contact AT sonarsource DOT com","5":" *","6":" * Sonar is free software; you can redistribute it and\/or","7":" * modify it under the terms of the GNU Lesser General Public","8":" * License as published by the Free Software Foundation; either","9":" * version 3 of the License, or (at your option) any later version.","10":" *","11":" * Sonar is distributed in the hope that it will be useful,","12":" * but WITHOUT ANY WARRANTY; without even the implied warranty of","13":" * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU","14":" * Lesser General Public License for more details.","15":" *","16":" * You should have received a copy of the GNU Lesser General Public","17":" * License along with Sonar; if not, write to the Free Software","18":" * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02","19":" *\/","20":"package org.sonar.api.utils;","21":"","22":"import com.google.common.collect.Multiset;","23":"import org.apache.commons.collections.Bag;","24":"import org.apache.commons.lang.StringUtils;","25":"import org.apache.commons.lang.math.NumberUtils;","26":"import org.sonar.api.rules.RulePriority;","27":"import org.slf4j.LoggerFactory;","28":"","29":"import java.util.HashMap;","30":"import java.util.Map;","31":"","32":"\/**","33":" * Util class to format key\/value data. Output is a string representation ready to be","34":" * injected into the database","35":" *","36":" * @since 1.10","37":" *\/","38":"public final class KeyValueFormat {","39":"","40":" private KeyValueFormat() {","41":" }","42":"","43":" \/**","44":" * Transforms a string with the following format : "key1=value1;key2=value2..."","45":" * into a Map<KEY, VALUE>. Requires to implement the transform(key,value) method","46":" *","47":" * @param data the input string","48":" * @param transformer the interface to implement","49":" * @return a Map of <key, value>","50":" *\/","51":" public static <KEY, VALUE> Map<KEY, VALUE> parse(String data, Transformer<KEY, VALUE> transformer) {","52":" Map<String, String> rawData = parse(data);","53":" Map<KEY, VALUE> map = new HashMap<KEY, VALUE>();","54":" for (Map.Entry<String, String> entry : rawData.entrySet()) {","55":" KeyValue<KEY, VALUE> keyVal = transformer.transform(entry.getKey(), entry.getValue());","56":" if (keyVal != null) {","57":" map.put(keyVal.getKey(), keyVal.getValue());","58":" }","59":" }","60":" return map;","61":" }","62":"","63":" \/**","64":" * Transforms a string with the following format : "key1=value1;key2=value2..."","65":" * into a Map<String,String>","66":" *","67":" * @param data the string to parse","68":" * @return a map","69":" *\/","70":" public static Map<String, String> parse(String data) {","71":" Map<String, String> map = new HashMap<String, String>();","72":" String[] pairs = StringUtils.split(data, ";");","73":" for (String pair : pairs) {","74":" String[] keyValue = StringUtils.split(pair, "=");","75":" String key = keyValue[0];","76":" String value = (keyValue.length == 2 ? keyValue[1] : "");","77":" map.put(key, value);","78":" }","79":" return map;","80":" }","81":"","82":" \/**","83":" * Transforms a map<KEY,VALUE> into a string with the format : "key1=value1;key2=value2..."","84":" *","85":" * @param map the map to transform","86":" * @return the formatted string","87":" *\/","88":" public static <KEY, VALUE> String format(Map<KEY, VALUE> map) {","89":" StringBuilder sb = new StringBuilder();","90":" boolean first = true;","91":" for (Map.Entry<?, ?> entry : map.entrySet()) {","92":" if (!first) {","93":" sb.append(";");","94":" }","95":" sb.append(entry.getKey().toString());","96":" sb.append("=");","97":" if (entry.getValue() != null) {","98":" sb.append(entry.getValue());","99":" }","100":" first = false;","101":" }","102":"","103":" return sb.toString();","104":" }","105":"","106":" \/**","107":" * @since 1.11","108":" * @deprecated use Multiset from google collections instead of commons-collections bags","109":" *\/","110":" public static String format(Bag bag) {","111":" return format(bag, 0);","112":" }","113":"","114":" \/**","115":" * @since 1.11","116":" * @deprecated use Multiset from google collections instead of commons-collections bags","117":" *\/","118":" public static String format(Bag bag, int var) {","119":" StringBuilder sb = new StringBuilder();","120":" boolean first = true;","121":" for (Object obj : bag.uniqueSet()) {","122":" if (!first) {","123":" sb.append(";");","124":" }","125":" sb.append(obj.toString());","126":" sb.append("=");","127":" sb.append(bag.getCount(obj) + var);","128":" first = false;","129":" }","130":"","131":" return sb.toString();","132":" }","133":"","134":" \/**","135":" * Transforms a Multiset<?> into a string with the format : "key1=count1;key2=count2..."","136":" *","137":" * @param set the set to transform","138":" * @return the formatted string","139":" *\/","140":" public static String format(Multiset<?> set) {","141":" StringBuilder sb = new StringBuilder();","142":" boolean first = true;","143":" for (Multiset.Entry<?> entry : set.entrySet()) {","144":" if (!first) {","145":" sb.append(";");","146":" }","147":" sb.append(entry.getElement().toString());","148":" sb.append("=");","149":" sb.append(entry.getCount());","150":" first = false;","151":" }","152":" return sb.toString();","153":" }","154":"","155":" \/**","156":" * Transforms a Object... into a string with the format : "object1=object2;object3=object4..."","157":" *","158":" * @param objects the object list to transform","159":" * @return the formatted string","160":" *\/","161":" public static String format(Object... objects) {","162":" StringBuilder sb = new StringBuilder();","163":" boolean first = true;","164":" if (objects != null) {","165":" for (int i = 0; i < objects.length; i++) {","166":" if (!first) {","167":" sb.append(";");","168":" }","169":" sb.append(objects[i++].toString());","170":" sb.append("=");","171":" sb.append(objects[i]);","172":" first = false;","173":" }","174":" }","175":" return sb.toString();","176":" }","177":"","178":" public interface Transformer<KEY, VALUE> {","179":" KeyValue<KEY, VALUE> transform(String key, String value);","180":" }","181":"","182":" \/**","183":" * Implementation of Transformer<String, Double>","184":" *\/","185":" public static class StringNumberPairTransformer implements Transformer<String, Double> {","186":"","187":" public KeyValue<String, Double> transform(String key, String value) {","188":" return new KeyValue<String, Double>(key, toDouble(value));","189":" }","190":" }","191":"","192":" \/**","193":" * Implementation of Transformer<Double, Double>","194":" *\/","195":" public static class DoubleNumbersPairTransformer implements Transformer<Double, Double> {","196":"","197":" public KeyValue<Double, Double> transform(String key, String value) {","198":" return new KeyValue<Double, Double>(toDouble(key), toDouble(value));","199":" }","200":" }","201":"","202":" \/**","203":" * Implementation of Transformer<Integer, Integer>","204":" *\/","205":" public static class IntegerNumbersPairTransformer implements Transformer<Integer, Integer> {","206":"","207":" public KeyValue<Integer, Integer> transform(String key, String value) {","208":" return new KeyValue<Integer, Integer>(toInteger(key), toInteger(value));","209":" }","210":" }","211":"","212":" \/**","213":" * Implementation of Transformer<RulePriority, Integer>","214":" *\/","215":" public static class RulePriorityNumbersPairTransformer implements Transformer<RulePriority, Integer> {","216":"","217":" public KeyValue<RulePriority, Integer> transform(String key, String value) {","218":" try {","219":" if (StringUtils.isBlank(value)) { value = "0"; }","220":" return new KeyValue<RulePriority, Integer>(RulePriority.valueOf(key.toUpperCase()), Integer.parseInt(value));","221":" }","222":" catch (Exception e) {","223":" LoggerFactory.getLogger(RulePriorityNumbersPairTransformer.class).warn("Property " + key + " has invalid value: " + value, e);","224":" return null;","225":" }","226":" }","227":" }","228":"","229":" private static Double toDouble(String value) {","230":" return StringUtils.isBlank(value) ? null : NumberUtils.toDouble(value);","231":" }","232":"","233":" private static Integer toInteger(String value) {","234":" return StringUtils.isBlank(value) ? null : NumberUtils.toInt(value);","235":" }","236":"}"}] \ No newline at end of file