You are viewing a plain text version of this content. The canonical link for it is here.
Posted to kato-commits@incubator.apache.org by sp...@apache.org on 2009/06/18 12:39:02 UTC
svn commit: r786038 -
/incubator/kato/branches/experimental/maven_restructure/org.apache.kato/kato.tools.katoview/src/main/java/org/apache/kato/katoview/commands/XPathCommand.java
Author: spoole
Date: Thu Jun 18 12:39:02 2009
New Revision: 786038
URL: http://svn.apache.org/viewvc?rev=786038&view=rev
Log:
updated katoview xpath command to deal with null values
Modified:
incubator/kato/branches/experimental/maven_restructure/org.apache.kato/kato.tools.katoview/src/main/java/org/apache/kato/katoview/commands/XPathCommand.java
Modified: incubator/kato/branches/experimental/maven_restructure/org.apache.kato/kato.tools.katoview/src/main/java/org/apache/kato/katoview/commands/XPathCommand.java
URL: http://svn.apache.org/viewvc/incubator/kato/branches/experimental/maven_restructure/org.apache.kato/kato.tools.katoview/src/main/java/org/apache/kato/katoview/commands/XPathCommand.java?rev=786038&r1=786037&r2=786038&view=diff
==============================================================================
--- incubator/kato/branches/experimental/maven_restructure/org.apache.kato/kato.tools.katoview/src/main/java/org/apache/kato/katoview/commands/XPathCommand.java (original)
+++ incubator/kato/branches/experimental/maven_restructure/org.apache.kato/kato.tools.katoview/src/main/java/org/apache/kato/katoview/commands/XPathCommand.java Thu Jun 18 12:39:02 2009
@@ -91,8 +91,10 @@
int count=1;
while (values.hasNext()) {
Object value = values.next();
-
- if (value instanceof String) {
+ if(value==null) {
+ out.println(count+":\tnull");
+ }
+ else if (value instanceof String) {
out.println(count+":\t"+"\""+((String) value)+"\"");
} else if (value instanceof Number) {
out.println(count+":\t"+value.toString());