GUAC-1101: Properly translate to/from NULL parent using the root identifier.
This commit is contained in:
1 parent
0e4507f3d1
commit
ee3f817bbd
1 file changed
+15
-1
+15
-1
@@ -105,12 +105,26 @@ public class MySQLConnection implements Connection, DirectoryObject<ConnectionMo
|
||||
|
||||
@Override
|
||||
public String getParentIdentifier() {
|
||||
return connectionModel.getParentIdentifier();
|
||||
|
||||
// Translate null parent to proper identifier
|
||||
String parentIdentifier = connectionModel.getParentIdentifier();
|
||||
if (parentIdentifier == null)
|
||||
return MySQLConstants.CONNECTION_GROUP_ROOT_IDENTIFIER;
|
||||
|
||||
return parentIdentifier;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setParentIdentifier(String parentIdentifier) {
|
||||
|
||||
// Translate root identifier back into null
|
||||
if (parentIdentifier != null
|
||||
&& parentIdentifier.equals(MySQLConstants.CONNECTION_GROUP_ROOT_IDENTIFIER))
|
||||
parentIdentifier = null;
|
||||
|
||||
connectionModel.setParentID(parentIdentifier);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in new issue
Block a user