We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 719c9e6 commit c706c5bCopy full SHA for c706c5b
dd-java-agent/instrumentation/sofarpc/sofarpc-5.0/build.gradle
@@ -40,9 +40,7 @@ tasks.named('compileLatestDepTestGroovy') {
40
classpath.files.findAll { it.name.contains('sofa') }.each { f ->
41
println " sofa artifact: ${f.name} exists=${f.exists()} size=${f.exists() ? f.size() : 'MISSING'}"
42
if (f.exists() && f.size() < 1_000_000) {
43
- def allBytes = f.bytes
44
- def len = Math.min(256, allBytes.length)
45
- def bytes = allBytes[0..<len]
+ byte[] bytes = Arrays.copyOf(f.bytes, Math.min(256, (int) f.size()))
46
println " first bytes (hex): ${bytes.encodeHex()}"
47
println " first bytes (text): ${new String(bytes).replaceAll('[\\x00-\\x1f\\x7f-\\xff]', '.')}"
48
}
0 commit comments