From 69fe32b1f5e8b82045969ffb0d43c2f58a72b950 Mon Sep 17 00:00:00 2001 From: igor-suhorukov Date: Fri, 2 Mar 2018 00:34:07 +0300 Subject: [PATCH] Polish Replace class "Stack" by more modern "Deque" Closes gh-12304 --- .../boot/cli/command/shell/ShellPrompts.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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 bca81c3cb3..793e66ea03 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.