fixed arrayoutofbounds + spelling

This commit is contained in:
iNPUTmice 2014-11-01 14:33:34 +01:00
parent a0f694ea44
commit 1ea2e7dc3b
2 changed files with 7 additions and 7 deletions

View file

@ -310,7 +310,7 @@ public class Message extends AbstractEntity {
return this.mPreviousMessage; return this.mPreviousMessage;
} }
public boolean mergable(Message message) { public boolean mergeable(Message message) {
if (message == null) { if (message == null) {
return false; return false;
} }
@ -333,7 +333,7 @@ public class Message extends AbstractEntity {
public String getMergedBody() { public String getMergedBody() {
Message next = this.next(); Message next = this.next();
if (this.mergable(next)) { if (this.mergeable(next)) {
return body.trim() + '\n' + next.getMergedBody(); return body.trim() + '\n' + next.getMergedBody();
} }
return body.trim(); return body.trim();
@ -341,7 +341,7 @@ public class Message extends AbstractEntity {
public int getMergedStatus() { public int getMergedStatus() {
Message next = this.next(); Message next = this.next();
if (this.mergable(next)) { if (this.mergeable(next)) {
return next.getMergedStatus(); return next.getMergedStatus();
} else { } else {
return getStatus(); return getStatus();
@ -350,7 +350,7 @@ public class Message extends AbstractEntity {
public long getMergedTimeSent() { public long getMergedTimeSent() {
Message next = this.next(); Message next = this.next();
if (this.mergable(next)) { if (this.mergeable(next)) {
return next.getMergedTimeSent(); return next.getMergedTimeSent();
} else { } else {
return getTimeSent(); return getTimeSent();
@ -362,7 +362,7 @@ public class Message extends AbstractEntity {
if (prev == null) { if (prev == null) {
return false; return false;
} else { } else {
return prev.mergable(this); return prev.mergeable(this);
} }
} }
@ -386,7 +386,7 @@ public class Message extends AbstractEntity {
if (pathParts.length > 0) { if (pathParts.length > 0) {
filename = pathParts[pathParts.length - 1]; filename = pathParts[pathParts.length - 1];
} else { } else {
filename = pathParts[0]; return false;
} }
String[] extensionParts = filename.split("\\."); String[] extensionParts = filename.split("\\.");
if (extensionParts.length == 2 if (extensionParts.length == 2

View file

@ -1935,7 +1935,7 @@ public class XmppConnectionService extends Service {
Message current = message; Message current = message;
while(current.getStatus() == Message.STATUS_SEND_FAILED) { while(current.getStatus() == Message.STATUS_SEND_FAILED) {
messages.add(current); messages.add(current);
if (current.mergable(current.next())) { if (current.mergeable(current.next())) {
current = current.next(); current = current.next();
} else { } else {
break; break;