Skip to content

Commit

Permalink
Base64.java: Deprecate our Base64 implementation in favor of Java's.
Browse files Browse the repository at this point in the history
The only code in the library that uses it is Skype-for-Asterisk which I am pretty sure has been dead a long time anyway.
  • Loading branch information
seanbright committed Aug 27, 2024
1 parent 69407ef commit d708a84
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,8 @@
*/
package org.asteriskjava.manager.event;

import org.asteriskjava.util.Base64;

import java.nio.charset.StandardCharsets;
import java.util.Base64;

/**
* A SkypeChatMessageEvent is triggered when a Skype Chat message is sent or
Expand Down Expand Up @@ -107,6 +106,6 @@ public String getDecodedMessage() {
if (message == null) {
return null;
}
return new String(Base64.base64ToByteArray(message), StandardCharsets.UTF_8);
return new String(Base64.getDecoder().decode(message), StandardCharsets.UTF_8);
}
}
3 changes: 3 additions & 0 deletions src/main/java/org/asteriskjava/util/Base64.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,11 @@
* and vice-versa.<p>
* From java.util.prefs.
*
* @deprecated Use {@link java.util.Base64} instead.
*
* @author Josh Bloch
*/
@Deprecated
public class Base64 {

private Base64() {
Expand Down

0 comments on commit d708a84

Please sign in to comment.