Closed Bug 468404 Opened 16 years ago Closed 16 years ago

gloda Log4Moz unit testing addition glitch from upgrade [this._formatter is undefined]

Categories

(MailNews Core :: Database, defect)

defect
Not set
minor

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: asuth, Assigned: asuth)

Details

Attachments

(1 file)

Bug 467087 upgraded gloda, and even though I went into the review knowing to look for this, I foolishly missed it.  We used to depend on _formatter existing from the style of inheritance used; that went away, so we need to create one.  I'm updating the socket appender to the idiom at the same time.

This only affects unit tests that fail, which theoretically shouldn't happen, but of course does happen.

The error tends to look like:
"Bailing on job (at file:///buildbot/trunk-unix/build/objdir-tb/mozilla/dist/bin/modules/gloda/log4moz.js:414) because: TypeError: this._formatter is undefined"
Attachment #351859 - Flags: review?(bugzilla)
Comment on attachment 351859 [details] [diff] [review]
v1 fix throwing appender's formatter issue, fix up socket appender at the same time

>-  this._formatter = formatter;
>+  this._formatter = formatter? formatter : new BasicFormatter();

nit: space before the question mark please (both lines changed)
Attachment #351859 - Flags: review?(bugzilla) → review+
committed: http://hg.mozilla.org/comm-central/rev/fad4bc350fa7

The nit was not addressed because that style decision was made upstream (and in fact the lines in questions are copied from upstream).
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
(In reply to comment #2)
> The nit was not addressed because that style decision was made upstream (and in
> fact the lines in questions are copied from upstream).

IMHO not the normal way mailnews does these.
You need to log in before you can comment on or make changes to this bug.