language: java
jdk:
  - oraclejdk8
  - oraclejdk7
  - openjdk7

before_install:
  - cat /etc/hosts # optionally check the content *before*
  - sudo hostname "$(hostname | cut -c1-63)"
  - sed -e "s/^\\(127\\.0\\.0\\.1.*\\)/\\1 $(hostname | cut -c1-63)/" /etc/hosts | sudo tee /etc/hosts
  - cat /etc/hosts # optionally check the content *after*

after_success:
  - bash <(curl -s https://codecov.io/bash)

language: java
jdk:
  - oraclejdk8
  - oraclejdk7
  - openjdk7

addons:
  hosts:
    - localhost
  hostname: localhost

after_success:
  - bash <(curl -s https://codecov.io/bash)

Fix `buffer overflow detected` crash on TravisCI
Fix `buffer overflow detected` crash on TravisCI

On some occasions, the `openjdk7` build would fail due to an error in
TravisCI. A first fix was proposed by the Travis team, which was
outdated on Aug 11, 2016. This commit introduces the updated fix.

See also: https://github.com/travis-ci/travis-ci/issues/5227#issuecomment-165131913
