Skip to content

Commit f75b921

Browse files
committed
Use static methods via class reference in examples and tests
1 parent 08aaecd commit f75b921

2 files changed

Lines changed: 5 additions & 7 deletions

File tree

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ import static io.github.doblon8.openpnp.capture.OpenPnpCapture.*;
3232
void main() throws Exception {
3333
System.out.println("openpnp-capture version: " + OpenPnpCapture.getLibraryVersion());
3434

35-
setLogLevel(LogLevel.INFO);
36-
installCustomLogFunction((logLevel, message) -> System.out.println("Log [" + logLevel + "]: " + message));
37-
35+
OpenPnpCapture.setLogLevel(LogLevel.INFO);
36+
OpenPnpCapture.installCustomLogFunction((logLevel, message) -> System.out.println("Log [" + logLevel + "]: " + message));
37+
3838
try (var capture = new OpenPnpCapture()) {
3939
var device = capture.getDevices().stream()
4040
.findFirst()

src/test/java/Scratch.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,11 @@
22

33
import javax.imageio.ImageIO;
44

5-
import static io.github.doblon8.openpnp.capture.OpenPnpCapture.*;
6-
75
void main() throws Exception {
86
System.out.println("openpnp-capture version: " + OpenPnpCapture.getLibraryVersion());
97

10-
setLogLevel(LogLevel.INFO);
11-
installCustomLogFunction((logLevel, message) -> System.out.println("Log [" + logLevel + "]: " + message));
8+
OpenPnpCapture.setLogLevel(LogLevel.INFO);
9+
OpenPnpCapture.installCustomLogFunction((logLevel, message) -> System.out.println("Log [" + logLevel + "]: " + message));
1210

1311
try (var capture = new OpenPnpCapture()) {
1412
var device = capture.getDevices().stream()

0 commit comments

Comments
 (0)