* Use java 11 * Use .of - Replace Arrays.asList with List.of - Replace HashSet<>(List.of()) with Set.of * Formatting
This commit is contained in:
@ -43,7 +43,7 @@ public abstract class Service {
|
||||
public ArrayList<Exception> exceptionsList;
|
||||
private static final Random RANDOM = new Random();
|
||||
private static final String ALL_CHARS = "ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890";
|
||||
private static final Hashtable<String, Boolean> USED_IDS = new Hashtable<String, Boolean>();
|
||||
private static final Hashtable<String, Boolean> USED_IDS = new Hashtable<>();
|
||||
|
||||
protected Service(Database db, Exception...exc) {
|
||||
this.database = db;
|
||||
|
@ -45,9 +45,9 @@ class RetryTest {
|
||||
Retry.HandleErrorIssue<Order> handleError = (o,e) -> {
|
||||
return;
|
||||
};
|
||||
Retry<Order> r1 = new Retry<Order>(op, handleError, 3, 30000,
|
||||
Retry<Order> r1 = new Retry<>(op, handleError, 3, 30000,
|
||||
e -> DatabaseUnavailableException.class.isAssignableFrom(e.getClass()));
|
||||
Retry<Order> r2 = new Retry<Order>(op, handleError, 3, 30000,
|
||||
Retry<Order> r2 = new Retry<>(op, handleError, 3, 30000,
|
||||
e -> DatabaseUnavailableException.class.isAssignableFrom(e.getClass()));
|
||||
User user = new User("Jim", "ABCD");
|
||||
Order order = new Order(user, "book", 10f);
|
||||
|
Reference in New Issue
Block a user