Skip to content

Commit

Permalink
8299497: Usage of constructors of primitive wrapper classes should be…
Browse files Browse the repository at this point in the history
… avoided in java.desktop API docs

Reviewed-by: serb, prr
  • Loading branch information
yuantj authored and mrserb committed Jan 24, 2023
1 parent 77a5010 commit b5ee3d1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
@@ -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
Expand Down Expand Up @@ -198,7 +198,7 @@
* // 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,
Expand Down
@@ -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
Expand Down Expand Up @@ -48,7 +48,7 @@
* 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
Expand Down

1 comment on commit b5ee3d1

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.