Entropy source for Travis

This commit is contained in:
jendib 2016-05-05 22:16:04 +02:00
parent 6af7b6fce9
commit bc94466cf7
3 changed files with 4 additions and 3 deletions

View File

@ -4,6 +4,7 @@ language: java
before_install: before_install:
- sudo apt-get -qq update - sudo apt-get -qq update
- sudo apt-get -y -q install tesseract-ocr tesseract-ocr-fra tesseract-ocr-jpn - sudo apt-get -y -q install tesseract-ocr tesseract-ocr-fra tesseract-ocr-jpn
- sudo apt-get install haveged && sudo service haveged start
env: env:
global: global:
- TESSDATA_PREFIX=/usr/share/tesseract-ocr - TESSDATA_PREFIX=/usr/share/tesseract-ocr

View File

@ -80,7 +80,7 @@ public class RequestContextFilter implements Filter {
@Override @Override
public void doFilter(ServletRequest request, ServletResponse response, FilterChain filterChain) throws IOException, ServletException { public void doFilter(ServletRequest request, ServletResponse response, FilterChain filterChain) throws IOException, ServletException {
EntityManager em = null; EntityManager em;
try { try {
em = EMF.get().createEntityManager(); em = EMF.get().createEntityManager();

View File

@ -99,7 +99,7 @@ public class UserResource extends BaseResource {
user.setPassword(password); user.setPassword(password);
user.setEmail(email); user.setEmail(email);
user.setStorageQuota(storageQuota); user.setStorageQuota(storageQuota);
user.setStorageCurrent(0l); user.setStorageCurrent(0L);
try { try {
user.setPrivateKey(EncryptionUtil.generatePrivateKey()); user.setPrivateKey(EncryptionUtil.generatePrivateKey());
} catch (NoSuchAlgorithmException e) { } catch (NoSuchAlgorithmException e) {
@ -678,7 +678,7 @@ public class UserResource extends BaseResource {
UserDao userDao = new UserDao(); UserDao userDao = new UserDao();
User user = userDao.getActiveByUsername(principal.getName()); User user = userDao.getActiveByUsername(principal.getName());
user.setTotpKey(key.getKey()); user.setTotpKey(key.getKey());
user = userDao.update(user, principal.getId()); userDao.update(user, principal.getId());
JsonObjectBuilder response = Json.createObjectBuilder() JsonObjectBuilder response = Json.createObjectBuilder()
.add("secret", key.getKey()); .add("secret", key.getKey());