From 7797d98559de190fca9a52fcbe0e6a3157d0ef3a Mon Sep 17 00:00:00 2001 From: Radovan Semancik Date: Fri, 22 Mar 2019 11:28:01 +0100 Subject: [PATCH] Some cleanup --- .../xml/ns/_public/types_3/ItemDeltaType.java | 47 +++---------------- 1 file changed, 6 insertions(+), 41 deletions(-) diff --git a/infra/prism-api/src/main/java/com/evolveum/prism/xml/ns/_public/types_3/ItemDeltaType.java b/infra/prism-api/src/main/java/com/evolveum/prism/xml/ns/_public/types_3/ItemDeltaType.java index a7c56efc360..ced5b48d984 100644 --- a/infra/prism-api/src/main/java/com/evolveum/prism/xml/ns/_public/types_3/ItemDeltaType.java +++ b/infra/prism-api/src/main/java/com/evolveum/prism/xml/ns/_public/types_3/ItemDeltaType.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2015 Evolveum + * Copyright (c) 2010-2019 Evolveum * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,13 +14,6 @@ * limitations under the License. */ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2012.05.20 at 05:41:15 PM CEST -// - package com.evolveum.prism.xml.ns._public.types_3; @@ -51,41 +44,14 @@ /** + * + * THIS IS NOT A GENERATED CLASS. It was heavily modified after it was originally generated long time ago. * * Describe a change to a single attribute. * In this case the path expression used in the "property" * attribute must select exactly one property. * * TODO: this should be renamed to ItemDeltaType - * - * - *

Java class for ItemDeltaType complex type. - * - *

The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="ItemDeltaType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element name="modificationType" type="{http://prism.evolveum.com/xml/ns/public/types-3}ModificationTypeType"/>
- *         <element name="path" type="{http://prism.evolveum.com/xml/ns/public/types-3}XPathType" minOccurs="0"/>
- *         <element name="value">
- *           <complexType>
- *             <complexContent>
- *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *                 <sequence>
- *                   <any processContents='lax' maxOccurs="unbounded" minOccurs="0"/>
- *                 </sequence>
- *               </restriction>
- *             </complexContent>
- *           </complexType>
- *         </element>
- *       </sequence>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
*/ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "ItemDeltaType", propOrder = { @@ -299,11 +265,10 @@ public ItemDeltaType clone() { ItemDeltaType clone = new ItemDeltaType(); clone.setModificationType(getModificationType()); clone.setPath(getPath()); //TODO clone path - // If not to clone inside iteration, then in clone object would be an origin raw objects and manipulations with - // clones wail take effect on origin objects. For example parsing while taking data from raw objects. - // In our case it have bad side effect - equals doesn't work. + // Proper cloning of inner raw values. + List cloneValue = clone.getValue(); for (RawType rawType : getValue()) { - clone.getValue().add(rawType.clone()); + cloneValue.add(rawType.clone()); } // delta.setValue(value != null ? value.clone() : null); clone.getEstimatedOldValue().addAll(getEstimatedOldValue());