Add java 11 (#1048)

This commit is contained in:
Leon Mak
2019-10-28 04:05:10 +08:00
committed by Ilkka Seppälä
parent b50189e283
commit 63fb8dc318
11 changed files with 119 additions and 145 deletions
@@ -23,10 +23,8 @@
package com.iluwatar.commander;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Hashtable;
import java.util.Random;
import java.util.*;
import com.iluwatar.commander.exceptions.DatabaseUnavailableException;
/**
@@ -49,7 +47,7 @@ public abstract class Service {
protected Service(Database db, Exception...exc) {
this.database = db;
this.exceptionsList = new ArrayList<Exception>(Arrays.asList(exc));
this.exceptionsList = new ArrayList<>(List.of(exc));
}
public abstract String receiveRequest(Object...parameters) throws DatabaseUnavailableException;
@@ -23,12 +23,13 @@
package com.iluwatar.commander.queue;
import java.util.ArrayList;
import java.util.Arrays;
import com.iluwatar.commander.Database;
import com.iluwatar.commander.exceptions.DatabaseUnavailableException;
import com.iluwatar.commander.exceptions.IsEmptyException;
import java.util.ArrayList;
import java.util.List;
/**
* QueueDatabase id where the instructions to be implemented are queued.
*/
@@ -39,8 +40,8 @@ public class QueueDatabase extends Database<QueueTask> {
public ArrayList<Exception> exceptionsList;
public QueueDatabase(Exception...exc) {
this.data = new Queue<QueueTask>();
this.exceptionsList = new ArrayList<Exception>(Arrays.asList(exc));
this.data = new Queue<>();
this.exceptionsList = new ArrayList<>(List.of(exc));
}
@Override