title: Jackson-Databind ArrayIndexOutOfBoundException Version 2.6.0
body: <p>i have updated to jackson-databind 2.6.0 to fix a deserialization bug. But, now i receive a new one (i checked the same test with Version 2.4.0 and 2.5.4, both worked).</p>
  
  <p>Here is the exception:</p>
  
  
  
  <pre><code>java.lang.ArrayIndexOutOfBoundsException: 56
      at com.fasterxml.jackson.databind.deser.impl.BeanPropertyMap.withProperty(BeanPropertyMap.java:177)
      at com.fasterxml.jackson.databind.deser.BeanDeserializerBuilder.build(BeanDeserializerBuilder.java:344)
      at com.fasterxml.jackson.databind.deser.BeanDeserializerFactory.buildBeanDeserializer(BeanDeserializerFactory.java:251)
      at com.fasterxml.jackson.databind.deser.BeanDeserializerFactory.createBeanDeserializer(BeanDeserializerFactory.java:142)
      at com.fasterxml.jackson.databind.deser.DeserializerCache._createDeserializer2(DeserializerCache.java:403)
      at com.fasterxml.jackson.databind.deser.DeserializerCache._createDeserializer(DeserializerCache.java:352)
      at com.fasterxml.jackson.databind.deser.DeserializerCache._createAndCache2(DeserializerCache.java:264)
      at com.fasterxml.jackson.databind.deser.DeserializerCache._createAndCacheValueDeserializer(DeserializerCache.java:244)
      at com.fasterxml.jackson.databind.deser.DeserializerCache.findValueDeserializer(DeserializerCache.java:142)
      at com.fasterxml.jackson.databind.DeserializationContext.findRootValueDeserializer(DeserializationContext.java:461)
      at com.fasterxml.jackson.databind.ObjectMapper._findRootDeserializer(ObjectMapper.java:3804)
      at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:3698)
      at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:2714)
      at com.mleitner.businessmaximizer.webservice.JacksonMapperTest.testOneTimeCustomer(JacksonMapperTest.java:43)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:497)
      at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:84)
      at org.testng.internal.Invoker.invokeMethod(Invoker.java:714)
      at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:901)
      at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1231)
      at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:127)
      at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111)
      at org.testng.TestRunner.privateRun(TestRunner.java:767)
      at org.testng.TestRunner.run(TestRunner.java:617)
      at org.testng.SuiteRunner.runTest(SuiteRunner.java:334)
      at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:329)
      at org.testng.SuiteRunner.privateRun(SuiteRunner.java:291)
      at org.testng.SuiteRunner.run(SuiteRunner.java:240)
      at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
      at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
      at org.testng.TestNG.runSuitesSequentially(TestNG.java:1224)
      at org.testng.TestNG.runSuitesLocally(TestNG.java:1149)
      at org.testng.TestNG.run(TestNG.java:1057)
      at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:111)
      at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:204)
      at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:175)
  </code></pre>
  
  
  
  <p>The test is simple:</p>
  
  
  
  <pre><code>@Test
      public void testOneTimeCustomer() throws Exception {
          OneTimeCustomerDTO customer = new OneTimeCustomerDTO("Max", null, null, null, null, null, null, null);
          ObjectMapper om = new MyObjectMapper();
          String result = om.writeValueAsString(customer);
          System.out.println("Result:" + result);
          om.readValue(result, OneTimeCustomerDTO.class);
      }
  
  and has this output: Result:{"@id":1,"firstName":"Max"}
  </code></pre>
  
  
  
  <p>The class MyObjectMapper does some config which i always use. The config is set to:</p>
  
  
  
  <pre><code>this.setVisibility(
                  getSerializationConfig().
                  getDefaultVisibilityChecker().
                  withFieldVisibility(JsonAutoDetect.Visibility.ANY).
                  withGetterVisibility(JsonAutoDetect.Visibility.NONE).
                  withSetterVisibility(JsonAutoDetect.Visibility.NONE).
                  withCreatorVisibility(JsonAutoDetect.Visibility.NONE).
                  withIsGetterVisibility(JsonAutoDetect.Visibility.NONE));
          this.configure(SerializationFeature.FAIL_ON_EMPTY_BEANS, false);
          this.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
          this.configure(SerializationFeature.WRITE_NULL_MAP_VALUES, false);
  
          this.setSerializationInclusion(Include.NON_NULL);
  </code></pre>
  
  
  
  <p>And i have an AnnotationIntrospector which adds ids for recursive structures:</p>
  
  
  
  <pre><code>@Override
      public ObjectIdInfo findObjectIdInfo(final Annotated ann) {
          if (BaseDTO.class.isAssignableFrom(ann.getRawType())) {
              // this is needed for recursive structures
              return new ObjectIdInfo(PropertyName.construct("@id", null),
                      ann.getRawType(),
                      ObjectIdGenerators.IntSequenceGenerator.class, null);
          }
          return super.findObjectIdInfo(ann);
      }
  </code></pre>
  
  
  
  <p>My DTO looks like this:
  OneTimeCustomerDTO->CustomerDTO(abstract)->BaseDTO(abstract).</p>
  
  <p>OneTimeCustomerDTO has 8 String attributes, CustomerDTO 1 String and 1 long attribute. Both have also complex attributes (other classes), but they are null during this test so i think they are not relevant.</p>
  
  <p>If i remove the ObjectIdInfo it also works with 2.6.0... but i need this to transfer recursive structures. </p>
  
  <p>So my questions are:</p>
  
  <ul>
  <li>Any idea for an workaround? </li>
  <li>I didn't find a possibility to report a
  bug to jackson-databind?! Because i believe this is a bug and all
  should work fine...</li>
  </ul>
  
  <p>Thanks in advance for your time and efforts. </p>
  
  <p>kr</p>