HHH-10715 Use the more efficient iterators
This commit is contained in:
parent
e3edcdbe55
commit
8f1873121e
|
@ -47,10 +47,11 @@ public class UpdateBuilder {
|
||||||
sb.append( "update " ).append( entityName ).append( " " ).append( alias );
|
sb.append( "update " ).append( entityName ).append( " " ).append( alias );
|
||||||
sb.append( " set " );
|
sb.append( " set " );
|
||||||
int i = 1;
|
int i = 1;
|
||||||
for ( String property : updates.keySet() ) {
|
for ( java.util.Map.Entry<String, Object> entry : updates.entrySet() ) {
|
||||||
|
final String property = entry.getKey();
|
||||||
final String paramName = generateParameterName();
|
final String paramName = generateParameterName();
|
||||||
sb.append( alias ).append( "." ).append( property ).append( " = " ).append( ":" ).append( paramName );
|
sb.append( alias ).append( "." ).append( property ).append( " = " ).append( ":" ).append( paramName );
|
||||||
updateParamValues.put( paramName, updates.get( property ) );
|
updateParamValues.put( paramName, entry.getValue() );
|
||||||
if ( i < updates.size() ) {
|
if ( i < updates.size() ) {
|
||||||
sb.append( ", " );
|
sb.append( ", " );
|
||||||
}
|
}
|
||||||
|
|
|
@ -87,8 +87,8 @@ public class OsgiServiceUtil implements Stoppable {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void stop() {
|
public void stop() {
|
||||||
for (String key : serviceTrackers.keySet()) {
|
for ( java.util.Map.Entry<String, org.osgi.util.tracker.ServiceTracker> entry : serviceTrackers.entrySet() ) {
|
||||||
serviceTrackers.get( key ).close();
|
entry.getValue().close();
|
||||||
}
|
}
|
||||||
serviceTrackers.clear();
|
serviceTrackers.clear();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue