vgritsenko 2003/12/16 06:06:10
Modified: java/src/org/apache/xindice/core/data Record.java Value.java
Log:
minor tweaks
Revision Changes Path
1.5 +3 -4
xml-xindice/java/src/org/apache/xindice/core/data/Record.java
Index: Record.java
===================================================================
RCS file:
/home/cvs/xml-xindice/java/src/org/apache/xindice/core/data/Record.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- Record.java 7 Aug 2003 20:13:21 -0000 1.4
+++ Record.java 16 Dec 2003 14:06:10 -0000 1.5
@@ -134,7 +134,6 @@
* @return The metadata value
*/
public Object getMetaData(Object name) {
- return meta != null ? meta.get(name)
- : null;
+ return meta != null ? meta.get(name) : null;
}
}
1.8 +4 -7
xml-xindice/java/src/org/apache/xindice/core/data/Value.java
Index: Value.java
===================================================================
RCS file:
/home/cvs/xml-xindice/java/src/org/apache/xindice/core/data/Value.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- Value.java 9 Aug 2003 05:01:56 -0000 1.7
+++ Value.java 16 Dec 2003 14:06:10 -0000 1.8
@@ -100,11 +100,9 @@
public Value(String data) {
try {
-
this.data = data.getBytes("utf-8");
this.len = this.data.length;
} catch (UnsupportedEncodingException e) {
-
throw new XindiceRuntimeException("Java doesn't support UTF-8
encoding", e);
}
}
@@ -119,8 +117,9 @@
byte[] b = new byte[len];
System.arraycopy(data, pos, b, 0, len);
return b;
- } else
+ } else {
return data;
+ }
}
/**
@@ -156,10 +155,8 @@
public final String toString() {
try {
-
return new String(getData(), "utf-8");
} catch (UnsupportedEncodingException e) {
-
throw new XindiceRuntimeException("Java doesn't seem to support
UTF-8!", e);
}
}