Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add a debug message when comparing instances of different types
  • Loading branch information
jlsalmon committed Jun 9, 2016
commit c173dafc99a6abc12c1aee4ebabb665fa36ac245
6 changes: 6 additions & 0 deletions src/main/java/de/danielbechler/diff/access/Instances.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
import de.danielbechler.util.Assert;
import de.danielbechler.util.Classes;
import de.danielbechler.util.Collections;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.Collection;
import java.util.Map;
Expand All @@ -28,6 +30,7 @@

public class Instances
{
private static final Logger logger = LoggerFactory.getLogger(Instances.class);
private final Accessor sourceAccessor;
private final Object working;
private final Object base;
Expand Down Expand Up @@ -225,6 +228,9 @@ else if (sourceAccessorType != null)
// special handling for beans and arrays should go here
}
}

logger.info("Detected instances of different types " + types + ". " +
"Instances should normally either be null or have the exact same type.");
return Object.class;
}

Expand Down