Skip to content

Commit

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

Reviewed-by: naoto, jpai
  • Loading branch information
justin-curtis-lu authored and jaikiran committed Jan 7, 2023
1 parent 5393dc9 commit 63cf4aa
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/java.base/share/classes/java/net/SocketOptions.java
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1996, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1996, 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 @@ -54,9 +54,9 @@ public interface SocketOptions {
* <BR><PRE>
* SocketImpl s;
* ...
* s.setOption(SO_LINGER, new Integer(10));
* s.setOption(SO_LINGER, Integer.valueOf(10));
* // OK - set SO_LINGER w/ timeout of 10 sec.
* s.setOption(SO_LINGER, new Double(10));
* s.setOption(SO_LINGER, Double.valueOf(10));
* // ERROR - expects java.lang.Integer
*</PRE>
* If the requested option is binary, it can be set using this method by
Expand Down

3 comments on commit 63cf4aa

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

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

@justin-curtis-lu
Copy link
Member Author

Choose a reason for hiding this comment

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

/backport jdk20

@openjdk
Copy link

@openjdk openjdk bot commented on 63cf4aa Jan 13, 2023

Choose a reason for hiding this comment

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

@justin-curtis-lu the backport was successfully created on the branch justin-curtis-lu-backport-63cf4aa0 in my personal fork of openjdk/jdk20. To create a pull request with this backport targeting openjdk/jdk20:master, just click the following link:

➡️ Create pull request

The title of the pull request is automatically filled in correctly and below you find a suggestion for the pull request body:

Hi all,

This pull request contains a backport of commit 63cf4aa0 from the openjdk/jdk repository.

The commit being backported was authored by Justin Lu on 7 Jan 2023 and was reviewed by Naoto Sato and Jaikiran Pai.

Thanks!

If you need to update the source branch of the pull then run the following commands in a local clone of your personal fork of openjdk/jdk20:

$ git fetch https://github.com/openjdk-bots/jdk20 justin-curtis-lu-backport-63cf4aa0:justin-curtis-lu-backport-63cf4aa0
$ git checkout justin-curtis-lu-backport-63cf4aa0
# make changes
$ git add paths/to/changed/files
$ git commit --message 'Describe additional changes made'
$ git push https://github.com/openjdk-bots/jdk20 justin-curtis-lu-backport-63cf4aa0

Please sign in to comment.