From 979d0a2768d089cde853429a7becd36244bacefe Mon Sep 17 00:00:00 2001 From: =?utf8?q?Manuel=20Carrasco=20Mo=C3=B1ino?= Date: Fri, 7 Feb 2014 21:18:25 +0100 Subject: [PATCH] Dont define ajaxtransport static, so as we can override it in JVM tests --- .../com/google/gwt/query/client/plugins/ajax/Ajax.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/ajax/Ajax.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/ajax/Ajax.java index 7b472ba5..e11e5923 100644 --- a/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/ajax/Ajax.java +++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/ajax/Ajax.java @@ -44,8 +44,6 @@ public class Ajax extends GQuery { Promise getXhr(Settings settings); } - static AjaxTransport transport = GQ.getAjaxTransport(); - /** * Ajax Settings object */ @@ -137,11 +135,11 @@ public class Ajax extends GQuery { Promise ret = null; if ("jsonp".equalsIgnoreCase(dataType)) { - ret = transport.getJsonP(settings); + ret = GQ.getAjaxTransport().getJsonP(settings); } else if ("loadscript".equalsIgnoreCase(dataType)){ - ret = transport.getLoadScript(settings); + ret = GQ.getAjaxTransport().getLoadScript(settings); } else { - ret = transport.getXhr(settings) + ret = GQ.getAjaxTransport().getXhr(settings) .then(new Function() { public Object f(Object...args) { Response response = arguments(0); -- 2.39.5