Skip to content

Commit d71de54

Browse files
committed
minor comments cleanup
1 parent eb5007b commit d71de54

File tree

3 files changed

+11
-16
lines changed

3 files changed

+11
-16
lines changed

src/main/java/com/fasterxml/jackson/databind/deser/BeanDeserializerFactory.java

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -520,9 +520,9 @@ protected void addBeanProps(DeserializationContext ctxt,
520520
// 25-Sep-2014, tatu: No point in finding constructor parameters for abstract types
521521
// (since they are never used anyway)
522522
if (isConcrete && propDef.hasConstructorParameter()) {
523-
/* [JACKSON-700] If property is passed via constructor parameter, we must
524-
* handle things in special way. Not sure what is the most optimal way...
525-
* for now, let's just call a (new) method in builder, which does nothing.
523+
/* If property is passed via constructor parameter, we must
524+
* handle things in special way. Not sure what is the most optimal way...
525+
* for now, let's just call a (new) method in builder, which does nothing.
526526
*/
527527
// but let's call a method just to allow custom builders to be aware...
528528
final String name = propDef.getName();
@@ -707,6 +707,7 @@ protected SettableBeanProperty constructSettableProperty(DeserializationContext
707707
{
708708
// need to ensure method is callable (for non-public)
709709
AnnotatedMember mutator = propDef.getNonConstructorMutator();
710+
710711
if (ctxt.canOverrideAccessModifiers()) {
711712
mutator.fixAccess(ctxt.isEnabled(MapperFeature.OVERRIDE_PUBLIC_ACCESS_MODIFIERS));
712713
}
@@ -720,24 +721,22 @@ protected SettableBeanProperty constructSettableProperty(DeserializationContext
720721
property = property.withType(type);
721722
}
722723

723-
/* First: does the Method specify the deserializer to use?
724-
* If so, let's use it.
725-
*/
724+
// First: does the Method specify the deserializer to use? If so, let's use it.
726725
JsonDeserializer<Object> propDeser = findDeserializerFromAnnotation(ctxt, mutator);
727726
type = modifyTypeByAnnotation(ctxt, mutator, type);
728727
TypeDeserializer typeDeser = type.getTypeHandler();
729728
SettableBeanProperty prop;
730729
if (mutator instanceof AnnotatedMethod) {
731730
prop = new MethodProperty(propDef, type, typeDeser,
732-
beanDesc.getClassAnnotations(), (AnnotatedMethod) mutator);
731+
beanDesc.getClassAnnotations(), (AnnotatedMethod) mutator);
733732
} else {
734733
prop = new FieldProperty(propDef, type, typeDeser,
735734
beanDesc.getClassAnnotations(), (AnnotatedField) mutator);
736735
}
737736
if (propDeser != null) {
738737
prop = prop.withValueDeserializer(propDeser);
739738
}
740-
// [JACKSON-235]: need to retain name of managed forward references:
739+
// need to retain name of managed forward references:
741740
AnnotationIntrospector.ReferenceProperty ref = propDef.findReferenceType();
742741
if (ref != null && ref.isManagedReference()) {
743742
prop.setManagedReferenceName(ref.getName());

src/main/java/com/fasterxml/jackson/databind/deser/std/ThrowableDeserializer.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -120,10 +120,8 @@ public Object deserializeFromObject(JsonParser p, DeserializationContext ctxt) t
120120
continue;
121121
}
122122
}
123-
/* As per [JACKSON-313], things marked as ignorable should not be
124-
* passed to any setter
125-
*/
126-
if (_ignorableProps != null && _ignorableProps.contains(propName)) {
123+
// Things marked as ignorable should not be passed to any setter
124+
if ((_ignorableProps != null) && _ignorableProps.contains(propName)) {
127125
p.skipChildren();
128126
continue;
129127
}

src/test/java/com/fasterxml/jackson/databind/deser/TestExceptionDeserialization.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ static class MyNoArgException extends Exception
5151
/**********************************************************
5252
*/
5353

54-
final ObjectMapper MAPPER = new ObjectMapper();
54+
private final ObjectMapper MAPPER = new ObjectMapper();
5555

5656
public void testIOException() throws IOException
5757
{
@@ -61,7 +61,6 @@ public void testIOException() throws IOException
6161
assertEquals(ioe.getMessage(), result.getMessage());
6262
}
6363

64-
// As per [JACKSON-377]
6564
public void testWithCreator() throws IOException
6665
{
6766
final String MSG = "the message";
@@ -74,7 +73,6 @@ public void testWithCreator() throws IOException
7473
assertEquals(result.getFoo(), result.stuff.get("foo"));
7574
}
7675

77-
// [JACKSON-388]
7876
public void testWithNullMessage() throws IOException
7977
{
8078
final ObjectMapper mapper = new ObjectMapper();
@@ -98,7 +96,7 @@ public void testJDK7SuppressionProperty() throws IOException
9896
assertNotNull(exc);
9997
}
10098

101-
// [Issue#381]
99+
// [databind#381]
102100
public void testSingleValueArrayDeserialization() throws Exception {
103101
final ObjectMapper mapper = new ObjectMapper();
104102
mapper.enable(DeserializationFeature.UNWRAP_SINGLE_VALUE_ARRAYS);

0 commit comments

Comments
 (0)