-
Bug
-
Resolution: Fixed
-
P2
-
9
/jdk9-client/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/LWCToolkit.m:92:13: error: 4 enumeration values not handled in switch: 'NSEventPhaseNone', 'NSEventPhaseStationary', 'NSEventPhaseChanged'... [-Werror,-Wswitch]
switch (phase) {
^
1 error generated.
make[3]: *** [/jdk9-client/build/macosx-x86_64-normal-server-release/support/native/java.desktop/libawt_lwawt/LWCToolkit.o] Error 1
make[3]: *** Waiting for unfinished jobs....
This may not fail with the current official xcode 6.3 but does
fail with xcode 7.0 which I expect many people use.
This code was added in the fix for
8166591: [macos 10.12] Trackpad scrolling of text on OS X 10.12 Sierra is very fast (Trackpad, Retina only)
The fix appears to be to add a "default" option to the switch.
diff --git a/src/java.desktop/macosx/native/libawt_lwawt/awt/LWCToolkit.m b/src/java.desktop/macosx/native/libawt_lwawt/awt/LWCToolkit.m
--- a/src/java.desktop/macosx/native/libawt_lwawt/awt/LWCToolkit.m
+++ b/src/java.desktop/macosx/native/libawt_lwawt/awt/LWCToolkit.m
@@ -93,8 +93,8 @@
case NSEventPhaseBegan: return SCROLL_PHASE_BEGAN;
case NSEventPhaseCancelled: return SCROLL_PHASE_CANCELLED;
case NSEventPhaseEnded: return SCROLL_PHASE_ENDED;
+ default: return SCROLL_PHASE_CONTINUED;
}
- return SCROLL_PHASE_CONTINUED;
}
[~enoconn]
This builds with JPRT too ..
switch (phase) {
^
1 error generated.
make[3]: *** [/jdk9-client/build/macosx-x86_64-normal-server-release/support/native/java.desktop/libawt_lwawt/LWCToolkit.o] Error 1
make[3]: *** Waiting for unfinished jobs....
This may not fail with the current official xcode 6.3 but does
fail with xcode 7.0 which I expect many people use.
This code was added in the fix for
8166591: [macos 10.12] Trackpad scrolling of text on OS X 10.12 Sierra is very fast (Trackpad, Retina only)
The fix appears to be to add a "default" option to the switch.
diff --git a/src/java.desktop/macosx/native/libawt_lwawt/awt/LWCToolkit.m b/src/java.desktop/macosx/native/libawt_lwawt/awt/LWCToolkit.m
--- a/src/java.desktop/macosx/native/libawt_lwawt/awt/LWCToolkit.m
+++ b/src/java.desktop/macosx/native/libawt_lwawt/awt/LWCToolkit.m
@@ -93,8 +93,8 @@
case NSEventPhaseBegan: return SCROLL_PHASE_BEGAN;
case NSEventPhaseCancelled: return SCROLL_PHASE_CANCELLED;
case NSEventPhaseEnded: return SCROLL_PHASE_ENDED;
+ default: return SCROLL_PHASE_CONTINUED;
}
- return SCROLL_PHASE_CONTINUED;
}
[~enoconn]
This builds with JPRT too ..