aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authoriNPUTmice <daniel@gultsch.de>2014-11-01 14:33:34 +0100
committeriNPUTmice <daniel@gultsch.de>2014-11-01 14:33:34 +0100
commit1ea2e7dc3b3f9080ab55e1712c737ae9685d7791 (patch)
tree8584aa528ad43507af620a482de16155095d8fad /src
parenta0f694ea44b9d68390846b48d720f9a37fd679b8 (diff)
fixed arrayoutofbounds + spelling
Diffstat (limited to '')
-rw-r--r--src/main/java/eu/siacs/conversations/entities/Message.java12
-rw-r--r--src/main/java/eu/siacs/conversations/services/XmppConnectionService.java2
2 files changed, 7 insertions, 7 deletions
diff --git a/src/main/java/eu/siacs/conversations/entities/Message.java b/src/main/java/eu/siacs/conversations/entities/Message.java
index 8a83c465..b33d5f37 100644
--- a/src/main/java/eu/siacs/conversations/entities/Message.java
+++ b/src/main/java/eu/siacs/conversations/entities/Message.java
@@ -310,7 +310,7 @@ public class Message extends AbstractEntity {
return this.mPreviousMessage;
}
- public boolean mergable(Message message) {
+ public boolean mergeable(Message message) {
if (message == null) {
return false;
}
@@ -333,7 +333,7 @@ public class Message extends AbstractEntity {
public String getMergedBody() {
Message next = this.next();
- if (this.mergable(next)) {
+ if (this.mergeable(next)) {
return body.trim() + '\n' + next.getMergedBody();
}
return body.trim();
@@ -341,7 +341,7 @@ public class Message extends AbstractEntity {
public int getMergedStatus() {
Message next = this.next();
- if (this.mergable(next)) {
+ if (this.mergeable(next)) {
return next.getMergedStatus();
} else {
return getStatus();
@@ -350,7 +350,7 @@ public class Message extends AbstractEntity {
public long getMergedTimeSent() {
Message next = this.next();
- if (this.mergable(next)) {
+ if (this.mergeable(next)) {
return next.getMergedTimeSent();
} else {
return getTimeSent();
@@ -362,7 +362,7 @@ public class Message extends AbstractEntity {
if (prev == null) {
return false;
} else {
- return prev.mergable(this);
+ return prev.mergeable(this);
}
}
@@ -386,7 +386,7 @@ public class Message extends AbstractEntity {
if (pathParts.length > 0) {
filename = pathParts[pathParts.length - 1];
} else {
- filename = pathParts[0];
+ return false;
}
String[] extensionParts = filename.split("\\.");
if (extensionParts.length == 2
diff --git a/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java b/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java
index be73e07f..ea6f509f 100644
--- a/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java
+++ b/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java
@@ -1935,7 +1935,7 @@ public class XmppConnectionService extends Service {
Message current = message;
while(current.getStatus() == Message.STATUS_SEND_FAILED) {
messages.add(current);
- if (current.mergable(current.next())) {
+ if (current.mergeable(current.next())) {
current = current.next();
} else {
break;