calabash-android 0.4.7.pre4 → 0.4.7.pre6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (446) hide show
  1. checksums.yaml +4 -4
  2. data/lib/calabash-android/helpers.rb +22 -1
  3. data/lib/calabash-android/lib/TestServer.apk +0 -0
  4. data/lib/calabash-android/lib/apktool-cli-1.5.3-SNAPSHOT.jar +0 -0
  5. data/lib/calabash-android/version.rb +1 -1
  6. data/test-server/instrumentation-backend/.classpath +4 -1
  7. data/test-server/instrumentation-backend/libs/jackson-annotations-2.2.0-rc2-20130418.042013-1.jar +0 -0
  8. data/test-server/instrumentation-backend/libs/jackson-core-2.2.0-rc2-20130420.041001-2.jar +0 -0
  9. data/test-server/instrumentation-backend/libs/jackson-databind-2.2.0-rc2-20130422.041053-3.jar +0 -0
  10. data/test-server/instrumentation-backend/libs/robotium-solo-4.1.jar +0 -0
  11. data/test-server/instrumentation-backend/src/org/antlr/runtime/LegacyCommonTokenStream.java +6 -1
  12. data/test-server/instrumentation-backend/src/org/antlr/runtime/debug/DebugTokenStream.java +3 -3
  13. data/test-server/instrumentation-backend/src/org/antlr/runtime/misc/FastQueue.java +1 -1
  14. data/test-server/instrumentation-backend/src/org/antlr/runtime/tree/BaseTreeAdaptor.java +4 -4
  15. data/test-server/instrumentation-backend/src/org/antlr/runtime/tree/CommonErrorNode.java +8 -1
  16. data/test-server/instrumentation-backend/src/org/antlr/runtime/tree/TreeIterator.java +2 -3
  17. data/test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/CalabashInstrumentationTestRunner.java +1 -1
  18. data/test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/InstrumentationBackend.java +2 -2
  19. data/test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/HttpServer.java +21 -11
  20. data/test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/NanoHTTPD.java +127 -68
  21. data/test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/button/PressButtonText.java +2 -2
  22. data/test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/button/PressImageButtonDescription.java +2 -3
  23. data/test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/gestures/Swipe.java +0 -1
  24. data/test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/list/GetListData.java +1 -1
  25. data/test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/list/GetListItemProperties.java +1 -1
  26. data/test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/list/GetListItemText.java +1 -1
  27. data/test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/text/AssertGridViewContainsNoDuplicates.java +4 -4
  28. data/test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/view/Press.java +1 -1
  29. data/test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/view/SelectTab.java +4 -4
  30. data/test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/wait/WaitForProgress.java +1 -1
  31. data/test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/wait/WaitForTab.java +4 -4
  32. data/test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/webview/QueryHelper.java +2 -1
  33. data/test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/json/JSONUtils.java +1 -1
  34. data/test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/query/QueryResult.java +2 -2
  35. data/test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/query/ast/UIQueryASTClassName.java +0 -2
  36. data/test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/query/ast/UIQueryUtils.java +3 -2
  37. metadata +7 -411
  38. data/test-server/instrumentation-backend/libs/robotium-solo-3.6.jar +0 -0
  39. data/test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/activity/GetOpenedActivities.java +0 -31
  40. data/test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/activity/GoBackToActivity.java +0 -67
  41. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/Base64Variant.java +0 -413
  42. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/Base64Variants.java +0 -90
  43. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/FormatSchema.java +0 -29
  44. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/JsonEncoding.java +0 -47
  45. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/JsonFactory.java +0 -937
  46. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/JsonGenerationException.java +0 -28
  47. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/JsonGenerator.java +0 -1197
  48. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/JsonLocation.java +0 -141
  49. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/JsonNode.java +0 -879
  50. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/JsonParseException.java +0 -23
  51. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/JsonParser.java +0 -1434
  52. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/JsonProcessingException.java +0 -80
  53. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/JsonStreamContext.java +0 -122
  54. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/JsonToken.java +0 -161
  55. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/ObjectCodec.java +0 -157
  56. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/PrettyPrinter.java +0 -166
  57. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/SerializableString.java +0 -54
  58. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/Version.java +0 -90
  59. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/Versioned.java +0 -20
  60. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/annotate/JacksonAnnotation.java +0 -20
  61. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/annotate/JsonAnyGetter.java +0 -25
  62. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/annotate/JsonAnySetter.java +0 -24
  63. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/annotate/JsonAutoDetect.java +0 -148
  64. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/annotate/JsonBackReference.java +0 -41
  65. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/annotate/JsonCreator.java +0 -19
  66. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/annotate/JsonGetter.java +0 -35
  67. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/annotate/JsonIgnore.java +0 -57
  68. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/annotate/JsonIgnoreProperties.java +0 -48
  69. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/annotate/JsonIgnoreType.java +0 -33
  70. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/annotate/JsonManagedReference.java +0 -41
  71. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/annotate/JsonMethod.java +0 -90
  72. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/annotate/JsonProperty.java +0 -38
  73. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/annotate/JsonPropertyOrder.java +0 -46
  74. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/annotate/JsonRawValue.java +0 -33
  75. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/annotate/JsonSetter.java +0 -33
  76. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/annotate/JsonSubTypes.java +0 -44
  77. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/annotate/JsonTypeInfo.java +0 -236
  78. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/annotate/JsonTypeName.java +0 -28
  79. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/annotate/JsonUnwrapped.java +0 -76
  80. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/annotate/JsonValue.java +0 -46
  81. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/annotate/JsonWriteNullProperties.java +0 -34
  82. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/annotate/package-info.java +0 -16
  83. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/format/DataFormatDetector.java +0 -176
  84. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/format/DataFormatMatcher.java +0 -117
  85. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/format/InputAccessor.java +0 -130
  86. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/format/MatchStrength.java +0 -64
  87. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/format/package-info.java +0 -8
  88. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/impl/ByteSourceBootstrapper.java +0 -518
  89. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/impl/DefaultPrettyPrinter.java +0 -13
  90. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/impl/Indenter.java +0 -23
  91. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/impl/JsonGeneratorBase.java +0 -570
  92. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/impl/JsonNumericParserBase.java +0 -20
  93. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/impl/JsonParserBase.java +0 -1067
  94. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/impl/JsonParserMinimalBase.java +0 -539
  95. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/impl/JsonReadContext.java +0 -188
  96. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/impl/JsonWriteContext.java +0 -178
  97. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/impl/ReaderBasedParser.java +0 -1815
  98. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/impl/ReaderBasedParserBase.java +0 -228
  99. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/impl/StreamBasedParserBase.java +0 -197
  100. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/impl/Utf8Generator.java +0 -1757
  101. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/impl/Utf8StreamParser.java +0 -2966
  102. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/impl/WriterBasedGenerator.java +0 -1815
  103. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/impl/package-info.java +0 -6
  104. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/io/BaseReader.java +0 -117
  105. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/io/CharacterEscapes.java +0 -73
  106. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/io/IOContext.java +0 -239
  107. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/io/InputDecorator.java +0 -67
  108. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/io/JsonStringEncoder.java +0 -408
  109. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/io/MergedStream.java +0 -145
  110. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/io/NumberInput.java +0 -303
  111. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/io/NumberOutput.java +0 -398
  112. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/io/OutputDecorator.java +0 -40
  113. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/io/SegmentedStringWriter.java +0 -104
  114. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/io/SerializedString.java +0 -114
  115. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/io/UTF32Reader.java +0 -214
  116. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/io/UTF8Writer.java +0 -387
  117. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/io/package.html +0 -4
  118. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/AbstractTypeResolver.java +0 -63
  119. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/AnnotationIntrospector.java +0 -1485
  120. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/BeanDescription.java +0 -171
  121. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/BeanProperty.java +0 -123
  122. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/BeanPropertyDefinition.java +0 -66
  123. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ClassIntrospector.java +0 -117
  124. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ContextualDeserializer.java +0 -38
  125. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ContextualKeyDeserializer.java +0 -33
  126. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ContextualSerializer.java +0 -38
  127. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/DeserializationConfig.java +0 -926
  128. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/DeserializationContext.java +0 -262
  129. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/DeserializationProblemHandler.java +0 -56
  130. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/DeserializerFactory.java +0 -356
  131. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/DeserializerProvider.java +0 -185
  132. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/Deserializers.java +0 -339
  133. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/HandlerInstantiator.java +0 -115
  134. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/InjectableValues.java +0 -85
  135. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/JsonDeserializer.java +0 -166
  136. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/JsonMappingException.java +0 -335
  137. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/JsonSerializable.java +0 -34
  138. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/JsonSerializableWithType.java +0 -22
  139. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/JsonSerializer.java +0 -138
  140. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/KeyDeserializer.java +0 -31
  141. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/KeyDeserializers.java +0 -21
  142. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/MapperConfig.java +0 -1154
  143. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/MappingIterator.java +0 -190
  144. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/MappingJsonFactory.java +0 -81
  145. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/Module.java +0 -255
  146. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ObjectMapper.java +0 -2885
  147. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ObjectReader.java +0 -958
  148. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ObjectWriter.java +0 -554
  149. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/PropertyNamingStrategy.java +0 -258
  150. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ResolvableDeserializer.java +0 -23
  151. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ResolvableSerializer.java +0 -23
  152. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/RuntimeJsonMappingException.java +0 -21
  153. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/SerializationConfig.java +0 -1041
  154. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/SerializerFactory.java +0 -198
  155. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/SerializerProvider.java +0 -552
  156. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/Serializers.java +0 -137
  157. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/TypeDeserializer.java +0 -118
  158. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/TypeSerializer.java +0 -164
  159. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/annotate/JacksonInject.java +0 -30
  160. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/annotate/JacksonStdImpl.java +0 -25
  161. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/annotate/JsonCachable.java +0 -32
  162. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/annotate/JsonDeserialize.java +0 -109
  163. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/annotate/JsonFilter.java +0 -31
  164. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/annotate/JsonRootName.java +0 -29
  165. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/annotate/JsonSerialize.java +0 -216
  166. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/annotate/JsonTypeIdResolver.java +0 -35
  167. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/annotate/JsonTypeResolver.java +0 -28
  168. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/annotate/JsonValueInstantiator.java +0 -26
  169. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/annotate/JsonView.java +0 -37
  170. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/annotate/NoClass.java +0 -19
  171. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/annotate/package-info.java +0 -5
  172. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/AbstractDeserializer.java +0 -102
  173. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/ArrayDeserializer.java +0 -28
  174. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/ArrayDeserializers.java +0 -11
  175. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/BasicDeserializerFactory.java +0 -894
  176. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/BeanDeserializer.java +0 -1537
  177. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/BeanDeserializerBuilder.java +0 -277
  178. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/BeanDeserializerFactory.java +0 -1474
  179. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/BeanDeserializerModifier.java +0 -58
  180. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/CollectionDeserializer.java +0 -47
  181. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/ContainerDeserializer.java +0 -14
  182. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/CustomDeserializerFactory.java +0 -227
  183. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/DateDeserializer.java +0 -9
  184. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/EnumDeserializer.java +0 -15
  185. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/EnumResolver.java +0 -17
  186. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/FromStringDeserializer.java +0 -13
  187. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/JsonNodeDeserializer.java +0 -54
  188. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/MapDeserializer.java +0 -44
  189. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/SettableAnyProperty.java +0 -177
  190. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/SettableBeanProperty.java +0 -827
  191. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/StdDeserializationContext.java +0 -326
  192. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/StdDeserializer.java +0 -94
  193. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/StdDeserializerProvider.java +0 -494
  194. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/StdDeserializers.java +0 -119
  195. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/StdKeyDeserializer.java +0 -12
  196. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/StdKeyDeserializers.java +0 -11
  197. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/StdScalarDeserializer.java +0 -13
  198. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/ThrowableDeserializer.java +0 -13
  199. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/UntypedObjectDeserializer.java +0 -9
  200. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/ValueInstantiator.java +0 -280
  201. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/ValueInstantiators.java +0 -52
  202. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/impl/BeanPropertyMap.java +0 -257
  203. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/impl/CreatorCollector.java +0 -141
  204. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/impl/CreatorProperty.java +0 -152
  205. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/impl/ExternalTypeHandler.java +0 -173
  206. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/impl/PropertyBasedCreator.java +0 -117
  207. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/impl/PropertyValue.java +0 -117
  208. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/impl/PropertyValueBuffer.java +0 -102
  209. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/impl/UnwrappedPropertyHandler.java +0 -41
  210. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/impl/ValueInjector.java +0 -45
  211. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/impl/package-info.java +0 -9
  212. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/package-info.java +0 -5
  213. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/std/AtomicBooleanDeserializer.java +0 -22
  214. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/std/AtomicReferenceDeserializer.java +0 -47
  215. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/std/CalendarDeserializer.java +0 -47
  216. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/std/ClassDeserializer.java +0 -49
  217. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/std/CollectionDeserializer.java +0 -265
  218. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/std/ContainerDeserializerBase.java +0 -37
  219. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/std/DateDeserializer.java +0 -30
  220. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/std/EnumDeserializer.java +0 -139
  221. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/std/EnumMapDeserializer.java +0 -90
  222. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/std/EnumSetDeserializer.java +0 -89
  223. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/std/FromStringDeserializer.java +0 -265
  224. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/std/JavaTypeDeserializer.java +0 -38
  225. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/std/JsonNodeDeserializer.java +0 -314
  226. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/std/MapDeserializer.java +0 -412
  227. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/std/ObjectArrayDeserializer.java +0 -201
  228. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/std/PrimitiveArrayDeserializers.java +0 -583
  229. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/std/StdDeserializer.java +0 -1136
  230. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/std/StdKeyDeserializer.java +0 -340
  231. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/std/StdKeyDeserializers.java +0 -108
  232. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/std/StdScalarDeserializer.java +0 -34
  233. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/std/StdValueInstantiator.java +0 -392
  234. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/std/StringCollectionDeserializer.java +0 -227
  235. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/std/StringDeserializer.java +0 -55
  236. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/std/ThrowableDeserializer.java +0 -164
  237. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/std/TimestampDeserializer.java +0 -30
  238. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/std/TokenBufferDeserializer.java +0 -36
  239. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/std/UntypedObjectDeserializer.java +0 -248
  240. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/deser/std/package-info.java +0 -15
  241. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/exc/UnrecognizedPropertyException.java +0 -75
  242. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ext/DOMDeserializer.java +0 -65
  243. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ext/OptionalHandlerFactory.java +0 -217
  244. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ext/package-info.java +0 -23
  245. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/introspect/Annotated.java +0 -85
  246. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/introspect/AnnotatedClass.java +0 -980
  247. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/introspect/AnnotatedConstructor.java +0 -143
  248. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/introspect/AnnotatedField.java +0 -119
  249. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/introspect/AnnotatedMember.java +0 -56
  250. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/introspect/AnnotatedMethod.java +0 -188
  251. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/introspect/AnnotatedMethodMap.java +0 -85
  252. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/introspect/AnnotatedParameter.java +0 -191
  253. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/introspect/AnnotatedWithParams.java +0 -195
  254. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/introspect/AnnotationMap.java +0 -101
  255. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/introspect/BasicBeanDescription.java +0 -615
  256. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/introspect/BasicClassIntrospector.java +0 -364
  257. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/introspect/JacksonAnnotationIntrospector.java +0 -813
  258. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/introspect/MemberKey.java +0 -83
  259. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/introspect/MethodFilter.java +0 -12
  260. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/introspect/NopAnnotationIntrospector.java +0 -209
  261. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/introspect/POJOPropertiesCollector.java +0 -713
  262. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/introspect/POJOPropertyBuilder.java +0 -648
  263. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/introspect/VisibilityChecker.java +0 -424
  264. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/introspect/package-info.java +0 -12
  265. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/jsontype/NamedType.java +0 -53
  266. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/jsontype/SubtypeResolver.java +0 -39
  267. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/jsontype/TypeIdResolver.java +0 -74
  268. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/jsontype/TypeResolverBuilder.java +0 -151
  269. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/jsontype/impl/AsArrayTypeDeserializer.java +0 -126
  270. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/jsontype/impl/AsArrayTypeSerializer.java +0 -110
  271. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/jsontype/impl/AsExternalTypeDeserializer.java +0 -37
  272. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/jsontype/impl/AsExternalTypeSerializer.java +0 -129
  273. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/jsontype/impl/AsPropertyTypeDeserializer.java +0 -191
  274. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/jsontype/impl/AsPropertyTypeSerializer.java +0 -69
  275. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/jsontype/impl/AsWrapperTypeDeserializer.java +0 -103
  276. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/jsontype/impl/AsWrapperTypeSerializer.java +0 -121
  277. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/jsontype/impl/ClassNameIdResolver.java +0 -138
  278. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/jsontype/impl/MinimalClassNameIdResolver.java +0 -66
  279. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/jsontype/impl/StdSubtypeResolver.java +0 -151
  280. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/jsontype/impl/StdTypeResolverBuilder.java +0 -202
  281. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/jsontype/impl/TypeDeserializerBase.java +0 -154
  282. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/jsontype/impl/TypeIdResolverBase.java +0 -37
  283. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/jsontype/impl/TypeNameIdResolver.java +0 -154
  284. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/jsontype/impl/TypeSerializerBase.java +0 -31
  285. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/jsontype/impl/package-info.java +0 -9
  286. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/jsontype/package-info.java +0 -10
  287. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/module/SimpleAbstractTypeResolver.java +0 -86
  288. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/module/SimpleDeserializers.java +0 -130
  289. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/module/SimpleKeyDeserializers.java +0 -59
  290. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/module/SimpleModule.java +0 -265
  291. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/module/SimpleSerializers.java +0 -206
  292. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/module/SimpleValueInstantiators.java +0 -45
  293. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/module/package-info.java +0 -16
  294. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/package-info.java +0 -34
  295. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/AnyGetterWriter.java +0 -48
  296. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/ArraySerializers.java +0 -7
  297. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/BasicSerializerFactory.java +0 -806
  298. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/BeanPropertyFilter.java +0 -30
  299. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/BeanPropertyWriter.java +0 -512
  300. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/BeanSerializer.java +0 -126
  301. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/BeanSerializerBuilder.java +0 -140
  302. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/BeanSerializerFactory.java +0 -780
  303. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/BeanSerializerModifier.java +0 -95
  304. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/ContainerSerializers.java +0 -8
  305. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/CustomSerializerFactory.java +0 -293
  306. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/EnumSerializer.java +0 -17
  307. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/FilterProvider.java +0 -23
  308. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/FilteredBeanPropertyWriter.java +0 -96
  309. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/JdkSerializers.java +0 -11
  310. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/MapSerializer.java +0 -58
  311. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/PropertyBuilder.java +0 -372
  312. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/ScalarSerializerBase.java +0 -18
  313. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/SerializerBase.java +0 -23
  314. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/StdKeySerializer.java +0 -10
  315. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/StdSerializerProvider.java +0 -852
  316. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/StdSerializers.java +0 -372
  317. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/ToStringSerializer.java +0 -14
  318. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/impl/FailingSerializer.java +0 -43
  319. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/impl/JsonSerializerMap.java +0 -93
  320. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/impl/PropertySerializerMap.java +0 -231
  321. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/impl/ReadOnlyClassToSerializerMap.java +0 -73
  322. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/impl/SerializerCache.java +0 -304
  323. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/impl/SimpleBeanPropertyFilter.java +0 -109
  324. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/impl/SimpleFilterProvider.java +0 -114
  325. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/impl/UnknownSerializer.java +0 -54
  326. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/impl/UnwrappingBeanPropertyWriter.java +0 -99
  327. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/impl/UnwrappingBeanSerializer.java +0 -76
  328. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/impl/package-info.java +0 -5
  329. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/package-info.java +0 -5
  330. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/AsArraySerializerBase.java +0 -185
  331. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/BeanSerializerBase.java +0 -340
  332. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/CalendarSerializer.java +0 -43
  333. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/CollectionSerializer.java +0 -113
  334. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/ContainerSerializerBase.java +0 -51
  335. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/DateSerializer.java +0 -42
  336. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/EnumMapSerializer.java +0 -218
  337. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/EnumSerializer.java +0 -84
  338. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/EnumSetSerializer.java +0 -47
  339. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/IndexedStringListSerializer.java +0 -116
  340. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/InetAddressSerializer.java +0 -51
  341. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/IterableSerializer.java +0 -63
  342. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/JsonValueSerializer.java +0 -233
  343. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/MapSerializer.java +0 -422
  344. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/NonTypedScalarSerializerBase.java +0 -34
  345. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/NullSerializer.java +0 -38
  346. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/ObjectArraySerializer.java +0 -281
  347. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/RawSerializer.java +0 -52
  348. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/ScalarSerializerBase.java +0 -52
  349. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/SerializableSerializer.java +0 -99
  350. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/SerializableWithTypeSerializer.java +0 -90
  351. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/SerializerBase.java +0 -184
  352. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/StaticListSerializerBase.java +0 -46
  353. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/StdArraySerializers.java +0 -476
  354. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/StdContainerSerializers.java +0 -249
  355. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/StdJdkSerializers.java +0 -195
  356. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/StdKeySerializer.java +0 -43
  357. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/StdKeySerializers.java +0 -95
  358. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/StringCollectionSerializer.java +0 -119
  359. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/StringSerializer.java +0 -36
  360. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/TimeZoneSerializer.java +0 -38
  361. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/ToStringSerializer.java +0 -73
  362. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/TokenBufferSerializer.java +0 -66
  363. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/type/ArrayType.java +0 -260
  364. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/type/ClassKey.java +0 -94
  365. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/type/CollectionLikeType.java +0 -204
  366. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/type/CollectionType.java +0 -94
  367. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/type/HierarchicType.java +0 -88
  368. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/type/MapLikeType.java +0 -265
  369. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/type/MapType.java +0 -146
  370. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/type/SimpleType.java +0 -250
  371. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/type/TypeBase.java +0 -148
  372. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/type/TypeBindings.java +0 -351
  373. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/type/TypeFactory.java +0 -1165
  374. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/type/TypeModifier.java +0 -38
  375. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/type/TypeParser.java +0 -134
  376. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/type/package-info.java +0 -10
  377. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/util/Annotations.java +0 -23
  378. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/util/ArrayBuilders.java +0 -293
  379. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/util/BeanUtil.java +0 -260
  380. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/util/ClassUtil.java +0 -645
  381. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/util/Comparators.java +0 -48
  382. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/util/EnumResolver.java +0 -108
  383. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/util/EnumValues.java +0 -82
  384. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/util/ISO8601DateFormat.java +0 -52
  385. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/util/ISO8601Utils.java +0 -230
  386. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/util/JSONPObject.java +0 -105
  387. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/util/JSONWrappedObject.java +0 -117
  388. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/util/LRUMap.java +0 -28
  389. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/util/LinkedNode.java +0 -45
  390. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/util/Named.java +0 -10
  391. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/util/ObjectBuffer.java +0 -257
  392. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/util/PrimitiveArrayBuilder.java +0 -180
  393. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/util/Provider.java +0 -21
  394. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/util/RootNameLookup.java +0 -54
  395. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/util/StdDateFormat.java +0 -348
  396. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/util/package-info.java +0 -4
  397. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/node/ArrayNode.java +0 -758
  398. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/node/BaseJsonNode.java +0 -122
  399. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/node/BigIntegerNode.java +0 -104
  400. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/node/BinaryNode.java +0 -136
  401. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/node/BooleanNode.java +0 -84
  402. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/node/ContainerNode.java +0 -185
  403. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/node/DecimalNode.java +0 -96
  404. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/node/DoubleNode.java +0 -106
  405. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/node/IntNode.java +0 -122
  406. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/node/JsonNodeFactory.java +0 -222
  407. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/node/LongNode.java +0 -99
  408. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/node/MissingNode.java +0 -97
  409. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/node/NodeCursor.java +0 -222
  410. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/node/NullNode.java +0 -58
  411. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/node/NumericNode.java +0 -72
  412. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/node/ObjectNode.java +0 -696
  413. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/node/POJONode.java +0 -145
  414. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/node/TextNode.java +0 -299
  415. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/node/TreeTraversingParser.java +0 -383
  416. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/node/ValueNode.java +0 -58
  417. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/node/package-info.java +0 -8
  418. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/package-info.java +0 -30
  419. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/schema/JsonSchema.java +0 -82
  420. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/schema/JsonSerializableSchema.java +0 -46
  421. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/schema/SchemaAware.java +0 -25
  422. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/schema/package-info.java +0 -5
  423. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/sym/BytesToNameCanonicalizer.java +0 -969
  424. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/sym/CharsToNameCanonicalizer.java +0 -578
  425. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/sym/Name.java +0 -50
  426. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/sym/Name1.java +0 -44
  427. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/sym/Name2.java +0 -40
  428. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/sym/Name3.java +0 -39
  429. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/sym/NameN.java +0 -68
  430. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/sym/package-info.java +0 -5
  431. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/type/JavaType.java +0 -503
  432. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/type/TypeReference.java +0 -60
  433. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/type/package-info.java +0 -8
  434. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/util/BufferRecycler.java +0 -109
  435. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/util/ByteArrayBuilder.java +0 -294
  436. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/util/CharTypes.java +0 -237
  437. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/util/DefaultPrettyPrinter.java +0 -282
  438. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/util/InternCache.java +0 -49
  439. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/util/JsonGeneratorDelegate.java +0 -273
  440. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/util/JsonParserDelegate.java +0 -251
  441. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/util/JsonParserSequence.java +0 -150
  442. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/util/MinimalPrettyPrinter.java +0 -152
  443. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/util/TextBuffer.java +0 -707
  444. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/util/TokenBuffer.java +0 -1233
  445. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/util/VersionUtil.java +0 -79
  446. data/test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/util/package-info.java +0 -4
@@ -1,188 +0,0 @@
1
- package sh.calaba.org.codehaus.jackson.impl;
2
-
3
- import sh.calaba.org.codehaus.jackson.*;
4
- import sh.calaba.org.codehaus.jackson.util.CharTypes;
5
-
6
- /**
7
- * Extension of {@link JsonStreamContext}, which implements
8
- * core methods needed, and also exposes
9
- * more complete API to parser implementation classes.
10
- */
11
- public final class JsonReadContext
12
- extends JsonStreamContext
13
- {
14
- // // // Configuration
15
-
16
- protected final JsonReadContext _parent;
17
-
18
- // // // Location information (minus source reference)
19
-
20
- protected int _lineNr;
21
- protected int _columnNr;
22
-
23
- protected String _currentName;
24
-
25
- /*
26
- /**********************************************************
27
- /* Simple instance reuse slots; speeds up things
28
- /* a bit (10-15%) for docs with lots of small
29
- /* arrays/objects (for which allocation was
30
- /* visible in profile stack frames)
31
- /**********************************************************
32
- */
33
-
34
- protected JsonReadContext _child = null;
35
-
36
- /*
37
- /**********************************************************
38
- /* Instance construction, reuse
39
- /**********************************************************
40
- */
41
-
42
- public JsonReadContext(JsonReadContext parent, int type, int lineNr, int colNr)
43
- {
44
- super();
45
- _type = type;
46
- _parent = parent;
47
- _lineNr = lineNr;
48
- _columnNr = colNr;
49
- _index = -1;
50
- }
51
-
52
- protected final void reset(int type, int lineNr, int colNr)
53
- {
54
- _type = type;
55
- _index = -1;
56
- _lineNr = lineNr;
57
- _columnNr = colNr;
58
- _currentName = null;
59
- }
60
-
61
- // // // Factory methods
62
-
63
- public static JsonReadContext createRootContext(int lineNr, int colNr)
64
- {
65
- return new JsonReadContext(null, TYPE_ROOT, lineNr, colNr);
66
- }
67
-
68
- /**
69
- * @since 1.9
70
- */
71
- public static JsonReadContext createRootContext()
72
- {
73
- return new JsonReadContext(null, TYPE_ROOT, 1, 0);
74
- }
75
-
76
- public final JsonReadContext createChildArrayContext(int lineNr, int colNr)
77
- {
78
- JsonReadContext ctxt = _child;
79
- if (ctxt == null) {
80
- _child = ctxt = new JsonReadContext(this, TYPE_ARRAY, lineNr, colNr);
81
- return ctxt;
82
- }
83
- ctxt.reset(TYPE_ARRAY, lineNr, colNr);
84
- return ctxt;
85
- }
86
-
87
- public final JsonReadContext createChildObjectContext(int lineNr, int colNr)
88
- {
89
- JsonReadContext ctxt = _child;
90
- if (ctxt == null) {
91
- _child = ctxt = new JsonReadContext(this, TYPE_OBJECT, lineNr, colNr);
92
- return ctxt;
93
- }
94
- ctxt.reset(TYPE_OBJECT, lineNr, colNr);
95
- return ctxt;
96
- }
97
-
98
- /*
99
- /**********************************************************
100
- /* Abstract method implementation
101
- /**********************************************************
102
- */
103
-
104
- @Override
105
- public final String getCurrentName() { return _currentName; }
106
-
107
- @Override
108
- public final JsonReadContext getParent() { return _parent; }
109
-
110
- /*
111
- /**********************************************************
112
- /* Extended API
113
- /**********************************************************
114
- */
115
-
116
- /**
117
- * @return Location pointing to the point where the context
118
- * start marker was found
119
- */
120
- public final JsonLocation getStartLocation(Object srcRef)
121
- {
122
- /* We don't keep track of offsets at this level (only
123
- * reader does)
124
- */
125
- long totalChars = -1L;
126
-
127
- return new JsonLocation(srcRef, totalChars, _lineNr, _columnNr);
128
- }
129
-
130
- /*
131
- /**********************************************************
132
- /* State changes
133
- /**********************************************************
134
- */
135
-
136
- public final boolean expectComma()
137
- {
138
- /* Assumption here is that we will be getting a value (at least
139
- * before calling this method again), and
140
- * so will auto-increment index to avoid having to do another call
141
- */
142
- int ix = ++_index; // starts from -1
143
- return (_type != TYPE_ROOT && ix > 0);
144
- }
145
-
146
- public void setCurrentName(String name)
147
- {
148
- _currentName = name;
149
- }
150
-
151
- /*
152
- /**********************************************************
153
- /* Overridden standard methods
154
- /**********************************************************
155
- */
156
-
157
- /**
158
- * Overridden to provide developer readable "JsonPath" representation
159
- * of the context.
160
- */
161
- @Override
162
- public final String toString()
163
- {
164
- StringBuilder sb = new StringBuilder(64);
165
- switch (_type) {
166
- case TYPE_ROOT:
167
- sb.append("/");
168
- break;
169
- case TYPE_ARRAY:
170
- sb.append('[');
171
- sb.append(getCurrentIndex());
172
- sb.append(']');
173
- break;
174
- case TYPE_OBJECT:
175
- sb.append('{');
176
- if (_currentName != null) {
177
- sb.append('"');
178
- CharTypes.appendQuoted(sb, _currentName);
179
- sb.append('"');
180
- } else {
181
- sb.append('?');
182
- }
183
- sb.append('}');
184
- break;
185
- }
186
- return sb.toString();
187
- }
188
- }
@@ -1,178 +0,0 @@
1
- package sh.calaba.org.codehaus.jackson.impl;
2
-
3
- import sh.calaba.org.codehaus.jackson.*;
4
-
5
- /**
6
- * Extension of {@link JsonStreamContext}, which implements
7
- * core methods needed, and also exposes
8
- * more complete API to generator implementation classes.
9
- */
10
- public class JsonWriteContext
11
- extends JsonStreamContext
12
- {
13
- // // // Return values for writeValue()
14
-
15
- public final static int STATUS_OK_AS_IS = 0;
16
- public final static int STATUS_OK_AFTER_COMMA = 1;
17
- public final static int STATUS_OK_AFTER_COLON = 2;
18
- public final static int STATUS_OK_AFTER_SPACE = 3; // in root context
19
- public final static int STATUS_EXPECT_VALUE = 4;
20
- public final static int STATUS_EXPECT_NAME = 5;
21
-
22
- protected final JsonWriteContext _parent;
23
-
24
- /**
25
- * Name of the field of which value is to be parsed; only
26
- * used for OBJECT contexts
27
- */
28
- protected String _currentName;
29
-
30
- /*
31
- /**********************************************************
32
- /* Simple instance reuse slots; speed up things
33
- /* a bit (10-15%) for docs with lots of small
34
- /* arrays/objects
35
- /**********************************************************
36
- */
37
-
38
- protected JsonWriteContext _child = null;
39
-
40
- /*
41
- /**********************************************************
42
- /* Life-cycle
43
- /**********************************************************
44
- */
45
-
46
- protected JsonWriteContext(int type, JsonWriteContext parent)
47
- {
48
- super();
49
- _type = type;
50
- _parent = parent;
51
- _index = -1;
52
- }
53
-
54
- // // // Factory methods
55
-
56
- public static JsonWriteContext createRootContext()
57
- {
58
- return new JsonWriteContext(TYPE_ROOT, null);
59
- }
60
-
61
- private final JsonWriteContext reset(int type) {
62
- _type = type;
63
- _index = -1;
64
- _currentName = null;
65
- return this;
66
- }
67
-
68
- public final JsonWriteContext createChildArrayContext()
69
- {
70
- JsonWriteContext ctxt = _child;
71
- if (ctxt == null) {
72
- _child = ctxt = new JsonWriteContext(TYPE_ARRAY, this);
73
- return ctxt;
74
- }
75
- return ctxt.reset(TYPE_ARRAY);
76
- }
77
-
78
- public final JsonWriteContext createChildObjectContext()
79
- {
80
- JsonWriteContext ctxt = _child;
81
- if (ctxt == null) {
82
- _child = ctxt = new JsonWriteContext(TYPE_OBJECT, this);
83
- return ctxt;
84
- }
85
- return ctxt.reset(TYPE_OBJECT);
86
- }
87
-
88
- // // // Shared API
89
-
90
- @Override
91
- public final JsonWriteContext getParent() { return _parent; }
92
-
93
- @Override
94
- public final String getCurrentName() { return _currentName; }
95
-
96
- // // // API sub-classes are to implement
97
-
98
- /**
99
- * Method that writer is to call before it writes a field name.
100
- *
101
- * @return Index of the field entry (0-based)
102
- */
103
- public final int writeFieldName(String name)
104
- {
105
- if (_type == TYPE_OBJECT) {
106
- if (_currentName != null) { // just wrote a name...
107
- return STATUS_EXPECT_VALUE;
108
- }
109
- _currentName = name;
110
- return (_index < 0) ? STATUS_OK_AS_IS : STATUS_OK_AFTER_COMMA;
111
- }
112
- return STATUS_EXPECT_VALUE;
113
- }
114
-
115
- public final int writeValue()
116
- {
117
- // Most likely, object:
118
- if (_type == TYPE_OBJECT) {
119
- if (_currentName == null) {
120
- return STATUS_EXPECT_NAME;
121
- }
122
- _currentName = null;
123
- ++_index;
124
- return STATUS_OK_AFTER_COLON;
125
- }
126
-
127
- // Ok, array?
128
- if (_type == TYPE_ARRAY) {
129
- int ix = _index;
130
- ++_index;
131
- return (ix < 0) ? STATUS_OK_AS_IS : STATUS_OK_AFTER_COMMA;
132
- }
133
-
134
- // Nope, root context
135
- // No commas within root context, but need space
136
- ++_index;
137
- return (_index == 0) ? STATUS_OK_AS_IS : STATUS_OK_AFTER_SPACE;
138
- }
139
-
140
- // // // Internally used abstract methods
141
-
142
- protected final void appendDesc(StringBuilder sb)
143
- {
144
- if (_type == TYPE_OBJECT) {
145
- sb.append('{');
146
- if (_currentName != null) {
147
- sb.append('"');
148
- // !!! TODO: Name chars should be escaped?
149
- sb.append(_currentName);
150
- sb.append('"');
151
- } else {
152
- sb.append('?');
153
- }
154
- sb.append('}');
155
- } else if (_type == TYPE_ARRAY) {
156
- sb.append('[');
157
- sb.append(getCurrentIndex());
158
- sb.append(']');
159
- } else {
160
- // nah, ROOT:
161
- sb.append("/");
162
- }
163
- }
164
-
165
- // // // Overridden standard methods
166
-
167
- /**
168
- * Overridden to provide developer writeable "JsonPath" representation
169
- * of the context.
170
- */
171
- @Override
172
- public final String toString()
173
- {
174
- StringBuilder sb = new StringBuilder(64);
175
- appendDesc(sb);
176
- return sb.toString();
177
- }
178
- }
@@ -1,1815 +0,0 @@
1
- package sh.calaba.org.codehaus.jackson.impl;
2
-
3
- import java.io.*;
4
-
5
- import sh.calaba.org.codehaus.jackson.*;
6
- import sh.calaba.org.codehaus.jackson.io.IOContext;
7
- import sh.calaba.org.codehaus.jackson.sym.CharsToNameCanonicalizer;
8
- import sh.calaba.org.codehaus.jackson.util.*;
9
-
10
- /**
11
- * This is a concrete implementation of {@link JsonParser}, which is
12
- * based on a {@link java.io.Reader} to handle low-level character
13
- * conversion tasks.
14
- */
15
- public final class ReaderBasedParser
16
- extends JsonParserBase
17
- {
18
- /*
19
- /**********************************************************
20
- /* Input configuration
21
- /**********************************************************
22
- */
23
-
24
- /**
25
- * Reader that can be used for reading more content, if one
26
- * buffer from input source, but in some cases pre-loaded buffer
27
- * is handed to the parser.
28
- */
29
- protected Reader _reader;
30
-
31
- /**
32
- * Current buffer from which data is read; generally data is read into
33
- * buffer from input source.
34
- */
35
- protected char[] _inputBuffer;
36
-
37
- /*
38
- /**********************************************************
39
- /* Configuration
40
- /**********************************************************
41
- */
42
-
43
- protected ObjectCodec _objectCodec;
44
-
45
- final protected CharsToNameCanonicalizer _symbols;
46
-
47
- /*
48
- /**********************************************************
49
- /* Parsing state
50
- /**********************************************************
51
- */
52
-
53
- /**
54
- * Flag that indicates that the current token has not yet
55
- * been fully processed, and needs to be finished for
56
- * some access (or skipped to obtain the next token)
57
- */
58
- protected boolean _tokenIncomplete = false;
59
-
60
- /*
61
- /**********************************************************
62
- /* Life-cycle
63
- /**********************************************************
64
- */
65
-
66
- public ReaderBasedParser(IOContext ctxt, int features, Reader r,
67
- ObjectCodec codec, CharsToNameCanonicalizer st)
68
- {
69
- super(ctxt, features);
70
- _reader = r;
71
- _inputBuffer = ctxt.allocTokenBuffer();
72
- _objectCodec = codec;
73
- _symbols = st;
74
- }
75
-
76
- /*
77
- /**********************************************************
78
- /* Base method defs, overrides
79
- /**********************************************************
80
- */
81
-
82
- @Override
83
- public ObjectCodec getCodec() {
84
- return _objectCodec;
85
- }
86
-
87
- @Override
88
- public void setCodec(ObjectCodec c) {
89
- _objectCodec = c;
90
- }
91
-
92
- @Override
93
- public int releaseBuffered(Writer w) throws IOException
94
- {
95
- int count = _inputEnd - _inputPtr;
96
- if (count < 1) {
97
- return 0;
98
- }
99
- // let's just advance ptr to end
100
- int origPtr = _inputPtr;
101
- w.write(_inputBuffer, origPtr, count);
102
- return count;
103
- }
104
-
105
- @Override
106
- public Object getInputSource() {
107
- return _reader;
108
- }
109
-
110
- @Override
111
- protected final boolean loadMore() throws IOException
112
- {
113
- _currInputProcessed += _inputEnd;
114
- _currInputRowStart -= _inputEnd;
115
-
116
- if (_reader != null) {
117
- int count = _reader.read(_inputBuffer, 0, _inputBuffer.length);
118
- if (count > 0) {
119
- _inputPtr = 0;
120
- _inputEnd = count;
121
- return true;
122
- }
123
- // End of input
124
- _closeInput();
125
- // Should never return 0, so let's fail
126
- if (count == 0) {
127
- throw new IOException("Reader returned 0 characters when trying to read "+_inputEnd);
128
- }
129
- }
130
- return false;
131
- }
132
-
133
- protected char getNextChar(String eofMsg)
134
- throws IOException, JsonParseException
135
- {
136
- if (_inputPtr >= _inputEnd) {
137
- if (!loadMore()) {
138
- _reportInvalidEOF(eofMsg);
139
- }
140
- }
141
- return _inputBuffer[_inputPtr++];
142
- }
143
-
144
- @Override
145
- protected void _closeInput() throws IOException
146
- {
147
- /* 25-Nov-2008, tatus: As per [JACKSON-16] we are not to call close()
148
- * on the underlying Reader, unless we "own" it, or auto-closing
149
- * feature is enabled.
150
- * One downside is that when using our optimized
151
- * Reader (granted, we only do that for UTF-32...) this
152
- * means that buffer recycling won't work correctly.
153
- */
154
- if (_reader != null) {
155
- if (_ioContext.isResourceManaged() || isEnabled(Feature.AUTO_CLOSE_SOURCE)) {
156
- _reader.close();
157
- }
158
- _reader = null;
159
- }
160
- }
161
-
162
- /**
163
- * Method called to release internal buffers owned by the base
164
- * reader. This may be called along with {@link #_closeInput} (for
165
- * example, when explicitly closing this reader instance), or
166
- * separately (if need be).
167
- */
168
- @Override
169
- protected void _releaseBuffers()
170
- throws IOException
171
- {
172
- super._releaseBuffers();
173
- char[] buf = _inputBuffer;
174
- if (buf != null) {
175
- _inputBuffer = null;
176
- _ioContext.releaseTokenBuffer(buf);
177
- }
178
- }
179
-
180
- /*
181
- /**********************************************************
182
- /* Public API, data access
183
- /**********************************************************
184
- */
185
-
186
- /**
187
- * Method for accessing textual representation of the current event;
188
- * if no current event (before first call to {@link #nextToken}, or
189
- * after encountering end-of-input), returns null.
190
- * Method can be called for any event.
191
- */
192
- @Override
193
- public final String getText()
194
- throws IOException, JsonParseException
195
- {
196
- JsonToken t = _currToken;
197
- if (t == JsonToken.VALUE_STRING) {
198
- if (_tokenIncomplete) {
199
- _tokenIncomplete = false;
200
- _finishString(); // only strings can be incomplete
201
- }
202
- return _textBuffer.contentsAsString();
203
- }
204
- return _getText2(t);
205
- }
206
-
207
- protected final String _getText2(JsonToken t)
208
- {
209
- if (t == null) {
210
- return null;
211
- }
212
- switch (t) {
213
- case FIELD_NAME:
214
- return _parsingContext.getCurrentName();
215
-
216
- case VALUE_STRING:
217
- // fall through
218
- case VALUE_NUMBER_INT:
219
- case VALUE_NUMBER_FLOAT:
220
- return _textBuffer.contentsAsString();
221
- }
222
- return t.asString();
223
- }
224
-
225
- @Override
226
- public char[] getTextCharacters()
227
- throws IOException, JsonParseException
228
- {
229
- if (_currToken != null) { // null only before/after document
230
- switch (_currToken) {
231
-
232
- case FIELD_NAME:
233
- if (!_nameCopied) {
234
- String name = _parsingContext.getCurrentName();
235
- int nameLen = name.length();
236
- if (_nameCopyBuffer == null) {
237
- _nameCopyBuffer = _ioContext.allocNameCopyBuffer(nameLen);
238
- } else if (_nameCopyBuffer.length < nameLen) {
239
- _nameCopyBuffer = new char[nameLen];
240
- }
241
- name.getChars(0, nameLen, _nameCopyBuffer, 0);
242
- _nameCopied = true;
243
- }
244
- return _nameCopyBuffer;
245
-
246
- case VALUE_STRING:
247
- if (_tokenIncomplete) {
248
- _tokenIncomplete = false;
249
- _finishString(); // only strings can be incomplete
250
- }
251
- // fall through
252
- case VALUE_NUMBER_INT:
253
- case VALUE_NUMBER_FLOAT:
254
- return _textBuffer.getTextBuffer();
255
-
256
- default:
257
- return _currToken.asCharArray();
258
- }
259
- }
260
- return null;
261
- }
262
-
263
- @Override
264
- public int getTextLength()
265
- throws IOException, JsonParseException
266
- {
267
- if (_currToken != null) { // null only before/after document
268
- switch (_currToken) {
269
-
270
- case FIELD_NAME:
271
- return _parsingContext.getCurrentName().length();
272
- case VALUE_STRING:
273
- if (_tokenIncomplete) {
274
- _tokenIncomplete = false;
275
- _finishString(); // only strings can be incomplete
276
- }
277
- // fall through
278
- case VALUE_NUMBER_INT:
279
- case VALUE_NUMBER_FLOAT:
280
- return _textBuffer.size();
281
-
282
- default:
283
- return _currToken.asCharArray().length;
284
- }
285
- }
286
- return 0;
287
- }
288
-
289
- @Override
290
- public int getTextOffset() throws IOException, JsonParseException
291
- {
292
- // Most have offset of 0, only some may have other values:
293
- if (_currToken != null) {
294
- switch (_currToken) {
295
- case FIELD_NAME:
296
- return 0;
297
- case VALUE_STRING:
298
- if (_tokenIncomplete) {
299
- _tokenIncomplete = false;
300
- _finishString(); // only strings can be incomplete
301
- }
302
- // fall through
303
- case VALUE_NUMBER_INT:
304
- case VALUE_NUMBER_FLOAT:
305
- return _textBuffer.getTextOffset();
306
- }
307
- }
308
- return 0;
309
- }
310
-
311
- @Override
312
- public byte[] getBinaryValue(Base64Variant b64variant)
313
- throws IOException, JsonParseException
314
- {
315
- if (_currToken != JsonToken.VALUE_STRING &&
316
- (_currToken != JsonToken.VALUE_EMBEDDED_OBJECT || _binaryValue == null)) {
317
- _reportError("Current token ("+_currToken+") not VALUE_STRING or VALUE_EMBEDDED_OBJECT, can not access as binary");
318
- }
319
- /* To ensure that we won't see inconsistent data, better clear up
320
- * state...
321
- */
322
- if (_tokenIncomplete) {
323
- try {
324
- _binaryValue = _decodeBase64(b64variant);
325
- } catch (IllegalArgumentException iae) {
326
- throw _constructError("Failed to decode VALUE_STRING as base64 ("+b64variant+"): "+iae.getMessage());
327
- }
328
- /* let's clear incomplete only now; allows for accessing other
329
- * textual content in error cases
330
- */
331
- _tokenIncomplete = false;
332
- } else { // may actually require conversion...
333
- if (_binaryValue == null) {
334
- ByteArrayBuilder builder = _getByteArrayBuilder();
335
- _decodeBase64(getText(), builder, b64variant);
336
- _binaryValue = builder.toByteArray();
337
- }
338
- }
339
- return _binaryValue;
340
- }
341
-
342
- /*
343
- /**********************************************************
344
- /* Public API, traversal
345
- /**********************************************************
346
- */
347
-
348
- /**
349
- * @return Next token from the stream, if any found, or null
350
- * to indicate end-of-input
351
- */
352
- @Override
353
- public JsonToken nextToken()
354
- throws IOException, JsonParseException
355
- {
356
- _numTypesValid = NR_UNKNOWN;
357
-
358
- /* First: field names are special -- we will always tokenize
359
- * (part of) value along with field name to simplify
360
- * state handling. If so, can and need to use secondary token:
361
- */
362
- if (_currToken == JsonToken.FIELD_NAME) {
363
- return _nextAfterName();
364
- }
365
- if (_tokenIncomplete) {
366
- _skipString(); // only strings can be partial
367
- }
368
- int i = _skipWSOrEnd();
369
- if (i < 0) { // end-of-input
370
- /* 19-Feb-2009, tatu: Should actually close/release things
371
- * like input source, symbol table and recyclable buffers now.
372
- */
373
- close();
374
- return (_currToken = null);
375
- }
376
-
377
- /* First, need to ensure we know the starting location of token
378
- * after skipping leading white space
379
- */
380
- _tokenInputTotal = _currInputProcessed + _inputPtr - 1;
381
- _tokenInputRow = _currInputRow;
382
- _tokenInputCol = _inputPtr - _currInputRowStart - 1;
383
-
384
- // finally: clear any data retained so far
385
- _binaryValue = null;
386
-
387
- // Closing scope?
388
- if (i == INT_RBRACKET) {
389
- if (!_parsingContext.inArray()) {
390
- _reportMismatchedEndMarker(i, '}');
391
- }
392
- _parsingContext = _parsingContext.getParent();
393
- return (_currToken = JsonToken.END_ARRAY);
394
- }
395
- if (i == INT_RCURLY) {
396
- if (!_parsingContext.inObject()) {
397
- _reportMismatchedEndMarker(i, ']');
398
- }
399
- _parsingContext = _parsingContext.getParent();
400
- return (_currToken = JsonToken.END_OBJECT);
401
- }
402
-
403
- // Nope: do we then expect a comma?
404
- if (_parsingContext.expectComma()) {
405
- if (i != INT_COMMA) {
406
- _reportUnexpectedChar(i, "was expecting comma to separate "+_parsingContext.getTypeDesc()+" entries");
407
- }
408
- i = _skipWS();
409
- }
410
-
411
- /* And should we now have a name? Always true for
412
- * Object contexts, since the intermediate 'expect-value'
413
- * state is never retained.
414
- */
415
- boolean inObject = _parsingContext.inObject();
416
- if (inObject) {
417
- // First, field name itself:
418
- String name = _parseFieldName(i);
419
- _parsingContext.setCurrentName(name);
420
- _currToken = JsonToken.FIELD_NAME;
421
- i = _skipWS();
422
- if (i != INT_COLON) {
423
- _reportUnexpectedChar(i, "was expecting a colon to separate field name and value");
424
- }
425
- i = _skipWS();
426
- }
427
-
428
- // Ok: we must have a value... what is it?
429
-
430
- JsonToken t;
431
-
432
- switch (i) {
433
- case INT_QUOTE:
434
- _tokenIncomplete = true;
435
- t = JsonToken.VALUE_STRING;
436
- break;
437
- case INT_LBRACKET:
438
- if (!inObject) {
439
- _parsingContext = _parsingContext.createChildArrayContext(_tokenInputRow, _tokenInputCol);
440
- }
441
- t = JsonToken.START_ARRAY;
442
- break;
443
- case INT_LCURLY:
444
- if (!inObject) {
445
- _parsingContext = _parsingContext.createChildObjectContext(_tokenInputRow, _tokenInputCol);
446
- }
447
- t = JsonToken.START_OBJECT;
448
- break;
449
- case INT_RBRACKET:
450
- case INT_RCURLY:
451
- // Error: neither is valid at this point; valid closers have
452
- // been handled earlier
453
- _reportUnexpectedChar(i, "expected a value");
454
- case INT_t:
455
- _matchToken("true", 1);
456
- t = JsonToken.VALUE_TRUE;
457
- break;
458
- case INT_f:
459
- _matchToken("false", 1);
460
- t = JsonToken.VALUE_FALSE;
461
- break;
462
- case INT_n:
463
- _matchToken("null", 1);
464
- t = JsonToken.VALUE_NULL;
465
- break;
466
-
467
- case INT_MINUS:
468
- /* Should we have separate handling for plus? Although
469
- * it is not allowed per se, it may be erroneously used,
470
- * and could be indicate by a more specific error message.
471
- */
472
- case INT_0:
473
- case INT_1:
474
- case INT_2:
475
- case INT_3:
476
- case INT_4:
477
- case INT_5:
478
- case INT_6:
479
- case INT_7:
480
- case INT_8:
481
- case INT_9:
482
- t = parseNumberText(i);
483
- break;
484
- default:
485
- t = _handleUnexpectedValue(i);
486
- break;
487
- }
488
-
489
- if (inObject) {
490
- _nextToken = t;
491
- return _currToken;
492
- }
493
- _currToken = t;
494
- return t;
495
- }
496
-
497
- private final JsonToken _nextAfterName()
498
- {
499
- _nameCopied = false; // need to invalidate if it was copied
500
- JsonToken t = _nextToken;
501
- _nextToken = null;
502
- // Also: may need to start new context?
503
- if (t == JsonToken.START_ARRAY) {
504
- _parsingContext = _parsingContext.createChildArrayContext(_tokenInputRow, _tokenInputCol);
505
- } else if (t == JsonToken.START_OBJECT) {
506
- _parsingContext = _parsingContext.createChildObjectContext(_tokenInputRow, _tokenInputCol);
507
- }
508
- return (_currToken = t);
509
- }
510
-
511
- /*
512
- @Override
513
- public boolean nextFieldName(SerializableString str)
514
- throws IOException, JsonParseException
515
- */
516
-
517
- // note: identical to one in Utf8StreamParser
518
- @Override
519
- public String nextTextValue()
520
- throws IOException, JsonParseException
521
- {
522
- if (_currToken == JsonToken.FIELD_NAME) { // mostly copied from '_nextAfterName'
523
- _nameCopied = false;
524
- JsonToken t = _nextToken;
525
- _nextToken = null;
526
- _currToken = t;
527
- if (t == JsonToken.VALUE_STRING) {
528
- if (_tokenIncomplete) {
529
- _tokenIncomplete = false;
530
- _finishString();
531
- }
532
- return _textBuffer.contentsAsString();
533
- }
534
- if (t == JsonToken.START_ARRAY) {
535
- _parsingContext = _parsingContext.createChildArrayContext(_tokenInputRow, _tokenInputCol);
536
- } else if (t == JsonToken.START_OBJECT) {
537
- _parsingContext = _parsingContext.createChildObjectContext(_tokenInputRow, _tokenInputCol);
538
- }
539
- return null;
540
- }
541
- // !!! TODO: optimize this case as well
542
- return (nextToken() == JsonToken.VALUE_STRING) ? getText() : null;
543
- }
544
-
545
- // note: identical to one in Utf8StreamParser
546
- @Override
547
- public int nextIntValue(int defaultValue)
548
- throws IOException, JsonParseException
549
- {
550
- if (_currToken == JsonToken.FIELD_NAME) {
551
- _nameCopied = false;
552
- JsonToken t = _nextToken;
553
- _nextToken = null;
554
- _currToken = t;
555
- if (t == JsonToken.VALUE_NUMBER_INT) {
556
- return getIntValue();
557
- }
558
- if (t == JsonToken.START_ARRAY) {
559
- _parsingContext = _parsingContext.createChildArrayContext(_tokenInputRow, _tokenInputCol);
560
- } else if (t == JsonToken.START_OBJECT) {
561
- _parsingContext = _parsingContext.createChildObjectContext(_tokenInputRow, _tokenInputCol);
562
- }
563
- return defaultValue;
564
- }
565
- // !!! TODO: optimize this case as well
566
- return (nextToken() == JsonToken.VALUE_NUMBER_INT) ? getIntValue() : defaultValue;
567
- }
568
-
569
- // note: identical to one in Utf8StreamParser
570
- @Override
571
- public long nextLongValue(long defaultValue)
572
- throws IOException, JsonParseException
573
- {
574
- if (_currToken == JsonToken.FIELD_NAME) { // mostly copied from '_nextAfterName'
575
- _nameCopied = false;
576
- JsonToken t = _nextToken;
577
- _nextToken = null;
578
- _currToken = t;
579
- if (t == JsonToken.VALUE_NUMBER_INT) {
580
- return getLongValue();
581
- }
582
- if (t == JsonToken.START_ARRAY) {
583
- _parsingContext = _parsingContext.createChildArrayContext(_tokenInputRow, _tokenInputCol);
584
- } else if (t == JsonToken.START_OBJECT) {
585
- _parsingContext = _parsingContext.createChildObjectContext(_tokenInputRow, _tokenInputCol);
586
- }
587
- return defaultValue;
588
- }
589
- // !!! TODO: optimize this case as well
590
- return (nextToken() == JsonToken.VALUE_NUMBER_INT) ? getLongValue() : defaultValue;
591
- }
592
-
593
- // note: identical to one in Utf8StreamParser
594
- @Override
595
- public Boolean nextBooleanValue()
596
- throws IOException, JsonParseException
597
- {
598
- if (_currToken == JsonToken.FIELD_NAME) { // mostly copied from '_nextAfterName'
599
- _nameCopied = false;
600
- JsonToken t = _nextToken;
601
- _nextToken = null;
602
- _currToken = t;
603
- if (t == JsonToken.VALUE_TRUE) {
604
- return Boolean.TRUE;
605
- }
606
- if (t == JsonToken.VALUE_FALSE) {
607
- return Boolean.FALSE;
608
- }
609
- if (t == JsonToken.START_ARRAY) {
610
- _parsingContext = _parsingContext.createChildArrayContext(_tokenInputRow, _tokenInputCol);
611
- } else if (t == JsonToken.START_OBJECT) {
612
- _parsingContext = _parsingContext.createChildObjectContext(_tokenInputRow, _tokenInputCol);
613
- }
614
- return null;
615
- }
616
- switch (nextToken()) {
617
- case VALUE_TRUE:
618
- return Boolean.TRUE;
619
- case VALUE_FALSE:
620
- return Boolean.FALSE;
621
- }
622
- return null;
623
- }
624
-
625
- @Override
626
- public void close() throws IOException
627
- {
628
- super.close();
629
- _symbols.release();
630
- }
631
-
632
- /*
633
- /**********************************************************
634
- /* Internal methods, number parsing
635
- /* (note: in 1.8 and prior, part of "ReaderBasedNumericParser"
636
- /**********************************************************
637
- */
638
-
639
- /**
640
- * Initial parsing method for number values. It needs to be able
641
- * to parse enough input to be able to determine whether the
642
- * value is to be considered a simple integer value, or a more
643
- * generic decimal value: latter of which needs to be expressed
644
- * as a floating point number. The basic rule is that if the number
645
- * has no fractional or exponential part, it is an integer; otherwise
646
- * a floating point number.
647
- *<p>
648
- * Because much of input has to be processed in any case, no partial
649
- * parsing is done: all input text will be stored for further
650
- * processing. However, actual numeric value conversion will be
651
- * deferred, since it is usually the most complicated and costliest
652
- * part of processing.
653
- */
654
- protected final JsonToken parseNumberText(int ch)
655
- throws IOException, JsonParseException
656
- {
657
- /* Although we will always be complete with respect to textual
658
- * representation (that is, all characters will be parsed),
659
- * actual conversion to a number is deferred. Thus, need to
660
- * note that no representations are valid yet
661
- */
662
- boolean negative = (ch == INT_MINUS);
663
- int ptr = _inputPtr;
664
- int startPtr = ptr-1; // to include sign/digit already read
665
- final int inputLen = _inputEnd;
666
-
667
- dummy_loop:
668
- do { // dummy loop, to be able to break out
669
- if (negative) { // need to read the next digit
670
- if (ptr >= _inputEnd) {
671
- break dummy_loop;
672
- }
673
- ch = _inputBuffer[ptr++];
674
- // First check: must have a digit to follow minus sign
675
- if (ch > INT_9 || ch < INT_0) {
676
- _inputPtr = ptr;
677
- return _handleInvalidNumberStart(ch, true);
678
- }
679
- /* (note: has been checked for non-negative already, in
680
- * the dispatching code that determined it should be
681
- * a numeric value)
682
- */
683
- }
684
- // One special case, leading zero(es):
685
- if (ch == INT_0) {
686
- break dummy_loop;
687
- }
688
-
689
- /* First, let's see if the whole number is contained within
690
- * the input buffer unsplit. This should be the common case;
691
- * and to simplify processing, we will just reparse contents
692
- * in the alternative case (number split on buffer boundary)
693
- */
694
-
695
- int intLen = 1; // already got one
696
-
697
- // First let's get the obligatory integer part:
698
-
699
- int_loop:
700
- while (true) {
701
- if (ptr >= _inputEnd) {
702
- break dummy_loop;
703
- }
704
- ch = (int) _inputBuffer[ptr++];
705
- if (ch < INT_0 || ch > INT_9) {
706
- break int_loop;
707
- }
708
- ++intLen;
709
- }
710
-
711
- int fractLen = 0;
712
-
713
- // And then see if we get other parts
714
- if (ch == INT_DECIMAL_POINT) { // yes, fraction
715
- fract_loop:
716
- while (true) {
717
- if (ptr >= inputLen) {
718
- break dummy_loop;
719
- }
720
- ch = (int) _inputBuffer[ptr++];
721
- if (ch < INT_0 || ch > INT_9) {
722
- break fract_loop;
723
- }
724
- ++fractLen;
725
- }
726
- // must be followed by sequence of ints, one minimum
727
- if (fractLen == 0) {
728
- reportUnexpectedNumberChar(ch, "Decimal point not followed by a digit");
729
- }
730
- }
731
-
732
- int expLen = 0;
733
- if (ch == INT_e || ch == INT_E) { // and/or exponent
734
- if (ptr >= inputLen) {
735
- break dummy_loop;
736
- }
737
- // Sign indicator?
738
- ch = (int) _inputBuffer[ptr++];
739
- if (ch == INT_MINUS || ch == INT_PLUS) { // yup, skip for now
740
- if (ptr >= inputLen) {
741
- break dummy_loop;
742
- }
743
- ch = (int) _inputBuffer[ptr++];
744
- }
745
- while (ch <= INT_9 && ch >= INT_0) {
746
- ++expLen;
747
- if (ptr >= inputLen) {
748
- break dummy_loop;
749
- }
750
- ch = (int) _inputBuffer[ptr++];
751
- }
752
- // must be followed by sequence of ints, one minimum
753
- if (expLen == 0) {
754
- reportUnexpectedNumberChar(ch, "Exponent indicator not followed by a digit");
755
- }
756
- }
757
-
758
- // Got it all: let's add to text buffer for parsing, access
759
- --ptr; // need to push back following separator
760
- _inputPtr = ptr;
761
- int len = ptr-startPtr;
762
- _textBuffer.resetWithShared(_inputBuffer, startPtr, len);
763
- return reset(negative, intLen, fractLen, expLen);
764
- } while (false);
765
-
766
- _inputPtr = negative ? (startPtr+1) : startPtr;
767
- return parseNumberText2(negative);
768
- }
769
-
770
- /**
771
- * Method called to parse a number, when the primary parse
772
- * method has failed to parse it, due to it being split on
773
- * buffer boundary. As a result code is very similar, except
774
- * that it has to explicitly copy contents to the text buffer
775
- * instead of just sharing the main input buffer.
776
- */
777
- private final JsonToken parseNumberText2(boolean negative)
778
- throws IOException, JsonParseException
779
- {
780
- char[] outBuf = _textBuffer.emptyAndGetCurrentSegment();
781
- int outPtr = 0;
782
-
783
- // Need to prepend sign?
784
- if (negative) {
785
- outBuf[outPtr++] = '-';
786
- }
787
-
788
- // This is the place to do leading-zero check(s) too:
789
- int intLen = 0;
790
- char c = (_inputPtr < _inputEnd) ? _inputBuffer[_inputPtr++] : getNextChar("No digit following minus sign");
791
- if (c == '0') {
792
- c = _verifyNoLeadingZeroes();
793
- }
794
- boolean eof = false;
795
-
796
- // Ok, first the obligatory integer part:
797
- int_loop:
798
- while (c >= '0' && c <= '9') {
799
- ++intLen;
800
- if (outPtr >= outBuf.length) {
801
- outBuf = _textBuffer.finishCurrentSegment();
802
- outPtr = 0;
803
- }
804
- outBuf[outPtr++] = c;
805
- if (_inputPtr >= _inputEnd && !loadMore()) {
806
- // EOF is legal for main level int values
807
- c = CHAR_NULL;
808
- eof = true;
809
- break int_loop;
810
- }
811
- c = _inputBuffer[_inputPtr++];
812
- }
813
- // Also, integer part is not optional
814
- if (intLen == 0) {
815
- reportInvalidNumber("Missing integer part (next char "+_getCharDesc(c)+")");
816
- }
817
-
818
- int fractLen = 0;
819
- // And then see if we get other parts
820
- if (c == '.') { // yes, fraction
821
- outBuf[outPtr++] = c;
822
-
823
- fract_loop:
824
- while (true) {
825
- if (_inputPtr >= _inputEnd && !loadMore()) {
826
- eof = true;
827
- break fract_loop;
828
- }
829
- c = _inputBuffer[_inputPtr++];
830
- if (c < INT_0 || c > INT_9) {
831
- break fract_loop;
832
- }
833
- ++fractLen;
834
- if (outPtr >= outBuf.length) {
835
- outBuf = _textBuffer.finishCurrentSegment();
836
- outPtr = 0;
837
- }
838
- outBuf[outPtr++] = c;
839
- }
840
- // must be followed by sequence of ints, one minimum
841
- if (fractLen == 0) {
842
- reportUnexpectedNumberChar(c, "Decimal point not followed by a digit");
843
- }
844
- }
845
-
846
- int expLen = 0;
847
- if (c == 'e' || c == 'E') { // exponent?
848
- if (outPtr >= outBuf.length) {
849
- outBuf = _textBuffer.finishCurrentSegment();
850
- outPtr = 0;
851
- }
852
- outBuf[outPtr++] = c;
853
- // Not optional, can require that we get one more char
854
- c = (_inputPtr < _inputEnd) ? _inputBuffer[_inputPtr++]
855
- : getNextChar("expected a digit for number exponent");
856
- // Sign indicator?
857
- if (c == '-' || c == '+') {
858
- if (outPtr >= outBuf.length) {
859
- outBuf = _textBuffer.finishCurrentSegment();
860
- outPtr = 0;
861
- }
862
- outBuf[outPtr++] = c;
863
- // Likewise, non optional:
864
- c = (_inputPtr < _inputEnd) ? _inputBuffer[_inputPtr++]
865
- : getNextChar("expected a digit for number exponent");
866
- }
867
-
868
- exp_loop:
869
- while (c <= INT_9 && c >= INT_0) {
870
- ++expLen;
871
- if (outPtr >= outBuf.length) {
872
- outBuf = _textBuffer.finishCurrentSegment();
873
- outPtr = 0;
874
- }
875
- outBuf[outPtr++] = c;
876
- if (_inputPtr >= _inputEnd && !loadMore()) {
877
- eof = true;
878
- break exp_loop;
879
- }
880
- c = _inputBuffer[_inputPtr++];
881
- }
882
- // must be followed by sequence of ints, one minimum
883
- if (expLen == 0) {
884
- reportUnexpectedNumberChar(c, "Exponent indicator not followed by a digit");
885
- }
886
- }
887
-
888
- // Ok; unless we hit end-of-input, need to push last char read back
889
- if (!eof) {
890
- --_inputPtr;
891
- }
892
- _textBuffer.setCurrentLength(outPtr);
893
- // And there we have it!
894
- return reset(negative, intLen, fractLen, expLen);
895
- }
896
-
897
- /**
898
- * Method called when we have seen one zero, and want to ensure
899
- * it is not followed by another
900
- */
901
- private final char _verifyNoLeadingZeroes()
902
- throws IOException, JsonParseException
903
- {
904
- // Ok to have plain "0"
905
- if (_inputPtr >= _inputEnd && !loadMore()) {
906
- return '0';
907
- }
908
- char ch = _inputBuffer[_inputPtr];
909
- // if not followed by a number (probably '.'); return zero as is, to be included
910
- if (ch < '0' || ch > '9') {
911
- return '0';
912
- }
913
- if (!isEnabled(Feature.ALLOW_NUMERIC_LEADING_ZEROS)) {
914
- reportInvalidNumber("Leading zeroes not allowed");
915
- }
916
- // if so, just need to skip either all zeroes (if followed by number); or all but one (if non-number)
917
- ++_inputPtr; // Leading zero to be skipped
918
- if (ch == INT_0) {
919
- while (_inputPtr < _inputEnd || loadMore()) {
920
- ch = _inputBuffer[_inputPtr];
921
- if (ch < '0' || ch > '9') { // followed by non-number; retain one zero
922
- return '0';
923
- }
924
- ++_inputPtr; // skip previous zero
925
- if (ch != '0') { // followed by other number; return
926
- break;
927
- }
928
- }
929
- }
930
- return ch;
931
- }
932
-
933
- /**
934
- * Method called if expected numeric value (due to leading sign) does not
935
- * look like a number
936
- */
937
- protected JsonToken _handleInvalidNumberStart(int ch, boolean negative)
938
- throws IOException, JsonParseException
939
- {
940
- if (ch == 'I') {
941
- if (_inputPtr >= _inputEnd) {
942
- if (!loadMore()) {
943
- _reportInvalidEOFInValue();
944
- }
945
- }
946
- ch = _inputBuffer[_inputPtr++];
947
- if (ch == 'N') {
948
- String match = negative ? "-INF" :"+INF";
949
- _matchToken(match, 3);
950
- if (isEnabled(Feature.ALLOW_NON_NUMERIC_NUMBERS)) {
951
- return resetAsNaN(match, negative ? Double.NEGATIVE_INFINITY : Double.POSITIVE_INFINITY);
952
- }
953
- _reportError("Non-standard token '"+match+"': enable JsonParser.Feature.ALLOW_NON_NUMERIC_NUMBERS to allow");
954
- } else if (ch == 'n') {
955
- String match = negative ? "-Infinity" :"+Infinity";
956
- _matchToken(match, 3);
957
- if (isEnabled(Feature.ALLOW_NON_NUMERIC_NUMBERS)) {
958
- return resetAsNaN(match, negative ? Double.NEGATIVE_INFINITY : Double.POSITIVE_INFINITY);
959
- }
960
- _reportError("Non-standard token '"+match+"': enable JsonParser.Feature.ALLOW_NON_NUMERIC_NUMBERS to allow");
961
- }
962
- }
963
- reportUnexpectedNumberChar(ch, "expected digit (0-9) to follow minus sign, for valid numeric value");
964
- return null;
965
- }
966
-
967
- /*
968
- /**********************************************************
969
- /* Internal methods, secondary parsing
970
- /**********************************************************
971
- */
972
-
973
- protected final String _parseFieldName(int i)
974
- throws IOException, JsonParseException
975
- {
976
- if (i != INT_QUOTE) {
977
- return _handleUnusualFieldName(i);
978
- }
979
- /* First: let's try to see if we have a simple name: one that does
980
- * not cross input buffer boundary, and does not contain escape
981
- * sequences.
982
- */
983
- int ptr = _inputPtr;
984
- int hash = 0;
985
- final int inputLen = _inputEnd;
986
-
987
- if (ptr < inputLen) {
988
- final int[] codes = CharTypes.getInputCodeLatin1();
989
- final int maxCode = codes.length;
990
-
991
- do {
992
- int ch = _inputBuffer[ptr];
993
- if (ch < maxCode && codes[ch] != 0) {
994
- if (ch == '"') {
995
- int start = _inputPtr;
996
- _inputPtr = ptr+1; // to skip the quote
997
- return _symbols.findSymbol(_inputBuffer, start, ptr - start, hash);
998
- }
999
- break;
1000
- }
1001
- hash = (hash * 31) + ch;
1002
- ++ptr;
1003
- } while (ptr < inputLen);
1004
- }
1005
-
1006
- int start = _inputPtr;
1007
- _inputPtr = ptr;
1008
- return _parseFieldName2(start, hash, INT_QUOTE);
1009
- }
1010
-
1011
- private String _parseFieldName2(int startPtr, int hash, int endChar)
1012
- throws IOException, JsonParseException
1013
- {
1014
- _textBuffer.resetWithShared(_inputBuffer, startPtr, (_inputPtr - startPtr));
1015
-
1016
- /* Output pointers; calls will also ensure that the buffer is
1017
- * not shared and has room for at least one more char.
1018
- */
1019
- char[] outBuf = _textBuffer.getCurrentSegment();
1020
- int outPtr = _textBuffer.getCurrentSegmentSize();
1021
-
1022
- while (true) {
1023
- if (_inputPtr >= _inputEnd) {
1024
- if (!loadMore()) {
1025
- _reportInvalidEOF(": was expecting closing '"+((char) endChar)+"' for name");
1026
- }
1027
- }
1028
- char c = _inputBuffer[_inputPtr++];
1029
- int i = (int) c;
1030
- if (i <= INT_BACKSLASH) {
1031
- if (i == INT_BACKSLASH) {
1032
- /* Although chars outside of BMP are to be escaped as
1033
- * an UTF-16 surrogate pair, does that affect decoding?
1034
- * For now let's assume it does not.
1035
- */
1036
- c = _decodeEscaped();
1037
- } else if (i <= endChar) {
1038
- if (i == endChar) {
1039
- break;
1040
- }
1041
- if (i < INT_SPACE) {
1042
- _throwUnquotedSpace(i, "name");
1043
- }
1044
- }
1045
- }
1046
- hash = (hash * 31) + i;
1047
- // Ok, let's add char to output:
1048
- outBuf[outPtr++] = c;
1049
-
1050
- // Need more room?
1051
- if (outPtr >= outBuf.length) {
1052
- outBuf = _textBuffer.finishCurrentSegment();
1053
- outPtr = 0;
1054
- }
1055
- }
1056
- _textBuffer.setCurrentLength(outPtr);
1057
- {
1058
- TextBuffer tb = _textBuffer;
1059
- char[] buf = tb.getTextBuffer();
1060
- int start = tb.getTextOffset();
1061
- int len = tb.size();
1062
-
1063
- return _symbols.findSymbol(buf, start, len, hash);
1064
- }
1065
- }
1066
-
1067
- /**
1068
- * Method called when we see non-white space character other
1069
- * than double quote, when expecting a field name.
1070
- * In standard mode will just throw an expection; but
1071
- * in non-standard modes may be able to parse name.
1072
- *
1073
- * @since 1.2
1074
- */
1075
- protected final String _handleUnusualFieldName(int i)
1076
- throws IOException, JsonParseException
1077
- {
1078
- // [JACKSON-173]: allow single quotes
1079
- if (i == INT_APOSTROPHE && isEnabled(Feature.ALLOW_SINGLE_QUOTES)) {
1080
- return _parseApostropheFieldName();
1081
- }
1082
- // [JACKSON-69]: allow unquoted names if feature enabled:
1083
- if (!isEnabled(Feature.ALLOW_UNQUOTED_FIELD_NAMES)) {
1084
- _reportUnexpectedChar(i, "was expecting double-quote to start field name");
1085
- }
1086
- final int[] codes = CharTypes.getInputCodeLatin1JsNames();
1087
- final int maxCode = codes.length;
1088
-
1089
- // Also: first char must be a valid name char, but NOT be number
1090
- boolean firstOk;
1091
-
1092
- if (i < maxCode) { // identifier, and not a number
1093
- firstOk = (codes[i] == 0) && (i < INT_0 || i > INT_9);
1094
- } else {
1095
- firstOk = Character.isJavaIdentifierPart((char) i);
1096
- }
1097
- if (!firstOk) {
1098
- _reportUnexpectedChar(i, "was expecting either valid name character (for unquoted name) or double-quote (for quoted) to start field name");
1099
- }
1100
- int ptr = _inputPtr;
1101
- int hash = 0;
1102
- final int inputLen = _inputEnd;
1103
-
1104
- if (ptr < inputLen) {
1105
- do {
1106
- int ch = _inputBuffer[ptr];
1107
- if (ch < maxCode) {
1108
- if (codes[ch] != 0) {
1109
- int start = _inputPtr-1; // -1 to bring back first char
1110
- _inputPtr = ptr;
1111
- return _symbols.findSymbol(_inputBuffer, start, ptr - start, hash);
1112
- }
1113
- } else if (!Character.isJavaIdentifierPart((char) ch)) {
1114
- int start = _inputPtr-1; // -1 to bring back first char
1115
- _inputPtr = ptr;
1116
- return _symbols.findSymbol(_inputBuffer, start, ptr - start, hash);
1117
- }
1118
- hash = (hash * 31) + ch;
1119
- ++ptr;
1120
- } while (ptr < inputLen);
1121
- }
1122
- int start = _inputPtr-1;
1123
- _inputPtr = ptr;
1124
- return _parseUnusualFieldName2(start, hash, codes);
1125
- }
1126
-
1127
- protected final String _parseApostropheFieldName()
1128
- throws IOException, JsonParseException
1129
- {
1130
- // Note: mostly copy of_parseFieldName
1131
- int ptr = _inputPtr;
1132
- int hash = 0;
1133
- final int inputLen = _inputEnd;
1134
-
1135
- if (ptr < inputLen) {
1136
- final int[] codes = CharTypes.getInputCodeLatin1();
1137
- final int maxCode = codes.length;
1138
-
1139
- do {
1140
- int ch = _inputBuffer[ptr];
1141
- if (ch == '\'') {
1142
- int start = _inputPtr;
1143
- _inputPtr = ptr+1; // to skip the quote
1144
- return _symbols.findSymbol(_inputBuffer, start, ptr - start, hash);
1145
- }
1146
- if (ch < maxCode && codes[ch] != 0) {
1147
- break;
1148
- }
1149
- hash = (hash * 31) + ch;
1150
- ++ptr;
1151
- } while (ptr < inputLen);
1152
- }
1153
-
1154
- int start = _inputPtr;
1155
- _inputPtr = ptr;
1156
-
1157
- return _parseFieldName2(start, hash, INT_APOSTROPHE);
1158
- }
1159
-
1160
- /**
1161
- * Method for handling cases where first non-space character
1162
- * of an expected value token is not legal for standard JSON content.
1163
- *
1164
- * @since 1.3
1165
- */
1166
- protected final JsonToken _handleUnexpectedValue(int i)
1167
- throws IOException, JsonParseException
1168
- {
1169
- // Most likely an error, unless we are to allow single-quote-strings
1170
- switch (i) {
1171
- case '\'':
1172
- /* [JACKSON-173]: allow single quotes. Unlike with regular
1173
- * Strings, we'll eagerly parse contents; this so that there's
1174
- * no need to store information on quote char used.
1175
- *
1176
- * Also, no separation to fast/slow parsing; we'll just do
1177
- * one regular (~= slowish) parsing, to keep code simple
1178
- */
1179
- if (isEnabled(Feature.ALLOW_SINGLE_QUOTES)) {
1180
- return _handleApostropheValue();
1181
- }
1182
- break;
1183
- case 'N':
1184
- _matchToken("NaN", 1);
1185
- if (isEnabled(Feature.ALLOW_NON_NUMERIC_NUMBERS)) {
1186
- return resetAsNaN("NaN", Double.NaN);
1187
- }
1188
- _reportError("Non-standard token 'NaN': enable JsonParser.Feature.ALLOW_NON_NUMERIC_NUMBERS to allow");
1189
- break;
1190
- case '+': // note: '-' is taken as number
1191
- if (_inputPtr >= _inputEnd) {
1192
- if (!loadMore()) {
1193
- _reportInvalidEOFInValue();
1194
- }
1195
- }
1196
- return _handleInvalidNumberStart(_inputBuffer[_inputPtr++], false);
1197
- }
1198
- _reportUnexpectedChar(i, "expected a valid value (number, String, array, object, 'true', 'false' or 'null')");
1199
- return null;
1200
- }
1201
-
1202
- /**
1203
- * @since 1.8
1204
- */
1205
- protected final JsonToken _handleApostropheValue()
1206
- throws IOException, JsonParseException
1207
- {
1208
- char[] outBuf = _textBuffer.emptyAndGetCurrentSegment();
1209
- int outPtr = _textBuffer.getCurrentSegmentSize();
1210
-
1211
- while (true) {
1212
- if (_inputPtr >= _inputEnd) {
1213
- if (!loadMore()) {
1214
- _reportInvalidEOF(": was expecting closing quote for a string value");
1215
- }
1216
- }
1217
- char c = _inputBuffer[_inputPtr++];
1218
- int i = (int) c;
1219
- if (i <= INT_BACKSLASH) {
1220
- if (i == INT_BACKSLASH) {
1221
- /* Although chars outside of BMP are to be escaped as
1222
- * an UTF-16 surrogate pair, does that affect decoding?
1223
- * For now let's assume it does not.
1224
- */
1225
- c = _decodeEscaped();
1226
- } else if (i <= INT_APOSTROPHE) {
1227
- if (i == INT_APOSTROPHE) {
1228
- break;
1229
- }
1230
- if (i < INT_SPACE) {
1231
- _throwUnquotedSpace(i, "string value");
1232
- }
1233
- }
1234
- }
1235
- // Need more room?
1236
- if (outPtr >= outBuf.length) {
1237
- outBuf = _textBuffer.finishCurrentSegment();
1238
- outPtr = 0;
1239
- }
1240
- // Ok, let's add char to output:
1241
- outBuf[outPtr++] = c;
1242
- }
1243
- _textBuffer.setCurrentLength(outPtr);
1244
- return JsonToken.VALUE_STRING;
1245
- }
1246
-
1247
- /**
1248
- * @since 1.2
1249
- */
1250
- private String _parseUnusualFieldName2(int startPtr, int hash, int[] codes)
1251
- throws IOException, JsonParseException
1252
- {
1253
- _textBuffer.resetWithShared(_inputBuffer, startPtr, (_inputPtr - startPtr));
1254
- char[] outBuf = _textBuffer.getCurrentSegment();
1255
- int outPtr = _textBuffer.getCurrentSegmentSize();
1256
- final int maxCode = codes.length;
1257
-
1258
- while (true) {
1259
- if (_inputPtr >= _inputEnd) {
1260
- if (!loadMore()) { // acceptable for now (will error out later)
1261
- break;
1262
- }
1263
- }
1264
- char c = _inputBuffer[_inputPtr];
1265
- int i = (int) c;
1266
- if (i <= maxCode) {
1267
- if (codes[i] != 0) {
1268
- break;
1269
- }
1270
- } else if (!Character.isJavaIdentifierPart(c)) {
1271
- break;
1272
- }
1273
- ++_inputPtr;
1274
- hash = (hash * 31) + i;
1275
- // Ok, let's add char to output:
1276
- outBuf[outPtr++] = c;
1277
-
1278
- // Need more room?
1279
- if (outPtr >= outBuf.length) {
1280
- outBuf = _textBuffer.finishCurrentSegment();
1281
- outPtr = 0;
1282
- }
1283
- }
1284
- _textBuffer.setCurrentLength(outPtr);
1285
- {
1286
- TextBuffer tb = _textBuffer;
1287
- char[] buf = tb.getTextBuffer();
1288
- int start = tb.getTextOffset();
1289
- int len = tb.size();
1290
-
1291
- return _symbols.findSymbol(buf, start, len, hash);
1292
- }
1293
- }
1294
-
1295
- @Override
1296
- protected void _finishString()
1297
- throws IOException, JsonParseException
1298
- {
1299
- /* First: let's try to see if we have simple String value: one
1300
- * that does not cross input buffer boundary, and does not
1301
- * contain escape sequences.
1302
- */
1303
- int ptr = _inputPtr;
1304
- final int inputLen = _inputEnd;
1305
-
1306
- if (ptr < inputLen) {
1307
- final int[] codes = CharTypes.getInputCodeLatin1();
1308
- final int maxCode = codes.length;
1309
-
1310
- do {
1311
- int ch = _inputBuffer[ptr];
1312
- if (ch < maxCode && codes[ch] != 0) {
1313
- if (ch == '"') {
1314
- _textBuffer.resetWithShared(_inputBuffer, _inputPtr, (ptr-_inputPtr));
1315
- _inputPtr = ptr+1;
1316
- // Yes, we got it all
1317
- return;
1318
- }
1319
- break;
1320
- }
1321
- ++ptr;
1322
- } while (ptr < inputLen);
1323
- }
1324
-
1325
- /* Either ran out of input, or bumped into an escape
1326
- * sequence...
1327
- */
1328
- _textBuffer.resetWithCopy(_inputBuffer, _inputPtr, (ptr-_inputPtr));
1329
- _inputPtr = ptr;
1330
- _finishString2();
1331
- }
1332
-
1333
- protected void _finishString2()
1334
- throws IOException, JsonParseException
1335
- {
1336
- char[] outBuf = _textBuffer.getCurrentSegment();
1337
- int outPtr = _textBuffer.getCurrentSegmentSize();
1338
-
1339
- while (true) {
1340
- if (_inputPtr >= _inputEnd) {
1341
- if (!loadMore()) {
1342
- _reportInvalidEOF(": was expecting closing quote for a string value");
1343
- }
1344
- }
1345
- char c = _inputBuffer[_inputPtr++];
1346
- int i = (int) c;
1347
- if (i <= INT_BACKSLASH) {
1348
- if (i == INT_BACKSLASH) {
1349
- /* Although chars outside of BMP are to be escaped as
1350
- * an UTF-16 surrogate pair, does that affect decoding?
1351
- * For now let's assume it does not.
1352
- */
1353
- c = _decodeEscaped();
1354
- } else if (i <= INT_QUOTE) {
1355
- if (i == INT_QUOTE) {
1356
- break;
1357
- }
1358
- if (i < INT_SPACE) {
1359
- _throwUnquotedSpace(i, "string value");
1360
- }
1361
- }
1362
- }
1363
- // Need more room?
1364
- if (outPtr >= outBuf.length) {
1365
- outBuf = _textBuffer.finishCurrentSegment();
1366
- outPtr = 0;
1367
- }
1368
- // Ok, let's add char to output:
1369
- outBuf[outPtr++] = c;
1370
- }
1371
- _textBuffer.setCurrentLength(outPtr);
1372
- }
1373
-
1374
- /**
1375
- * Method called to skim through rest of unparsed String value,
1376
- * if it is not needed. This can be done bit faster if contents
1377
- * need not be stored for future access.
1378
- */
1379
- protected void _skipString()
1380
- throws IOException, JsonParseException
1381
- {
1382
- _tokenIncomplete = false;
1383
-
1384
- int inputPtr = _inputPtr;
1385
- int inputLen = _inputEnd;
1386
- char[] inputBuffer = _inputBuffer;
1387
-
1388
- while (true) {
1389
- if (inputPtr >= inputLen) {
1390
- _inputPtr = inputPtr;
1391
- if (!loadMore()) {
1392
- _reportInvalidEOF(": was expecting closing quote for a string value");
1393
- }
1394
- inputPtr = _inputPtr;
1395
- inputLen = _inputEnd;
1396
- }
1397
- char c = inputBuffer[inputPtr++];
1398
- int i = (int) c;
1399
- if (i <= INT_BACKSLASH) {
1400
- if (i == INT_BACKSLASH) {
1401
- /* Although chars outside of BMP are to be escaped as
1402
- * an UTF-16 surrogate pair, does that affect decoding?
1403
- * For now let's assume it does not.
1404
- */
1405
- _inputPtr = inputPtr;
1406
- c = _decodeEscaped();
1407
- inputPtr = _inputPtr;
1408
- inputLen = _inputEnd;
1409
- } else if (i <= INT_QUOTE) {
1410
- if (i == INT_QUOTE) {
1411
- _inputPtr = inputPtr;
1412
- break;
1413
- }
1414
- if (i < INT_SPACE) {
1415
- _inputPtr = inputPtr;
1416
- _throwUnquotedSpace(i, "string value");
1417
- }
1418
- }
1419
- }
1420
- }
1421
- }
1422
-
1423
- /*
1424
- /**********************************************************
1425
- /* Internal methods, other parsing
1426
- /**********************************************************
1427
- */
1428
-
1429
- /**
1430
- * We actually need to check the character value here
1431
- * (to see if we have \n following \r).
1432
- */
1433
- protected final void _skipCR() throws IOException
1434
- {
1435
- if (_inputPtr < _inputEnd || loadMore()) {
1436
- if (_inputBuffer[_inputPtr] == '\n') {
1437
- ++_inputPtr;
1438
- }
1439
- }
1440
- ++_currInputRow;
1441
- _currInputRowStart = _inputPtr;
1442
- }
1443
-
1444
- protected final void _skipLF() throws IOException
1445
- {
1446
- ++_currInputRow;
1447
- _currInputRowStart = _inputPtr;
1448
- }
1449
-
1450
- private final int _skipWS()
1451
- throws IOException, JsonParseException
1452
- {
1453
- while (_inputPtr < _inputEnd || loadMore()) {
1454
- int i = (int) _inputBuffer[_inputPtr++];
1455
- if (i > INT_SPACE) {
1456
- if (i != INT_SLASH) {
1457
- return i;
1458
- }
1459
- _skipComment();
1460
- } else if (i != INT_SPACE) {
1461
- if (i == INT_LF) {
1462
- _skipLF();
1463
- } else if (i == INT_CR) {
1464
- _skipCR();
1465
- } else if (i != INT_TAB) {
1466
- _throwInvalidSpace(i);
1467
- }
1468
- }
1469
- }
1470
- throw _constructError("Unexpected end-of-input within/between "+_parsingContext.getTypeDesc()+" entries");
1471
- }
1472
-
1473
- private final int _skipWSOrEnd()
1474
- throws IOException, JsonParseException
1475
- {
1476
- while ((_inputPtr < _inputEnd) || loadMore()) {
1477
- int i = (int) _inputBuffer[_inputPtr++];
1478
- if (i > INT_SPACE) {
1479
- if (i == INT_SLASH) {
1480
- _skipComment();
1481
- continue;
1482
- }
1483
- return i;
1484
- }
1485
- if (i != INT_SPACE) {
1486
- if (i == INT_LF) {
1487
- _skipLF();
1488
- } else if (i == INT_CR) {
1489
- _skipCR();
1490
- } else if (i != INT_TAB) {
1491
- _throwInvalidSpace(i);
1492
- }
1493
- }
1494
- }
1495
- // We ran out of input...
1496
- _handleEOF();
1497
- return -1;
1498
- }
1499
-
1500
- private final void _skipComment()
1501
- throws IOException, JsonParseException
1502
- {
1503
- if (!isEnabled(Feature.ALLOW_COMMENTS)) {
1504
- _reportUnexpectedChar('/', "maybe a (non-standard) comment? (not recognized as one since Feature 'ALLOW_COMMENTS' not enabled for parser)");
1505
- }
1506
- // First: check which comment (if either) it is:
1507
- if (_inputPtr >= _inputEnd && !loadMore()) {
1508
- _reportInvalidEOF(" in a comment");
1509
- }
1510
- char c = _inputBuffer[_inputPtr++];
1511
- if (c == '/') {
1512
- _skipCppComment();
1513
- } else if (c == '*') {
1514
- _skipCComment();
1515
- } else {
1516
- _reportUnexpectedChar(c, "was expecting either '*' or '/' for a comment");
1517
- }
1518
- }
1519
-
1520
- private final void _skipCComment()
1521
- throws IOException, JsonParseException
1522
- {
1523
- // Ok: need the matching '*/'
1524
- main_loop:
1525
- while ((_inputPtr < _inputEnd) || loadMore()) {
1526
- int i = (int) _inputBuffer[_inputPtr++];
1527
- if (i <= INT_ASTERISK) {
1528
- if (i == INT_ASTERISK) { // end?
1529
- if ((_inputPtr >= _inputEnd) && !loadMore()) {
1530
- break main_loop;
1531
- }
1532
- if (_inputBuffer[_inputPtr] == INT_SLASH) {
1533
- ++_inputPtr;
1534
- return;
1535
- }
1536
- continue;
1537
- }
1538
- if (i < INT_SPACE) {
1539
- if (i == INT_LF) {
1540
- _skipLF();
1541
- } else if (i == INT_CR) {
1542
- _skipCR();
1543
- } else if (i != INT_TAB) {
1544
- _throwInvalidSpace(i);
1545
- }
1546
- }
1547
- }
1548
- }
1549
- _reportInvalidEOF(" in a comment");
1550
- }
1551
-
1552
- private final void _skipCppComment()
1553
- throws IOException, JsonParseException
1554
- {
1555
- // Ok: need to find EOF or linefeed
1556
- while ((_inputPtr < _inputEnd) || loadMore()) {
1557
- int i = (int) _inputBuffer[_inputPtr++];
1558
- if (i < INT_SPACE) {
1559
- if (i == INT_LF) {
1560
- _skipLF();
1561
- break;
1562
- } else if (i == INT_CR) {
1563
- _skipCR();
1564
- break;
1565
- } else if (i != INT_TAB) {
1566
- _throwInvalidSpace(i);
1567
- }
1568
- }
1569
- }
1570
- }
1571
-
1572
- @Override
1573
- protected final char _decodeEscaped()
1574
- throws IOException, JsonParseException
1575
- {
1576
- if (_inputPtr >= _inputEnd) {
1577
- if (!loadMore()) {
1578
- _reportInvalidEOF(" in character escape sequence");
1579
- }
1580
- }
1581
- char c = _inputBuffer[_inputPtr++];
1582
-
1583
- switch ((int) c) {
1584
- // First, ones that are mapped
1585
- case INT_b:
1586
- return '\b';
1587
- case INT_t:
1588
- return '\t';
1589
- case INT_n:
1590
- return '\n';
1591
- case INT_f:
1592
- return '\f';
1593
- case INT_r:
1594
- return '\r';
1595
-
1596
- // And these are to be returned as they are
1597
- case INT_QUOTE:
1598
- case INT_SLASH:
1599
- case INT_BACKSLASH:
1600
- return c;
1601
-
1602
- case INT_u: // and finally hex-escaped
1603
- break;
1604
-
1605
- default:
1606
- return _handleUnrecognizedCharacterEscape(c);
1607
- }
1608
-
1609
- // Ok, a hex escape. Need 4 characters
1610
- int value = 0;
1611
- for (int i = 0; i < 4; ++i) {
1612
- if (_inputPtr >= _inputEnd) {
1613
- if (!loadMore()) {
1614
- _reportInvalidEOF(" in character escape sequence");
1615
- }
1616
- }
1617
- int ch = (int) _inputBuffer[_inputPtr++];
1618
- int digit = CharTypes.charToHex(ch);
1619
- if (digit < 0) {
1620
- _reportUnexpectedChar(ch, "expected a hex-digit for character escape sequence");
1621
- }
1622
- value = (value << 4) | digit;
1623
- }
1624
- return (char) value;
1625
- }
1626
-
1627
- /**
1628
- * Helper method for checking whether input matches expected token
1629
- *
1630
- * @since 1.8
1631
- */
1632
- protected final void _matchToken(String matchStr, int i)
1633
- throws IOException, JsonParseException
1634
- {
1635
- final int len = matchStr.length();
1636
-
1637
- do {
1638
- if (_inputPtr >= _inputEnd) {
1639
- if (!loadMore()) {
1640
- _reportInvalidEOFInValue();
1641
- }
1642
- }
1643
- if (_inputBuffer[_inputPtr] != matchStr.charAt(i)) {
1644
- _reportInvalidToken(matchStr.substring(0, i), "'null', 'true', 'false' or NaN");
1645
- }
1646
- ++_inputPtr;
1647
- } while (++i < len);
1648
-
1649
- // but let's also ensure we either get EOF, or non-alphanum char...
1650
- if (_inputPtr >= _inputEnd) {
1651
- if (!loadMore()) {
1652
- return;
1653
- }
1654
- }
1655
- char c = _inputBuffer[_inputPtr];
1656
- if (c < '0' || c == ']' || c == '}') { // expected/allowed chars
1657
- return;
1658
- }
1659
- // if Java letter, it's a problem tho
1660
- if (Character.isJavaIdentifierPart(c)) {
1661
- ++_inputPtr;
1662
- _reportInvalidToken(matchStr.substring(0, i), "'null', 'true', 'false' or NaN");
1663
- }
1664
- return;
1665
- }
1666
-
1667
- /*
1668
- /**********************************************************
1669
- /* Binary access
1670
- /**********************************************************
1671
- */
1672
-
1673
- /**
1674
- * Efficient handling for incremental parsing of base64-encoded
1675
- * textual content.
1676
- */
1677
- protected byte[] _decodeBase64(Base64Variant b64variant)
1678
- throws IOException, JsonParseException
1679
- {
1680
- ByteArrayBuilder builder = _getByteArrayBuilder();
1681
-
1682
- //main_loop:
1683
- while (true) {
1684
- // first, we'll skip preceding white space, if any
1685
- char ch;
1686
- do {
1687
- if (_inputPtr >= _inputEnd) {
1688
- loadMoreGuaranteed();
1689
- }
1690
- ch = _inputBuffer[_inputPtr++];
1691
- } while (ch <= INT_SPACE);
1692
- int bits = b64variant.decodeBase64Char(ch);
1693
- if (bits < 0) {
1694
- if (ch == '"') { // reached the end, fair and square?
1695
- return builder.toByteArray();
1696
- }
1697
- bits = _decodeBase64Escape(b64variant, ch, 0);
1698
- if (bits < 0) { // white space to skip
1699
- continue;
1700
- }
1701
- }
1702
- int decodedData = bits;
1703
-
1704
- // then second base64 char; can't get padding yet, nor ws
1705
-
1706
- if (_inputPtr >= _inputEnd) {
1707
- loadMoreGuaranteed();
1708
- }
1709
- ch = _inputBuffer[_inputPtr++];
1710
- bits = b64variant.decodeBase64Char(ch);
1711
- if (bits < 0) {
1712
- bits = _decodeBase64Escape(b64variant, ch, 1);
1713
- }
1714
- decodedData = (decodedData << 6) | bits;
1715
-
1716
- // third base64 char; can be padding, but not ws
1717
- if (_inputPtr >= _inputEnd) {
1718
- loadMoreGuaranteed();
1719
- }
1720
- ch = _inputBuffer[_inputPtr++];
1721
- bits = b64variant.decodeBase64Char(ch);
1722
-
1723
- // First branch: can get padding (-> 1 byte)
1724
- if (bits < 0) {
1725
- if (bits != Base64Variant.BASE64_VALUE_PADDING) {
1726
- // as per [JACKSON-631], could also just be 'missing' padding
1727
- if (ch == '"' && !b64variant.usesPadding()) {
1728
- decodedData >>= 4;
1729
- builder.append(decodedData);
1730
- return builder.toByteArray();
1731
- }
1732
- bits = _decodeBase64Escape(b64variant, ch, 2);
1733
- }
1734
- if (bits == Base64Variant.BASE64_VALUE_PADDING) {
1735
- // Ok, must get more padding chars, then
1736
- if (_inputPtr >= _inputEnd) {
1737
- loadMoreGuaranteed();
1738
- }
1739
- ch = _inputBuffer[_inputPtr++];
1740
- if (!b64variant.usesPaddingChar(ch)) {
1741
- throw reportInvalidBase64Char(b64variant, ch, 3, "expected padding character '"+b64variant.getPaddingChar()+"'");
1742
- }
1743
- // Got 12 bits, only need 8, need to shift
1744
- decodedData >>= 4;
1745
- builder.append(decodedData);
1746
- continue;
1747
- }
1748
- // otherwise we got escaped other char, to be processed below
1749
- }
1750
- // Nope, 2 or 3 bytes
1751
- decodedData = (decodedData << 6) | bits;
1752
- // fourth and last base64 char; can be padding, but not ws
1753
- if (_inputPtr >= _inputEnd) {
1754
- loadMoreGuaranteed();
1755
- }
1756
- ch = _inputBuffer[_inputPtr++];
1757
- bits = b64variant.decodeBase64Char(ch);
1758
- if (bits < 0) {
1759
- if (bits != Base64Variant.BASE64_VALUE_PADDING) {
1760
- // as per [JACKSON-631], could also just be 'missing' padding
1761
- if (ch == '"' && !b64variant.usesPadding()) {
1762
- decodedData >>= 2;
1763
- builder.appendTwoBytes(decodedData);
1764
- return builder.toByteArray();
1765
- }
1766
- bits = _decodeBase64Escape(b64variant, ch, 3);
1767
- }
1768
- if (bits == Base64Variant.BASE64_VALUE_PADDING) {
1769
- // With padding we only get 2 bytes; but we have
1770
- // to shift it a bit so it is identical to triplet
1771
- // case with partial output.
1772
- // 3 chars gives 3x6 == 18 bits, of which 2 are
1773
- // dummies, need to discard:
1774
- decodedData >>= 2;
1775
- builder.appendTwoBytes(decodedData);
1776
- continue;
1777
- }
1778
- // otherwise we got escaped other char, to be processed below
1779
- }
1780
- // otherwise, our triplet is now complete
1781
- decodedData = (decodedData << 6) | bits;
1782
- builder.appendThreeBytes(decodedData);
1783
- }
1784
- }
1785
-
1786
- /*
1787
- /**********************************************************
1788
- /* Error reporting
1789
- /**********************************************************
1790
- */
1791
-
1792
- protected void _reportInvalidToken(String matchedPart, String msg)
1793
- throws IOException, JsonParseException
1794
- {
1795
- StringBuilder sb = new StringBuilder(matchedPart);
1796
- /* Let's just try to find what appears to be the token, using
1797
- * regular Java identifier character rules. It's just a heuristic,
1798
- * nothing fancy here.
1799
- */
1800
- while (true) {
1801
- if (_inputPtr >= _inputEnd) {
1802
- if (!loadMore()) {
1803
- break;
1804
- }
1805
- }
1806
- char c = _inputBuffer[_inputPtr];
1807
- if (!Character.isJavaIdentifierPart(c)) {
1808
- break;
1809
- }
1810
- ++_inputPtr;
1811
- sb.append(c);
1812
- }
1813
- _reportError("Unrecognized token '"+sb.toString()+"': was expecting ");
1814
- }
1815
- }