Skip to content

Commit

Permalink
Disable http2 by default for java8 (eclipse-che#16964)
Browse files Browse the repository at this point in the history
* Disable http2 by default for java8. OkHttp wrongly detects JDK8u251 and higher as JDK9 which enables Http2 unsupported for JDK8.

Signed-off-by: Sergii Kabashniuk <skabashniuk@redhat.com>
  • Loading branch information
skabashnyuk authored May 18, 2020
1 parent 7143355 commit fb063a9
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,13 @@ public class WsMasterModule extends AbstractModule {

@Override
protected void configure() {
// Workaround for https://github.com/fabric8io/kubernetes-client/issues/2212
// OkHttp wrongly detects JDK8u251 and higher as JDK9 which enables Http2 unsupported for JDK8.
// Can be removed after upgrade to Fabric8 4.10.2 or higher or to Java 11
if (System.getProperty("java.version", "").startsWith("1.8")) {
System.setProperty("http2.disable", "true");
}

// db related components modules
install(new org.eclipse.che.account.api.AccountModule());
install(new org.eclipse.che.api.ssh.server.jpa.SshJpaModule());
Expand Down

0 comments on commit fb063a9

Please sign in to comment.