我在Eclipse Luna下有一个Java项目,使用EclEmma 2.3.1.201405111647(最新版),它使用Jacoco 0.7.1,它支持Java 8,如更改日志中所述:
"2.3.1版(2014/05/11)
Run Code Online (Sandbox Code Playgroud)Fixed ASM 5.0.1 dependency conflicts with new ASM bundles in Eclipse 4.4 (GitHub #83). Upgrade to JaCoCo 0.7.1 for full Java 8 support.
我现在有以下toString:
@Override
public String toString() {
// [BLOCK0]
if (0 == value) {
return "0B";
}
// [BLOCK1]
final MutableLong val = new MutableLong(value);
final StringBuilder sb = new StringBuilder();
// [BLOCK2]
Arrays.asList(TERA_BYTES, GIGA_BYTES, MEGA_BYTES, KILO_BYTES, BYTES).forEach(unit -> {
// [BLOCK3]
long divider = unit.toBytes(1);
long n = val.longValue() …Run Code Online (Sandbox Code Playgroud)