Commit 86439d30 authored by Gaston Dombiak's avatar Gaston Dombiak Committed by gato

Replaced String#isEmpty with String#trim#size > 0. It now compiles in Java 5 again.

git-svn-id: http://svn.igniterealtime.org/svn/repos/openfire/trunk@9296 b35dd754-fafc-0310-a699-88a17e54d16e
parent e1db19d7
...@@ -237,7 +237,7 @@ public class LocalMUCUser implements MUCUser { ...@@ -237,7 +237,7 @@ public class LocalMUCUser implements MUCUser {
try { try {
if (packet.getSubject() != null && packet.getSubject().trim().length() > 0 && if (packet.getSubject() != null && packet.getSubject().trim().length() > 0 &&
Message.Type.groupchat == packet.getType() && Message.Type.groupchat == packet.getType() &&
(packet.getBody() == null || packet.getBody().trim().isEmpty())) { (packet.getBody() == null || packet.getBody().trim().length() == 0)) {
// An occupant is trying to change the room's subject // An occupant is trying to change the room's subject
role.getChatRoom().changeSubject(packet, role); role.getChatRoom().changeSubject(packet, role);
......
...@@ -213,7 +213,7 @@ public class SASLAuthentication { ...@@ -213,7 +213,7 @@ public class SASLAuthentication {
new XMPPCallbackHandler()); new XMPPCallbackHandler());
// evaluateResponse doesn't like null parameter // evaluateResponse doesn't like null parameter
byte[] token = new byte[0]; byte[] token = new byte[0];
if (!doc.getText().isEmpty()) { if (doc.getText().length() > 0) {
// If auth request includes a value then validate it // If auth request includes a value then validate it
token = StringUtils.decodeBase64(doc.getText().trim()); token = StringUtils.decodeBase64(doc.getText().trim());
if (token == null) { if (token == null) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment