62abbc2a03c899a79d2f9136ab0bf83ad08a8748
This PR adds a new way to define scoped trace events in Java, using the try-with-resource construct. This makes code simpler to read, and less error-prone.
Before:
```java
try {
TraceSection.begin("name");
// ....
} finally {
TraceSection.end();
}
```
Now:
```java
try (TraceSection e = TraceSection.scoped("name")) {
// ...
}
```
[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
Description
Languages
Dart
75.4%
C++
16.4%
Objective-C++
2.7%
Java
2.7%
Objective-C
0.6%
Other
1.8%