Ignore:
Timestamp:
2016-07-23T23:54:27+02:00 (8 years ago)
Author:
Don-vip
Message:

see #11390 - Java 8: use java.util.Base64

Location:
trunk/src/org/openstreetmap/josm/tools
Files:
1 deleted
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/tools/bugreport/BugReportSender.java

    r10616 r10618  
    1010import java.net.URL;
    1111import java.net.URLEncoder;
    12 import java.nio.ByteBuffer;
    13 import java.nio.CharBuffer;
    14 import java.nio.charset.Charset;
    1512import java.nio.charset.StandardCharsets;
     13import java.util.Base64;
    1614
    1715import javax.swing.JOptionPane;
     
    2725import org.openstreetmap.josm.gui.widgets.JMultilineLabel;
    2826import org.openstreetmap.josm.gui.widgets.UrlLabel;
    29 import org.openstreetmap.josm.tools.Base64;
    3027import org.openstreetmap.josm.tools.GBC;
    3128import org.openstreetmap.josm.tools.HttpClient;
     
    8481        try {
    8582            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));
    8884            String postQuery = "pdata=" + URLEncoder.encode(pdata, "UTF-8");
    8985            HttpClient client = HttpClient.create(new URL(getJOSMTicketURL()), "POST")
Note: See TracChangeset for help on using the changeset viewer.