ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anovi...@apache.org
Subject [1/2] incubator-ignite git commit: # ignite-776 WIP
Date Tue, 28 Apr 2015 11:16:46 GMT
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-776 5fbdd4048 -> 5dc5a6a69


# ignite-776 WIP


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/7c5a04bc
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/7c5a04bc
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/7c5a04bc

Branch: refs/heads/ignite-776
Commit: 7c5a04bc644486250acfccfa7f76857a0d37e073
Parents: 06eaccb
Author: Andrey <anovikov@gridgain.com>
Authored: Tue Apr 28 18:14:52 2015 +0700
Committer: Andrey <anovikov@gridgain.com>
Committed: Tue Apr 28 18:14:52 2015 +0700

----------------------------------------------------------------------
 .../org/apache/ignite/internal/GridUpdateNotifier.java   | 11 ++++++-----
 .../ignite/internal/GridUpdateNotifierSelfTest.java      |  4 +++-
 2 files changed, 9 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7c5a04bc/modules/core/src/main/java/org/apache/ignite/internal/GridUpdateNotifier.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/GridUpdateNotifier.java
b/modules/core/src/main/java/org/apache/ignite/internal/GridUpdateNotifier.java
index 4e67d15..089321b 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/GridUpdateNotifier.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/GridUpdateNotifier.java
@@ -92,8 +92,8 @@ class GridUpdateNotifier {
      * @param reportOnlyNew Whether or not to report only new version.
      * @throws IgniteCheckedException If failed.
      */
-    GridUpdateNotifier(String gridName, String ver, GridKernalGateway gw, Collection<PluginProvider>
pluginProviders, boolean reportOnlyNew)
-        throws IgniteCheckedException {
+    GridUpdateNotifier(String gridName, String ver, GridKernalGateway gw, Collection<PluginProvider>
pluginProviders,
+        boolean reportOnlyNew) throws IgniteCheckedException {
         try {
             DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
 
@@ -118,7 +118,7 @@ class GridUpdateNotifier {
             pluginVers = U.newHashMap(pluginProviders.size());
 
             for (PluginProvider provider : pluginProviders)
-                pluginVers.put("plugin_" + provider.name(), provider.version());
+                pluginVers.put("plugins." + provider.name(), provider.version());
 
             this.reportOnlyNew = reportOnlyNew;
 
@@ -276,14 +276,15 @@ class GridUpdateNotifier {
                 SB plugins = new SB();
 
                 for (Map.Entry<String, String> p : pluginVers.entrySet())
-                    plugins.a("&").a(p.getKey()).a("=").a(p.getValue());
+                    plugins.a("&").a(p.getKey()).a("=").a(encode(p.getValue(), CHARSET));
 
                 String postParams =
                     "gridName=" + encode(gridName, CHARSET) +
                     (!F.isEmpty(UPD_STATUS_PARAMS) ? "&" + UPD_STATUS_PARAMS : "") +
                     (topSize > 0 ? "&topSize=" + topSize : "") +
                     (!F.isEmpty(stackTrace) ? "&stackTrace=" + encode(stackTrace, CHARSET)
: "") +
-                    (!F.isEmpty(vmProps) ? "&vmProps=" + encode(vmProps, CHARSET) : "");
+                    (!F.isEmpty(vmProps) ? "&vmProps=" + encode(vmProps, CHARSET) : "")
+
+                    plugins.toString();
 
                 URLConnection conn = new URL(url).openConnection();
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7c5a04bc/modules/core/src/test/java/org/apache/ignite/internal/GridUpdateNotifierSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridUpdateNotifierSelfTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/GridUpdateNotifierSelfTest.java
index 2b119ec..bd0ccca 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/GridUpdateNotifierSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/GridUpdateNotifierSelfTest.java
@@ -18,10 +18,12 @@
 package org.apache.ignite.internal;
 
 import org.apache.ignite.*;
+import org.apache.ignite.plugin.*;
 import org.apache.ignite.testframework.junits.common.*;
 import org.h2.constant.*;
 import org.jetbrains.annotations.*;
 
+import java.util.*;
 import java.util.concurrent.*;
 
 /**
@@ -53,7 +55,7 @@ public class GridUpdateNotifierSelfTest extends GridCommonAbstractTest {
      */
     public void testNotifier() throws Exception {
         GridUpdateNotifier ntf = new GridUpdateNotifier(null, IgniteProperties.get("ignite.version"),
-            TEST_GATEWAY, false);
+            TEST_GATEWAY, Collections.<PluginProvider>emptyList(), false);
 
         ntf.checkForNewVersion(new SelfExecutor(), log);
 


Mime
View raw message