diff --git a/src/java.desktop/share/classes/java/awt/font/LineBreakMeasurer.java b/src/java.desktop/share/classes/java/awt/font/LineBreakMeasurer.java index 079ee9ff55c..423aae39c37 100644 --- a/src/java.desktop/share/classes/java/awt/font/LineBreakMeasurer.java +++ b/src/java.desktop/share/classes/java/awt/font/LineBreakMeasurer.java @@ -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, diff --git a/src/java.desktop/share/classes/java/awt/image/renderable/ParameterBlock.java b/src/java.desktop/share/classes/java/awt/image/renderable/ParameterBlock.java index cd2e8d45dba..10f62777526 100644 --- a/src/java.desktop/share/classes/java/awt/image/renderable/ParameterBlock.java +++ b/src/java.desktop/share/classes/java/awt/image/renderable/ParameterBlock.java @@ -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))". * *
Note that the get and set methods operate on references. * Therefore, one must be careful not to share references between