Avoid UnsupportedEncodingException & use const from StandardCharsets (#11948)

Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
This commit is contained in:
Christoph Weitkamp
2022-01-03 16:05:08 +01:00
committed by GitHub
parent 3f54327d5a
commit 167f8ebc49
52 changed files with 180 additions and 414 deletions

View File

@@ -20,7 +20,6 @@ import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.UnsupportedEncodingException;
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.net.ProtocolException;
@@ -129,8 +128,7 @@ public class RdsDataPoints {
* private method: execute an HTTP PUT on the server to set a data point value
*/
private void httpSetPointValueJson(String apiKey, String token, String pointUrl, String json)
throws RdsCloudException, UnsupportedEncodingException, ProtocolException, MalformedURLException,
IOException {
throws RdsCloudException, ProtocolException, MalformedURLException, IOException {
/*
* NOTE: this class uses JAVAX HttpsURLConnection library instead of the
* preferred JETTY library; the reason is that JETTY does not allow sending the