You are viewing a plain text version of this content. The canonical link for it is here.
Posted to slide-dev@jakarta.apache.org by re...@apache.org on 2001/07/06 20:06:10 UTC
cvs commit: jakarta-slide/src/share/org/apache/slide/content NodeRevisionDescriptor.java
remm 01/07/06 11:06:09
Modified: src/share/org/apache/slide/content
NodeRevisionDescriptor.java
Log:
- getLong should not be used here, but I always confuse it with parseLong
and valueOf (which would produce the correct result).
Patch submitted by Christopher Harding <Christopher.Harding at softwareag.com>
Revision Changes Path
1.18 +10 -5 jakarta-slide/src/share/org/apache/slide/content/NodeRevisionDescriptor.java
Index: NodeRevisionDescriptor.java
===================================================================
RCS file: /home/cvs/jakarta-slide/src/share/org/apache/slide/content/NodeRevisionDescriptor.java,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- NodeRevisionDescriptor.java 2001/04/25 01:56:14 1.17
+++ NodeRevisionDescriptor.java 2001/07/06 18:06:07 1.18
@@ -1,7 +1,7 @@
/*
- * $Header: /home/cvs/jakarta-slide/src/share/org/apache/slide/content/NodeRevisionDescriptor.java,v 1.17 2001/04/25 01:56:14 remm Exp $
- * $Revision: 1.17 $
- * $Date: 2001/04/25 01:56:14 $
+ * $Header: /home/cvs/jakarta-slide/src/share/org/apache/slide/content/NodeRevisionDescriptor.java,v 1.18 2001/07/06 18:06:07 remm Exp $
+ * $Revision: 1.18 $
+ * $Date: 2001/07/06 18:06:07 $
*
* ====================================================================
*
@@ -81,7 +81,7 @@
* Node Revision Descriptor class.
*
* @author <a href="mailto:remm@apache.org">Remy Maucherat</a>
- * @version $Revision: 1.17 $
+ * @version $Revision: 1.18 $
*/
public final class NodeRevisionDescriptor implements Serializable, Cloneable {
@@ -745,7 +745,12 @@
* @param creationLength New content length
*/
public void setContentLength(String contentLength) {
- Long contentLengthValue = Long.getLong(contentLength);
+ Long contentLengthValue = null;
+ try {
+ contentLengthValue = new Long(contentLength);
+ } catch (NumberFormatException e) {
+ // Ignore
+ }
if (contentLengthValue == null) {
contentLengthValue = new Long(0);
}