Skip to content

Commit

Permalink
Use exception instead of deprecation notice
Browse files Browse the repository at this point in the history
  • Loading branch information
funkyboy committed Mar 16, 2018
1 parent 8d4b37d commit d3f5238
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions lib/src/main/java/io/ably/lib/types/BaseMessage.java
Original file line number Diff line number Diff line change
Expand Up @@ -131,11 +131,7 @@ public void encode(ChannelOptions opts) throws AblyException {
encoding = ((encoding == null) ? "" : encoding + "/") + "utf-8";
}
} else if(!(data instanceof byte[])) {
if (opts != null && opts.encrypted) {
throw AblyException.fromErrorInfo(new ErrorInfo("Invalid message data or encoding", 400, 40013));
} else {
Log.e(TAG, "Message data must be either `byte[]`, `String` or `JSONElement`; implicit coercion of other types to String is deprecated and throws from v.0.9 on.\nPlease check the documentation (https://www.ably.io/documentation/realtime/types#message).");
}
}
}
if (opts != null && opts.encrypted) {
Expand Down

0 comments on commit d3f5238

Please sign in to comment.