diff --git a/spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/shell/ShellPrompts.java b/spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/shell/ShellPrompts.java index bca81c3cb39..793e66ea039 100644 --- a/spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/shell/ShellPrompts.java +++ b/spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/shell/ShellPrompts.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2017 the original author or authors. + * Copyright 2012-2018 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,7 +16,8 @@ package org.springframework.boot.cli.command.shell; -import java.util.Stack; +import java.util.ArrayDeque; +import java.util.Deque; /** * Abstraction to manage a stack of prompts. @@ -27,7 +28,7 @@ public class ShellPrompts { private static final String DEFAULT_PROMPT = "$ "; - private final Stack prompts = new Stack<>(); + private final Deque prompts = new ArrayDeque<>(); /** * Push a new prompt to be used by the shell.