mirror of
https://github.com/ebean-orm/ebean.git
synced 2026-11-17 22:56:28 +00:00
#1674 - For ProfileLocation use in constructors trim label <init> to init .... (for safe label)
This commit is contained in:
1 parent
2639e799c5
commit
d32559baf4
3 files changed
+48
-3
No files matched your search
@@ -7,8 +7,19 @@ final class UtilLocation {
|
||||
if (pos == -1) {
|
||||
return shortDescription;
|
||||
} else {
|
||||
return shortDescription.substring(0, pos);
|
||||
return trimInit(shortDescription.substring(0, pos));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Trim constructor init to be "safe" without greater than or less than chars.
|
||||
*/
|
||||
private static String trimInit(String desc) {
|
||||
if (desc.endsWith("<init>")) {
|
||||
// trim to make a safe label
|
||||
return desc.substring(0, desc.length() - 6) + "init";
|
||||
}
|
||||
return desc;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user