Bug 72 : DefaultAutoFetchManager creates CallStack with a dummy element when main() method has...
Priority 
High
Reported Version 
 
Logged By 
Rob
Status 
Fixed
Fixed Version 
1.0.3
Assigned To 
 
Product 
Ebean - core
Duplicate Of 
 
Created 
17/02/2009
Updated 
17/02/2009
Type 
Bug
 
Attachments 
No attachments

This code means that DefaultAutoFetchManager will create a call stack with only the dummy element in it.

public static void main(String[] args) {

EbeanServer server = Ebean.getServer(null);

Query q2 = server.createQuery(User.class);
server.findList(q2, null);
}

 
Rob 17 Feb 07:47
Effect

This has the effect of making the AutoFetch query tuning not work for this scenario.

Typically you could hit this scenario when writing test code in main methods (which is a reasonable way to test).

Rob 17 Feb 07:50
Fixed in v1.0.3

The fix is to change DefaultAutoFetchManager so that it is smarter about trimming the stack elements.

We want to trim the avaje ebean parts of the stack trace so that the first element in the CallStack is application code.

Fixed in v1.0.3.

woResponse

Upload a file