Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 07A23200B5C for ; Thu, 11 Aug 2016 18:33:17 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 063FE160A93; Thu, 11 Aug 2016 16:33:17 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 53E6D160A90 for ; Thu, 11 Aug 2016 18:33:16 +0200 (CEST) Received: (qmail 86549 invoked by uid 500); 11 Aug 2016 16:33:15 -0000 Mailing-List: contact dev-help@felix.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@felix.apache.org Delivered-To: mailing list dev@felix.apache.org Received: (qmail 86537 invoked by uid 99); 11 Aug 2016 16:33:15 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Aug 2016 16:33:15 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id B8785C071B for ; Thu, 11 Aug 2016 16:33:14 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.179 X-Spam-Level: * X-Spam-Status: No, score=1.179 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd4-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id D7CaYJFfJSWR for ; Thu, 11 Aug 2016 16:33:11 +0000 (UTC) Received: from mail-oi0-f41.google.com (mail-oi0-f41.google.com [209.85.218.41]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id B83F65FE18 for ; Thu, 11 Aug 2016 16:33:10 +0000 (UTC) Received: by mail-oi0-f41.google.com with SMTP id l203so1221965oib.1 for ; Thu, 11 Aug 2016 09:33:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=3Vz1YT29BbnxdEsJ2EgsvyBms4/nEhCbQbWy+BW2RFU=; b=BxmHfGKn+XiQbfbCKOnnEuTxyobVDPwpRx1KI9jBXOp8WtxWKGO++hMJGNzDhBSOam iorrZk7Jt8nxpSowdMr3nVIJm62KzNiINsfXiNCQm3G0fBQ4bBhl2fbB0AeymACTNpEz fJsXSBCoJ2BLQxotqv7DB2X4kXlpzqCtVaLZ88X3UTnr8ywur1degYRek+MoT5x6vLaT WF4c6iSSg9e52NcTaDdstDsmN4arxq0b4WTGIEi4hdPaBJSqD8fdjVpzZNtv4EZC7RGb jR7mafNaj1JEZbLR7XpHYoInBm35oJqTvIqCRLm3Lq5aQWKvjbpkI0+nrqNoywL2ywRK SO7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=3Vz1YT29BbnxdEsJ2EgsvyBms4/nEhCbQbWy+BW2RFU=; b=U7yBkXlXVS7WJmtk06Wj9Ku/ZBDkMzJzb2bUThgL0+IGqNkA3Tpp22JVsugnMyzit5 fB022q9PTvONmWEg1ogWwhQNWiB+ttsazMJlDPakJJVEBl2pOwdxyJqsJLmPKPWd+uhP tJTyJPmido6hDPDZ7Gq50BmruRON1QnuS4XI2RNs7OotbszvZxuP4cBdyBiG4m3CUQvr 9cXINOXgAVock2yiwezXLriI4Jb/tFHUF2eNi8P3i+3NvfGuA67LwdKOZo6+SaB5fMDX +NjhEtXMg50rvxCbZnnU2KIcx9t9bPLj3OHy6uPt87DbkF2T5DXxV/bszH8gzztZV61+ XgQQ== X-Gm-Message-State: AEkoouslDMW+Lch3ZBldikr0tJDt8Jl0CBzNy+02l2+/kn3BdHgA7mRyR6nU1sE7pj5YXpxHa/EIRJH8qmLOUA== X-Received: by 10.202.60.3 with SMTP id j3mr5708811oia.92.1470933189206; Thu, 11 Aug 2016 09:33:09 -0700 (PDT) MIME-Version: 1.0 Received: by 10.202.71.209 with HTTP; Thu, 11 Aug 2016 09:32:48 -0700 (PDT) In-Reply-To: References: From: David Bosschaert Date: Thu, 11 Aug 2016 17:32:48 +0100 Message-ID: Subject: Re: [Converter] Null result... why? To: "dev@felix.apache.org" Content-Type: multipart/alternative; boundary=001a113cd1a23b288f0539ce5258 archived-at: Thu, 11 Aug 2016 16:33:17 -0000 --001a113cd1a23b288f0539ce5258 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi David, I added initial support for DTOs which should make what you were doing possible. Not all name-escaping rules are implemented yet, but for simple DTOs things should work. Unfortunately there aren't many comments in the code yet, we should certainly add those when the codebase becomes a bit more stable. However, maybe the changes for the DTO might help you understand the code a bit better: https://svn.apache.org/viewvc?view=3Drevision&revision=3D1756008 Let us know if it works for you! Cheers, David On 11 August 2016 at 13:57, David Leangen wrote: > > Hi David B., > > Thanks for your quick reply. > > I=E2=80=99d be happy to help out=E2=80=A6 but I=E2=80=99m having a bit of= trouble understanding > the code. It=E2=80=99s very low-level. > > If there were more comments to explain the intent of what=E2=80=99s going= on, > perhaps I could be of some use. :-) > > > Cheers, > =3DDavid > > > > > On Aug 11, 2016, at 9:51 PM, David Bosschaert < > david.bosschaert@gmail.com> wrote: > > > > Hi David, > > > > I will take a look at it sometime soon. It could very well be that you'= re > > hitting something that isn't implemented yet. The converter is pre-alph= a > at > > this stage :) > > > > Cheers, > > > > David > > > > On 11 August 2016 at 13:44, David Leangen wrote: > > > >> > >> Hi! > >> > >> I have a DTO that looks like this: > >> > >> public class MyDTO extends DTO { > >> public String pid; > >> public String name; > >> public String description; > >> public String type; > >> } > >> > >> And a Map (myMap) that has key/values with these keys: {=E2=80=9Cpid= =E2=80=9D, =E2=80=9Cname=E2=80=9D, > >> =E2=80=9Cdescription=E2=80=9D, =E2=80=9Ctype=E2=80=9D}. > >> > >> I make this call: > >> > >> MyDTO dto =3D converter.convert( myMap ).to( MyDTO.class ); > >> > >> > >> It is my expectation that dto should be non-null, but I get a null > result. > >> I step through the code, but am not particularly enlightened. > >> > >> Any suggestion as to what strategy I could use to figure out my proble= m? > >> > >> > >> Thanks! > >> =3DDavid > >> > >> > >> > >> > > --001a113cd1a23b288f0539ce5258--