Skip to content

Commit

Permalink
javadoc/comment cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
cowtowncoder committed Jun 6, 2024
1 parent d327c16 commit 23862ec
Showing 1 changed file with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ public final class DeserializerCache

/**
* We hold an explicit lock while creating deserializers to avoid creating duplicates.
* Guards {@link #_incompleteDeserializers}.
*
* @since 2.17
*/
private final ReentrantLock _incompleteDeserializersLock = new ReentrantLock();

Expand Down Expand Up @@ -169,10 +172,9 @@ public JsonDeserializer<Object> findValueDeserializer(DeserializationContext ctx
// If not, need to request factory to construct (or recycle)
deser = _createAndCacheValueDeserializer(ctxt, factory, propertyType);
if (deser == null) {
/* Should we let caller handle it? Let's have a helper method
* decide it; can throw an exception, or return a valid
* deserializer
*/
// Should we let caller handle it? Let's have a helper method
// decide it; can throw an exception, or return a valid
// deserializer
deser = _handleUnknownValueDeserializer(ctxt, propertyType);
}
}
Expand Down Expand Up @@ -211,9 +213,8 @@ public boolean hasValueDeserializerFor(DeserializationContext ctxt,
DeserializerFactory factory, JavaType type)
throws JsonMappingException
{
/* Note: mostly copied from findValueDeserializer, except for
* handling of unknown types
*/
// Note: mostly copied from findValueDeserializer, except for
// handling of unknown types
JsonDeserializer<Object> deser = _findCachedDeserializer(type);
if (deser == null) {
deser = _createAndCacheValueDeserializer(ctxt, factory, type);
Expand Down Expand Up @@ -249,10 +250,9 @@ protected JsonDeserializer<Object> _createAndCacheValueDeserializer(Deserializat
DeserializerFactory factory, JavaType type)
throws JsonMappingException
{
/* Only one thread to construct deserializers at any given point in time;
* limitations necessary to ensure that only completely initialized ones
* are visible and used.
*/
// Only one thread to construct deserializers at any given point in time;
// limitations necessary to ensure that only completely initialized ones
// are visible and used.
_incompleteDeserializersLock.lock();
try {
// Ok, then: could it be that due to a race condition, deserializer can now be found?
Expand Down

0 comments on commit 23862ec

Please sign in to comment.