What the user said is interesting. AFAIK Jersey 1.x depends on Java 6 features for quite some time already. Maybe we still compile with target flag set to 1.5, but that would be wrong. Will need to investigate. Thanks for the info.
Retrofitting AutoCloseable should be possible at any time if we make sure that our close methods have the proper signature.
Marek
On 5. 7. 2012, at 4:34, Bill Burke <bburke_at_redhat.com> wrote:
> Was at InfoQ giving a JAX-RS 2.0 talk 2 weeks ago...Met a user that said he had to drop resteasy (and I think) move to Jersey because we started only shipping Java 6 compiled code. he said Java 5 was still the standard at his company...Just something to think about.
>
> The AutoCloseable stuff is very cool though. Could these types of things be retrofitted after?
>
> On 7/4/12 4:07 PM, Marek Potociar wrote:
>> Hello experts,
>>
>> Just to start a discussion:
>> The comments around issue
>> http://java.net/jira/browse/JAX_RS_SPEC-165 brought up an interesting
>> topic of whether or not should we consider adopting Java SE 7 APIs in
>> the JAX-RS 2.0.
>>
>> As indicated in the issue, we could base our Locale - String conversion
>> support on a standard JDK API methods. Also there are other places where
>> the Java SE 7 features and API could be used to the benefit of our users
>> - e.g. we could change some of our classes and interfaces to implement
>> AutoCloseable so that the components can be used in a "try with
>> resources" code blocks. There may be also other places where Java SE 7
>> constructs could be adopted.
>>
>> For those of you who are more conservative, before you completely
>> dismiss the idea, let me remind you that by the time we release JAX-RS
>> 2.0, the Java SE 8 will be most likely out and as such Java SE 6 will
>> become EOLed (which means no further public SE 6 update releases anymore).
>>
>> In any case, just a thought... please share yours.
>>
>> Marek
>
> --
> Bill Burke
> JBoss, a division of Red Hat
> http://bill.burkecentral.com
>
>