jon * [[EMAIL PROTECTED]] wrote:
> on 1/4/00 4:29 PM, Christopher Elkins <[EMAIL PROTECTED]> wrote:
>
> > Make sure these exist in your local props file (with valid strings, of
> > course),
> > and the NPE _should_ go away (and Turbine should be just peachy again).
>
> cool! that also fixed a problem i was having with jyve on java.apache.org.
> ;-)
>
> i'm an idiot for not thinking of that first. ;-) (especially since that has
> bitten me before)
>
> Great job Christopher!
>
> -jon
>
Cool. Glad to hear it! Here's some more info:
The NPE occurs because RunData was passing a null value to the StringElement
constructor. It seems ECS _really_ didn't like this null value when it came
time to output the tag. Doesn't it make sense that a StringElement should
consider null values the same as null-strings?
Attached below is a trivial patch that might help prevent future problems.
True, it falls into the realm of "defensive programming", but maybe that's
okay considering how many people got bit by this.
(I know it's probably more appropriate to post this to the ECS list, but I
also know there are a few people here who could commit it just the same.)
--
Christopher Elkins
--
Index: StringElement.java
===================================================================
RCS file: /products/cvs/master/ecs/src/java/org/apache/ecs/StringElement.java,v
retrieving revision 1.2
diff -r1.2 StringElement.java
80c80,83
< setTagText(string);
---
> if (string != null)
> setTagText(string);
> else
> setTagText("");
------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Problems?: [EMAIL PROTECTED]