Changeset 10618 in josm for trunk/src/org/openstreetmap/josm/tools/bugreport
- Timestamp:
- 2016-07-23T23:54:27+02:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/tools/bugreport/BugReportSender.java
r10616 r10618 10 10 import java.net.URL; 11 11 import java.net.URLEncoder; 12 import java.nio.ByteBuffer;13 import java.nio.CharBuffer;14 import java.nio.charset.Charset;15 12 import java.nio.charset.StandardCharsets; 13 import java.util.Base64; 16 14 17 15 import javax.swing.JOptionPane; … … 27 25 import org.openstreetmap.josm.gui.widgets.JMultilineLabel; 28 26 import org.openstreetmap.josm.gui.widgets.UrlLabel; 29 import org.openstreetmap.josm.tools.Base64;30 27 import org.openstreetmap.josm.tools.GBC; 31 28 import org.openstreetmap.josm.tools.HttpClient; … … 84 81 try { 85 82 String text = Utils.strip(statusText); 86 ByteBuffer buffer = Charset.forName("UTF-8").encode(CharBuffer.wrap(text)); 87 String pdata = Base64.encode(buffer, false); 83 String pdata = Base64.getEncoder().encodeToString(text.getBytes(StandardCharsets.UTF_8)); 88 84 String postQuery = "pdata=" + URLEncoder.encode(pdata, "UTF-8"); 89 85 HttpClient client = HttpClient.create(new URL(getJOSMTicketURL()), "POST")
Note:
See TracChangeset
for help on using the changeset viewer.