OpenJDK / portola / portola
changeset 17898:f47410f6015c
6436314: Vector could be created with appropriate size in DefaultComboBoxModel
Reviewed-by: alexsch, alexp
author | vkarnauk |
---|---|
date | Fri, 31 May 2013 19:34:02 +0400 |
parents | fb367e67916d |
children | d3a864bdee7d |
files | jdk/src/share/classes/javax/swing/DefaultComboBoxModel.java |
diffstat | 1 files changed, 2 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/jdk/src/share/classes/javax/swing/DefaultComboBoxModel.java Fri May 31 18:46:41 2013 +0400 +++ b/jdk/src/share/classes/javax/swing/DefaultComboBoxModel.java Fri May 31 19:34:02 2013 +0400 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2004, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -55,8 +55,7 @@ * @param items an array of Object objects */ public DefaultComboBoxModel(final E items[]) { - objects = new Vector<E>(); - objects.ensureCapacity( items.length ); + objects = new Vector<E>(items.length); int i,c; for ( i=0,c=items.length;i<c;i++ )