HBASE-10624 Fix 2 new findbugs warnings introduced by HBASE-10598

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1574149 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Zhihong Yu 2014-03-04 17:44:30 +00:00
parent ddfc421a7d
commit bc9834426a
2 changed files with 5 additions and 5 deletions

View File

@ -635,7 +635,7 @@ public class StoreFile {
public Long getMinimumTimestamp() {
return (getReader().timeRangeTracker == null) ?
null :
getReader().timeRangeTracker.minimumTimestamp;
getReader().timeRangeTracker.getMinimumTimestamp();
}
/**
@ -1505,7 +1505,7 @@ public class StoreFile {
}
public long getMaxTimestamp() {
return timeRangeTracker == null ? Long.MAX_VALUE : timeRangeTracker.maximumTimestamp;
return timeRangeTracker == null ? Long.MAX_VALUE : timeRangeTracker.getMaximumTimestamp();
}
}

View File

@ -134,18 +134,18 @@ public class TimeRangeTracker implements Writable {
return maximumTimestamp;
}
public void write(final DataOutput out) throws IOException {
public synchronized void write(final DataOutput out) throws IOException {
out.writeLong(minimumTimestamp);
out.writeLong(maximumTimestamp);
}
public void readFields(final DataInput in) throws IOException {
public synchronized void readFields(final DataInput in) throws IOException {
this.minimumTimestamp = in.readLong();
this.maximumTimestamp = in.readLong();
}
@Override
public String toString() {
public synchronized String toString() {
return "[" + minimumTimestamp + "," + maximumTimestamp + "]";
}
}