look it's a bugfix!
This commit is contained in:
parent
1d9af6ef1f
commit
53f7d2e16e
|
@ -25,11 +25,7 @@ public class JavaSensorsConsumer implements ConfigurationConsumer {
|
|||
ConfigField configField = iterator.cf;
|
||||
ConfigField next = iterator.next;
|
||||
|
||||
if (configField.isBit()) {
|
||||
// do not support bits for now but need to account for size
|
||||
tsPosition += configField.getSize(next);
|
||||
return tsPosition;
|
||||
}
|
||||
if (!configField.isBit()) {
|
||||
sb.append(configField.getName()).append("(");
|
||||
|
||||
String string = readerState.variableRegistry.applyVariables(configField.getComment());
|
||||
|
@ -56,8 +52,10 @@ public class JavaSensorsConsumer implements ConfigurationConsumer {
|
|||
sb.append("\n");
|
||||
|
||||
|
||||
}
|
||||
tsPosition += configField.getSize(next);
|
||||
// this value would be consumed by UsagesReader
|
||||
// todo: too many variables that's fragile shall we move tsPosition to iterator state?
|
||||
sensorTsPosition = tsPosition;
|
||||
|
||||
return tsPosition;
|
||||
|
|
|
@ -53,6 +53,6 @@ public class JavaSensorsConsumerTest {
|
|||
JavaSensorsConsumer javaSensorsConsumer = new JavaSensorsConsumer();
|
||||
state.readBufferedReader(outputChannels, javaSensorsConsumer);
|
||||
|
||||
assertEquals(0, javaSensorsConsumer.sensorTsPosition);
|
||||
assertEquals(4, javaSensorsConsumer.sensorTsPosition);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue