changeset 9255:9be51f776798

Merge from 3.2.1
author gernotbelger
date Fri, 13 Jul 2018 11:56:22 +0200
parents 68ff4087b987 (current diff) 14200ded6d67 (diff)
children 6c24c857ccf9
files gwt-client/src/main/java/org/dive4elements/river/client/client/ui/fixation/FixationPanel.java java.header
diffstat 11 files changed, 44 insertions(+), 60 deletions(-) [+]
line wrap: on
line diff
--- a/.hgtags	Fri Jul 13 11:40:25 2018 +0200
+++ b/.hgtags	Fri Jul 13 11:56:22 2018 +0200
@@ -104,3 +104,4 @@
 1bc1d696952036c492e016e18fb721032b3320b5 3.1.10
 e062d3afd6825e0366f1715b80c60903b1cb11db 3.2.0
 d8e3b20e2c93065eee064a8c707344e5bb63f620 3.2.1
+de423c2a3c1b8f1b559282b23ff150a6260744f6 3.2.2
--- a/checkstyle.xml	Fri Jul 13 11:40:25 2018 +0200
+++ b/checkstyle.xml	Fri Jul 13 11:56:22 2018 +0200
@@ -17,8 +17,9 @@
 
   <!-- Following interprets the header file as regular expressions. -->
   <module name="RegexpHeader">
-    <property name="headerFile" value="../java.header"/>
     <property name="fileExtensions" value="java"/>
+    <property name="header"
+              value="^/\* Copyright \(C\) .* by Bundesanstalt für Gewässerkunde$\n^ \* Software engineering by .*$\n^ \*$\n^ \* This file is Free Software under the GNU AGPL \(>=v3\)$\n^ \* and comes with ABSOLUTELY NO WARRANTY! Check out the$\n^ \* documentation coming with Dive4Elements River for details.$\n^ \*/$"/>
   </module>
 
   <module name="FileTabCharacter">
--- a/contrib/make_flys_release/make_release.sh	Fri Jul 13 11:40:25 2018 +0200
+++ b/contrib/make_flys_release/make_release.sh	Fri Jul 13 11:56:22 2018 +0200
@@ -151,8 +151,9 @@
     cd $repo
     if [ -z "`hg tags | sed -n "/$VERSION/p"`" -a -z "`hg branches | sed -n "/$VERSION/p"`" ]
     then
-        echo "ERROR: No tag or branch $VERSION found in repository of $repo!"
-        exit 1
+        echo "WARNING: No tag or branch $VERSION found in repository of $repo!"
+        echo "         Will fallback to 'default'!"
+        hg up default
     else
         hg up "$VERSION"
     fi
--- a/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/fixation/FixationPanel.java	Fri Jul 13 11:40:25 2018 +0200
+++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/fixation/FixationPanel.java	Fri Jul 13 11:56:22 2018 +0200
@@ -16,7 +16,6 @@
 import org.dive4elements.river.client.client.services.FixingsOverviewService;
 import org.dive4elements.river.client.client.services.FixingsOverviewServiceAsync;
 import org.dive4elements.river.client.client.ui.AbstractUIProvider;
-import org.dive4elements.river.client.shared.MapUtils;
 import org.dive4elements.river.client.shared.model.AbstractFixBunduArtifact;
 import org.dive4elements.river.client.shared.model.Data;
 import org.dive4elements.river.client.shared.model.DataList;
@@ -24,6 +23,7 @@
 import org.dive4elements.river.client.shared.model.FixingsOverviewInfo;
 
 import com.google.gwt.core.client.GWT;
+import com.google.gwt.http.client.URL;
 import com.google.gwt.i18n.client.DateTimeFormat;
 import com.google.gwt.i18n.client.NumberFormat;
 import com.google.gwt.json.client.JSONNumber;
@@ -144,7 +144,7 @@
 
         final AbstractFixBunduArtifact art = (AbstractFixBunduArtifact) this.artifact;
 
-        this.overviewService.generateOverview(locale, this.artifact.getUuid(), MapUtils.toJavaEncodedString(getOverviewFilter(art.getFilter())),
+        this.overviewService.generateOverview(locale, this.artifact.getUuid(), getOverviewFilter(art.getFilter()),
                 renderCheckboxes(), callBack, new AsyncCallback<FixingsOverviewInfo>() {
                     @Override
                     public void onFailure(final Throwable caught) {
@@ -287,10 +287,10 @@
             hHeight = (int) (hWidth * 3f / 4);
         }
 
-        String imgUrl = GWT.getModuleBaseURL();
-        imgUrl += "fixings-km-chart";
-        imgUrl += "?locale=" + locale;
-        imgUrl += "&filter=" + getChartFilter(filter, hWidth, hHeight);
+        final String imgUrl = URL.encode(GWT.getModuleBaseURL()
+                + "fixings-km-chart"
+                + "?locale=" + locale
+                + "&filter=" + getChartFilter(filter, hWidth, hHeight));
 
         if (this.chartContainer.hasMember(this.chartImg)) {
             this.chartImg.setWidth(hWidth);
--- a/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/minfo/BedCampaignChart.java	Fri Jul 13 11:40:25 2018 +0200
+++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/minfo/BedCampaignChart.java	Fri Jul 13 11:56:22 2018 +0200
@@ -9,6 +9,7 @@
 package org.dive4elements.river.client.client.ui.minfo;
 
 import com.google.gwt.core.client.GWT;
+import com.google.gwt.http.client.URL;
 import com.google.gwt.json.client.JSONNumber;
 import com.google.gwt.json.client.JSONObject;
 import com.google.gwt.json.client.JSONString;
@@ -68,10 +69,10 @@
         jfix.put("bed", jfilter);
         String filter = jfix.toString();
 
-        String imgUrl = GWT.getModuleBaseURL();
-        imgUrl += "bed-km-chart";
-        imgUrl += "?locale=" + locale;
-        imgUrl += "&filter=" + filter;
+        String imgUrl = URL.encode(GWT.getModuleBaseURL()
+            + "bed-km-chart"
+            + "?locale=" + locale
+            + "&filter=" + filter);
 
         if (chartImg != null && hasMember(chartImg)) {
             chartImg.setWidth(hWidth);
--- a/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/minfo/BedloadCampaignChart.java	Fri Jul 13 11:40:25 2018 +0200
+++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/minfo/BedloadCampaignChart.java	Fri Jul 13 11:56:22 2018 +0200
@@ -9,6 +9,7 @@
 package org.dive4elements.river.client.client.ui.minfo;
 
 import com.google.gwt.core.client.GWT;
+import com.google.gwt.http.client.URL;
 import com.google.gwt.json.client.JSONNumber;
 import com.google.gwt.json.client.JSONObject;
 import com.google.gwt.json.client.JSONString;
@@ -71,10 +72,10 @@
         jfix.put("bedload", jfilter);
         String filter = jfix.toString();
 
-        String imgUrl = GWT.getModuleBaseURL();
-        imgUrl += "bedload-km-chart";
-        imgUrl += "?locale=" + locale;
-        imgUrl += "&filter=" + filter;
+        String imgUrl = URL.encode(GWT.getModuleBaseURL()
+            + "bedload-km-chart"
+            + "?locale=" + locale
+            + "&filter=" + filter);
 
         if (chartImg != null && hasMember(chartImg)) {
             chartImg.setWidth(hWidth);
--- a/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/range/DischargeInfoDataSource.java	Fri Jul 13 11:40:25 2018 +0200
+++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/range/DischargeInfoDataSource.java	Fri Jul 13 11:56:22 2018 +0200
@@ -9,6 +9,7 @@
 package org.dive4elements.river.client.client.ui.range;
 
 import com.google.gwt.core.client.GWT;
+import com.google.gwt.http.client.URL;
 
 import com.smartgwt.client.data.DataSource;
 import com.smartgwt.client.data.DataSourceField;
@@ -43,11 +44,11 @@
 
 
     protected String getServiceURL(String server, long gauge, String river) {
-        String url = GWT.getModuleBaseURL();
-        url += "dischargeinfoxml";
-        url += "?server=" + server;
-        url += "&gauge=" + String.valueOf(gauge);
-        url += "&river=" + river;
+        String url = URL.encode(GWT.getModuleBaseURL()
+            + "dischargeinfoxml"
+            + "?server=" + server
+            + "&gauge=" + String.valueOf(gauge)
+            + "&river=" + river);
 
         return url;
     }
--- a/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/range/DistanceInfoDataSource.java	Fri Jul 13 11:40:25 2018 +0200
+++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/range/DistanceInfoDataSource.java	Fri Jul 13 11:56:22 2018 +0200
@@ -9,6 +9,7 @@
 package org.dive4elements.river.client.client.ui.range;
 
 import com.google.gwt.core.client.GWT;
+import com.google.gwt.http.client.URL;
 
 import com.smartgwt.client.data.DataSource;
 import com.smartgwt.client.data.DataSourceField;
@@ -48,12 +49,16 @@
     }
 
 
-    protected String getServiceURL(String server, String river, String filter) {
-        String url = GWT.getModuleBaseURL();
-        url += "distanceinfoxml";
-        url += "?server=" + server;
-        url += "&river=" + river;
-        url += "&filter=" + filter;
+    protected String getServiceURL(
+        String server,
+        String river,
+        String filter
+    ) {
+        String url = URL.encode(GWT.getModuleBaseURL()
+            + "distanceinfoxml"
+            + "?server=" + server
+            + "&river=" + river
+            + "&filter=" + filter);
 
         return url;
     }
--- a/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/sq/SQCampaignChart.java	Fri Jul 13 11:40:25 2018 +0200
+++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/sq/SQCampaignChart.java	Fri Jul 13 11:56:22 2018 +0200
@@ -9,6 +9,7 @@
 package org.dive4elements.river.client.client.ui.sq;
 
 import com.google.gwt.core.client.GWT;
+import com.google.gwt.http.client.URL;
 import com.google.gwt.json.client.JSONNumber;
 import com.google.gwt.json.client.JSONObject;
 import com.google.gwt.json.client.JSONString;
@@ -69,10 +70,10 @@
         jfix.put("sq", jfilter);
         String filter = jfix.toString();
 
-        String imgUrl = GWT.getModuleBaseURL();
-        imgUrl += "sq-km-chart";
-        imgUrl += "?locale=" + locale;
-        imgUrl += "&filter=" + filter;
+        String imgUrl = URL.encode(GWT.getModuleBaseURL()
+            + "sq-km-chart"
+            + "?locale=" + locale
+            + "&filter=" + filter);
 
         if (chartImg != null && hasMember(chartImg)) {
             chartImg.setWidth(hWidth);
--- a/gwt-client/src/main/java/org/dive4elements/river/client/shared/MapUtils.java	Fri Jul 13 11:40:25 2018 +0200
+++ b/gwt-client/src/main/java/org/dive4elements/river/client/shared/MapUtils.java	Fri Jul 13 11:56:22 2018 +0200
@@ -51,26 +51,5 @@
 
         return url;
     }
-
-
-    public static String toJavaEncodedString(String str) {
-        if (str == null) {
-            return null;
-        }
-        StringBuilder sb = new StringBuilder();
-        for (int i = 0, len = str.length(); i < len; i++) {
-            int unipoint = Character.codePointAt(str, i);
-            if ((unipoint < 32) || (unipoint > 127)) {
-                sb.append("\\u");
-                sb.append(Integer.toHexString((unipoint >> 3*4) & 0xf));
-                sb.append(Integer.toHexString((unipoint >> 2*4) & 0xf));
-                sb.append(Integer.toHexString((unipoint >> 1*4) & 0xf));
-                sb.append(Integer.toHexString((unipoint >> 0*4) & 0xf));
-            } else {
-                sb.append(str.charAt(i));
-            }
-        }
-        return sb.toString();
-    }
 }
 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :
--- a/java.header	Fri Jul 13 11:40:25 2018 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,7 +0,0 @@
-^/\* Copyright \(C\) .* by Bundesanstalt für Gewässerkunde$
-^ \* Software engineering by .*$
-^ \*$
-^ \* This file is Free Software under the GNU AGPL \(>=v3\)$
-^ \* and comes with ABSOLUTELY NO WARRANTY! Check out the$
-^ \* documentation coming with Dive4Elements River for details.$
-^ \*/$

http://dive4elements.wald.intevation.org