Teammates: Upgrade to Java 8

Created on 26 Jun 2017  路  5Comments  路  Source: TEAMMATES/teammates

Recent versions of AppEngine SDK are fully compatible with JDK 8, as long as the compiler compliance level is set to Java 7.

Reasons for Upgrading

  • First step in upgrading to Java 8 (second step is still dependent on Google though)
  • Enables use of latest Travis images (can revert #7548)
  • Enables use of Checkstyle 7
  • Enables use of SonarQube

Caveats

  • The iteration order of HashMaps and HashSets is affected (link):
    > In rare situations, this change could introduce a change to the iteration order of HashMap and HashSet. A particular iteration order is not specified for HashMap objects - any code that depends on iteration order should be fixed.

    • Unfortunately, some of our tests do depend on a particular iteration order

    • These tests need to be updated - the dependence on iteration order must be removed

    • This is required to allow testing on both the dev server (running on Java 8) and the staging server (running on Java 7)

  • Still requires a valid JRE 7 installation as the Java 7 libraries are needed for proper cross-compilation to Java 7-compatible bytecode required for the GAE runtime in deployed instances
  • Dependent on #7608 to be merged first, as older versions of AppEngine SDK won't work Edit: merged
c.DevOps p.Medium

Most helpful comment

Just in: https://cloudplatform.googleblog.com/2017/06/Google-App-Engine-standard-now-supports-Java-8.html
They finally open this for beta release, which means that the GA version should not take anything longer than 1-2 months. We might as well escalate this issue to full-fledged Java 8.

All 5 comments

IIRC, we put the adoption of SonarCube on hold because it needs Java 8 to run.

@whipermr5 With JDK8 we can use new Date-time API through which we can easily handle timezone related issues, especially in the comments section.

@Mynk96 That's Java 8 - this issue is about switching to JDK 8 while still using Java 7 (including Java 7 libraries). We still have to use Java 7 until GAE updates their runtime.

@whipermr5 got carried away seeing 8

Just in: https://cloudplatform.googleblog.com/2017/06/Google-App-Engine-standard-now-supports-Java-8.html
They finally open this for beta release, which means that the GA version should not take anything longer than 1-2 months. We might as well escalate this issue to full-fledged Java 8.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Derek-Hardy picture Derek-Hardy  路  3Comments

keoren3 picture keoren3  路  3Comments

xpdavid picture xpdavid  路  3Comments

whipermr5 picture whipermr5  路  3Comments

HirdayGupta picture HirdayGupta  路  4Comments