refs #2316: Exception aggregating Storage Usage Records
https://support.d4science.org/issues/2316 added trace log git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-publishing/document-store-lib@124341 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
ccc336a519
commit
2b0ee63840
|
@ -11,12 +11,16 @@ import java.util.Set;
|
|||
import org.gcube.documentstore.exception.NotAggregatableRecordsExceptions;
|
||||
import org.gcube.documentstore.records.AggregatedRecord;
|
||||
import org.gcube.documentstore.records.Record;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
* @author Luca Frosini (ISTI - CNR) http://www.lucafrosini.com/
|
||||
*/
|
||||
public class AggregationUtility<T extends AggregatedRecord<T,?>> {
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(AggregationUtility.class);
|
||||
|
||||
protected T t;
|
||||
protected Set<String> aggregationFields;
|
||||
protected Set<String> neededFields;
|
||||
|
@ -91,10 +95,12 @@ public class AggregationUtility<T extends AggregatedRecord<T,?>> {
|
|||
@SuppressWarnings("rawtypes")
|
||||
Comparable thisValueComparable = (Comparable) thisValue;
|
||||
if(recordValueComparable.compareTo(thisValueComparable)!=0){
|
||||
logger.trace("{} != {}", recordValueComparable, thisValueComparable);
|
||||
return false;
|
||||
}
|
||||
}else{
|
||||
if(recordValue.hashCode()!=this.hashCode()){
|
||||
logger.trace("{} != {}", recordValue, thisValue);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue