Skip to content

Commit ec51570

Browse files
committed
Do not raise an exception when a duplicate modification is seen (#2470)
1 parent cfb7323 commit ec51570

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

server/src/com/thoughtworks/go/server/persistence/MaterialRepository.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
import org.hibernate.criterion.*;
4242
import org.hibernate.type.LongType;
4343
import org.hibernate.type.StringType;
44+
import org.slf4j.Logger;
4445
import org.slf4j.LoggerFactory;
4546
import org.springframework.orm.hibernate3.HibernateCallback;
4647
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
@@ -59,7 +60,7 @@
5960
* @understands how to store and retrieve Materials from the database
6061
*/
6162
public class MaterialRepository extends HibernateDaoSupport {
62-
private static final org.slf4j.Logger LOGGER = LoggerFactory.getLogger(MaterialRepository.class.getName());
63+
private static final Logger LOGGER = LoggerFactory.getLogger(MaterialRepository.class.getName());
6364

6465
private final GoCache goCache;
6566
private final TransactionSynchronizationManager transactionSynchronizationManager;
@@ -849,7 +850,7 @@ public <T> boolean isMet(T item) {
849850
}
850851
}
851852
if (!newChanges.isEmpty() && list.isEmpty()) {
852-
throw new RuntimeException("All modifications already exist in db: " + revisions);
853+
LOGGER.debug("All modifications already exist in db [{}]", revisions);
853854
}
854855
if (!matchingRevisionsFromDb.isEmpty()) {
855856
LOGGER.info("Saving revisions for material [{}] after removing the following duplicates {}",

0 commit comments

Comments
 (0)