aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/pixart/messenger/entities
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2017-04-13 21:25:32 +0200
committerChristian Schneppe <christian@pix-art.de>2017-04-13 21:25:32 +0200
commiteda9c3542d784ac5071240839b94a94343f92444 (patch)
tree58d80488ad3dfafb85541417afcb13a049a18740 /src/main/java/de/pixart/messenger/entities
parent22229d6b4312108144e1f132272dd9e9d848fdf7 (diff)
avoid crash on urls with missing protocols
Diffstat (limited to 'src/main/java/de/pixart/messenger/entities')
-rw-r--r--src/main/java/de/pixart/messenger/entities/Message.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/de/pixart/messenger/entities/Message.java b/src/main/java/de/pixart/messenger/entities/Message.java
index 89bd9069d..633feed12 100644
--- a/src/main/java/de/pixart/messenger/entities/Message.java
+++ b/src/main/java/de/pixart/messenger/entities/Message.java
@@ -666,7 +666,7 @@ public class Message extends AbstractEntity {
final String protocol = url.getProtocol();
final boolean encrypted = ref != null && ref.matches("([A-Fa-f0-9]{2}){48}");
return (AesGcmURLStreamHandler.PROTOCOL_NAME.equalsIgnoreCase(protocol) && encrypted)
- || ((protocol.equalsIgnoreCase("http") || protocol.equalsIgnoreCase("https")) && (oob || encrypted));
+ || (("http".equalsIgnoreCase(protocol) || "https".equalsIgnoreCase(protocol)) && (oob || encrypted));
} catch (MalformedURLException e) {
return false;