Issue Details (XML | Word | Printable)

Key: NUCMONGODB-116
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Trivial Trivial
Assignee: Unassigned
Reporter: Igor Tochansky
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
DataNucleus Store MongoDB

argument to logger in MongoDBPersistenceHandler.fetchObject should be String not StringBuffer

Created: 04/Jan/13 05:04 PM   Updated: 01/Feb/13 07:42 AM   Resolved: 07/Jan/13 10:55 AM
Component/s: Persistence
Affects Version/s: 3.2.0.m2, 3.2.0.release
Fix Version/s: 3.2.0.m3

Datastore: MongoDB
Severity: Development


 Description  « Hide
MongoDBPersistenceHandler.fetchObject has the following code:
// Debug information about what we are retrieving
StringBuffer str = new StringBuffer("Fetching object \"");
// other code
NucleusLogger.DATASTORE_RETRIEVE.debug(str);

Some loggers do not convert StringBuffer to String and fail.
For example, log4mongo fails.

Probably, it would be better to have
NucleusLogger.DATASTORE_RETRIEVE.debug(str.toString());

Andy Jefferson added a comment - 07/Jan/13 10:50 AM
Update title to make sense

Andy Jefferson made changes - 07/Jan/13 10:50 AM
Field Original Value New Value
Summary MongoDBPersistenceHandler.fetchObject argument to logger in MongoDBPersistenceHandler.fetchObject should be String not StringBuffer
Priority Minor [ 4 ] Trivial [ 5 ]
Andy Jefferson made changes - 07/Jan/13 10:55 AM
Status Open [ 1 ] Resolved [ 5 ]
Fix Version/s 3.2.0.m3 [ 11841 ]
Resolution Fixed [ 1 ]
Andy Jefferson made changes - 01/Feb/13 07:42 AM
Status Resolved [ 5 ] Closed [ 6 ]