Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_jdk
提交
20e8a8fd
D
dragonwell8_jdk
项目概览
openanolis
/
dragonwell8_jdk
通知
4
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
dragonwell8_jdk
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
20e8a8fd
编写于
7月 09, 2009
作者:
D
darcy
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
6628737: Specification of wrapper class valueOf static factories should require caching
Reviewed-by: mr
上级
f949d246
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
17 addition
and
2 deletion
+17
-2
src/share/classes/java/lang/Byte.java
src/share/classes/java/lang/Byte.java
+2
-2
src/share/classes/java/lang/Character.java
src/share/classes/java/lang/Character.java
+4
-0
src/share/classes/java/lang/Integer.java
src/share/classes/java/lang/Integer.java
+3
-0
src/share/classes/java/lang/Long.java
src/share/classes/java/lang/Long.java
+5
-0
src/share/classes/java/lang/Short.java
src/share/classes/java/lang/Short.java
+3
-0
未找到文件。
src/share/classes/java/lang/Byte.java
浏览文件 @
20e8a8fd
...
@@ -90,8 +90,8 @@ public final class Byte extends Number implements Comparable<Byte> {
...
@@ -90,8 +90,8 @@ public final class Byte extends Number implements Comparable<Byte> {
* If a new {@code Byte} instance is not required, this method
* If a new {@code Byte} instance is not required, this method
* should generally be used in preference to the constructor
* should generally be used in preference to the constructor
* {@link #Byte(byte)}, as this method is likely to yield
* {@link #Byte(byte)}, as this method is likely to yield
* significantly better space and time performance
by caching
* significantly better space and time performance
since
*
frequently requested values
.
*
all byte values are cached
.
*
*
* @param b a byte value.
* @param b a byte value.
* @return a {@code Byte} instance representing {@code b}.
* @return a {@code Byte} instance representing {@code b}.
...
...
src/share/classes/java/lang/Character.java
浏览文件 @
20e8a8fd
...
@@ -2571,6 +2571,10 @@ class Character extends Object implements java.io.Serializable, Comparable<Chara
...
@@ -2571,6 +2571,10 @@ class Character extends Object implements java.io.Serializable, Comparable<Chara
* significantly better space and time performance by caching
* significantly better space and time performance by caching
* frequently requested values.
* frequently requested values.
*
*
* This method will always cache values in the range '\u0000'
* to '\u007f'", inclusive, and may cache other values outside
* of this range.
*
* @param c a char value.
* @param c a char value.
* @return a <tt>Character</tt> instance representing <tt>c</tt>.
* @return a <tt>Character</tt> instance representing <tt>c</tt>.
* @since 1.5
* @since 1.5
...
...
src/share/classes/java/lang/Integer.java
浏览文件 @
20e8a8fd
...
@@ -638,6 +638,9 @@ public final class Integer extends Number implements Comparable<Integer> {
...
@@ -638,6 +638,9 @@ public final class Integer extends Number implements Comparable<Integer> {
* to yield significantly better space and time performance by
* to yield significantly better space and time performance by
* caching frequently requested values.
* caching frequently requested values.
*
*
* This method will always cache values in the range -128 to 127,
* inclusive, and may cache other values outside of this range.
*
* @param i an {@code int} value.
* @param i an {@code int} value.
* @return an {@code Integer} instance representing {@code i}.
* @return an {@code Integer} instance representing {@code i}.
* @since 1.5
* @since 1.5
...
...
src/share/classes/java/lang/Long.java
浏览文件 @
20e8a8fd
...
@@ -560,6 +560,11 @@ public final class Long extends Number implements Comparable<Long> {
...
@@ -560,6 +560,11 @@ public final class Long extends Number implements Comparable<Long> {
* significantly better space and time performance by caching
* significantly better space and time performance by caching
* frequently requested values.
* frequently requested values.
*
*
* Note that unlike the {@linkplain Integer#valueOf(int)
* corresponding method} in the {@code Integer} class, this method
* is <em>not</em> required to cache values within a particular
* range.
*
* @param l a long value.
* @param l a long value.
* @return a {@code Long} instance representing {@code l}.
* @return a {@code Long} instance representing {@code l}.
* @since 1.5
* @since 1.5
...
...
src/share/classes/java/lang/Short.java
浏览文件 @
20e8a8fd
...
@@ -219,6 +219,9 @@ public final class Short extends Number implements Comparable<Short> {
...
@@ -219,6 +219,9 @@ public final class Short extends Number implements Comparable<Short> {
* significantly better space and time performance by caching
* significantly better space and time performance by caching
* frequently requested values.
* frequently requested values.
*
*
* This method will always cache values in the range -128 to 127,
* inclusive, and may cache other values outside of this range.
*
* @param s a short value.
* @param s a short value.
* @return a {@code Short} instance representing {@code s}.
* @return a {@code Short} instance representing {@code s}.
* @since 1.5
* @since 1.5
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录