src/java.base/share/classes/java/util/WeakHashMap.java
changeset 51187 e55d46250431
parent 49433 b6671a111395
equal deleted inserted replaced
51186:22e1b5900d90 51187:e55d46250431
   250      * @param   m the map whose mappings are to be placed in this map
   250      * @param   m the map whose mappings are to be placed in this map
   251      * @throws  NullPointerException if the specified map is null
   251      * @throws  NullPointerException if the specified map is null
   252      * @since   1.3
   252      * @since   1.3
   253      */
   253      */
   254     public WeakHashMap(Map<? extends K, ? extends V> m) {
   254     public WeakHashMap(Map<? extends K, ? extends V> m) {
   255         this(Math.max((int) (m.size() / DEFAULT_LOAD_FACTOR) + 1,
   255         this(Math.max((int) ((float)m.size() / DEFAULT_LOAD_FACTOR + 1.0F),
   256                 DEFAULT_INITIAL_CAPACITY),
   256                 DEFAULT_INITIAL_CAPACITY),
   257              DEFAULT_LOAD_FACTOR);
   257              DEFAULT_LOAD_FACTOR);
   258         putAll(m);
   258         putAll(m);
   259     }
   259     }
   260 
   260