#1673 - ENH: Support ProfileLocation on DtoQuery including via orm query.asDto()

This commit is contained in:
rob bygrave committed 2019-04-12 02:01:01 +12:00
1 parent 46c66b7169
commit 2639e799c5
14 files changed
+117 -35

No files matched your search

@@ -42,11 +42,12 @@ class DProfileLocation implements ProfileLocation {
@Override
public String obtain() {
// atomic assignment so happy with this
// atomic assignments so happy enough with this (racing but atomic)
if (location == null) {
final String loc = create();
shortDescription = shortDesc(loc);
label = UtilLocation.label(shortDescription);
final String shortDesc = shortDesc(loc);
label = UtilLocation.label(shortDesc);
shortDescription = shortDesc;
location = loc;
}
return location;
@@ -63,6 +64,7 @@ class DProfileLocation implements ProfileLocation {
}
private String create() {
// relatively expensive but we only do it once per profile location
StackTraceElement[] trace = Thread.currentThread().getStackTrace();
for (int i = 3; i < trace.length; i++) {
if (!trace[i].getClassName().startsWith(IO_EBEAN)) {