8299497: Usage of constructors of primitive wrapper classes should be avoided in java.desktop API docs

Reviewed-by: serb, prr
This commit is contained in:
Tingjun Yuan 2023-01-24 01:25:29 +00:00 committed by Sergey Bylokhov
parent 77a50105f0
commit b5ee3d1f2a
2 changed files with 4 additions and 4 deletions

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2023, 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
@ -198,7 +198,7 @@ import java.awt.font.FontRenderContext;
* // layout can be null if lineContainsText is true
* if (layout != null) {
* layouts.addElement(layout);
* penPositions.addElement(new Float(horizontalPos));
* penPositions.addElement(Float.valueOf(horizontalPos));
* horizontalPos += layout.getAdvance();
* maxAscent = Math.max(maxAscent, layout.getAscent());
* maxDescent = Math.max(maxDescent,

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, 2021, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2023, 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
@ -48,7 +48,7 @@ import java.util.Vector;
* downward cast and have return values of base type; an exception
* will be thrown if the stored values do not have the correct type.
* There is no way to distinguish between the results of
* "short s; add(s)" and "add(new Short(s))".
* "short s; add(s)" and "add(Short.valueOf(s))".
*
* <p> Note that the get and set methods operate on references.
* Therefore, one must be careful not to share references between