You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@shindig.apache.org by zh...@apache.org on 2010/07/01 21:27:05 UTC
svn commit: r959753 -
/shindig/trunk/java/common/src/main/java/org/apache/shindig/config/JsonContainerConfig.java
Author: zhoresh
Date: Thu Jul 1 19:27:04 2010
New Revision: 959753
URL: http://svn.apache.org/viewvc?rev=959753&view=rev
Log:
Fix comperison name
http://codereview.appspot.com/1704045/show
Modified:
shindig/trunk/java/common/src/main/java/org/apache/shindig/config/JsonContainerConfig.java
Modified: shindig/trunk/java/common/src/main/java/org/apache/shindig/config/JsonContainerConfig.java
URL: http://svn.apache.org/viewvc/shindig/trunk/java/common/src/main/java/org/apache/shindig/config/JsonContainerConfig.java?rev=959753&r1=959752&r2=959753&view=diff
==============================================================================
--- shindig/trunk/java/common/src/main/java/org/apache/shindig/config/JsonContainerConfig.java (original)
+++ shindig/trunk/java/common/src/main/java/org/apache/shindig/config/JsonContainerConfig.java Thu Jul 1 19:27:04 2010
@@ -48,6 +48,8 @@ import java.util.logging.Logger;
import java.util.logging.Level;
import java.util.regex.Pattern;
+import javax.annotation.Nullable;
+
import javax.el.ELContext;
import javax.el.ELException;
import javax.el.ValueExpression;
@@ -86,7 +88,7 @@ public class JsonContainerConfig extends
*/
@Inject
public JsonContainerConfig(@Named("shindig.containers.default") String containers,
- @Named("shindig.port") String port,
+ @Nullable @Named("shindig.port") String port,
Expressions expressions)
throws ContainerConfigException {
this.expressions = expressions;
@@ -119,7 +121,7 @@ public class JsonContainerConfig extends
configEntry.setValue(value);
}
}
-
+
@Override
public Collection<String> getContainers() {
return Collections.unmodifiableSet(config.keySet());
@@ -389,7 +391,7 @@ public class JsonContainerConfig extends
public String toString() {
return JsonSerializer.serialize(config);
}
-
+
private Object evaluateAll(Object value) {
if (value instanceof CharSequence) {
return value.toString();
@@ -399,14 +401,14 @@ public class JsonContainerConfig extends
for (Map.Entry<?, ?> entry : mapValue.entrySet()) {
newMap.put(entry.getKey(), evaluateAll(entry.getValue()));
}
-
+
return newMap.build();
} else if (value instanceof List<?>) {
- ImmutableList.Builder<Object> newList = ImmutableList.builder();
+ ImmutableList.Builder<Object> newList = ImmutableList.builder();
for (Object entry : (List<?>) value) {
newList.add(evaluateAll(entry));
}
-
+
return newList.build();
} else {
return value;