if (v == null) {
outstream.write("null".getBytes(UTF_8));
}
else {
final DefinitionsFactory definitionsFactory = MappingContextSingleton.get().getDefinitionsFactory();
if (definitionsFactory == null) {
throw new RuntimeException("definition factory is null!");
}
final MappingDefinition definition1 = definitionsFactory.getDefinition(mapping.getType());
if (definition1 == null) {
throw new RuntimeException("no mapping definition for: " + mapping.getType().getFullyQualifiedName());
}