Skip to content

Commit

Permalink
k2
Browse files Browse the repository at this point in the history
  • Loading branch information
Hummel009 committed Apr 27, 2024
1 parent 03f33ca commit d6b95d2
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import com.sun.jna.platform.win32.User32;
import com.sun.jna.win32.W32APIOptions;

@SuppressWarnings("FunctionName")
@SuppressWarnings("all")
interface ExUser32 extends User32 {
ExUser32 INSTANCE = Native.load("user32", ExUser32.class, W32APIOptions.DEFAULT_OPTIONS);

Expand Down
2 changes: 1 addition & 1 deletion appJava/src/main/java/com/github/hummel/wincalc/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public class Main {
private static final String ERROR = "Error!";

private static final List<String> STORAGE = new ArrayList<>();
private static final int[] FACTORIAL = new int[]{1, 1, 2, 6, 24, 120, 720, 5040, 40320, 362880, 3628800, 39916800, 479001600};
private static final int[] FACTORIAL = {1, 1, 2, 6, 24, 120, 720, 5040, 40320, 362880, 3628800, 39916800, 479001600};

private static WinDef.HWND field;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ private class WndProc : WinUser.WindowProc {
private fun calculateWrapper() {
try {
calculate(field)
} catch (e: Exception) {
} catch (_: Exception) {
storage.clear()
ExUser32.INSTANCE.SetWindowText(field, ERROR)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ private fun wndProc(window: HWND?, msg: UINT, wParam: WPARAM, lParam: LPARAM): L
private fun calculateWrapper() {
try {
calculate(field)
} catch (e: Exception) {
} catch (_: Exception) {
storage.clear()
SetWindowTextW(field, ERROR)
}
Expand Down

0 comments on commit d6b95d2

Please sign in to comment.