1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-07 16:26:11 +02:00

[187953] empty array should be returned if no persistable children, not null.

This commit is contained in:
David Dykstal 2007-05-24 14:56:49 +00:00
parent f687d1e8e4
commit d86e241758
12 changed files with 17 additions and 14 deletions

View file

@ -491,7 +491,7 @@ public class SystemFilterReference extends SystemReferencingObject implements IA
}
public IRSEPersistableContainer[] getPersistableChildren() {
return new IRSEPersistableContainer[0];
return IRSEPersistableContainer.NO_CHILDREN;
}
}

View file

@ -237,7 +237,7 @@ public class DummyHost extends PlatformObject implements IHost
}
public IRSEPersistableContainer[] getPersistableChildren() {
return new IRSEPersistableContainer[0];
return IRSEPersistableContainer.NO_CHILDREN;
}
public boolean isTainted() {

View file

@ -20,12 +20,14 @@ package org.eclipse.rse.core.model;
/**
* This is the interface for all objects that contain persistent data.
* The objects themselves may not have a persistent form, but can lie in the
* persistence heirarchy and be reconstructed when the persistent form is restored.
* persistence hierarchy and be reconstructed when the persistent form is restored.
* An example of this is the SytemFilterPoolManager, which is itself not persisted, but
* has this interface since it can be reconstructed from its ordering and exists
* in the parent chain from SystemFilterPool to SystemProfile.
*/
public interface IRSEPersistableContainer {
static final IRSEPersistableContainer[] NO_CHILDREN = new IRSEPersistableContainer[0];
/**
* Request a persistence manager to persist this object.
@ -101,15 +103,16 @@ public interface IRSEPersistableContainer {
/**
* Retrieve the parent of this object in the persistence containment hierarchy.
* This is related to, but not necessarily the same as, the model hierarchy.
* @return the parent persistable object. This is null if there is no parent.
* @return the parent persistent object. This is null if there is no parent.
*/
public IRSEPersistableContainer getPersistableParent();
/**
* Retrieves the children of this object in the persistence containment hierarchy.
* This is related to, but not necessarily the same as, the model hierarchy.
* @return the array of persistable children in the order they are to be stored in the
* @return the array of persistent children in the order they are to be stored in the
* persistent form. This is an empty array if there are no children.
* See {@link #NO_CHILDREN}.
*/
public IRSEPersistableContainer[] getPersistableChildren();

View file

@ -179,7 +179,7 @@ public class PropertySet extends RSEPersistableObject implements IPropertySet, I
}
public IRSEPersistableContainer[] getPersistableChildren() {
return new IRSEPersistableContainer[0];
return IRSEPersistableContainer.NO_CHILDREN;
}
public IRSEPersistableContainer getPersistableParent() {

View file

@ -779,7 +779,7 @@ public abstract class AbstractDelegatingConnectorService implements IDelegatingC
{
return conServ.getPersistableChildren();
}
return new IRSEPersistableContainer[0];
return IRSEPersistableContainer.NO_CHILDREN;
}

View file

@ -1651,7 +1651,7 @@ public class SystemFilterPoolManager extends RSEPersistableObject implements ISy
}
public IRSEPersistableContainer[] getPersistableChildren() {
return new IRSEPersistableContainer[0];
return IRSEPersistableContainer.NO_CHILDREN;
}
}

View file

@ -269,6 +269,6 @@ public class SystemFilterPoolReference extends SystemPersistableReferencingObjec
* @see org.eclipse.rse.core.model.IRSEPersistableContainer#getPersistableChildren()
*/
public IRSEPersistableContainer[] getPersistableChildren() {
return new IRSEPersistableContainer[0];
return IRSEPersistableContainer.NO_CHILDREN;
}
}

View file

@ -299,7 +299,7 @@ public class SystemFilterString extends RSEModelObject implements ISystemFilterS
}
public IRSEPersistableContainer[] getPersistableChildren() {
return new IRSEPersistableContainer[0];
return IRSEPersistableContainer.NO_CHILDREN;
}
}

View file

@ -595,7 +595,7 @@ public class SystemHostPool extends RSEModelObject implements ISystemHostPool
}
public IRSEPersistableContainer[] getPersistableChildren() {
return new IRSEPersistableContainer[0];
return IRSEPersistableContainer.NO_CHILDREN;
}
// -------------------------

View file

@ -3115,7 +3115,7 @@ public abstract class SubSystemConfiguration implements ISubSystemConfiguration
}
public IRSEPersistableContainer[] getPersistableChildren() {
return new IRSEPersistableContainer[0];
return IRSEPersistableContainer.NO_CHILDREN;
}
/**

View file

@ -160,7 +160,7 @@ public class UserActionContext extends RSEModelObject implements IUserActionCont
* @see org.eclipse.rse.core.model.IRSEPersistableContainer#getPersistableChildren()
*/
public IRSEPersistableContainer[] getPersistableChildren() {
return new IRSEPersistableContainer[0];
return IRSEPersistableContainer.NO_CHILDREN;
}
/* (non-Javadoc)

View file

@ -219,7 +219,7 @@ public class UserActionModel extends RSEModelObject implements IUserActionModel
* @see org.eclipse.rse.core.model.IRSEPersistableContainer#getPersistableChildren()
*/
public IRSEPersistableContainer[] getPersistableChildren() {
return new IRSEPersistableContainer[0];
return IRSEPersistableContainer.NO_CHILDREN;
}
/* (non-Javadoc)