Skip to content

Commit 5860938

Browse files
committed
HBX-2877: Work around the deprecated method 'org.hibernate.mapping.Component#getPropertyIterator()'
Signed-off-by: Koen Aers <[email protected]>
1 parent ccd4420 commit 5860938

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

test/common/src/main/java/org/hibernate/tool/jdbc2cfg/CompositeId/TestCase.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ public void testPossibleKeyManyToOne() {
139139
assertTrue(identifierProperty.getValue() instanceof Component);
140140
Component cmpid = (Component) identifierProperty.getValue();
141141
assertEquals(2, cmpid.getPropertySpan() );
142-
Iterator<?> iter = cmpid.getPropertyIterator();
142+
Iterator<?> iter = cmpid.getProperties().iterator();
143143
Property id = (Property) iter.next();
144144
Property extraId = (Property) iter.next();
145145
assertEquals(
@@ -168,7 +168,7 @@ public void testKeyProperty() {
168168
assertTrue(identifierProperty.getValue() instanceof Component);
169169
Component cmpid = (Component) identifierProperty.getValue();
170170
assertEquals(2, cmpid.getPropertySpan() );
171-
Iterator<?> iter = cmpid.getPropertyIterator();
171+
Iterator<?> iter = cmpid.getProperties().iterator();
172172
Property id = (Property)iter.next();
173173
Property extraId = (Property)iter.next();
174174
if ("extraId".equals(id.getName())) {

test/common/src/main/java/org/hibernate/tool/jdbc2cfg/KeyPropertyCompositeId/TestCase.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ public void testPossibleKeyManyToOne() {
129129
assertTrue(identifierProperty.getValue() instanceof Component);
130130
Component cmpid = (Component) identifierProperty.getValue();
131131
assertEquals(2, cmpid.getPropertySpan());
132-
Iterator<?> iter = cmpid.getPropertyIterator();
132+
Iterator<?> iter = cmpid.getProperties().iterator();
133133
Property id = (Property) iter.next();
134134
Property extraId = (Property) iter.next();
135135
assertEquals(
@@ -155,7 +155,7 @@ public void testKeyProperty() {
155155
assertTrue(identifierProperty.getValue() instanceof Component);
156156
Component cmpid = (Component) identifierProperty.getValue();
157157
assertEquals(2, cmpid.getPropertySpan());
158-
Iterator<?> iter = cmpid.getPropertyIterator();
158+
Iterator<?> iter = cmpid.getProperties().iterator();
159159
Property id = (Property)iter.next();
160160
Property extraId = (Property)iter.next();
161161
if ("extraId".equals(id.getName())) {

test/nodb/src/test/java/org/hibernate/tool/hbm2x/Hbm2JavaTest/TestCase.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ public void testUseRawTypeNullability() {
296296
"wrappers should be used by default");
297297
pc = metadata.getEntityBinding( "org.hibernate.tool.hbm2x.Hbm2JavaTest.Customer" );
298298
Component identifier = (Component) pc.getIdentifier();
299-
assertFalse(((Property) identifier.getPropertyIterator().next() )
299+
assertFalse(((Property) identifier.getProperties().iterator().next() )
300300
.getValue().isNullable() );
301301
assertEquals( "long", c2j.getJavaTypeName( property, false ) );
302302
}

0 commit comments

Comments
 (0)