litesoft
Diff Revisions
949
vs
950
for /trunk/Java/KeyHole/src/org/litesoft/aokeyhole/swing/mains/mementobeans/support/BeanWriter.java
|
@@ -1,7 +1,7 @@ |
1 |
1 |
|
package org.litesoft.aokeyhole.swing.mains.mementobeans.support; |
2 |
2 |
|
|
|
3 |
+ |
import org.litesoft.commonfoundation.base.*; |
3 |
4 |
|
import org.litesoft.commonfoundation.typeutils.*; |
4 |
|
- |
import org.litesoft.commonfoundation.typeutils.Objects; |
5 |
5 |
|
import org.litesoft.core.simpletypes.*; |
6 |
6 |
|
import org.litesoft.textfiledirectory.*; |
7 |
7 |
|
|
|
@@ -38,7 +38,7 @@ |
38 |
38 |
|
return create( pBuilder.getName(), pBuilder.getNotes(), mergedAttributes ); |
39 |
39 |
|
} |
40 |
40 |
|
boolean attributesChanged = convertAndMergeInto( pBeanReader.getAttributeDatas(), pBuilder.getAttributes(), mergedAttributes ); |
41 |
|
- |
if ( attributesChanged || !Objects.areArraysEqual( pBeanReader.getNotes(), pBuilder.getNotes() ) ) { |
|
41 |
+ |
if ( attributesChanged || !Currently.areEqual( pBeanReader.getNotes(), pBuilder.getNotes() ) ) { |
42 |
42 |
|
return update( pBuilder.getName(), pBuilder.getNotes(), mergedAttributes ); |
43 |
43 |
|
} |
44 |
44 |
|
return pBeanReader; |
|
@@ -208,7 +208,7 @@ |
208 |
208 |
|
* @return if there were any attribute changes |
209 |
209 |
|
*/ |
210 |
210 |
|
private boolean convertAndMergeInto( List<AttributeData> pPrevAttributes, List<BeanAttributeBuilder> pNewAttributes, List<AttributeData> pMergedAttributes ) { |
211 |
|
- |
pPrevAttributes = Lists.deNull( pPrevAttributes ); |
|
211 |
+ |
pPrevAttributes = ConstrainTo.notNull( pPrevAttributes ); |
212 |
212 |
|
pNewAttributes = Lists.from( pNewAttributes ); // Copy |
213 |
213 |
|
boolean zChanges = false; |
214 |
214 |
|
int zLastIndex = -1; |