You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@roller.apache.org by ag...@apache.org on 2006/05/22 18:38:08 UTC
svn commit: r408706 -
/incubator/roller/trunk/src/org/apache/roller/business/hibernate/HibernatePingTargetManagerImpl.java
Author: agilliland
Date: Mon May 22 09:38:07 2006
New Revision: 408706
URL: http://svn.apache.org/viewvc?rev=408706&view=rev
Log:
fixing bug in removePingTarget() method where we weren't properly cleaning up references to the deleted ping target.
also removed old removePingTarget(id) method which is no longer used.
Modified:
incubator/roller/trunk/src/org/apache/roller/business/hibernate/HibernatePingTargetManagerImpl.java
Modified: incubator/roller/trunk/src/org/apache/roller/business/hibernate/HibernatePingTargetManagerImpl.java
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/src/org/apache/roller/business/hibernate/HibernatePingTargetManagerImpl.java?rev=408706&r1=408705&r2=408706&view=diff
==============================================================================
--- incubator/roller/trunk/src/org/apache/roller/business/hibernate/HibernatePingTargetManagerImpl.java (original)
+++ incubator/roller/trunk/src/org/apache/roller/business/hibernate/HibernatePingTargetManagerImpl.java Mon May 22 09:38:07 2006
@@ -61,17 +61,9 @@
}
- public void removePingTarget(String id) throws RollerException {
-
- PingTargetData pingTarget = getPingTarget(id);
-
+ public void removePingTarget(PingTargetData pingTarget) throws RollerException {
// remove contents and then target
this.removePingTargetContents(pingTarget);
- strategy.remove(pingTarget);
- }
-
-
- public void removePingTarget(PingTargetData pingTarget) throws RollerException {
this.strategy.remove(pingTarget);
}
@@ -89,6 +81,10 @@
Criteria criteria = session.createCriteria(PingQueueEntryData.class);
criteria.add(Expression.eq("pingTarget", ping));
List queueEntries = criteria.list();
+ Iterator qIT = queueEntries.iterator();
+ while(qIT.hasNext()) {
+ this.strategy.remove((PingQueueEntryData) qIT.next());
+ }
// Remove the website's auto ping configurations
AutoPingManager autoPingMgr = RollerFactory.getRoller().getAutopingManager();