aboutsummaryrefslogtreecommitdiffstats
path: root/src/eu/siacs/conversations/xmpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/eu/siacs/conversations/xmpp')
-rw-r--r--src/eu/siacs/conversations/xmpp/jingle/JingleCandidate.java4
-rw-r--r--src/eu/siacs/conversations/xmpp/jingle/JingleConnection.java8
-rw-r--r--src/eu/siacs/conversations/xmpp/jingle/JingleInbandTransport.java6
-rw-r--r--src/eu/siacs/conversations/xmpp/jingle/JingleSocks5Transport.java6
-rw-r--r--src/eu/siacs/conversations/xmpp/jingle/stanzas/Content.java2
-rw-r--r--src/eu/siacs/conversations/xmpp/stanzas/streammgmt/AckPacket.java2
-rw-r--r--src/eu/siacs/conversations/xmpp/stanzas/streammgmt/ResumePacket.java2
7 files changed, 15 insertions, 15 deletions
diff --git a/src/eu/siacs/conversations/xmpp/jingle/JingleCandidate.java b/src/eu/siacs/conversations/xmpp/jingle/JingleCandidate.java
index 2874b9a5..3e7c7b68 100644
--- a/src/eu/siacs/conversations/xmpp/jingle/JingleCandidate.java
+++ b/src/eu/siacs/conversations/xmpp/jingle/JingleCandidate.java
@@ -117,9 +117,9 @@ public class JingleCandidate {
Element element = new Element("candidate");
element.setAttribute("cid", this.getCid());
element.setAttribute("host", this.getHost());
- element.setAttribute("port", "" + this.getPort());
+ element.setAttribute("port", Integer.toString(this.getPort()));
element.setAttribute("jid", this.getJid());
- element.setAttribute("priority", "" + this.getPriority());
+ element.setAttribute("priority", Integer.toString(this.getPriority()));
if (this.getType() == TYPE_DIRECT) {
element.setAttribute("type", "direct");
} else if (this.getType() == TYPE_PROXY) {
diff --git a/src/eu/siacs/conversations/xmpp/jingle/JingleConnection.java b/src/eu/siacs/conversations/xmpp/jingle/JingleConnection.java
index 317838fd..a5cc2c49 100644
--- a/src/eu/siacs/conversations/xmpp/jingle/JingleConnection.java
+++ b/src/eu/siacs/conversations/xmpp/jingle/JingleConnection.java
@@ -95,7 +95,7 @@ public class JingleConnection {
BitmapFactory.decodeFile(file.getAbsolutePath(), options);
int imageHeight = options.outHeight;
int imageWidth = options.outWidth;
- message.setBody("" + file.getSize() + "," + imageWidth + ","
+ message.setBody(Long.toString(file.getSize()) + ',' + imageWidth + ','
+ imageHeight);
mXmppConnectionService.databaseBackend.createMessage(message);
mXmppConnectionService.markMessage(message,
@@ -302,7 +302,7 @@ public class JingleConnection {
}
if (supportedFile) {
long size = Long.parseLong(fileSize.getContent());
- message.setBody("" + size);
+ message.setBody(Long.toString(size));
conversation.getMessages().add(message);
if (size <= this.mJingleConnectionManager
.getAutoAcceptFileSize()) {
@@ -630,7 +630,7 @@ public class JingleConnection {
this.transportId = this.mJingleConnectionManager.nextRandomId();
content.setTransportId(this.transportId);
content.ibbTransport().setAttribute("block-size",
- "" + this.ibbBlockSize);
+ Integer.toString(this.ibbBlockSize));
packet.setContent(content);
this.sendJinglePacket(packet);
}
@@ -652,7 +652,7 @@ public class JingleConnection {
Content content = new Content("initiator", "a-file-offer");
content.setTransportId(this.transportId);
content.ibbTransport().setAttribute("block-size",
- "" + this.ibbBlockSize);
+ Integer.toString(this.ibbBlockSize));
answer.setContent(content);
this.sendJinglePacket(answer);
return true;
diff --git a/src/eu/siacs/conversations/xmpp/jingle/JingleInbandTransport.java b/src/eu/siacs/conversations/xmpp/jingle/JingleInbandTransport.java
index 331b53de..cd87552b 100644
--- a/src/eu/siacs/conversations/xmpp/jingle/JingleInbandTransport.java
+++ b/src/eu/siacs/conversations/xmpp/jingle/JingleInbandTransport.java
@@ -59,7 +59,7 @@ public class JingleInbandTransport extends JingleTransport {
Element open = iq.addChild("open", "http://jabber.org/protocol/ibb");
open.setAttribute("sid", this.sessionId);
open.setAttribute("stanza", "iq");
- open.setAttribute("block-size", "" + this.blockSize);
+ open.setAttribute("block-size", Integer.toString(this.blockSize));
this.account.getXmppConnection().sendIqPacket(iq,
new OnIqPacketReceived() {
@@ -134,8 +134,8 @@ public class JingleInbandTransport extends JingleTransport {
iq.setTo(this.counterpart);
Element data = iq.addChild("data",
"http://jabber.org/protocol/ibb");
- data.setAttribute("seq", "" + this.seq);
- data.setAttribute("block-size", "" + this.blockSize);
+ data.setAttribute("seq", Integer.toString(this.seq));
+ data.setAttribute("block-size", Integer.toString(this.blockSize));
data.setAttribute("sid", this.sessionId);
data.setContent(base64);
this.account.getXmppConnection().sendIqPacket(iq,
diff --git a/src/eu/siacs/conversations/xmpp/jingle/JingleSocks5Transport.java b/src/eu/siacs/conversations/xmpp/jingle/JingleSocks5Transport.java
index e476decc..1a8ab9dd 100644
--- a/src/eu/siacs/conversations/xmpp/jingle/JingleSocks5Transport.java
+++ b/src/eu/siacs/conversations/xmpp/jingle/JingleSocks5Transport.java
@@ -58,10 +58,10 @@ public class JingleSocks5Transport extends JingleTransport {
byte[] reply = new byte[2];
outputStream.write(login);
inputStream.read(reply);
+ final String connect = Character.toString('\u0005') + '\u0001' + '\u0000'
+ + '\u0003' + '\u0028' + destination + '\u0000'
+ + '\u0000';
if (Arrays.equals(reply, expectedReply)) {
- String connect = "" + '\u0005' + '\u0001' + '\u0000'
- + '\u0003' + '\u0028' + destination + '\u0000'
- + '\u0000';
outputStream.write(connect.getBytes());
byte[] result = new byte[2];
inputStream.read(result);
diff --git a/src/eu/siacs/conversations/xmpp/jingle/stanzas/Content.java b/src/eu/siacs/conversations/xmpp/jingle/stanzas/Content.java
index 1e8e3fd6..d19e6dfd 100644
--- a/src/eu/siacs/conversations/xmpp/jingle/stanzas/Content.java
+++ b/src/eu/siacs/conversations/xmpp/jingle/stanzas/Content.java
@@ -30,7 +30,7 @@ public class Content extends Element {
"urn:xmpp:jingle:apps:file-transfer:3");
Element offer = description.addChild("offer");
Element file = offer.addChild("file");
- file.addChild("size").setContent("" + actualFile.getSize());
+ file.addChild("size").setContent(Long.toString(actualFile.getSize()));
if (otr) {
file.addChild("name").setContent(actualFile.getName() + ".otr");
} else {
diff --git a/src/eu/siacs/conversations/xmpp/stanzas/streammgmt/AckPacket.java b/src/eu/siacs/conversations/xmpp/stanzas/streammgmt/AckPacket.java
index c936891c..f93b5d87 100644
--- a/src/eu/siacs/conversations/xmpp/stanzas/streammgmt/AckPacket.java
+++ b/src/eu/siacs/conversations/xmpp/stanzas/streammgmt/AckPacket.java
@@ -7,7 +7,7 @@ public class AckPacket extends AbstractStanza {
public AckPacket(int sequence, int smVersion) {
super("a");
this.setAttribute("xmlns", "urn:xmpp:sm:" + smVersion);
- this.setAttribute("h", "" + sequence);
+ this.setAttribute("h", Integer.toString(sequence));
}
}
diff --git a/src/eu/siacs/conversations/xmpp/stanzas/streammgmt/ResumePacket.java b/src/eu/siacs/conversations/xmpp/stanzas/streammgmt/ResumePacket.java
index df039d5a..9cdcfa5e 100644
--- a/src/eu/siacs/conversations/xmpp/stanzas/streammgmt/ResumePacket.java
+++ b/src/eu/siacs/conversations/xmpp/stanzas/streammgmt/ResumePacket.java
@@ -8,7 +8,7 @@ public class ResumePacket extends AbstractStanza {
super("resume");
this.setAttribute("xmlns", "urn:xmpp:sm:" + smVersion);
this.setAttribute("previd", id);
- this.setAttribute("h", "" + sequence);
+ this.setAttribute("h", Integer.toString(sequence));
}
}