mirror of
https://github.com/igniterealtime/Spark.git
synced 2026-02-05 00:05:47 +00:00
SparkFileUploadPlugin.messageReceived() avoid NPE
This commit is contained in:
committed by
Guus der Kinderen
parent
27f2d20c18
commit
a6987246cf
@ -47,19 +47,10 @@ public class SparkFileUploadPlugin implements Plugin, ChatRoomListener, GlobalMe
|
||||
|
||||
@Override
|
||||
public void messageReceived(ChatRoom room, Message message) {
|
||||
|
||||
try {
|
||||
String body = message.getBody();
|
||||
|
||||
if ( (body.startsWith("https://") || body.startsWith("http://")) && body.contains("/httpfileupload/") )
|
||||
{
|
||||
Log.warning("http file upload get url " + message.getBody());
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
// i don't care
|
||||
String body = message.getBody();
|
||||
if (body != null && (body.startsWith("https://") || body.startsWith("http://")) && body.contains("/httpfileupload/")) {
|
||||
Log.warning("http file upload get url " + message.getBody());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user