mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-11 06:40:53 +00:00
Avoid deprecation by simply using encoding
This commit is contained in:
1 parent
40dea7ba61
commit
393c65d2d9
2 files changed
+5
-4
No files matched your search
+2
-1
@@ -1,6 +1,7 @@
|
||||
package com.sap.sailing.server.replication;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.URL;
|
||||
import java.util.UUID;
|
||||
@@ -15,7 +16,7 @@ import com.rabbitmq.client.QueueingConsumer;
|
||||
*/
|
||||
public interface ReplicationMasterDescriptor {
|
||||
|
||||
URL getReplicationRegistrationRequestURL(UUID uuid, String additionalInformation) throws MalformedURLException;
|
||||
URL getReplicationRegistrationRequestURL(UUID uuid, String additionalInformation) throws MalformedURLException, UnsupportedEncodingException;
|
||||
|
||||
URL getReplicationDeRegistrationRequestURL(UUID uuid) throws MalformedURLException;
|
||||
|
||||
|
||||
+3
-3
@@ -1,6 +1,7 @@
|
||||
package com.sap.sailing.server.replication.impl;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.URL;
|
||||
import java.util.UUID;
|
||||
@@ -29,13 +30,12 @@ public class ReplicationMasterDescriptorImpl implements ReplicationMasterDescrip
|
||||
this.exchangeName = exchangeName;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
@Override
|
||||
public URL getReplicationRegistrationRequestURL(UUID uuid, String additional) throws MalformedURLException {
|
||||
public URL getReplicationRegistrationRequestURL(UUID uuid, String additional) throws MalformedURLException, UnsupportedEncodingException {
|
||||
return new URL("http", hostname, servletPort, REPLICATION_SERVLET + "?" + ReplicationServlet.ACTION + "="
|
||||
+ ReplicationServlet.Action.REGISTER.name()
|
||||
+ "&" + ReplicationServlet.SERVER_UUID + "=" + uuid.toString()
|
||||
+ "&" + ReplicationServlet.ADDITIONAL_INFORMATION + "=" + java.net.URLEncoder.encode(BuildVersion.getBuildVersion()));
|
||||
+ "&" + ReplicationServlet.ADDITIONAL_INFORMATION + "=" + java.net.URLEncoder.encode(BuildVersion.getBuildVersion(), "UTF-8"));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in new issue
Block a user