Skip to content

Commit

Permalink
Fix for #503 Atmosphere Server on Android Compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
jfarcand committed Jul 12, 2012
1 parent da52259 commit 4c18af6
Showing 1 changed file with 14 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -142,24 +142,24 @@ private AtmosphereConfig parse(AtmosphereConfig config, Document document) {
Node attribute = root.getAttributes().item(j);

if (attribute.getNodeName().equals("support-session")) {
atmoHandler.setSupportSession(attribute.getFirstChild().getNodeValue());
atmoHandler.setSupportSession(attribute.getNodeValue());
} else if (attribute.getNodeName().equals("context-root")) {
atmoHandler.setContextRoot(attribute.getFirstChild().getNodeValue());
atmoHandler.setContextRoot(attribute.getNodeValue());
} else if (attribute.getNodeName().equals("class-name")) {
atmoHandler.setClassName(attribute.getFirstChild().getNodeValue());
atmoHandler.setClassName(attribute.getNodeValue());
} else if (attribute.getNodeName().equals("broadcaster")) {
atmoHandler.setBroadcaster(attribute.getFirstChild().getNodeValue());
atmoHandler.setBroadcaster(attribute.getNodeValue());
} else if (attribute.getNodeName().equals("broadcasterCache")) {
atmoHandler.setBroadcasterCache(attribute.getFirstChild().getNodeValue());
atmoHandler.setBroadcasterCache(attribute.getNodeValue());
} else if (attribute.getNodeName().equals("broadcastFilterClasses")) {
String[] values = attribute.getFirstChild().getNodeValue().split(",");
String[] values = attribute.getNodeValue().split(",");
for (String value : values) {
atmoHandler.getBroadcastFilterClasses().add(value);
}
} else if (attribute.getNodeName().equals("comet-support")) {
atmoHandler.setCometSupport(attribute.getFirstChild().getNodeValue());
atmoHandler.setCometSupport(attribute.getNodeValue());
} else if (attribute.getNodeName().equals("interceptorClasses")) {
String[] values = attribute.getFirstChild().getNodeValue().split(",");
String[] values = attribute.getNodeValue().split(",");
for (String value : values) {
atmoHandler.getAtmosphereInterceptorClasses().add(value);
}
Expand All @@ -184,10 +184,10 @@ private AtmosphereConfig parse(AtmosphereConfig config, Document document) {
Node n2 = n.getChildNodes().item(k);

if (n2.getNodeName().equals("param-name")) {
param = n2.getFirstChild().getNodeValue();
param = n2.getNodeValue();
} else if (n2.getNodeName().equals("param-value")) {
if (n2.getFirstChild() != null) {
value = n2.getFirstChild().getNodeValue();
if (n2 != null) {
value = n2.getNodeValue();
}
}

Expand All @@ -205,10 +205,10 @@ private AtmosphereConfig parse(AtmosphereConfig config, Document document) {
Node n2 = n.getChildNodes().item(k);

if (n2.getNodeName().equals("param-name")) {
param = n2.getFirstChild().getNodeValue();
param = n2.getNodeValue();
} else if (n2.getNodeName().equals("param-value")) {
if (n2.getFirstChild() != null) {
value = n2.getFirstChild().getNodeValue();
if (n2 != null) {
value = n2.getNodeValue();
}
}

Expand Down

0 comments on commit 4c18af6

Please sign in to comment.