You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tamaya.apache.org by Reinhard Sandtner <re...@gmail.com> on 2015/01/20 16:10:15 UTC
build failure
Hey guys
build is broken since PropertyConverter is no longer a FunctionalInterface :-(
shall i fix it or is someone working on it?
lg
reini
Re: build failure
Posted by Anatole Tresch <at...@gmail.com>.
-
Anatole Tresch
Glärnischweg 10
8620 Wetzikon
Tel +41 (43) 317 05 30
-
Send from Mobile
> Am 20.01.2015 um 22:39 schrieb Oliver B. Fischer <o....@swe-blog.net>:
>
> Yes, I will adapt it and mark it as false positive.
>
> Oliver
>
>> Am 20.01.15 um 22:33 schrieb Anatole Tresch:
>> I agree. Sometimes it is difficult when all is running OK (mvn verify) on
>> the whole source tree. No changes where detected by the IDE and you still
>> see things breaking... that was the situation as of now ;(
>> The last checkin should fix all code related issues, beside one FindBugs
>> role, that says you are not allowed to return null for a Boolean, which is
>> bullshit. Can you switch that role off, please? Thanks.
>>
>>
>> 2015-01-20 22:14 GMT+01:00 Oliver B. Fischer <o....@swe-blog.net>:
>>
>>> Guys,
>>>
>>> independ of all issues to discuss we should never break the build for more
>>> then one or two commits. A brocken build blocks all of us. At least me at
>>> the moment ;-)
>>>
>>> Bye
>>>
>>> Oliver
>>> Am 20.01.15 um 16:10 schrieb Reinhard Sandtner:
>>>
>>> Hey guys
>>>> build is broken since PropertyConverter is no longer a
>>>> FunctionalInterface :-(
>>>>
>>>> shall i fix it or is someone working on it?
>>>>
>>>> lg
>>>> reini
>>> --
>>> N Oliver B. Fischer
>>> A Schönhauser Allee 64, 10437 Berlin, Deutschland/Germany
>>> P +49 30 44793251
>>> M +49 178 7903538
>>> E o.b.fischer@swe-blog.net
>>> S oliver.b.fischer
>>> J oliver.b.fischer@jabber.org
>>> X http://xing.to/obf
>
> --
> N Oliver B. Fischer
> A Schönhauser Allee 64, 10437 Berlin, Deutschland/Germany
> P +49 30 44793251
> M +49 178 7903538
> E o.b.fischer@swe-blog.net
> S oliver.b.fischer
> J oliver.b.fischer@jabber.org
> X http://xing.to/obf
>
Re: build failure
Posted by "Oliver B. Fischer" <o....@swe-blog.net>.
Yes, I will adapt it and mark it as false positive.
Oliver
Am 20.01.15 um 22:33 schrieb Anatole Tresch:
> I agree. Sometimes it is difficult when all is running OK (mvn verify) on
> the whole source tree. No changes where detected by the IDE and you still
> see things breaking... that was the situation as of now ;(
> The last checkin should fix all code related issues, beside one FindBugs
> role, that says you are not allowed to return null for a Boolean, which is
> bullshit. Can you switch that role off, please? Thanks.
>
>
> 2015-01-20 22:14 GMT+01:00 Oliver B. Fischer <o....@swe-blog.net>:
>
>> Guys,
>>
>> independ of all issues to discuss we should never break the build for more
>> then one or two commits. A brocken build blocks all of us. At least me at
>> the moment ;-)
>>
>> Bye
>>
>> Oliver
>> Am 20.01.15 um 16:10 schrieb Reinhard Sandtner:
>>
>> Hey guys
>>> build is broken since PropertyConverter is no longer a
>>> FunctionalInterface :-(
>>>
>>> shall i fix it or is someone working on it?
>>>
>>> lg
>>> reini
>>>
>> --
>> N Oliver B. Fischer
>> A Schönhauser Allee 64, 10437 Berlin, Deutschland/Germany
>> P +49 30 44793251
>> M +49 178 7903538
>> E o.b.fischer@swe-blog.net
>> S oliver.b.fischer
>> J oliver.b.fischer@jabber.org
>> X http://xing.to/obf
>>
>>
>
--
N Oliver B. Fischer
A Schönhauser Allee 64, 10437 Berlin, Deutschland/Germany
P +49 30 44793251
M +49 178 7903538
E o.b.fischer@swe-blog.net
S oliver.b.fischer
J oliver.b.fischer@jabber.org
X http://xing.to/obf
Re: build failure
Posted by Anatole Tresch <at...@gmail.com>.
I agree. Sometimes it is difficult when all is running OK (mvn verify) on
the whole source tree. No changes where detected by the IDE and you still
see things breaking... that was the situation as of now ;(
The last checkin should fix all code related issues, beside one FindBugs
role, that says you are not allowed to return null for a Boolean, which is
bullshit. Can you switch that role off, please? Thanks.
2015-01-20 22:14 GMT+01:00 Oliver B. Fischer <o....@swe-blog.net>:
> Guys,
>
> independ of all issues to discuss we should never break the build for more
> then one or two commits. A brocken build blocks all of us. At least me at
> the moment ;-)
>
> Bye
>
> Oliver
> Am 20.01.15 um 16:10 schrieb Reinhard Sandtner:
>
> Hey guys
>>
>> build is broken since PropertyConverter is no longer a
>> FunctionalInterface :-(
>>
>> shall i fix it or is someone working on it?
>>
>> lg
>> reini
>>
>
> --
> N Oliver B. Fischer
> A Schönhauser Allee 64, 10437 Berlin, Deutschland/Germany
> P +49 30 44793251
> M +49 178 7903538
> E o.b.fischer@swe-blog.net
> S oliver.b.fischer
> J oliver.b.fischer@jabber.org
> X http://xing.to/obf
>
>
--
*Anatole Tresch*
Java Engineer & Architect, JSR Spec Lead
Glärnischweg 10
CH - 8620 Wetzikon
*Switzerland, Europe Zurich, GMT+1*
*Twitter: @atsticks*
*Blogs: **http://javaremarkables.blogspot.ch/
<http://javaremarkables.blogspot.ch/>*
*Google: atsticksMobile +41-76 344 62 79*
Re: build failure
Posted by "Oliver B. Fischer" <o....@swe-blog.net>.
Guys,
independ of all issues to discuss we should never break the build for
more then one or two commits. A brocken build blocks all of us. At least
me at the moment ;-)
Bye
Oliver
Am 20.01.15 um 16:10 schrieb Reinhard Sandtner:
> Hey guys
>
> build is broken since PropertyConverter is no longer a FunctionalInterface :-(
>
> shall i fix it or is someone working on it?
>
> lg
> reini
--
N Oliver B. Fischer
A Schönhauser Allee 64, 10437 Berlin, Deutschland/Germany
P +49 30 44793251
M +49 178 7903538
E o.b.fischer@swe-blog.net
S oliver.b.fischer
J oliver.b.fischer@jabber.org
X http://xing.to/obf
Re: build failure
Posted by Anatole Tresch <at...@gmail.com>.
Indeed, seems that I missed a part of this API, within the actual type
arguments of the parametrized type I have the infos ;) So I will adapt
things that it will work and remove the method ;) Sorry for the confusion...
Re: build failure
Posted by Anatole Tresch <at...@gmail.com>.
Fair enough...
2015-01-20 18:22 GMT+01:00 Romain Manni-Bucau <rm...@gmail.com>:
> if you know the reason just look the history of this project, generics
> didnt exist when it was written. That's also why it is using Class
> (and not Type).
>
>
> Romain Manni-Bucau
> @rmannibucau
> http://www.tomitribe.com
> http://rmannibucau.wordpress.com
> https://github.com/rmannibucau
>
>
> 2015-01-20 18:18 GMT+01:00 Anatole Tresch <at...@gmail.com>:
> > Sorry, if I missed the links, I did not see them ;)
> >
> > Looking at xbean they also have the type info on the converter, e.g.
> >
> > public static void registerConverter(Converter converter) {
> >
> > if (converter == null) throw new NullPointerException("editor is
> null");
> > Class type = converter.*getType*();
> > registry.put(type, converter);
> >
> >
> > So what is now the issue?
> >
> > Cheers, Anatole
> >
> >
> >
> >
> > 2015-01-20 17:57 GMT+01:00 Romain Manni-Bucau <rm...@gmail.com>:
> >
> >> already shared the link for xbean:
> >>
> >>
> https://svn.apache.org/repos/asf/geronimo/xbean/trunk/xbean-reflect/src/main/java/org/apache/xbean/propertyeditor/PropertyEditors.java
> >> and more particularly
> >>
> >>
> https://svn.apache.org/repos/asf/geronimo/xbean/trunk/xbean-reflect/src/main/java/org/apache/xbean/propertyeditor/CollectionUtil.java
> >> (of course this code is very old but the format shoudnt change). For
> >> spring it uses commons-lang code (fork surely?):
> >>
> >>
> http://grepcode.com/file/repo1.maven.org/maven2/org.springframework/spring-core/3.0.2.RELEASE/org/springframework/util/StringUtils.java#StringUtils.commaDelimitedListToSet%28java.lang.String%29
> >>
> >>
> >>
> >> Romain Manni-Bucau
> >> @rmannibucau
> >> http://www.tomitribe.com
> >> http://rmannibucau.wordpress.com
> >> https://github.com/rmannibucau
> >>
> >>
> >> 2015-01-20 17:50 GMT+01:00 Anatole Tresch <at...@gmail.com>:
> >> > Hi Romain
> >> >
> >> > 2015-01-20 17:39 GMT+01:00 Romain Manni-Bucau <rmannibucau@gmail.com
> >:
> >> >
> >> >> to be honest I don't see where is the hard part here:
> >> >> 1) type registration: we adopt 2 registrations mode as for property
> >> sources
> >> >> 1a) direct mode MyImpl -> use reflection (or meta if we want to be
> >> >> verbose) to get the Type
> >> >>
> >> >
> >> > -> Once more: Reflection will not work. The other things tbd.
> >> >
> >> >
> >> >
> >> >> 1b) kind of provider where we pass a context which register in the
> >> >> config (config context ATM) the converter:
> >> >>
> >> >> public class MyConverters implements ConvertersProvider {
> >> >> public void registerConverters(ConverterBootsrapContext ctx) {
> >> >> ctx.register(new MyTypeLiteral<List<String>>() {}, new
> >> >> MyConverter(true, 1));
> >> >> }
> >> >> }
> >> >>
> >> >
> >> > -> No this apporach is not part of the current API. We can register
> >> > directly PropertyConverter. There is no such thing like
> >> > a ConverterProvider. If so we could add the target type to the
> >> > ConverterProvider I agree. That was one of my proposals.
> >> >
> >> >
> >> >
> >> > 2) about list, map etc modelling: here we don't have much the choice
> >> >> we should just do what is common (and if we still think to a spec
> this
> >> >> is the way to go instead of thinking we are better than everything
> >> >> existing). References I commonly use or used are xbean and spring and
> >> >> both are more or less aligned.
> >> >>
> >> >
> >> > Just a short personal advice: If you want people to have an idea about
> >> > what to you talk you should either copy some code or at least add some
> >> > direct links to the APIs you are talking of. If not your efforts will
> be
> >> > not reflected. Most of the guys do not have time to search the exact
> >> > locations of what you are talking about ;(
> >> >
> >> > 3) agree about events but this one should be tackled after the first
> >> >> release IMO
> >> >>
> >> >>
> >> >> Romain Manni-Bucau
> >> >> @rmannibucau
> >> >> http://www.tomitribe.com
> >> >> http://rmannibucau.wordpress.com
> >> >> https://github.com/rmannibucau
> >> >>
> >> >>
> >> >> 2015-01-20 17:28 GMT+01:00 Anatole Tresch <at...@gmail.com>:
> >> >> > I think guys we really have more important things to discuss than
> >> these.
> >> >> > There are wuestion open about how to deal with type registration
> for
> >> >> > ProeprtyConverters, list property modelling and we did not even
> >> started
> >> >> > with event handling. I propose you guys put your energy on these
> tasks
> >> >> and
> >> >> > stop restarting the same discussion again and again.
> >> >> >
> >> >> > 2015-01-20 17:17 GMT+01:00 Romain Manni-Bucau <
> rmannibucau@gmail.com
> >> >:
> >> >> >
> >> >> >> yep, our build is complicated and we finally dont propose anything
> >> >> >> valuable thanks to it so why continuing this way?
> >> >> >>
> >> >> >>
> >> >> >> Romain Manni-Bucau
> >> >> >> @rmannibucau
> >> >> >> http://www.tomitribe.com
> >> >> >> http://rmannibucau.wordpress.com
> >> >> >> https://github.com/rmannibucau
> >> >> >>
> >> >> >>
> >> >> >> 2015-01-20 17:06 GMT+01:00 Werner Keil <we...@gmail.com>:
> >> >> >> >>
> >> >> >> >>
> >> >> >> >>
> >> >> >> >> In all cases you break java 8 lambdas, not an issue by itself
> but
> >> we
> >> >> >> >> should maybe think removing this java 8 module which will soon
> be
> >> >> only
> >> >> >> >> justified by Optional which is highly controversed.
> >> >> >> >>
> >> >> >> >>
> >> >> >> > What exactly do you mean by that, do you suggest merging the
> >> codebase
> >> >> >> here
> >> >> >> > because except for Optional there is little value of a Java 8+
> >> >> >> approach?;-)
> >> >> >>
> >> >> >
> >> >> >
> >> >> >
> >> >> > --
> >> >> > *Anatole Tresch*
> >> >> > Java Engineer & Architect, JSR Spec Lead
> >> >> > Glärnischweg 10
> >> >> > CH - 8620 Wetzikon
> >> >> >
> >> >> > *Switzerland, Europe Zurich, GMT+1*
> >> >> > *Twitter: @atsticks*
> >> >> > *Blogs: **http://javaremarkables.blogspot.ch/
> >> >> > <http://javaremarkables.blogspot.ch/>*
> >> >> >
> >> >> > *Google: atsticksMobile +41-76 344 62 79*
> >> >>
> >> >
> >> >
> >> >
> >> > --
> >> > *Anatole Tresch*
> >> > Java Engineer & Architect, JSR Spec Lead
> >> > Glärnischweg 10
> >> > CH - 8620 Wetzikon
> >> >
> >> > *Switzerland, Europe Zurich, GMT+1*
> >> > *Twitter: @atsticks*
> >> > *Blogs: **http://javaremarkables.blogspot.ch/
> >> > <http://javaremarkables.blogspot.ch/>*
> >> >
> >> > *Google: atsticksMobile +41-76 344 62 79*
> >>
> >
> >
> >
> > --
> > *Anatole Tresch*
> > Java Engineer & Architect, JSR Spec Lead
> > Glärnischweg 10
> > CH - 8620 Wetzikon
> >
> > *Switzerland, Europe Zurich, GMT+1*
> > *Twitter: @atsticks*
> > *Blogs: **http://javaremarkables.blogspot.ch/
> > <http://javaremarkables.blogspot.ch/>*
> >
> > *Google: atsticksMobile +41-76 344 62 79*
>
--
*Anatole Tresch*
Java Engineer & Architect, JSR Spec Lead
Glärnischweg 10
CH - 8620 Wetzikon
*Switzerland, Europe Zurich, GMT+1*
*Twitter: @atsticks*
*Blogs: **http://javaremarkables.blogspot.ch/
<http://javaremarkables.blogspot.ch/>*
*Google: atsticksMobile +41-76 344 62 79*
Re: build failure
Posted by Romain Manni-Bucau <rm...@gmail.com>.
if you know the reason just look the history of this project, generics
didnt exist when it was written. That's also why it is using Class
(and not Type).
Romain Manni-Bucau
@rmannibucau
http://www.tomitribe.com
http://rmannibucau.wordpress.com
https://github.com/rmannibucau
2015-01-20 18:18 GMT+01:00 Anatole Tresch <at...@gmail.com>:
> Sorry, if I missed the links, I did not see them ;)
>
> Looking at xbean they also have the type info on the converter, e.g.
>
> public static void registerConverter(Converter converter) {
>
> if (converter == null) throw new NullPointerException("editor is null");
> Class type = converter.*getType*();
> registry.put(type, converter);
>
>
> So what is now the issue?
>
> Cheers, Anatole
>
>
>
>
> 2015-01-20 17:57 GMT+01:00 Romain Manni-Bucau <rm...@gmail.com>:
>
>> already shared the link for xbean:
>>
>> https://svn.apache.org/repos/asf/geronimo/xbean/trunk/xbean-reflect/src/main/java/org/apache/xbean/propertyeditor/PropertyEditors.java
>> and more particularly
>>
>> https://svn.apache.org/repos/asf/geronimo/xbean/trunk/xbean-reflect/src/main/java/org/apache/xbean/propertyeditor/CollectionUtil.java
>> (of course this code is very old but the format shoudnt change). For
>> spring it uses commons-lang code (fork surely?):
>>
>> http://grepcode.com/file/repo1.maven.org/maven2/org.springframework/spring-core/3.0.2.RELEASE/org/springframework/util/StringUtils.java#StringUtils.commaDelimitedListToSet%28java.lang.String%29
>>
>>
>>
>> Romain Manni-Bucau
>> @rmannibucau
>> http://www.tomitribe.com
>> http://rmannibucau.wordpress.com
>> https://github.com/rmannibucau
>>
>>
>> 2015-01-20 17:50 GMT+01:00 Anatole Tresch <at...@gmail.com>:
>> > Hi Romain
>> >
>> > 2015-01-20 17:39 GMT+01:00 Romain Manni-Bucau <rm...@gmail.com>:
>> >
>> >> to be honest I don't see where is the hard part here:
>> >> 1) type registration: we adopt 2 registrations mode as for property
>> sources
>> >> 1a) direct mode MyImpl -> use reflection (or meta if we want to be
>> >> verbose) to get the Type
>> >>
>> >
>> > -> Once more: Reflection will not work. The other things tbd.
>> >
>> >
>> >
>> >> 1b) kind of provider where we pass a context which register in the
>> >> config (config context ATM) the converter:
>> >>
>> >> public class MyConverters implements ConvertersProvider {
>> >> public void registerConverters(ConverterBootsrapContext ctx) {
>> >> ctx.register(new MyTypeLiteral<List<String>>() {}, new
>> >> MyConverter(true, 1));
>> >> }
>> >> }
>> >>
>> >
>> > -> No this apporach is not part of the current API. We can register
>> > directly PropertyConverter. There is no such thing like
>> > a ConverterProvider. If so we could add the target type to the
>> > ConverterProvider I agree. That was one of my proposals.
>> >
>> >
>> >
>> > 2) about list, map etc modelling: here we don't have much the choice
>> >> we should just do what is common (and if we still think to a spec this
>> >> is the way to go instead of thinking we are better than everything
>> >> existing). References I commonly use or used are xbean and spring and
>> >> both are more or less aligned.
>> >>
>> >
>> > Just a short personal advice: If you want people to have an idea about
>> > what to you talk you should either copy some code or at least add some
>> > direct links to the APIs you are talking of. If not your efforts will be
>> > not reflected. Most of the guys do not have time to search the exact
>> > locations of what you are talking about ;(
>> >
>> > 3) agree about events but this one should be tackled after the first
>> >> release IMO
>> >>
>> >>
>> >> Romain Manni-Bucau
>> >> @rmannibucau
>> >> http://www.tomitribe.com
>> >> http://rmannibucau.wordpress.com
>> >> https://github.com/rmannibucau
>> >>
>> >>
>> >> 2015-01-20 17:28 GMT+01:00 Anatole Tresch <at...@gmail.com>:
>> >> > I think guys we really have more important things to discuss than
>> these.
>> >> > There are wuestion open about how to deal with type registration for
>> >> > ProeprtyConverters, list property modelling and we did not even
>> started
>> >> > with event handling. I propose you guys put your energy on these tasks
>> >> and
>> >> > stop restarting the same discussion again and again.
>> >> >
>> >> > 2015-01-20 17:17 GMT+01:00 Romain Manni-Bucau <rmannibucau@gmail.com
>> >:
>> >> >
>> >> >> yep, our build is complicated and we finally dont propose anything
>> >> >> valuable thanks to it so why continuing this way?
>> >> >>
>> >> >>
>> >> >> Romain Manni-Bucau
>> >> >> @rmannibucau
>> >> >> http://www.tomitribe.com
>> >> >> http://rmannibucau.wordpress.com
>> >> >> https://github.com/rmannibucau
>> >> >>
>> >> >>
>> >> >> 2015-01-20 17:06 GMT+01:00 Werner Keil <we...@gmail.com>:
>> >> >> >>
>> >> >> >>
>> >> >> >>
>> >> >> >> In all cases you break java 8 lambdas, not an issue by itself but
>> we
>> >> >> >> should maybe think removing this java 8 module which will soon be
>> >> only
>> >> >> >> justified by Optional which is highly controversed.
>> >> >> >>
>> >> >> >>
>> >> >> > What exactly do you mean by that, do you suggest merging the
>> codebase
>> >> >> here
>> >> >> > because except for Optional there is little value of a Java 8+
>> >> >> approach?;-)
>> >> >>
>> >> >
>> >> >
>> >> >
>> >> > --
>> >> > *Anatole Tresch*
>> >> > Java Engineer & Architect, JSR Spec Lead
>> >> > Glärnischweg 10
>> >> > CH - 8620 Wetzikon
>> >> >
>> >> > *Switzerland, Europe Zurich, GMT+1*
>> >> > *Twitter: @atsticks*
>> >> > *Blogs: **http://javaremarkables.blogspot.ch/
>> >> > <http://javaremarkables.blogspot.ch/>*
>> >> >
>> >> > *Google: atsticksMobile +41-76 344 62 79*
>> >>
>> >
>> >
>> >
>> > --
>> > *Anatole Tresch*
>> > Java Engineer & Architect, JSR Spec Lead
>> > Glärnischweg 10
>> > CH - 8620 Wetzikon
>> >
>> > *Switzerland, Europe Zurich, GMT+1*
>> > *Twitter: @atsticks*
>> > *Blogs: **http://javaremarkables.blogspot.ch/
>> > <http://javaremarkables.blogspot.ch/>*
>> >
>> > *Google: atsticksMobile +41-76 344 62 79*
>>
>
>
>
> --
> *Anatole Tresch*
> Java Engineer & Architect, JSR Spec Lead
> Glärnischweg 10
> CH - 8620 Wetzikon
>
> *Switzerland, Europe Zurich, GMT+1*
> *Twitter: @atsticks*
> *Blogs: **http://javaremarkables.blogspot.ch/
> <http://javaremarkables.blogspot.ch/>*
>
> *Google: atsticksMobile +41-76 344 62 79*
Re: build failure
Posted by Anatole Tresch <at...@gmail.com>.
Sorry, if I missed the links, I did not see them ;)
Looking at xbean they also have the type info on the converter, e.g.
public static void registerConverter(Converter converter) {
if (converter == null) throw new NullPointerException("editor is null");
Class type = converter.*getType*();
registry.put(type, converter);
So what is now the issue?
Cheers, Anatole
2015-01-20 17:57 GMT+01:00 Romain Manni-Bucau <rm...@gmail.com>:
> already shared the link for xbean:
>
> https://svn.apache.org/repos/asf/geronimo/xbean/trunk/xbean-reflect/src/main/java/org/apache/xbean/propertyeditor/PropertyEditors.java
> and more particularly
>
> https://svn.apache.org/repos/asf/geronimo/xbean/trunk/xbean-reflect/src/main/java/org/apache/xbean/propertyeditor/CollectionUtil.java
> (of course this code is very old but the format shoudnt change). For
> spring it uses commons-lang code (fork surely?):
>
> http://grepcode.com/file/repo1.maven.org/maven2/org.springframework/spring-core/3.0.2.RELEASE/org/springframework/util/StringUtils.java#StringUtils.commaDelimitedListToSet%28java.lang.String%29
>
>
>
> Romain Manni-Bucau
> @rmannibucau
> http://www.tomitribe.com
> http://rmannibucau.wordpress.com
> https://github.com/rmannibucau
>
>
> 2015-01-20 17:50 GMT+01:00 Anatole Tresch <at...@gmail.com>:
> > Hi Romain
> >
> > 2015-01-20 17:39 GMT+01:00 Romain Manni-Bucau <rm...@gmail.com>:
> >
> >> to be honest I don't see where is the hard part here:
> >> 1) type registration: we adopt 2 registrations mode as for property
> sources
> >> 1a) direct mode MyImpl -> use reflection (or meta if we want to be
> >> verbose) to get the Type
> >>
> >
> > -> Once more: Reflection will not work. The other things tbd.
> >
> >
> >
> >> 1b) kind of provider where we pass a context which register in the
> >> config (config context ATM) the converter:
> >>
> >> public class MyConverters implements ConvertersProvider {
> >> public void registerConverters(ConverterBootsrapContext ctx) {
> >> ctx.register(new MyTypeLiteral<List<String>>() {}, new
> >> MyConverter(true, 1));
> >> }
> >> }
> >>
> >
> > -> No this apporach is not part of the current API. We can register
> > directly PropertyConverter. There is no such thing like
> > a ConverterProvider. If so we could add the target type to the
> > ConverterProvider I agree. That was one of my proposals.
> >
> >
> >
> > 2) about list, map etc modelling: here we don't have much the choice
> >> we should just do what is common (and if we still think to a spec this
> >> is the way to go instead of thinking we are better than everything
> >> existing). References I commonly use or used are xbean and spring and
> >> both are more or less aligned.
> >>
> >
> > Just a short personal advice: If you want people to have an idea about
> > what to you talk you should either copy some code or at least add some
> > direct links to the APIs you are talking of. If not your efforts will be
> > not reflected. Most of the guys do not have time to search the exact
> > locations of what you are talking about ;(
> >
> > 3) agree about events but this one should be tackled after the first
> >> release IMO
> >>
> >>
> >> Romain Manni-Bucau
> >> @rmannibucau
> >> http://www.tomitribe.com
> >> http://rmannibucau.wordpress.com
> >> https://github.com/rmannibucau
> >>
> >>
> >> 2015-01-20 17:28 GMT+01:00 Anatole Tresch <at...@gmail.com>:
> >> > I think guys we really have more important things to discuss than
> these.
> >> > There are wuestion open about how to deal with type registration for
> >> > ProeprtyConverters, list property modelling and we did not even
> started
> >> > with event handling. I propose you guys put your energy on these tasks
> >> and
> >> > stop restarting the same discussion again and again.
> >> >
> >> > 2015-01-20 17:17 GMT+01:00 Romain Manni-Bucau <rmannibucau@gmail.com
> >:
> >> >
> >> >> yep, our build is complicated and we finally dont propose anything
> >> >> valuable thanks to it so why continuing this way?
> >> >>
> >> >>
> >> >> Romain Manni-Bucau
> >> >> @rmannibucau
> >> >> http://www.tomitribe.com
> >> >> http://rmannibucau.wordpress.com
> >> >> https://github.com/rmannibucau
> >> >>
> >> >>
> >> >> 2015-01-20 17:06 GMT+01:00 Werner Keil <we...@gmail.com>:
> >> >> >>
> >> >> >>
> >> >> >>
> >> >> >> In all cases you break java 8 lambdas, not an issue by itself but
> we
> >> >> >> should maybe think removing this java 8 module which will soon be
> >> only
> >> >> >> justified by Optional which is highly controversed.
> >> >> >>
> >> >> >>
> >> >> > What exactly do you mean by that, do you suggest merging the
> codebase
> >> >> here
> >> >> > because except for Optional there is little value of a Java 8+
> >> >> approach?;-)
> >> >>
> >> >
> >> >
> >> >
> >> > --
> >> > *Anatole Tresch*
> >> > Java Engineer & Architect, JSR Spec Lead
> >> > Glärnischweg 10
> >> > CH - 8620 Wetzikon
> >> >
> >> > *Switzerland, Europe Zurich, GMT+1*
> >> > *Twitter: @atsticks*
> >> > *Blogs: **http://javaremarkables.blogspot.ch/
> >> > <http://javaremarkables.blogspot.ch/>*
> >> >
> >> > *Google: atsticksMobile +41-76 344 62 79*
> >>
> >
> >
> >
> > --
> > *Anatole Tresch*
> > Java Engineer & Architect, JSR Spec Lead
> > Glärnischweg 10
> > CH - 8620 Wetzikon
> >
> > *Switzerland, Europe Zurich, GMT+1*
> > *Twitter: @atsticks*
> > *Blogs: **http://javaremarkables.blogspot.ch/
> > <http://javaremarkables.blogspot.ch/>*
> >
> > *Google: atsticksMobile +41-76 344 62 79*
>
--
*Anatole Tresch*
Java Engineer & Architect, JSR Spec Lead
Glärnischweg 10
CH - 8620 Wetzikon
*Switzerland, Europe Zurich, GMT+1*
*Twitter: @atsticks*
*Blogs: **http://javaremarkables.blogspot.ch/
<http://javaremarkables.blogspot.ch/>*
*Google: atsticksMobile +41-76 344 62 79*
Re: build failure
Posted by Romain Manni-Bucau <rm...@gmail.com>.
already shared the link for xbean:
https://svn.apache.org/repos/asf/geronimo/xbean/trunk/xbean-reflect/src/main/java/org/apache/xbean/propertyeditor/PropertyEditors.java
and more particularly
https://svn.apache.org/repos/asf/geronimo/xbean/trunk/xbean-reflect/src/main/java/org/apache/xbean/propertyeditor/CollectionUtil.java
(of course this code is very old but the format shoudnt change). For
spring it uses commons-lang code (fork surely?):
http://grepcode.com/file/repo1.maven.org/maven2/org.springframework/spring-core/3.0.2.RELEASE/org/springframework/util/StringUtils.java#StringUtils.commaDelimitedListToSet%28java.lang.String%29
Romain Manni-Bucau
@rmannibucau
http://www.tomitribe.com
http://rmannibucau.wordpress.com
https://github.com/rmannibucau
2015-01-20 17:50 GMT+01:00 Anatole Tresch <at...@gmail.com>:
> Hi Romain
>
> 2015-01-20 17:39 GMT+01:00 Romain Manni-Bucau <rm...@gmail.com>:
>
>> to be honest I don't see where is the hard part here:
>> 1) type registration: we adopt 2 registrations mode as for property sources
>> 1a) direct mode MyImpl -> use reflection (or meta if we want to be
>> verbose) to get the Type
>>
>
> -> Once more: Reflection will not work. The other things tbd.
>
>
>
>> 1b) kind of provider where we pass a context which register in the
>> config (config context ATM) the converter:
>>
>> public class MyConverters implements ConvertersProvider {
>> public void registerConverters(ConverterBootsrapContext ctx) {
>> ctx.register(new MyTypeLiteral<List<String>>() {}, new
>> MyConverter(true, 1));
>> }
>> }
>>
>
> -> No this apporach is not part of the current API. We can register
> directly PropertyConverter. There is no such thing like
> a ConverterProvider. If so we could add the target type to the
> ConverterProvider I agree. That was one of my proposals.
>
>
>
> 2) about list, map etc modelling: here we don't have much the choice
>> we should just do what is common (and if we still think to a spec this
>> is the way to go instead of thinking we are better than everything
>> existing). References I commonly use or used are xbean and spring and
>> both are more or less aligned.
>>
>
> Just a short personal advice: If you want people to have an idea about
> what to you talk you should either copy some code or at least add some
> direct links to the APIs you are talking of. If not your efforts will be
> not reflected. Most of the guys do not have time to search the exact
> locations of what you are talking about ;(
>
> 3) agree about events but this one should be tackled after the first
>> release IMO
>>
>>
>> Romain Manni-Bucau
>> @rmannibucau
>> http://www.tomitribe.com
>> http://rmannibucau.wordpress.com
>> https://github.com/rmannibucau
>>
>>
>> 2015-01-20 17:28 GMT+01:00 Anatole Tresch <at...@gmail.com>:
>> > I think guys we really have more important things to discuss than these.
>> > There are wuestion open about how to deal with type registration for
>> > ProeprtyConverters, list property modelling and we did not even started
>> > with event handling. I propose you guys put your energy on these tasks
>> and
>> > stop restarting the same discussion again and again.
>> >
>> > 2015-01-20 17:17 GMT+01:00 Romain Manni-Bucau <rm...@gmail.com>:
>> >
>> >> yep, our build is complicated and we finally dont propose anything
>> >> valuable thanks to it so why continuing this way?
>> >>
>> >>
>> >> Romain Manni-Bucau
>> >> @rmannibucau
>> >> http://www.tomitribe.com
>> >> http://rmannibucau.wordpress.com
>> >> https://github.com/rmannibucau
>> >>
>> >>
>> >> 2015-01-20 17:06 GMT+01:00 Werner Keil <we...@gmail.com>:
>> >> >>
>> >> >>
>> >> >>
>> >> >> In all cases you break java 8 lambdas, not an issue by itself but we
>> >> >> should maybe think removing this java 8 module which will soon be
>> only
>> >> >> justified by Optional which is highly controversed.
>> >> >>
>> >> >>
>> >> > What exactly do you mean by that, do you suggest merging the codebase
>> >> here
>> >> > because except for Optional there is little value of a Java 8+
>> >> approach?;-)
>> >>
>> >
>> >
>> >
>> > --
>> > *Anatole Tresch*
>> > Java Engineer & Architect, JSR Spec Lead
>> > Glärnischweg 10
>> > CH - 8620 Wetzikon
>> >
>> > *Switzerland, Europe Zurich, GMT+1*
>> > *Twitter: @atsticks*
>> > *Blogs: **http://javaremarkables.blogspot.ch/
>> > <http://javaremarkables.blogspot.ch/>*
>> >
>> > *Google: atsticksMobile +41-76 344 62 79*
>>
>
>
>
> --
> *Anatole Tresch*
> Java Engineer & Architect, JSR Spec Lead
> Glärnischweg 10
> CH - 8620 Wetzikon
>
> *Switzerland, Europe Zurich, GMT+1*
> *Twitter: @atsticks*
> *Blogs: **http://javaremarkables.blogspot.ch/
> <http://javaremarkables.blogspot.ch/>*
>
> *Google: atsticksMobile +41-76 344 62 79*
Re: build failure
Posted by Anatole Tresch <at...@gmail.com>.
Hi Romain
2015-01-20 17:39 GMT+01:00 Romain Manni-Bucau <rm...@gmail.com>:
> to be honest I don't see where is the hard part here:
> 1) type registration: we adopt 2 registrations mode as for property sources
> 1a) direct mode MyImpl -> use reflection (or meta if we want to be
> verbose) to get the Type
>
-> Once more: Reflection will not work. The other things tbd.
> 1b) kind of provider where we pass a context which register in the
> config (config context ATM) the converter:
>
> public class MyConverters implements ConvertersProvider {
> public void registerConverters(ConverterBootsrapContext ctx) {
> ctx.register(new MyTypeLiteral<List<String>>() {}, new
> MyConverter(true, 1));
> }
> }
>
-> No this apporach is not part of the current API. We can register
directly PropertyConverter. There is no such thing like
a ConverterProvider. If so we could add the target type to the
ConverterProvider I agree. That was one of my proposals.
2) about list, map etc modelling: here we don't have much the choice
> we should just do what is common (and if we still think to a spec this
> is the way to go instead of thinking we are better than everything
> existing). References I commonly use or used are xbean and spring and
> both are more or less aligned.
>
Just a short personal advice: If you want people to have an idea about
what to you talk you should either copy some code or at least add some
direct links to the APIs you are talking of. If not your efforts will be
not reflected. Most of the guys do not have time to search the exact
locations of what you are talking about ;(
3) agree about events but this one should be tackled after the first
> release IMO
>
>
> Romain Manni-Bucau
> @rmannibucau
> http://www.tomitribe.com
> http://rmannibucau.wordpress.com
> https://github.com/rmannibucau
>
>
> 2015-01-20 17:28 GMT+01:00 Anatole Tresch <at...@gmail.com>:
> > I think guys we really have more important things to discuss than these.
> > There are wuestion open about how to deal with type registration for
> > ProeprtyConverters, list property modelling and we did not even started
> > with event handling. I propose you guys put your energy on these tasks
> and
> > stop restarting the same discussion again and again.
> >
> > 2015-01-20 17:17 GMT+01:00 Romain Manni-Bucau <rm...@gmail.com>:
> >
> >> yep, our build is complicated and we finally dont propose anything
> >> valuable thanks to it so why continuing this way?
> >>
> >>
> >> Romain Manni-Bucau
> >> @rmannibucau
> >> http://www.tomitribe.com
> >> http://rmannibucau.wordpress.com
> >> https://github.com/rmannibucau
> >>
> >>
> >> 2015-01-20 17:06 GMT+01:00 Werner Keil <we...@gmail.com>:
> >> >>
> >> >>
> >> >>
> >> >> In all cases you break java 8 lambdas, not an issue by itself but we
> >> >> should maybe think removing this java 8 module which will soon be
> only
> >> >> justified by Optional which is highly controversed.
> >> >>
> >> >>
> >> > What exactly do you mean by that, do you suggest merging the codebase
> >> here
> >> > because except for Optional there is little value of a Java 8+
> >> approach?;-)
> >>
> >
> >
> >
> > --
> > *Anatole Tresch*
> > Java Engineer & Architect, JSR Spec Lead
> > Glärnischweg 10
> > CH - 8620 Wetzikon
> >
> > *Switzerland, Europe Zurich, GMT+1*
> > *Twitter: @atsticks*
> > *Blogs: **http://javaremarkables.blogspot.ch/
> > <http://javaremarkables.blogspot.ch/>*
> >
> > *Google: atsticksMobile +41-76 344 62 79*
>
--
*Anatole Tresch*
Java Engineer & Architect, JSR Spec Lead
Glärnischweg 10
CH - 8620 Wetzikon
*Switzerland, Europe Zurich, GMT+1*
*Twitter: @atsticks*
*Blogs: **http://javaremarkables.blogspot.ch/
<http://javaremarkables.blogspot.ch/>*
*Google: atsticksMobile +41-76 344 62 79*
Re: build failure
Posted by Romain Manni-Bucau <rm...@gmail.com>.
to be honest I don't see where is the hard part here:
1) type registration: we adopt 2 registrations mode as for property sources
1a) direct mode MyImpl -> use reflection (or meta if we want to be
verbose) to get the Type
1b) kind of provider where we pass a context which register in the
config (config context ATM) the converter:
public class MyConverters implements ConvertersProvider {
public void registerConverters(ConverterBootsrapContext ctx) {
ctx.register(new MyTypeLiteral<List<String>>() {}, new
MyConverter(true, 1));
}
}
2) about list, map etc modelling: here we don't have much the choice
we should just do what is common (and if we still think to a spec this
is the way to go instead of thinking we are better than everything
existing). References I commonly use or used are xbean and spring and
both are more or less aligned.
3) agree about events but this one should be tackled after the first release IMO
Romain Manni-Bucau
@rmannibucau
http://www.tomitribe.com
http://rmannibucau.wordpress.com
https://github.com/rmannibucau
2015-01-20 17:28 GMT+01:00 Anatole Tresch <at...@gmail.com>:
> I think guys we really have more important things to discuss than these.
> There are wuestion open about how to deal with type registration for
> ProeprtyConverters, list property modelling and we did not even started
> with event handling. I propose you guys put your energy on these tasks and
> stop restarting the same discussion again and again.
>
> 2015-01-20 17:17 GMT+01:00 Romain Manni-Bucau <rm...@gmail.com>:
>
>> yep, our build is complicated and we finally dont propose anything
>> valuable thanks to it so why continuing this way?
>>
>>
>> Romain Manni-Bucau
>> @rmannibucau
>> http://www.tomitribe.com
>> http://rmannibucau.wordpress.com
>> https://github.com/rmannibucau
>>
>>
>> 2015-01-20 17:06 GMT+01:00 Werner Keil <we...@gmail.com>:
>> >>
>> >>
>> >>
>> >> In all cases you break java 8 lambdas, not an issue by itself but we
>> >> should maybe think removing this java 8 module which will soon be only
>> >> justified by Optional which is highly controversed.
>> >>
>> >>
>> > What exactly do you mean by that, do you suggest merging the codebase
>> here
>> > because except for Optional there is little value of a Java 8+
>> approach?;-)
>>
>
>
>
> --
> *Anatole Tresch*
> Java Engineer & Architect, JSR Spec Lead
> Glärnischweg 10
> CH - 8620 Wetzikon
>
> *Switzerland, Europe Zurich, GMT+1*
> *Twitter: @atsticks*
> *Blogs: **http://javaremarkables.blogspot.ch/
> <http://javaremarkables.blogspot.ch/>*
>
> *Google: atsticksMobile +41-76 344 62 79*
Re: build failure
Posted by Anatole Tresch <at...@gmail.com>.
I think guys we really have more important things to discuss than these.
There are wuestion open about how to deal with type registration for
ProeprtyConverters, list property modelling and we did not even started
with event handling. I propose you guys put your energy on these tasks and
stop restarting the same discussion again and again.
2015-01-20 17:17 GMT+01:00 Romain Manni-Bucau <rm...@gmail.com>:
> yep, our build is complicated and we finally dont propose anything
> valuable thanks to it so why continuing this way?
>
>
> Romain Manni-Bucau
> @rmannibucau
> http://www.tomitribe.com
> http://rmannibucau.wordpress.com
> https://github.com/rmannibucau
>
>
> 2015-01-20 17:06 GMT+01:00 Werner Keil <we...@gmail.com>:
> >>
> >>
> >>
> >> In all cases you break java 8 lambdas, not an issue by itself but we
> >> should maybe think removing this java 8 module which will soon be only
> >> justified by Optional which is highly controversed.
> >>
> >>
> > What exactly do you mean by that, do you suggest merging the codebase
> here
> > because except for Optional there is little value of a Java 8+
> approach?;-)
>
--
*Anatole Tresch*
Java Engineer & Architect, JSR Spec Lead
Glärnischweg 10
CH - 8620 Wetzikon
*Switzerland, Europe Zurich, GMT+1*
*Twitter: @atsticks*
*Blogs: **http://javaremarkables.blogspot.ch/
<http://javaremarkables.blogspot.ch/>*
*Google: atsticksMobile +41-76 344 62 79*
Re: build failure
Posted by Romain Manni-Bucau <rm...@gmail.com>.
yep, our build is complicated and we finally dont propose anything
valuable thanks to it so why continuing this way?
Romain Manni-Bucau
@rmannibucau
http://www.tomitribe.com
http://rmannibucau.wordpress.com
https://github.com/rmannibucau
2015-01-20 17:06 GMT+01:00 Werner Keil <we...@gmail.com>:
>>
>>
>>
>> In all cases you break java 8 lambdas, not an issue by itself but we
>> should maybe think removing this java 8 module which will soon be only
>> justified by Optional which is highly controversed.
>>
>>
> What exactly do you mean by that, do you suggest merging the codebase here
> because except for Optional there is little value of a Java 8+ approach?;-)
Re: build failure
Posted by Werner Keil <we...@gmail.com>.
>
>
>
> In all cases you break java 8 lambdas, not an issue by itself but we
> should maybe think removing this java 8 module which will soon be only
> justified by Optional which is highly controversed.
>
>
What exactly do you mean by that, do you suggest merging the codebase here
because except for Optional there is little value of a Java 8+ approach?;-)
Re: build failure
Posted by Romain Manni-Bucau <rm...@gmail.com>.
yes and no (inline)
Romain Manni-Bucau
@rmannibucau
http://www.tomitribe.com
http://rmannibucau.wordpress.com
https://github.com/rmannibucau
2015-01-20 18:15 GMT+01:00 Anatole Tresch <at...@gmail.com>:
> Hi Romain
>
> IMO the use cases are not the same, in CDI you have
>
> SomeClass{
>
> @Inject
> private MyType type = Instance<MyType>;
>
private Instance<MyType>?
btw this mecasnism is also used if you have @Inject Converter<Boolean>
and have a class BooleanConverter -> this really looks close to half
of we need.
> Here the information about the target type is contained in the Field type.
> The part defined in <MyType> is removed by type erasure.
>
not for type hierarchy but for variables
> In Tamaya this problem is even more simpler, since
> a) the target type is explicitly passed, when accessing configuration
> b) the PropertyConverter to be used is passed explicitly. If the user does
> not use raw types, the compiler will ensure it will match.
>
> Now the situation we have is:
>
> public PropertyConverter<Integer>{...}
>
> during runtime gets to
>
> public PropertyConverter{}
>
> (during runtime you have raw types). The information in <> is lost and not
> accessible using reflection. You can simply imagine this is the case,
> because without that, Java 5 would not be compatible with versions before
> (that was the trick they applied to ensure binary compatibility).
>
> If I miss something, I am happy to learn.
>
we are not in this case, we are in the following one:
public IntegerConverter [extends|implements] PropertyConverter<Integer> {}
And here you can get the Integer checking parameters of the generic
[superclass|interfaces].
I think it is interesting because it allows you to register a type just doing:
public IntegerConverter .... {...} + META-INF/services/...., nothing else
> Best,
> Anatole
>
>
>
>
>
> 2015-01-20 17:46 GMT+01:00 Romain Manni-Bucau <rm...@gmail.com>:
>
>> 2015-01-20 17:40 GMT+01:00 Anatole Tresch <at...@gmail.com>:
>> > Hi Romain
>> >
>> > see inline.
>> >
>> > 2015-01-20 17:29 GMT+01:00 Romain Manni-Bucau <rm...@gmail.com>:
>> >
>> >> answered inline
>> >>
>> >> 2015-01-20 17:19 GMT+01:00 Anatole Tresch <at...@gmail.com>:
>> >> > Hi Romain
>> >> >
>> >> > 2015-01-20 17:02 GMT+01:00 Romain Manni-Bucau <rmannibucau@gmail.com
>> >:
>> >> >>
>> >> >>
>> >> >> performance overhead at runtime = 0...you shouldn't do it at runtime
>> >> >> but at registration time.
>> >> >
>> >> >
>> >> > -> Base on what information?
>> >> >
>> >>
>> >> the fact it is not called? if you use this when you register the
>> >> converter then you dont need it anymore and you build your meta at
>> >> registration and didnt pollute the API with new annotations.
>> >
>> >
>> > I dont get the point. Again, please answer my questions.
>> >
>> > How do you want to evaluate the target type a converter is targeting
>> > during registration?
>> >
>>
>> answering in next answer
>>
>> >
>> >
>> >> >> > Also when we would add a method returning the expected formats
>> (which
>> >> I
>> >> >> > think would be a very useful thing) we would loose the functional
>> >> >> aspects,
>> >> >> > if we add the
>> >> >> This is why making the type the contract makes sense here.
>> >> >>
>> >> >> -> Dont get the point.
>> >> >
>> >>
>> >> if I have MyPropertyConverter<Foo>. The type says me what I need (ie
>> >> Foo) so why doing:
>> >>
>> >> @TamayaMeta(Foo.class)
>> >> MyPropertyConverter<Foo>
>> >>
>> >> ?
>> >>
>> >
>> > Simple because you dont have that information at runtime in Java 7.
>> >
>>
>> oops so CDI is fully broken. Of course you have it - even in java 6.
>>
>> >
>> > You'll surely speak about hierarchy etc? It is of course true but
>> >> 1) most of the time you can deduce it counting the distance to the
>> desired
>> >> class
>> >>
>> > Already stated this will not work in all cases. Try thinking doing it
>> > alternately please.
>> >
>> > 2) if you really want to specify it you can as you mentionned add an
>> >> annotation but not by default to keep it simple and readable
>> >
>> > Combined with 1, this makes no sense. When I have the information from a
>> > reliable source (1 is not reliable) and dont need 2, if I cant do it, I
>> can
>> > go home and cry or just look for a soliution, I will not do things more
>> > simpler, just because of simplicitly. Reduce to the max, but not one step
>> > further!
>> >
>>
>> You didnt get me: I'm not opposed to @ConverterType or whatever name
>> it is, I'm opposed to force it cause it makes super verbose classes
>> for nothing + in 80% of the cases (100 in our impl IIRC) it is
>> redundant.
>>
>> >
>> >
>> >> >> > I see the following options currently:
>> >> >> > 1) Define an annotation, e.g. @ConverterSpec to add to the
>> meta-info
>> >> >> > automatically for the auto-registered PropertyProvider instances.
>> >> >> > 2) Add an additional interface, extending PropertyProvider that
>> adds
>> >> the
>> >> >> > additional methods. This interface then must be used for
>> registration
>> >> and
>> >> >> > adds the missing functionality.
>> >> >> > 3) We could let be PropertyProvider to be non functional, but add
>> in
>> >> >> Java 8
>> >> >> > an additional method to Configuration, which tykes a
>> >> Function<String,T>.
>> >> >> >
>> >> >>
>> >> >> In all cases you break java 8 lambdas, not an issue by itself but we
>> >> >> should maybe think removing this java 8 module which will soon be
>> only
>> >> >> justified by Optional which is highly controversed.
>> >> >>
>> >> >
>> >> > This is simply not true at all:
>> >> > - 1 Will not break it at all and will be Java 7 compatible.
>> >> > - 2 Will also not break it, since the extended interface is only used
>> for
>> >> > regitration not for the Configuration interface, where
>> >> > you can pass a Lambda starting with Java 8.
>> >> > - 3 Would not break Lambdas, because in Java 7 PropertyProvider is not
>> >> > functional because there is no such concept, and in Java 8 you have
>> the
>> >> > additional method, which takes a Lamba.
>> >> >
>> >> >
>> >>
>> >> 2 points here
>> >>
>> >> 1) if you split that much the API then I say (again) what I said in
>> >> j7/j8 thread: tamaya will fork by itself and both will not be
>> >> maintained correctly
>> >>
>> >
>> > Not true! 1 and 2 is exactly the same in Java 7 and 8.
>> >
>> >
>> >
>> >> 2) that said this confirms what is said before: you dont need this
>> >> getTargetType()
>> >
>> >
>> > As already said, useless to comment. It will not work as you suggest.
>> >
>>
>> I fear you don't know java reflection API enough here, or I am really
>> missing something important but I dont get yet what
>>
>> >
>> >> >
>> >> >
>> >> >
>> >> >>
>> >> >> > -Anatole
>> >> >> >
>> >> >> >
>> >> >> > 2015-01-20 16:33 GMT+01:00 Romain Manni-Bucau <
>> rmannibucau@gmail.com
>> >> >:
>> >> >> >
>> >> >> >> The annotation by itself doesn't make of the interface a
>> >> >> >> FunctionalInterface or the opposite (ie you can be without it) -
>> so
>> >> >> >> yes this is fully useless from a code/bytecode point of view.
>> That's
>> >> >> >> because getTargetType() was added.
>> >> >> >>
>> >> >> >> I'd just remove it and use reflection to determine it. We would
>> then
>> >> >> >> be able to do a lot more than simple Class which are more and more
>> >> >> >> java 1.4 (it is very funny to see it aside java 8 code ;))
>> >> >> >>
>> >> >> >>
>> >> >> >> Romain Manni-Bucau
>> >> >> >> @rmannibucau
>> >> >> >> http://www.tomitribe.com
>> >> >> >> http://rmannibucau.wordpress.com
>> >> >> >> https://github.com/rmannibucau
>> >> >> >>
>> >> >> >>
>> >> >> >> 2015-01-20 16:18 GMT+01:00 Werner Keil <we...@gmail.com>:
>> >> >> >> > How, did it lose the annotation or was the method signature
>> changed
>> >> >> >> > violating the Functional Interface definition?
>> >> >> >> >
>> >> >> >> > Werner
>> >> >> >> >
>> >> >> >> > On Tue, Jan 20, 2015 at 4:10 PM, Reinhard Sandtner <
>> >> >> >> > reinhard.sandtner@gmail.com> wrote:
>> >> >> >> >
>> >> >> >> >> Hey guys
>> >> >> >> >>
>> >> >> >> >> build is broken since PropertyConverter is no longer a
>> >> >> >> FunctionalInterface
>> >> >> >> >> :-(
>> >> >> >> >>
>> >> >> >> >> shall i fix it or is someone working on it?
>> >> >> >> >>
>> >> >> >> >> lg
>> >> >> >> >> reini
>> >> >> >>
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >> > --
>> >> >> > *Anatole Tresch*
>> >> >> > Java Engineer & Architect, JSR Spec Lead
>> >> >> > Glärnischweg 10
>> >> >> > CH - 8620 Wetzikon
>> >> >> >
>> >> >> > *Switzerland, Europe Zurich, GMT+1*
>> >> >> > *Twitter: @atsticks*
>> >> >> > *Blogs: **http://javaremarkables.blogspot.ch/
>> >> >> > <http://javaremarkables.blogspot.ch/>*
>> >> >> >
>> >> >> > *Google: atsticksMobile +41-76 344 62 79*
>> >> >>
>> >> >
>> >> >
>> >> >
>> >> > --
>> >> > *Anatole Tresch*
>> >> > Java Engineer & Architect, JSR Spec Lead
>> >> > Glärnischweg 10
>> >> > CH - 8620 Wetzikon
>> >> >
>> >> > *Switzerland, Europe Zurich, GMT+1*
>> >> > *Twitter: @atsticks*
>> >> > *Blogs: **http://javaremarkables.blogspot.ch/
>> >> > <http://javaremarkables.blogspot.ch/>*
>> >> >
>> >> > *Google: atsticksMobile +41-76 344 62 79*
>> >>
>> >
>> >
>> > --
>> > *Anatole Tresch*
>> > Java Engineer & Architect, JSR Spec Lead
>> > Glärnischweg 10
>> > CH - 8620 Wetzikon
>> >
>> > *Switzerland, Europe Zurich, GMT+1*
>> > *Twitter: @atsticks*
>> > *Blogs: **http://javaremarkables.blogspot.ch/
>> > <http://javaremarkables.blogspot.ch/>*
>> >
>> > *Google: atsticksMobile +41-76 344 62 79*
>>
>
>
>
> --
> *Anatole Tresch*
> Java Engineer & Architect, JSR Spec Lead
> Glärnischweg 10
> CH - 8620 Wetzikon
>
> *Switzerland, Europe Zurich, GMT+1*
> *Twitter: @atsticks*
> *Blogs: **http://javaremarkables.blogspot.ch/
> <http://javaremarkables.blogspot.ch/>*
>
> *Google: atsticksMobile +41-76 344 62 79*
Re: build failure
Posted by Anatole Tresch <at...@gmail.com>.
Hi Romain
IMO the use cases are not the same, in CDI you have
SomeClass{
@Inject
private MyType type = Instance<MyType>;
Here the information about the target type is contained in the Field type.
The part defined in <MyType> is removed by type erasure.
In Tamaya this problem is even more simpler, since
a) the target type is explicitly passed, when accessing configuration
b) the PropertyConverter to be used is passed explicitly. If the user does
not use raw types, the compiler will ensure it will match.
Now the situation we have is:
public PropertyConverter<Integer>{...}
during runtime gets to
public PropertyConverter{}
(during runtime you have raw types). The information in <> is lost and not
accessible using reflection. You can simply imagine this is the case,
because without that, Java 5 would not be compatible with versions before
(that was the trick they applied to ensure binary compatibility).
If I miss something, I am happy to learn.
Best,
Anatole
2015-01-20 17:46 GMT+01:00 Romain Manni-Bucau <rm...@gmail.com>:
> 2015-01-20 17:40 GMT+01:00 Anatole Tresch <at...@gmail.com>:
> > Hi Romain
> >
> > see inline.
> >
> > 2015-01-20 17:29 GMT+01:00 Romain Manni-Bucau <rm...@gmail.com>:
> >
> >> answered inline
> >>
> >> 2015-01-20 17:19 GMT+01:00 Anatole Tresch <at...@gmail.com>:
> >> > Hi Romain
> >> >
> >> > 2015-01-20 17:02 GMT+01:00 Romain Manni-Bucau <rmannibucau@gmail.com
> >:
> >> >>
> >> >>
> >> >> performance overhead at runtime = 0...you shouldn't do it at runtime
> >> >> but at registration time.
> >> >
> >> >
> >> > -> Base on what information?
> >> >
> >>
> >> the fact it is not called? if you use this when you register the
> >> converter then you dont need it anymore and you build your meta at
> >> registration and didnt pollute the API with new annotations.
> >
> >
> > I dont get the point. Again, please answer my questions.
> >
> > How do you want to evaluate the target type a converter is targeting
> > during registration?
> >
>
> answering in next answer
>
> >
> >
> >> >> > Also when we would add a method returning the expected formats
> (which
> >> I
> >> >> > think would be a very useful thing) we would loose the functional
> >> >> aspects,
> >> >> > if we add the
> >> >> This is why making the type the contract makes sense here.
> >> >>
> >> >> -> Dont get the point.
> >> >
> >>
> >> if I have MyPropertyConverter<Foo>. The type says me what I need (ie
> >> Foo) so why doing:
> >>
> >> @TamayaMeta(Foo.class)
> >> MyPropertyConverter<Foo>
> >>
> >> ?
> >>
> >
> > Simple because you dont have that information at runtime in Java 7.
> >
>
> oops so CDI is fully broken. Of course you have it - even in java 6.
>
> >
> > You'll surely speak about hierarchy etc? It is of course true but
> >> 1) most of the time you can deduce it counting the distance to the
> desired
> >> class
> >>
> > Already stated this will not work in all cases. Try thinking doing it
> > alternately please.
> >
> > 2) if you really want to specify it you can as you mentionned add an
> >> annotation but not by default to keep it simple and readable
> >
> > Combined with 1, this makes no sense. When I have the information from a
> > reliable source (1 is not reliable) and dont need 2, if I cant do it, I
> can
> > go home and cry or just look for a soliution, I will not do things more
> > simpler, just because of simplicitly. Reduce to the max, but not one step
> > further!
> >
>
> You didnt get me: I'm not opposed to @ConverterType or whatever name
> it is, I'm opposed to force it cause it makes super verbose classes
> for nothing + in 80% of the cases (100 in our impl IIRC) it is
> redundant.
>
> >
> >
> >> >> > I see the following options currently:
> >> >> > 1) Define an annotation, e.g. @ConverterSpec to add to the
> meta-info
> >> >> > automatically for the auto-registered PropertyProvider instances.
> >> >> > 2) Add an additional interface, extending PropertyProvider that
> adds
> >> the
> >> >> > additional methods. This interface then must be used for
> registration
> >> and
> >> >> > adds the missing functionality.
> >> >> > 3) We could let be PropertyProvider to be non functional, but add
> in
> >> >> Java 8
> >> >> > an additional method to Configuration, which tykes a
> >> Function<String,T>.
> >> >> >
> >> >>
> >> >> In all cases you break java 8 lambdas, not an issue by itself but we
> >> >> should maybe think removing this java 8 module which will soon be
> only
> >> >> justified by Optional which is highly controversed.
> >> >>
> >> >
> >> > This is simply not true at all:
> >> > - 1 Will not break it at all and will be Java 7 compatible.
> >> > - 2 Will also not break it, since the extended interface is only used
> for
> >> > regitration not for the Configuration interface, where
> >> > you can pass a Lambda starting with Java 8.
> >> > - 3 Would not break Lambdas, because in Java 7 PropertyProvider is not
> >> > functional because there is no such concept, and in Java 8 you have
> the
> >> > additional method, which takes a Lamba.
> >> >
> >> >
> >>
> >> 2 points here
> >>
> >> 1) if you split that much the API then I say (again) what I said in
> >> j7/j8 thread: tamaya will fork by itself and both will not be
> >> maintained correctly
> >>
> >
> > Not true! 1 and 2 is exactly the same in Java 7 and 8.
> >
> >
> >
> >> 2) that said this confirms what is said before: you dont need this
> >> getTargetType()
> >
> >
> > As already said, useless to comment. It will not work as you suggest.
> >
>
> I fear you don't know java reflection API enough here, or I am really
> missing something important but I dont get yet what
>
> >
> >> >
> >> >
> >> >
> >> >>
> >> >> > -Anatole
> >> >> >
> >> >> >
> >> >> > 2015-01-20 16:33 GMT+01:00 Romain Manni-Bucau <
> rmannibucau@gmail.com
> >> >:
> >> >> >
> >> >> >> The annotation by itself doesn't make of the interface a
> >> >> >> FunctionalInterface or the opposite (ie you can be without it) -
> so
> >> >> >> yes this is fully useless from a code/bytecode point of view.
> That's
> >> >> >> because getTargetType() was added.
> >> >> >>
> >> >> >> I'd just remove it and use reflection to determine it. We would
> then
> >> >> >> be able to do a lot more than simple Class which are more and more
> >> >> >> java 1.4 (it is very funny to see it aside java 8 code ;))
> >> >> >>
> >> >> >>
> >> >> >> Romain Manni-Bucau
> >> >> >> @rmannibucau
> >> >> >> http://www.tomitribe.com
> >> >> >> http://rmannibucau.wordpress.com
> >> >> >> https://github.com/rmannibucau
> >> >> >>
> >> >> >>
> >> >> >> 2015-01-20 16:18 GMT+01:00 Werner Keil <we...@gmail.com>:
> >> >> >> > How, did it lose the annotation or was the method signature
> changed
> >> >> >> > violating the Functional Interface definition?
> >> >> >> >
> >> >> >> > Werner
> >> >> >> >
> >> >> >> > On Tue, Jan 20, 2015 at 4:10 PM, Reinhard Sandtner <
> >> >> >> > reinhard.sandtner@gmail.com> wrote:
> >> >> >> >
> >> >> >> >> Hey guys
> >> >> >> >>
> >> >> >> >> build is broken since PropertyConverter is no longer a
> >> >> >> FunctionalInterface
> >> >> >> >> :-(
> >> >> >> >>
> >> >> >> >> shall i fix it or is someone working on it?
> >> >> >> >>
> >> >> >> >> lg
> >> >> >> >> reini
> >> >> >>
> >> >> >
> >> >> >
> >> >> >
> >> >> > --
> >> >> > *Anatole Tresch*
> >> >> > Java Engineer & Architect, JSR Spec Lead
> >> >> > Glärnischweg 10
> >> >> > CH - 8620 Wetzikon
> >> >> >
> >> >> > *Switzerland, Europe Zurich, GMT+1*
> >> >> > *Twitter: @atsticks*
> >> >> > *Blogs: **http://javaremarkables.blogspot.ch/
> >> >> > <http://javaremarkables.blogspot.ch/>*
> >> >> >
> >> >> > *Google: atsticksMobile +41-76 344 62 79*
> >> >>
> >> >
> >> >
> >> >
> >> > --
> >> > *Anatole Tresch*
> >> > Java Engineer & Architect, JSR Spec Lead
> >> > Glärnischweg 10
> >> > CH - 8620 Wetzikon
> >> >
> >> > *Switzerland, Europe Zurich, GMT+1*
> >> > *Twitter: @atsticks*
> >> > *Blogs: **http://javaremarkables.blogspot.ch/
> >> > <http://javaremarkables.blogspot.ch/>*
> >> >
> >> > *Google: atsticksMobile +41-76 344 62 79*
> >>
> >
> >
> > --
> > *Anatole Tresch*
> > Java Engineer & Architect, JSR Spec Lead
> > Glärnischweg 10
> > CH - 8620 Wetzikon
> >
> > *Switzerland, Europe Zurich, GMT+1*
> > *Twitter: @atsticks*
> > *Blogs: **http://javaremarkables.blogspot.ch/
> > <http://javaremarkables.blogspot.ch/>*
> >
> > *Google: atsticksMobile +41-76 344 62 79*
>
--
*Anatole Tresch*
Java Engineer & Architect, JSR Spec Lead
Glärnischweg 10
CH - 8620 Wetzikon
*Switzerland, Europe Zurich, GMT+1*
*Twitter: @atsticks*
*Blogs: **http://javaremarkables.blogspot.ch/
<http://javaremarkables.blogspot.ch/>*
*Google: atsticksMobile +41-76 344 62 79*
Re: build failure
Posted by Romain Manni-Bucau <rm...@gmail.com>.
2015-01-20 17:40 GMT+01:00 Anatole Tresch <at...@gmail.com>:
> Hi Romain
>
> see inline.
>
> 2015-01-20 17:29 GMT+01:00 Romain Manni-Bucau <rm...@gmail.com>:
>
>> answered inline
>>
>> 2015-01-20 17:19 GMT+01:00 Anatole Tresch <at...@gmail.com>:
>> > Hi Romain
>> >
>> > 2015-01-20 17:02 GMT+01:00 Romain Manni-Bucau <rm...@gmail.com>:
>> >>
>> >>
>> >> performance overhead at runtime = 0...you shouldn't do it at runtime
>> >> but at registration time.
>> >
>> >
>> > -> Base on what information?
>> >
>>
>> the fact it is not called? if you use this when you register the
>> converter then you dont need it anymore and you build your meta at
>> registration and didnt pollute the API with new annotations.
>
>
> I dont get the point. Again, please answer my questions.
>
> How do you want to evaluate the target type a converter is targeting
> during registration?
>
answering in next answer
>
>
>> >> > Also when we would add a method returning the expected formats (which
>> I
>> >> > think would be a very useful thing) we would loose the functional
>> >> aspects,
>> >> > if we add the
>> >> This is why making the type the contract makes sense here.
>> >>
>> >> -> Dont get the point.
>> >
>>
>> if I have MyPropertyConverter<Foo>. The type says me what I need (ie
>> Foo) so why doing:
>>
>> @TamayaMeta(Foo.class)
>> MyPropertyConverter<Foo>
>>
>> ?
>>
>
> Simple because you dont have that information at runtime in Java 7.
>
oops so CDI is fully broken. Of course you have it - even in java 6.
>
> You'll surely speak about hierarchy etc? It is of course true but
>> 1) most of the time you can deduce it counting the distance to the desired
>> class
>>
> Already stated this will not work in all cases. Try thinking doing it
> alternately please.
>
> 2) if you really want to specify it you can as you mentionned add an
>> annotation but not by default to keep it simple and readable
>
> Combined with 1, this makes no sense. When I have the information from a
> reliable source (1 is not reliable) and dont need 2, if I cant do it, I can
> go home and cry or just look for a soliution, I will not do things more
> simpler, just because of simplicitly. Reduce to the max, but not one step
> further!
>
You didnt get me: I'm not opposed to @ConverterType or whatever name
it is, I'm opposed to force it cause it makes super verbose classes
for nothing + in 80% of the cases (100 in our impl IIRC) it is
redundant.
>
>
>> >> > I see the following options currently:
>> >> > 1) Define an annotation, e.g. @ConverterSpec to add to the meta-info
>> >> > automatically for the auto-registered PropertyProvider instances.
>> >> > 2) Add an additional interface, extending PropertyProvider that adds
>> the
>> >> > additional methods. This interface then must be used for registration
>> and
>> >> > adds the missing functionality.
>> >> > 3) We could let be PropertyProvider to be non functional, but add in
>> >> Java 8
>> >> > an additional method to Configuration, which tykes a
>> Function<String,T>.
>> >> >
>> >>
>> >> In all cases you break java 8 lambdas, not an issue by itself but we
>> >> should maybe think removing this java 8 module which will soon be only
>> >> justified by Optional which is highly controversed.
>> >>
>> >
>> > This is simply not true at all:
>> > - 1 Will not break it at all and will be Java 7 compatible.
>> > - 2 Will also not break it, since the extended interface is only used for
>> > regitration not for the Configuration interface, where
>> > you can pass a Lambda starting with Java 8.
>> > - 3 Would not break Lambdas, because in Java 7 PropertyProvider is not
>> > functional because there is no such concept, and in Java 8 you have the
>> > additional method, which takes a Lamba.
>> >
>> >
>>
>> 2 points here
>>
>> 1) if you split that much the API then I say (again) what I said in
>> j7/j8 thread: tamaya will fork by itself and both will not be
>> maintained correctly
>>
>
> Not true! 1 and 2 is exactly the same in Java 7 and 8.
>
>
>
>> 2) that said this confirms what is said before: you dont need this
>> getTargetType()
>
>
> As already said, useless to comment. It will not work as you suggest.
>
I fear you don't know java reflection API enough here, or I am really
missing something important but I dont get yet what
>
>> >
>> >
>> >
>> >>
>> >> > -Anatole
>> >> >
>> >> >
>> >> > 2015-01-20 16:33 GMT+01:00 Romain Manni-Bucau <rmannibucau@gmail.com
>> >:
>> >> >
>> >> >> The annotation by itself doesn't make of the interface a
>> >> >> FunctionalInterface or the opposite (ie you can be without it) - so
>> >> >> yes this is fully useless from a code/bytecode point of view. That's
>> >> >> because getTargetType() was added.
>> >> >>
>> >> >> I'd just remove it and use reflection to determine it. We would then
>> >> >> be able to do a lot more than simple Class which are more and more
>> >> >> java 1.4 (it is very funny to see it aside java 8 code ;))
>> >> >>
>> >> >>
>> >> >> Romain Manni-Bucau
>> >> >> @rmannibucau
>> >> >> http://www.tomitribe.com
>> >> >> http://rmannibucau.wordpress.com
>> >> >> https://github.com/rmannibucau
>> >> >>
>> >> >>
>> >> >> 2015-01-20 16:18 GMT+01:00 Werner Keil <we...@gmail.com>:
>> >> >> > How, did it lose the annotation or was the method signature changed
>> >> >> > violating the Functional Interface definition?
>> >> >> >
>> >> >> > Werner
>> >> >> >
>> >> >> > On Tue, Jan 20, 2015 at 4:10 PM, Reinhard Sandtner <
>> >> >> > reinhard.sandtner@gmail.com> wrote:
>> >> >> >
>> >> >> >> Hey guys
>> >> >> >>
>> >> >> >> build is broken since PropertyConverter is no longer a
>> >> >> FunctionalInterface
>> >> >> >> :-(
>> >> >> >>
>> >> >> >> shall i fix it or is someone working on it?
>> >> >> >>
>> >> >> >> lg
>> >> >> >> reini
>> >> >>
>> >> >
>> >> >
>> >> >
>> >> > --
>> >> > *Anatole Tresch*
>> >> > Java Engineer & Architect, JSR Spec Lead
>> >> > Glärnischweg 10
>> >> > CH - 8620 Wetzikon
>> >> >
>> >> > *Switzerland, Europe Zurich, GMT+1*
>> >> > *Twitter: @atsticks*
>> >> > *Blogs: **http://javaremarkables.blogspot.ch/
>> >> > <http://javaremarkables.blogspot.ch/>*
>> >> >
>> >> > *Google: atsticksMobile +41-76 344 62 79*
>> >>
>> >
>> >
>> >
>> > --
>> > *Anatole Tresch*
>> > Java Engineer & Architect, JSR Spec Lead
>> > Glärnischweg 10
>> > CH - 8620 Wetzikon
>> >
>> > *Switzerland, Europe Zurich, GMT+1*
>> > *Twitter: @atsticks*
>> > *Blogs: **http://javaremarkables.blogspot.ch/
>> > <http://javaremarkables.blogspot.ch/>*
>> >
>> > *Google: atsticksMobile +41-76 344 62 79*
>>
>
>
> --
> *Anatole Tresch*
> Java Engineer & Architect, JSR Spec Lead
> Glärnischweg 10
> CH - 8620 Wetzikon
>
> *Switzerland, Europe Zurich, GMT+1*
> *Twitter: @atsticks*
> *Blogs: **http://javaremarkables.blogspot.ch/
> <http://javaremarkables.blogspot.ch/>*
>
> *Google: atsticksMobile +41-76 344 62 79*
Re: build failure
Posted by Anatole Tresch <at...@gmail.com>.
Hi Romain
see inline.
2015-01-20 17:29 GMT+01:00 Romain Manni-Bucau <rm...@gmail.com>:
> answered inline
>
> 2015-01-20 17:19 GMT+01:00 Anatole Tresch <at...@gmail.com>:
> > Hi Romain
> >
> > 2015-01-20 17:02 GMT+01:00 Romain Manni-Bucau <rm...@gmail.com>:
> >>
> >>
> >> performance overhead at runtime = 0...you shouldn't do it at runtime
> >> but at registration time.
> >
> >
> > -> Base on what information?
> >
>
> the fact it is not called? if you use this when you register the
> converter then you dont need it anymore and you build your meta at
> registration and didnt pollute the API with new annotations.
I dont get the point. Again, please answer my questions.
How do you want to evaluate the target type a converter is targeting
during registration?
> >> > Also when we would add a method returning the expected formats (which
> I
> >> > think would be a very useful thing) we would loose the functional
> >> aspects,
> >> > if we add the
> >> This is why making the type the contract makes sense here.
> >>
> >> -> Dont get the point.
> >
>
> if I have MyPropertyConverter<Foo>. The type says me what I need (ie
> Foo) so why doing:
>
> @TamayaMeta(Foo.class)
> MyPropertyConverter<Foo>
>
> ?
>
Simple because you dont have that information at runtime in Java 7.
You'll surely speak about hierarchy etc? It is of course true but
> 1) most of the time you can deduce it counting the distance to the desired
> class
>
Already stated this will not work in all cases. Try thinking doing it
alternately please.
2) if you really want to specify it you can as you mentionned add an
> annotation but not by default to keep it simple and readable
Combined with 1, this makes no sense. When I have the information from a
reliable source (1 is not reliable) and dont need 2, if I cant do it, I can
go home and cry or just look for a soliution, I will not do things more
simpler, just because of simplicitly. Reduce to the max, but not one step
further!
> >> > I see the following options currently:
> >> > 1) Define an annotation, e.g. @ConverterSpec to add to the meta-info
> >> > automatically for the auto-registered PropertyProvider instances.
> >> > 2) Add an additional interface, extending PropertyProvider that adds
> the
> >> > additional methods. This interface then must be used for registration
> and
> >> > adds the missing functionality.
> >> > 3) We could let be PropertyProvider to be non functional, but add in
> >> Java 8
> >> > an additional method to Configuration, which tykes a
> Function<String,T>.
> >> >
> >>
> >> In all cases you break java 8 lambdas, not an issue by itself but we
> >> should maybe think removing this java 8 module which will soon be only
> >> justified by Optional which is highly controversed.
> >>
> >
> > This is simply not true at all:
> > - 1 Will not break it at all and will be Java 7 compatible.
> > - 2 Will also not break it, since the extended interface is only used for
> > regitration not for the Configuration interface, where
> > you can pass a Lambda starting with Java 8.
> > - 3 Would not break Lambdas, because in Java 7 PropertyProvider is not
> > functional because there is no such concept, and in Java 8 you have the
> > additional method, which takes a Lamba.
> >
> >
>
> 2 points here
>
> 1) if you split that much the API then I say (again) what I said in
> j7/j8 thread: tamaya will fork by itself and both will not be
> maintained correctly
>
Not true! 1 and 2 is exactly the same in Java 7 and 8.
> 2) that said this confirms what is said before: you dont need this
> getTargetType()
As already said, useless to comment. It will not work as you suggest.
> >
> >
> >
> >>
> >> > -Anatole
> >> >
> >> >
> >> > 2015-01-20 16:33 GMT+01:00 Romain Manni-Bucau <rmannibucau@gmail.com
> >:
> >> >
> >> >> The annotation by itself doesn't make of the interface a
> >> >> FunctionalInterface or the opposite (ie you can be without it) - so
> >> >> yes this is fully useless from a code/bytecode point of view. That's
> >> >> because getTargetType() was added.
> >> >>
> >> >> I'd just remove it and use reflection to determine it. We would then
> >> >> be able to do a lot more than simple Class which are more and more
> >> >> java 1.4 (it is very funny to see it aside java 8 code ;))
> >> >>
> >> >>
> >> >> Romain Manni-Bucau
> >> >> @rmannibucau
> >> >> http://www.tomitribe.com
> >> >> http://rmannibucau.wordpress.com
> >> >> https://github.com/rmannibucau
> >> >>
> >> >>
> >> >> 2015-01-20 16:18 GMT+01:00 Werner Keil <we...@gmail.com>:
> >> >> > How, did it lose the annotation or was the method signature changed
> >> >> > violating the Functional Interface definition?
> >> >> >
> >> >> > Werner
> >> >> >
> >> >> > On Tue, Jan 20, 2015 at 4:10 PM, Reinhard Sandtner <
> >> >> > reinhard.sandtner@gmail.com> wrote:
> >> >> >
> >> >> >> Hey guys
> >> >> >>
> >> >> >> build is broken since PropertyConverter is no longer a
> >> >> FunctionalInterface
> >> >> >> :-(
> >> >> >>
> >> >> >> shall i fix it or is someone working on it?
> >> >> >>
> >> >> >> lg
> >> >> >> reini
> >> >>
> >> >
> >> >
> >> >
> >> > --
> >> > *Anatole Tresch*
> >> > Java Engineer & Architect, JSR Spec Lead
> >> > Glärnischweg 10
> >> > CH - 8620 Wetzikon
> >> >
> >> > *Switzerland, Europe Zurich, GMT+1*
> >> > *Twitter: @atsticks*
> >> > *Blogs: **http://javaremarkables.blogspot.ch/
> >> > <http://javaremarkables.blogspot.ch/>*
> >> >
> >> > *Google: atsticksMobile +41-76 344 62 79*
> >>
> >
> >
> >
> > --
> > *Anatole Tresch*
> > Java Engineer & Architect, JSR Spec Lead
> > Glärnischweg 10
> > CH - 8620 Wetzikon
> >
> > *Switzerland, Europe Zurich, GMT+1*
> > *Twitter: @atsticks*
> > *Blogs: **http://javaremarkables.blogspot.ch/
> > <http://javaremarkables.blogspot.ch/>*
> >
> > *Google: atsticksMobile +41-76 344 62 79*
>
--
*Anatole Tresch*
Java Engineer & Architect, JSR Spec Lead
Glärnischweg 10
CH - 8620 Wetzikon
*Switzerland, Europe Zurich, GMT+1*
*Twitter: @atsticks*
*Blogs: **http://javaremarkables.blogspot.ch/
<http://javaremarkables.blogspot.ch/>*
*Google: atsticksMobile +41-76 344 62 79*
Re: build failure
Posted by Romain Manni-Bucau <rm...@gmail.com>.
answered inline
2015-01-20 17:19 GMT+01:00 Anatole Tresch <at...@gmail.com>:
> Hi Romain
>
> 2015-01-20 17:02 GMT+01:00 Romain Manni-Bucau <rm...@gmail.com>:
>>
>>
>> performance overhead at runtime = 0...you shouldn't do it at runtime
>> but at registration time.
>
>
> -> Base on what information?
>
the fact it is not called? if you use this when you register the
converter then you dont need it anymore and you build your meta at
registration and didnt pollute the API with new annotations.
>
>
>> > Also when we would add a method returning the expected formats (which I
>> > think would be a very useful thing) we would loose the functional
>> aspects,
>> > if we add the
>> This is why making the type the contract makes sense here.
>>
>> -> Dont get the point.
>
if I have MyPropertyConverter<Foo>. The type says me what I need (ie
Foo) so why doing:
@TamayaMeta(Foo.class)
MyPropertyConverter<Foo>
?
You'll surely speak about hierarchy etc? It is of course true but
1) most of the time you can deduce it counting the distance to the desired class
2) if you really want to specify it you can as you mentionned add an
annotation but not by default to keep it simple and readable
>
>>
>> > I see the following options currently:
>> > 1) Define an annotation, e.g. @ConverterSpec to add to the meta-info
>> > automatically for the auto-registered PropertyProvider instances.
>> > 2) Add an additional interface, extending PropertyProvider that adds the
>> > additional methods. This interface then must be used for registration and
>> > adds the missing functionality.
>> > 3) We could let be PropertyProvider to be non functional, but add in
>> Java 8
>> > an additional method to Configuration, which tykes a Function<String,T>.
>> >
>>
>> In all cases you break java 8 lambdas, not an issue by itself but we
>> should maybe think removing this java 8 module which will soon be only
>> justified by Optional which is highly controversed.
>>
>
> This is simply not true at all:
> - 1 Will not break it at all and will be Java 7 compatible.
> - 2 Will also not break it, since the extended interface is only used for
> regitration not for the Configuration interface, where
> you can pass a Lambda starting with Java 8.
> - 3 Would not break Lambdas, because in Java 7 PropertyProvider is not
> functional because there is no such concept, and in Java 8 you have the
> additional method, which takes a Lamba.
>
>
2 points here
1) if you split that much the API then I say (again) what I said in
j7/j8 thread: tamaya will fork by itself and both will not be
maintained correctly
2) that said this confirms what is said before: you dont need this
getTargetType()
>
>
>
>>
>> > -Anatole
>> >
>> >
>> > 2015-01-20 16:33 GMT+01:00 Romain Manni-Bucau <rm...@gmail.com>:
>> >
>> >> The annotation by itself doesn't make of the interface a
>> >> FunctionalInterface or the opposite (ie you can be without it) - so
>> >> yes this is fully useless from a code/bytecode point of view. That's
>> >> because getTargetType() was added.
>> >>
>> >> I'd just remove it and use reflection to determine it. We would then
>> >> be able to do a lot more than simple Class which are more and more
>> >> java 1.4 (it is very funny to see it aside java 8 code ;))
>> >>
>> >>
>> >> Romain Manni-Bucau
>> >> @rmannibucau
>> >> http://www.tomitribe.com
>> >> http://rmannibucau.wordpress.com
>> >> https://github.com/rmannibucau
>> >>
>> >>
>> >> 2015-01-20 16:18 GMT+01:00 Werner Keil <we...@gmail.com>:
>> >> > How, did it lose the annotation or was the method signature changed
>> >> > violating the Functional Interface definition?
>> >> >
>> >> > Werner
>> >> >
>> >> > On Tue, Jan 20, 2015 at 4:10 PM, Reinhard Sandtner <
>> >> > reinhard.sandtner@gmail.com> wrote:
>> >> >
>> >> >> Hey guys
>> >> >>
>> >> >> build is broken since PropertyConverter is no longer a
>> >> FunctionalInterface
>> >> >> :-(
>> >> >>
>> >> >> shall i fix it or is someone working on it?
>> >> >>
>> >> >> lg
>> >> >> reini
>> >>
>> >
>> >
>> >
>> > --
>> > *Anatole Tresch*
>> > Java Engineer & Architect, JSR Spec Lead
>> > Glärnischweg 10
>> > CH - 8620 Wetzikon
>> >
>> > *Switzerland, Europe Zurich, GMT+1*
>> > *Twitter: @atsticks*
>> > *Blogs: **http://javaremarkables.blogspot.ch/
>> > <http://javaremarkables.blogspot.ch/>*
>> >
>> > *Google: atsticksMobile +41-76 344 62 79*
>>
>
>
>
> --
> *Anatole Tresch*
> Java Engineer & Architect, JSR Spec Lead
> Glärnischweg 10
> CH - 8620 Wetzikon
>
> *Switzerland, Europe Zurich, GMT+1*
> *Twitter: @atsticks*
> *Blogs: **http://javaremarkables.blogspot.ch/
> <http://javaremarkables.blogspot.ch/>*
>
> *Google: atsticksMobile +41-76 344 62 79*
Re: build failure
Posted by Anatole Tresch <at...@gmail.com>.
Hi Romain
2015-01-20 17:02 GMT+01:00 Romain Manni-Bucau <rm...@gmail.com>:
>
>
> performance overhead at runtime = 0...you shouldn't do it at runtime
> but at registration time.
-> Base on what information?
> > Also when we would add a method returning the expected formats (which I
> > think would be a very useful thing) we would loose the functional
> aspects,
> > if we add the
> This is why making the type the contract makes sense here.
>
> -> Dont get the point.
>
> > I see the following options currently:
> > 1) Define an annotation, e.g. @ConverterSpec to add to the meta-info
> > automatically for the auto-registered PropertyProvider instances.
> > 2) Add an additional interface, extending PropertyProvider that adds the
> > additional methods. This interface then must be used for registration and
> > adds the missing functionality.
> > 3) We could let be PropertyProvider to be non functional, but add in
> Java 8
> > an additional method to Configuration, which tykes a Function<String,T>.
> >
>
> In all cases you break java 8 lambdas, not an issue by itself but we
> should maybe think removing this java 8 module which will soon be only
> justified by Optional which is highly controversed.
>
This is simply not true at all:
- 1 Will not break it at all and will be Java 7 compatible.
- 2 Will also not break it, since the extended interface is only used for
regitration not for the Configuration interface, where
you can pass a Lambda starting with Java 8.
- 3 Would not break Lambdas, because in Java 7 PropertyProvider is not
functional because there is no such concept, and in Java 8 you have the
additional method, which takes a Lamba.
>
> > -Anatole
> >
> >
> > 2015-01-20 16:33 GMT+01:00 Romain Manni-Bucau <rm...@gmail.com>:
> >
> >> The annotation by itself doesn't make of the interface a
> >> FunctionalInterface or the opposite (ie you can be without it) - so
> >> yes this is fully useless from a code/bytecode point of view. That's
> >> because getTargetType() was added.
> >>
> >> I'd just remove it and use reflection to determine it. We would then
> >> be able to do a lot more than simple Class which are more and more
> >> java 1.4 (it is very funny to see it aside java 8 code ;))
> >>
> >>
> >> Romain Manni-Bucau
> >> @rmannibucau
> >> http://www.tomitribe.com
> >> http://rmannibucau.wordpress.com
> >> https://github.com/rmannibucau
> >>
> >>
> >> 2015-01-20 16:18 GMT+01:00 Werner Keil <we...@gmail.com>:
> >> > How, did it lose the annotation or was the method signature changed
> >> > violating the Functional Interface definition?
> >> >
> >> > Werner
> >> >
> >> > On Tue, Jan 20, 2015 at 4:10 PM, Reinhard Sandtner <
> >> > reinhard.sandtner@gmail.com> wrote:
> >> >
> >> >> Hey guys
> >> >>
> >> >> build is broken since PropertyConverter is no longer a
> >> FunctionalInterface
> >> >> :-(
> >> >>
> >> >> shall i fix it or is someone working on it?
> >> >>
> >> >> lg
> >> >> reini
> >>
> >
> >
> >
> > --
> > *Anatole Tresch*
> > Java Engineer & Architect, JSR Spec Lead
> > Glärnischweg 10
> > CH - 8620 Wetzikon
> >
> > *Switzerland, Europe Zurich, GMT+1*
> > *Twitter: @atsticks*
> > *Blogs: **http://javaremarkables.blogspot.ch/
> > <http://javaremarkables.blogspot.ch/>*
> >
> > *Google: atsticksMobile +41-76 344 62 79*
>
--
*Anatole Tresch*
Java Engineer & Architect, JSR Spec Lead
Glärnischweg 10
CH - 8620 Wetzikon
*Switzerland, Europe Zurich, GMT+1*
*Twitter: @atsticks*
*Blogs: **http://javaremarkables.blogspot.ch/
<http://javaremarkables.blogspot.ch/>*
*Google: atsticksMobile +41-76 344 62 79*
Re: build failure
Posted by Romain Manni-Bucau <rm...@gmail.com>.
Not fully agree
2015-01-20 16:58 GMT+01:00 Anatole Tresch <at...@gmail.com>:
> Romain, I think that reflection was already clearly stated to not be the
> way to go (see Marks mail some days ago). I follow Mark hereby completely,
> also due to performance reasons.
>
performance overhead at runtime = 0...you shouldn't do it at runtime
but at registration time.
> Also when we would add a method returning the expected formats (which I
> think would be a very useful thing) we would loose the functional aspects,
> if we add the
>
This is why making the type the contract makes sense here.
> I see the following options currently:
> 1) Define an annotation, e.g. @ConverterSpec to add to the meta-info
> automatically for the auto-registered PropertyProvider instances.
> 2) Add an additional interface, extending PropertyProvider that adds the
> additional methods. This interface then must be used for registration and
> adds the missing functionality.
> 3) We could let be PropertyProvider to be non functional, but add in Java 8
> an additional method to Configuration, which tykes a Function<String,T>.
>
In all cases you break java 8 lambdas, not an issue by itself but we
should maybe think removing this java 8 module which will soon be only
justified by Optional which is highly controversed.
> -Anatole
>
>
> 2015-01-20 16:33 GMT+01:00 Romain Manni-Bucau <rm...@gmail.com>:
>
>> The annotation by itself doesn't make of the interface a
>> FunctionalInterface or the opposite (ie you can be without it) - so
>> yes this is fully useless from a code/bytecode point of view. That's
>> because getTargetType() was added.
>>
>> I'd just remove it and use reflection to determine it. We would then
>> be able to do a lot more than simple Class which are more and more
>> java 1.4 (it is very funny to see it aside java 8 code ;))
>>
>>
>> Romain Manni-Bucau
>> @rmannibucau
>> http://www.tomitribe.com
>> http://rmannibucau.wordpress.com
>> https://github.com/rmannibucau
>>
>>
>> 2015-01-20 16:18 GMT+01:00 Werner Keil <we...@gmail.com>:
>> > How, did it lose the annotation or was the method signature changed
>> > violating the Functional Interface definition?
>> >
>> > Werner
>> >
>> > On Tue, Jan 20, 2015 at 4:10 PM, Reinhard Sandtner <
>> > reinhard.sandtner@gmail.com> wrote:
>> >
>> >> Hey guys
>> >>
>> >> build is broken since PropertyConverter is no longer a
>> FunctionalInterface
>> >> :-(
>> >>
>> >> shall i fix it or is someone working on it?
>> >>
>> >> lg
>> >> reini
>>
>
>
>
> --
> *Anatole Tresch*
> Java Engineer & Architect, JSR Spec Lead
> Glärnischweg 10
> CH - 8620 Wetzikon
>
> *Switzerland, Europe Zurich, GMT+1*
> *Twitter: @atsticks*
> *Blogs: **http://javaremarkables.blogspot.ch/
> <http://javaremarkables.blogspot.ch/>*
>
> *Google: atsticksMobile +41-76 344 62 79*
Re: build failure
Posted by Anatole Tresch <at...@gmail.com>.
Romain, I think that reflection was already clearly stated to not be the
way to go (see Marks mail some days ago). I follow Mark hereby completely,
also due to performance reasons.
Also when we would add a method returning the expected formats (which I
think would be a very useful thing) we would loose the functional aspects,
if we add the
I see the following options currently:
1) Define an annotation, e.g. @ConverterSpec to add to the meta-info
automatically for the auto-registered PropertyProvider instances.
2) Add an additional interface, extending PropertyProvider that adds the
additional methods. This interface then must be used for registration and
adds the missing functionality.
3) We could let be PropertyProvider to be non functional, but add in Java 8
an additional method to Configuration, which tykes a Function<String,T>.
-Anatole
2015-01-20 16:33 GMT+01:00 Romain Manni-Bucau <rm...@gmail.com>:
> The annotation by itself doesn't make of the interface a
> FunctionalInterface or the opposite (ie you can be without it) - so
> yes this is fully useless from a code/bytecode point of view. That's
> because getTargetType() was added.
>
> I'd just remove it and use reflection to determine it. We would then
> be able to do a lot more than simple Class which are more and more
> java 1.4 (it is very funny to see it aside java 8 code ;))
>
>
> Romain Manni-Bucau
> @rmannibucau
> http://www.tomitribe.com
> http://rmannibucau.wordpress.com
> https://github.com/rmannibucau
>
>
> 2015-01-20 16:18 GMT+01:00 Werner Keil <we...@gmail.com>:
> > How, did it lose the annotation or was the method signature changed
> > violating the Functional Interface definition?
> >
> > Werner
> >
> > On Tue, Jan 20, 2015 at 4:10 PM, Reinhard Sandtner <
> > reinhard.sandtner@gmail.com> wrote:
> >
> >> Hey guys
> >>
> >> build is broken since PropertyConverter is no longer a
> FunctionalInterface
> >> :-(
> >>
> >> shall i fix it or is someone working on it?
> >>
> >> lg
> >> reini
>
--
*Anatole Tresch*
Java Engineer & Architect, JSR Spec Lead
Glärnischweg 10
CH - 8620 Wetzikon
*Switzerland, Europe Zurich, GMT+1*
*Twitter: @atsticks*
*Blogs: **http://javaremarkables.blogspot.ch/
<http://javaremarkables.blogspot.ch/>*
*Google: atsticksMobile +41-76 344 62 79*
Re: build failure
Posted by Werner Keil <we...@gmail.com>.
I know, just curious.
Although using e.g. Optional could seem tempting to some, the annotations
alone would not force us to a complete dual codebase even in the API Nor
doing java 1.4 style things;-)
On Tue, Jan 20, 2015 at 4:33 PM, Romain Manni-Bucau <rm...@gmail.com>
wrote:
> The annotation by itself doesn't make of the interface a
> FunctionalInterface or the opposite (ie you can be without it) - so
> yes this is fully useless from a code/bytecode point of view. That's
> because getTargetType() was added.
>
> I'd just remove it and use reflection to determine it. We would then
> be able to do a lot more than simple Class which are more and more
> java 1.4 (it is very funny to see it aside java 8 code ;))
>
>
> Romain Manni-Bucau
> @rmannibucau
> http://www.tomitribe.com
> http://rmannibucau.wordpress.com
> https://github.com/rmannibucau
>
>
> 2015-01-20 16:18 GMT+01:00 Werner Keil <we...@gmail.com>:
> > How, did it lose the annotation or was the method signature changed
> > violating the Functional Interface definition?
> >
> > Werner
> >
> > On Tue, Jan 20, 2015 at 4:10 PM, Reinhard Sandtner <
> > reinhard.sandtner@gmail.com> wrote:
> >
> >> Hey guys
> >>
> >> build is broken since PropertyConverter is no longer a
> FunctionalInterface
> >> :-(
> >>
> >> shall i fix it or is someone working on it?
> >>
> >> lg
> >> reini
>
Re: build failure
Posted by Romain Manni-Bucau <rm...@gmail.com>.
The annotation by itself doesn't make of the interface a
FunctionalInterface or the opposite (ie you can be without it) - so
yes this is fully useless from a code/bytecode point of view. That's
because getTargetType() was added.
I'd just remove it and use reflection to determine it. We would then
be able to do a lot more than simple Class which are more and more
java 1.4 (it is very funny to see it aside java 8 code ;))
Romain Manni-Bucau
@rmannibucau
http://www.tomitribe.com
http://rmannibucau.wordpress.com
https://github.com/rmannibucau
2015-01-20 16:18 GMT+01:00 Werner Keil <we...@gmail.com>:
> How, did it lose the annotation or was the method signature changed
> violating the Functional Interface definition?
>
> Werner
>
> On Tue, Jan 20, 2015 at 4:10 PM, Reinhard Sandtner <
> reinhard.sandtner@gmail.com> wrote:
>
>> Hey guys
>>
>> build is broken since PropertyConverter is no longer a FunctionalInterface
>> :-(
>>
>> shall i fix it or is someone working on it?
>>
>> lg
>> reini
Re: build failure
Posted by Anatole Tresch <at...@gmail.com>.
I added getTargetType, so currently its not a functional
IF
anymore. Basical
l
y
we can make it a functional IF by
- adding a ConverterSpec annotation to the converters registered,
- adding an additinal ConverterProvider IF that is used for registration
using the ServiceLoader
I adapted all code AFAIK, so it should work. I will have a look what is
wrong...
Best,
Anatole
Werner Keil <we...@gmail.com> schrieb am Di., 20. Jan. 2015 um 16:19:
> How, did it lose the annotation or was the method signature changed
> violating the Functional Interface definition?
>
> Werner
>
> On Tue, Jan 20, 2015 at 4:10 PM, Reinhard Sandtner <
> reinhard.sandtner@gmail.com> wrote:
>
> > Hey guys
> >
> > build is broken since PropertyConverter is no longer a
> FunctionalInterface
> > :-(
> >
> > shall i fix it or is someone working on it?
> >
> > lg
> > reini
>
Re: build failure
Posted by Werner Keil <we...@gmail.com>.
How, did it lose the annotation or was the method signature changed
violating the Functional Interface definition?
Werner
On Tue, Jan 20, 2015 at 4:10 PM, Reinhard Sandtner <
reinhard.sandtner@gmail.com> wrote:
> Hey guys
>
> build is broken since PropertyConverter is no longer a FunctionalInterface
> :-(
>
> shall i fix it or is someone working on it?
>
> lg
> reini