"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "moskito-core/src/main/java/net/anotheria/moskito/core/tag/Tag.java" between
moskito-moskito-2.9.3.tar.gz and moskito-moskito-2.10.0.tar.gz

About: MoSKito (Monitoring System Kit) is a framework for java application monitoring. Sources.

Tag.java  (moskito-moskito-2.9.3):Tag.java  (moskito-moskito-2.10.0)
package net.anotheria.moskito.core.tag; package net.anotheria.moskito.core.tag;
import net.anotheria.moskito.core.config.MoskitoConfigurationHolder; import net.anotheria.moskito.core.config.MoskitoConfigurationHolder;
import java.util.LinkedHashMap; import java.util.LinkedHashMap;
import java.util.Map; import java.util.Map;
import java.util.Objects;
import java.util.concurrent.locks.ReadWriteLock; import java.util.concurrent.locks.ReadWriteLock;
import java.util.concurrent.locks.ReentrantReadWriteLock; import java.util.concurrent.locks.ReentrantReadWriteLock;
/** /**
* Tag. * Tag.
* *
* @author esmakula * @author esmakula
*/ */
public class Tag implements Comparable<Tag> { public class Tag implements Comparable<Tag> {
skipping to change at line 94 skipping to change at line 95
values.put(lastValue, 1); values.put(lastValue, 1);
} finally { } finally {
lock.writeLock().unlock(); lock.writeLock().unlock();
} }
} }
@Override @Override
public int compareTo(Tag o) { public int compareTo(Tag o) {
if (getType().equals(o.getType())) int typeCompare = getType().compareTo(o.getType());
return getName().compareTo(o.getName()); return typeCompare != 0 ?
return getType().compareTo(o.getType()); typeCompare : getName().compareTo(o.getName());
}
@Override
public boolean equals(Object obj) {
return getType()==((Tag)obj).getType() &&
getName().equals(((Tag)obj).getName());
}
@Override
public int hashCode() {
return Objects.hash(name, type, source);
} }
} }
 End of changes. 2 change blocks. 
3 lines changed or deleted 15 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)