Commit 5b0e0c92 authored by Matt Tucker's avatar Matt Tucker Committed by matt

Formatting.


git-svn-id: http://svn.igniterealtime.org/svn/repos/messenger/trunk@922 b35dd754-fafc-0310-a699-88a17e54d16e
parent 919511cd
...@@ -267,8 +267,7 @@ public class XPPPacketReader { ...@@ -267,8 +267,7 @@ public class XPPPacketReader {
int type = -1; int type = -1;
type = pp.nextToken(); type = pp.nextToken();
switch (type) { switch (type) {
case XmlPullParser.PROCESSING_INSTRUCTION: case XmlPullParser.PROCESSING_INSTRUCTION: {
{
String text = pp.getText(); String text = pp.getText();
int loc = text.indexOf(" "); int loc = text.indexOf(" ");
if (loc >= 0) { if (loc >= 0) {
...@@ -278,16 +277,14 @@ public class XPPPacketReader { ...@@ -278,16 +277,14 @@ public class XPPPacketReader {
document.addProcessingInstruction(text, ""); document.addProcessingInstruction(text, "");
break; break;
} }
case XmlPullParser.COMMENT: case XmlPullParser.COMMENT: {
{
if (parent != null) if (parent != null)
parent.addComment(pp.getText()); parent.addComment(pp.getText());
else else
document.addComment(pp.getText()); document.addComment(pp.getText());
break; break;
} }
case XmlPullParser.CDSECT: case XmlPullParser.CDSECT: {
{
String text = pp.getText(); String text = pp.getText();
if (parent != null) { if (parent != null) {
parent.addCDATA(text); parent.addCDATA(text);
...@@ -300,8 +297,7 @@ public class XPPPacketReader { ...@@ -300,8 +297,7 @@ public class XPPPacketReader {
break; break;
} }
case XmlPullParser.ENTITY_REF: case XmlPullParser.ENTITY_REF: {
{
String text = pp.getText(); String text = pp.getText();
if (parent != null) { if (parent != null) {
parent.addText(text); parent.addText(text);
...@@ -313,13 +309,10 @@ public class XPPPacketReader { ...@@ -313,13 +309,10 @@ public class XPPPacketReader {
} }
break; break;
} }
case XmlPullParser.END_DOCUMENT: {
case XmlPullParser.END_DOCUMENT:
{
return document; return document;
} }
case XmlPullParser.START_TAG: case XmlPullParser.START_TAG: {
{
QName qname = (pp.getPrefix() == null) ? df.createQName(pp.getName(), pp.getNamespace()) : df.createQName(pp.getName(), pp.getPrefix(), pp.getNamespace()); QName qname = (pp.getPrefix() == null) ? df.createQName(pp.getName(), pp.getNamespace()) : df.createQName(pp.getName(), pp.getPrefix(), pp.getNamespace());
Element newElement = null; Element newElement = null;
if ("jabber:client".equals(qname.getNamespaceURI())) { if ("jabber:client".equals(qname.getNamespaceURI())) {
...@@ -348,8 +341,7 @@ public class XPPPacketReader { ...@@ -348,8 +341,7 @@ public class XPPPacketReader {
count++; count++;
break; break;
} }
case XmlPullParser.END_TAG: case XmlPullParser.END_TAG: {
{
if (parent != null) { if (parent != null) {
parent = parent.getParent(); parent = parent.getParent();
} }
...@@ -359,8 +351,7 @@ public class XPPPacketReader { ...@@ -359,8 +351,7 @@ public class XPPPacketReader {
} }
break; break;
} }
case XmlPullParser.TEXT: case XmlPullParser.TEXT: {
{
String text = pp.getText(); String text = pp.getText();
if (parent != null) { if (parent != null) {
parent.addText(text); parent.addText(text);
...@@ -399,7 +390,6 @@ public class XPPPacketReader { ...@@ -399,7 +390,6 @@ public class XPPPacketReader {
} }
} }
/* /*
* Redistribution and use of this software and associated documentation * Redistribution and use of this software and associated documentation
* ("Software"), with or without modification, are permitted provided * ("Software"), with or without modification, are permitted provided
......
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