fix total offset error
This commit is contained in:
parent
47e205883c
commit
bdf78cad79
|
@ -4397,7 +4397,7 @@ public class InstanceValidator extends BaseValidator implements IResourceValidat
|
|||
// this method is reentrant, but also the right place to tell the user what is going on if it's the root.
|
||||
// if we're not at the root, we don't report progress
|
||||
pctOwned = true;
|
||||
pct = new PercentageTracker(resource.countDescendents(), resource.fhirType(), defn.getUrl());
|
||||
pct = new PercentageTracker(resource.countDescendents()+1, resource.fhirType(), defn.getUrl());
|
||||
}
|
||||
if (BUNDLE.equals(element.fhirType())) {
|
||||
if (debug) {
|
||||
|
|
|
@ -25,11 +25,14 @@ public class PercentageTracker {
|
|||
if (e.getInstanceId() != instance) {
|
||||
e.setInstanceId(instance);
|
||||
current++;
|
||||
int pct = (current*100) / total;
|
||||
if (pct > last + 5) {
|
||||
while (last + 5 < pct) {
|
||||
int pct = total == 0 ? 0: (current*100) / total;
|
||||
if (pct > last + 2) {
|
||||
while (last + 2 < pct) {
|
||||
System.out.print(".");
|
||||
last = last + 5;
|
||||
last = last + 2;
|
||||
if (last % 20 == 0) {
|
||||
System.out.print(""+last);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue