add 'isSafe' to FqNameUnsafe
This commit is contained in:
@@ -62,7 +62,7 @@ public class FqName extends FqNameBase {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static boolean isValidAfterUnsafeCheck(@NotNull String qualifiedName) {
|
/*package*/ static boolean isValidAfterUnsafeCheck(@NotNull String qualifiedName) {
|
||||||
// TODO: There's a valid name with escape char ``
|
// TODO: There's a valid name with escape char ``
|
||||||
return qualifiedName.indexOf('<') < 0;
|
return qualifiedName.indexOf('<') < 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -91,6 +91,13 @@ public class FqNameUnsafe extends FqNameBase {
|
|||||||
return fqName;
|
return fqName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isSafe() {
|
||||||
|
if (safe != null) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return FqName.isValidAfterUnsafeCheck(getFqName());
|
||||||
|
}
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
public FqName toSafe() {
|
public FqName toSafe() {
|
||||||
if (safe != null) {
|
if (safe != null) {
|
||||||
|
|||||||
Reference in New Issue
Block a user