提交 eed4dc6a 编写于 作者: M martin

6881442: (reflect) Race condition in Class.getName()

Summary: only read "name" field racily once
Reviewed-by: darcy
上级 84ec19f8
......@@ -565,8 +565,9 @@ public final
* represented by this object.
*/
public String getName() {
String name = this.name;
if (name == null)
name = getName0();
this.name = name = getName0();
return name;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册