mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
#1658 - ENH: Add label to ProfileLocation and use as default query label
This commit is contained in:
@@ -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