Omaha #5198 class cast exception from String to Long Fixed

Former-commit-id: 97bf5c4444a275555582386dfeea03d5df3ffd80
This commit is contained in:
Dave Hladky 2016-02-08 11:11:17 -06:00
parent d60d986d8b
commit d23f3a2967
2 changed files with 7 additions and 2 deletions

View file

@ -39,6 +39,7 @@ import com.raytheon.uf.edex.registry.federation.ReplicationEvent;
* 2/19/2014 2769 bphillip Initial Creation
* 8/27/2014 3560 bphillip Added query by event time method
* 5/11/2015 4448 bphillip Separated EBXML Registry from Data Delivery
* 8 Feb, 2016 5198 dhladky Class cast for String expecting Long fixed
* </pre>
*
* @author bphillip
@ -67,7 +68,7 @@ public class ReplicationEventDao extends
+ "%");
}
public List<ReplicationEvent> getEventsBeforeTime(String time) {
public List<ReplicationEvent> getEventsBeforeTime(Long time) {
return this.executeHQLQuery(GET_EVENTS_BY_TIME, "eventTime", time);
}
}

View file

@ -175,6 +175,7 @@ import com.raytheon.uf.edex.security.SecurityConfiguration;
* 5/29/2015 4448 bphillip Added default user to registry on startup
* 10/20/2015 4992 dhladky Improve error handling.
* Nov 12, 2015 4834 njensen Changed LocalizationOpFailedException to LocalizationException
* 8 Feb, 2016 5198 dhladky Class cast for String expecting Long fixed
*
* </pre>
*
@ -660,8 +661,11 @@ public class RegistryFederationManager implements IRegistryFederationManager,
public void updateRegistryEvents(
@PathParam("registryId") String registryId,
@PathParam("time") String time) {
Long lTime= Long.parseLong(time);
for (ReplicationEvent event : replicationEventDao
.getEventsBeforeTime(time)) {
.getEventsBeforeTime(lTime)) {
event.addReplicatedTo(registryId);
replicationEventDao.update(event);
}