Skip to main content
Homepage
Explore
Search or go to…
/
Sign in
Explore
Primary navigation
Project
J
jdk17u
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Collapse sidebar
Snippets
Groups
Projects
Show more breadcrumbs
einsteinathome
openjdk
jdk17u
Commits
3a555f05
Commit
3a555f05
authored
May 16, 2014
by
Christian Thalinger
Browse files
Options
Downloads
Patches
Plain Diff
8032606: ClassValue.ClassValueMap.type is unused
Reviewed-by: jrose, vlivanov
parent
4bb7d288
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
jdk/src/share/classes/java/lang/ClassValue.java
+6
-9
6 additions, 9 deletions
jdk/src/share/classes/java/lang/ClassValue.java
with
6 additions
and
9 deletions
jdk/src/share/classes/java/lang/ClassValue.java
+
6
−
9
View file @
3a555f05
...
@@ -25,7 +25,6 @@
...
@@ -25,7 +25,6 @@
package
java.lang
;
package
java.lang
;
import
java.lang.ClassValue.ClassValueMap
;
import
java.util.WeakHashMap
;
import
java.util.WeakHashMap
;
import
java.lang.ref.WeakReference
;
import
java.lang.ref.WeakReference
;
import
java.util.concurrent.atomic.AtomicInteger
;
import
java.util.concurrent.atomic.AtomicInteger
;
...
@@ -375,7 +374,7 @@ public abstract class ClassValue<T> {
...
@@ -375,7 +374,7 @@ public abstract class ClassValue<T> {
synchronized
(
CRITICAL_SECTION
)
{
// private object to avoid deadlocks
synchronized
(
CRITICAL_SECTION
)
{
// private object to avoid deadlocks
// happens about once per type
// happens about once per type
if
((
map
=
type
.
classValueMap
)
==
null
)
if
((
map
=
type
.
classValueMap
)
==
null
)
type
.
classValueMap
=
map
=
new
ClassValueMap
(
type
);
type
.
classValueMap
=
map
=
new
ClassValueMap
();
}
}
return
map
;
return
map
;
}
}
...
@@ -398,12 +397,11 @@ public abstract class ClassValue<T> {
...
@@ -398,12 +397,11 @@ public abstract class ClassValue<T> {
// The following class could also be top level and non-public:
// The following class could also be top level and non-public:
/** A backing map for all ClassValues
, relative a single given type
.
/** A backing map for all ClassValues.
* Gives a fully serialized "true state" for each pair (ClassValue cv, Class type).
* Gives a fully serialized "true state" for each pair (ClassValue cv, Class type).
* Also manages an unserialized fast-path cache.
* Also manages an unserialized fast-path cache.
*/
*/
static
class
ClassValueMap
extends
WeakHashMap
<
ClassValue
.
Identity
,
Entry
<?>>
{
static
class
ClassValueMap
extends
WeakHashMap
<
ClassValue
.
Identity
,
Entry
<?>>
{
private
final
Class
<?>
type
;
private
Entry
<?>[]
cacheArray
;
private
Entry
<?>[]
cacheArray
;
private
int
cacheLoad
,
cacheLoadLimit
;
private
int
cacheLoad
,
cacheLoadLimit
;
...
@@ -413,11 +411,10 @@ public abstract class ClassValue<T> {
...
@@ -413,11 +411,10 @@ public abstract class ClassValue<T> {
*/
*/
private
static
final
int
INITIAL_ENTRIES
=
32
;
private
static
final
int
INITIAL_ENTRIES
=
32
;
/** Build a backing map for ClassValues
, relative the given type
.
/** Build a backing map for ClassValues.
* Also, create an empty cache array and install it on the class.
* Also, create an empty cache array and install it on the class.
*/
*/
ClassValueMap
(
Class
<?>
type
)
{
ClassValueMap
()
{
this
.
type
=
type
;
sizeCache
(
INITIAL_ENTRIES
);
sizeCache
(
INITIAL_ENTRIES
);
}
}
...
...
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
sign in
to comment