diff --git a/src/main/java/com/fasterxml/jackson/databind/deser/BeanDeserializerFactory.java b/src/main/java/com/fasterxml/jackson/databind/deser/BeanDeserializerFactory.java
index 3eaac6e..10e08fc 100644
--- a/src/main/java/com/fasterxml/jackson/databind/deser/BeanDeserializerFactory.java
+++ b/src/main/java/com/fasterxml/jackson/databind/deser/BeanDeserializerFactory.java
@@ -520,9 +520,9 @@
             // 25-Sep-2014, tatu: No point in finding constructor parameters for abstract types
             //   (since they are never used anyway)
             if (isConcrete && propDef.hasConstructorParameter()) {
-                /* [JACKSON-700] If property is passed via constructor parameter, we must
-                 *   handle things in special way. Not sure what is the most optimal way...
-                 *   for now, let's just call a (new) method in builder, which does nothing.
+                /* If property is passed via constructor parameter, we must
+                 * handle things in special way. Not sure what is the most optimal way...
+                 * for now, let's just call a (new) method in builder, which does nothing.
                  */
                 // but let's call a method just to allow custom builders to be aware...
                 final String name = propDef.getName();
@@ -707,6 +707,7 @@
     {
         // need to ensure method is callable (for non-public)
         AnnotatedMember mutator = propDef.getNonConstructorMutator();
+
         if (ctxt.canOverrideAccessModifiers()) {
             mutator.fixAccess(ctxt.isEnabled(MapperFeature.OVERRIDE_PUBLIC_ACCESS_MODIFIERS));
         }
@@ -720,16 +721,14 @@
             property = property.withType(type);
         }
 
-        /* First: does the Method specify the deserializer to use?
-         * If so, let's use it.
-         */
+        // First: does the Method specify the deserializer to use? If so, let's use it.
         JsonDeserializer<Object> propDeser = findDeserializerFromAnnotation(ctxt, mutator);
         type = modifyTypeByAnnotation(ctxt, mutator, type);
         TypeDeserializer typeDeser = type.getTypeHandler();
         SettableBeanProperty prop;
         if (mutator instanceof AnnotatedMethod) {
             prop = new MethodProperty(propDef, type, typeDeser,
-                beanDesc.getClassAnnotations(), (AnnotatedMethod) mutator);
+                    beanDesc.getClassAnnotations(), (AnnotatedMethod) mutator);
         } else {
             prop = new FieldProperty(propDef, type, typeDeser,
                     beanDesc.getClassAnnotations(), (AnnotatedField) mutator);
@@ -737,7 +736,7 @@
         if (propDeser != null) {
             prop = prop.withValueDeserializer(propDeser);
         }
-        // [JACKSON-235]: need to retain name of managed forward references:
+        // need to retain name of managed forward references:
         AnnotationIntrospector.ReferenceProperty ref = propDef.findReferenceType();
         if (ref != null && ref.isManagedReference()) {
             prop.setManagedReferenceName(ref.getName());
diff --git a/src/main/java/com/fasterxml/jackson/databind/deser/std/ThrowableDeserializer.java b/src/main/java/com/fasterxml/jackson/databind/deser/std/ThrowableDeserializer.java
index 2f3b4bd..afd5f8b 100644
--- a/src/main/java/com/fasterxml/jackson/databind/deser/std/ThrowableDeserializer.java
+++ b/src/main/java/com/fasterxml/jackson/databind/deser/std/ThrowableDeserializer.java
@@ -120,10 +120,8 @@
                     continue;
                 }
             }
-            /* As per [JACKSON-313], things marked as ignorable should not be
-             * passed to any setter
-             */
-            if (_ignorableProps != null && _ignorableProps.contains(propName)) {
+            // Things marked as ignorable should not be passed to any setter
+            if ((_ignorableProps != null) && _ignorableProps.contains(propName)) {
                 p.skipChildren();
                 continue;
             }
diff --git a/src/test/java/com/fasterxml/jackson/databind/deser/TestExceptionDeserialization.java b/src/test/java/com/fasterxml/jackson/databind/deser/TestExceptionDeserialization.java
index 0342a0a..a94a4da 100644
--- a/src/test/java/com/fasterxml/jackson/databind/deser/TestExceptionDeserialization.java
+++ b/src/test/java/com/fasterxml/jackson/databind/deser/TestExceptionDeserialization.java
@@ -51,7 +51,7 @@
     /**********************************************************
      */
 
-    final ObjectMapper MAPPER = new ObjectMapper();
+    private final ObjectMapper MAPPER = new ObjectMapper();
     
     public void testIOException() throws IOException
     {
@@ -61,7 +61,6 @@
         assertEquals(ioe.getMessage(), result.getMessage());
     }
 
-    // As per [JACKSON-377]
     public void testWithCreator() throws IOException
     {
         final String MSG = "the message";
@@ -74,7 +73,6 @@
         assertEquals(result.getFoo(), result.stuff.get("foo"));
     }
 
-    // [JACKSON-388]
     public void testWithNullMessage() throws IOException
     {
         final ObjectMapper mapper = new ObjectMapper();
@@ -98,7 +96,7 @@
         assertNotNull(exc);
     }
     
-    // [Issue#381]
+    // [databind#381]
     public void testSingleValueArrayDeserialization() throws Exception {
         final ObjectMapper mapper = new ObjectMapper();
         mapper.enable(DeserializationFeature.UNWRAP_SINGLE_VALUE_ARRAYS);
