Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ice-dev] [ice-build] [eclipse/ice] 1fe14e: ResourceComponent now keeps a copy of the list's s...

Anna,

I just reviewed the code. Are you trying to do this to make it match up with the old way the XML was written? I noticed you have annotated the list names, etc.

	/**
	 * A handle to the source list that is necessary for JAXB to properly
	 * marshal/unmarshal the list of resources.
	 */
	@XmlElementWrapper(name="Resources")
	@XmlElement(name="ICEResource")
	protected BasicEventList<ICEResource> jaxbSourceList;

If you are doing this to preserve the way the XML is written, don't worry about it. I know this update will break the old XML schema, but that is OK as long as it works.

Also, ResourceComponent does not need to implement Component anymore because ListComponent does it. So you should be able to remove accept, update, etc. You can also remove hashCode because ListComponent.hashCode() will do all the work. It also should not need to have its own notifyListeners operation.

The equals operation should only need something like this:
	boolean retVal = false;
	// Check if they are the same reference in memory
	if (otherResourceComponent instanceof ResourceComponent) {
	   retVal = super.equals(otherResourceComponent);
	}
	return retVal;

I also don't think you need copy() since there are no private fields. You should remove it and run the tests to see if it works. (N.B. - You definitely need clone.)

Finally, please clean up this file by removing all <p>,</p>, <!-- begin/end-UML-doc --> and @generated lines. They were put there by RSA so it would know what it was working with, but since we no longer use that tool we don't need them.

Jay

On 02/04/2015 08:15 AM, Jay J. Billings wrote:
Anna,

The ListComponent base class is already storing a reference to the list source for JAXB. Why do you need to do it again on the ResourceComponent?

Jay

On 02/03/2015 05:36 PM, GitHub wrote:
  Branch: refs/heads/anna/postprocessing
  Home:   https://github.com/eclipse/ice
  Commit: 1fe14ebfde9816a862ea8eeadd9d6ada78741d1a
      https://github.com/eclipse/ice/commit/1fe14ebfde9816a862ea8eeadd9d6ada78741d1a
  Author: Anna Wojtowicz <wojtowicza@xxxxxxxx>
  Date:   2015-02-03 (Tue, 03 Feb 2015)

  Changed paths:
    M src/org.eclipse.ice.datastructures/src/org/eclipse/ice/datastructures/form/ResourceComponent.java
    M src/org.eclipse.ice.datastructures/src/org/eclipse/ice/datastructures/resource/ICEResource.java

  Log Message:
  -----------
  ResourceComponent now keeps a copy of the list's source locally for JAXB
to marshal it, which it does correctly now. Fixes bug 459069.

Removed unusued imports from ICEResource.

Signed-off-by: Anna Wojtowicz <wojtowicza@xxxxxxxx>




_______________________________________________
ice-build mailing list
ice-build@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/ice-build

-- 
Jay Jay Billings
Oak Ridge National Laboratory
Twitter Handle: @jayjaybillings


_______________________________________________
ice-dev mailing list
ice-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/ice-dev

-- 
Jay Jay Billings
Oak Ridge National Laboratory
Twitter Handle: @jayjaybillings

Back to the top