提交 b4720f40 编写于 作者: I igerasim

8191142: More refactoring for naming deserialization cases

Reviewed-by: chegar, rriggs
上级 36d8b92a
/*
* Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1999, 2017, 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
......@@ -302,8 +302,8 @@ public class BasicAttributes implements Attributes {
s.defaultReadObject(); // read in the ignoreCase flag
int n = s.readInt(); // number of attributes
attrs = (n >= 1)
? new Hashtable<String,Attribute>(n * 2)
: new Hashtable<String,Attribute>(2); // can't have initial size of 0 (grrr...)
? new Hashtable<>(1 + (int) (Math.min(768, n) / .75f))
: new Hashtable<>(2); // can't have initial size of 0 (grrr...)
while (--n >= 0) {
put((Attribute)s.readObject());
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册