abdera-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nathan Beyer (JIRA)" <j...@apache.org>
Subject [jira] Created: (ABDERA-193) [core] AtomDate hardening - clone java.util.Date, make non-null a requirement
Date Mon, 04 Aug 2008 01:25:44 GMT
[core] AtomDate hardening - clone java.util.Date, make non-null a requirement

                 Key: ABDERA-193
                 URL: https://issues.apache.org/jira/browse/ABDERA-193
             Project: Abdera
          Issue Type: Improvement
            Reporter: Nathan Beyer
         Attachments: ABDERA-193.patch

The class AtomDate contains a java.util.Date field and in several cases, the underlying field
can be modified unexpectedly, since java.util.Date is mutable. The patch being attached compensates
for this by cloning the java.util.Date instances to make safe copies. Additionally, the patch
makes non-null values a requirement, which is already required by some of the current code.
There are also a few style tweaks that I believe make the code more clear; use AssertionError
in clone method to indicate it will never happen, replace "GMT" with "UTC" to make the intent
more obvious. The patch also includes a unit test for the code that was changed.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message