mirror of
https://github.com/ebean-orm/ebean.git
synced 2026-11-18 14:58:47 +00:00
#1658 - ENH: Add label to ProfileLocation and use as default query label
This commit is contained in:
1 parent
54534ea7f3
commit
fc032c632b
10 files changed
+65
-8
No files matched your search
@@ -15,6 +15,8 @@ class DProfileLocation implements ProfileLocation {
|
||||
|
||||
private String shortDescription;
|
||||
|
||||
private String label;
|
||||
|
||||
private final int lineNumber;
|
||||
|
||||
DProfileLocation() {
|
||||
@@ -42,12 +44,19 @@ class DProfileLocation implements ProfileLocation {
|
||||
public String obtain() {
|
||||
// atomic assignment so happy with this
|
||||
if (location == null) {
|
||||
location = create();
|
||||
shortDescription = shortDesc(location);
|
||||
final String loc = create();
|
||||
shortDescription = shortDesc(loc);
|
||||
label = UtilLocation.label(shortDescription);
|
||||
location = loc;
|
||||
}
|
||||
return location;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String label() {
|
||||
return label;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String shortDescription() {
|
||||
return shortDescription;
|
||||
|
||||
Reference in new issue
Block a user