You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shindig.apache.org by Michael Young <mi...@liferay.com> on 2010/06/23 20:01:23 UTC

AppDataService.updatePersonData()

I'm using 1.1 beta 5 and I'm seeing a problem in the Map<String, String> values parameter where the value is not always a string, and I get an unboxing error on the generic. 

Has this been identified and/or fixed in trunk?



- Mike
--
Liferay West Coast Symposium
September 8-9, 2010
Anaheim, CA
www.liferay.com/wcs
--
Follow us on Twitter: liferay


Re: AppDataService.updatePersonData()

Posted by Michael Young <mi...@liferay.com>.
Oh wow, thanks for answering this an not letting go unnoticed :). I'll file in JIRA for this and I should be able to submit a patch too. It's been a while so I might need to refresh a bit :). 

I can't say I'm diligent like you in going back to old messages :). 

- Mike
--
Liferay West Coast Symposium
September 8-9, 2010
Anaheim, CA
www.liferay.com/wcs
--
Follow us on Twitter: liferay

On Aug 27, 2010, at 6:39 AM, Paul Lindner wrote:

> this definitely sounds like a bug.. 
> 
> The code in question is calling BaseRequestItem.getTypedParameter() which calls BeanConverter.convertToObject()
> 
> Mind filing a jira for this?
> 
> On Thu, Jun 24, 2010 at 8:53 AM, Michael Young <mi...@liferay.com> wrote:
> In particular:
> 
>        public Future<Void> updatePersonData(
>                        UserId userId, GroupId groupId, String appId, Set<String> fields,
>                        Map<String, String> values, SecurityToken securityToken)
>                throws ProtocolException {
> 
> 
> For example, in the SocialHelloWorld.xml gadget, I'm seeing an "int" for the "count" field, and I need code like this for it to work correctly:
> 
>                for (String key : values.keySet()) {
> 
>                        // Workaround for a Shindig bug that stores a Long in value instead
>                        // of the expected String so we cannot use generics here
> 
>                        String value = String.valueOf(values.get(key));
> 
> Thanks!
> 
> - Mike
> --
> Liferay West Coast Symposium
> September 8-9, 2010
> Anaheim, CA
> www.liferay.com/wcs
> --
> Follow us on Twitter: liferay
> 
> On Jun 23, 2010, at 11:01 AM, Michael Young wrote:
> 
> > I'm using 1.1 beta 5 and I'm seeing a problem in the Map<String, String> values parameter where the value is not always a string, and I get an unboxing error on the generic.
> >
> > Has this been identified and/or fixed in trunk?
> >
> >
> >
> > - Mike
> > --
> > Liferay West Coast Symposium
> > September 8-9, 2010
> > Anaheim, CA
> > www.liferay.com/wcs
> > --
> > Follow us on Twitter: liferay
> >
> 
> 
> 
> 
> -- 
> Paul Lindner -- plindner@linkedin.com -- linkedin.com/in/plindner


Re: AppDataService.updatePersonData()

Posted by Paul Lindner <pl...@linkedin.com>.
this definitely sounds like a bug..

The code in question is calling BaseRequestItem.getTypedParameter() which
calls BeanConverter.convertToObject()

Mind filing a jira for this?

On Thu, Jun 24, 2010 at 8:53 AM, Michael Young <mi...@liferay.com>wrote:

> In particular:
>
>        public Future<Void> updatePersonData(
>                        UserId userId, GroupId groupId, String appId,
> Set<String> fields,
>                        Map<String, String> values, SecurityToken
> securityToken)
>                throws ProtocolException {
>
>
> For example, in the SocialHelloWorld.xml gadget, I'm seeing an "int" for
> the "count" field, and I need code like this for it to work correctly:
>
>                for (String key : values.keySet()) {
>
>                        // Workaround for a Shindig bug that stores a Long
> in value instead
>                        // of the expected String so we cannot use generics
> here
>
>                        String value = String.valueOf(values.get(key));
>
> Thanks!
>
> - Mike
> --
> Liferay West Coast Symposium
> September 8-9, 2010
> Anaheim, CA
> www.liferay.com/wcs
> --
> Follow us on Twitter: liferay
>
> On Jun 23, 2010, at 11:01 AM, Michael Young wrote:
>
> > I'm using 1.1 beta 5 and I'm seeing a problem in the Map<String, String>
> values parameter where the value is not always a string, and I get an
> unboxing error on the generic.
> >
> > Has this been identified and/or fixed in trunk?
> >
> >
> >
> > - Mike
> > --
> > Liferay West Coast Symposium
> > September 8-9, 2010
> > Anaheim, CA
> > www.liferay.com/wcs
> > --
> > Follow us on Twitter: liferay
> >
>
>


-- 
Paul Lindner -- plindner@linkedin.com -- linkedin.com/in/plindner

Re: AppDataService.updatePersonData()

Posted by Michael Young <mi...@liferay.com>.
In particular:

	public Future<Void> updatePersonData(
			UserId userId, GroupId groupId, String appId, Set<String> fields,
			Map<String, String> values, SecurityToken securityToken)
		throws ProtocolException {

 
For example, in the SocialHelloWorld.xml gadget, I'm seeing an "int" for the "count" field, and I need code like this for it to work correctly:

		for (String key : values.keySet()) {

			// Workaround for a Shindig bug that stores a Long in value instead
			// of the expected String so we cannot use generics here

			String value = String.valueOf(values.get(key));

Thanks!

- Mike
--
Liferay West Coast Symposium
September 8-9, 2010
Anaheim, CA
www.liferay.com/wcs
--
Follow us on Twitter: liferay

On Jun 23, 2010, at 11:01 AM, Michael Young wrote:

> I'm using 1.1 beta 5 and I'm seeing a problem in the Map<String, String> values parameter where the value is not always a string, and I get an unboxing error on the generic. 
> 
> Has this been identified and/or fixed in trunk?
> 
> 
> 
> - Mike
> --
> Liferay West Coast Symposium
> September 8-9, 2010
> Anaheim, CA
> www.liferay.com/wcs
> --
> Follow us on Twitter: liferay
>