Re: Moving to Java 7 ( was: Make ResourceResolver implement Closeable)

2015-06-03 Thread Robert Munteanu
On Fri, 2015-05-29 at 18:08 +0300, Robert Munteanu wrote:
 
 On May 29, 2015 5:55 PM, Daniel Klco daniel.k...@gmail.com wrote:
 
  Considering that Oracle is already stopped public updates for both 
 Java 6
  and that the Premium Support ends December 2015, it would seem to 
 make
  sense to standardize on Java 7 for new development and change 
 everything
  over at the end of the year.
 That would be nice. However, there's also IBM and HP and they don't 
 follow the same support policies as Oracle.
 Robert

I removed support for sling.java.version = 5 and made 6 the default.

https://issues.apache.org/jira/browse/SLING-4772

Robert

 
  Either way this shakes out, we should create a Java support 
 schedule to
  make sure it's clear to users and contributors what versions are 
 supported,
  default and end of life across the Sling Launchpad versions.
 
  -Dan
 
  On Fri, May 29, 2015 at 5:31 AM, Carsten Ziegeler 
 cziege...@apache.org
  wrote:
 
   Am 29.05.15 um 11:23 schrieb Stefan Seifert:
it's just that we cannot use features like Closeable when we 
 still
   support JDK 1.6.
  
   Yepp, that's why I said, if it makes sense for a bundle to be 
 based on
   1.7 then we're free to do it.
  
   
if we do not want switch to JDK 1.7 now perhaps we should come 
 up with a
   plan/roadmap when
to do the switch and document it on the website, then it is 
 possible
   for upstream projects to take this into account.
  
   The launchpad already requires Java 7, and everything runs on 
 Java 7.
   It's just that we should not blindly update everything to depend 
 on 7
  
   Regards
   Carsten
   --
   Carsten Ziegeler
   Adobe Research Switzerland
   cziege...@apache.org
  



Re: Moving to Java 7 ( was: Make ResourceResolver implement Closeable)

2015-05-29 Thread Stefan Egli
Assuming we switch, what should be the best practice to support upstream
dependencies on Java 6 (like AEM 6.1) when doing eg hotfix releases?
Afaics so far Sling did not adopt making branches for these cases.

Cheers,
Stefan

On 5/28/15 6:12 PM, Stefan Seifert sseif...@pro-vision.de wrote:

why not drop Java 6 support for new released bundles at all?

+1 for using Java 7 as default and minimum Java version.

stefan

-Original Message-
From: Robert Munteanu [mailto:romb...@apache.org]
Sent: Thursday, May 28, 2015 11:58 AM
To: dev@sling.apache.org
Subject: Moving to Java 7 ( was: Make ResourceResolver implement
Closeable)

This might've been buried under the 'Closeable' thread so resending so
that it does not suprise anyone.

Currently our projects can use either Java 5 or 6, with 5 being the
default. This is very much out of date and we're missing out on
language improvements. I would suggest changing the supported Java
versions from

- 5 (default), 6
- 6, 7 (default)

I would have preferred

- 6, 7 (default), 8

But Java 8 support is blocked due to SLING-4702 [1].

Thoughts on the proposed change for the supported Java versions?

Cheers,

Robert

[1]: https://issues.apache.org/jira/browse/SLING-4702

On Tue, 2015-05-26 at 16:38 +0200, Carsten Ziegeler wrote:
 Am 26.05.15 um 16:14 schrieb Robert Munteanu:
  Hi Roy,
 
  On Tue, 2015-05-26 at 15:51 +0200, Roy Teeuwen wrote:
   Hello,
  
   As of Java 7, it is possible by implementing the Closeable or
   AutoCloseable to use the try-with-resources statement. This makes
   the
   notation a lot shorter than the try-finally block. Is there a
   reason
   that the ResourceResolver does not implement the Closeable
   interface,
   and would it be possible to let it implement it?
 
  We should just move to Java 7 by default.
 
 +1

 Carsten







Re: Moving to Java 7 ( was: Make ResourceResolver implement Closeable)

2015-05-29 Thread Carsten Ziegeler
I think we should allow Java 7 but not make it the default. 6 seems more
reasonable. It's like with dependencies to other bundles, we should use
the lowest version that makes sense :) So if there is no reason for
requiring 7 in a module, why should we?
Java 5 is way too old, so I think it doesn't make sense to support that.

I think we should also start supporting java 8 and update the parent pom
to allow this, even if that means that we disable the signature check
for java 8 for now.

Regards
Carsten
-- 
Carsten Ziegeler
Adobe Research Switzerland
cziege...@apache.org


Re: Moving to Java 7 ( was: Make ResourceResolver implement Closeable)

2015-05-29 Thread Roy Teeuwen
That would be a good idea. When looking at the AEM 6.1 technical requirements 
you can already see there is no more support for Oracle JDK 1.6, minimum Oracle 
JDK 1.7

Roy

 On 29 May 2015, at 11:23, Stefan Seifert sseif...@pro-vision.de wrote:
 
 it's just that we cannot use features like Closeable when we still support 
 JDK 1.6.
 
 if we do not want switch to JDK 1.7 now perhaps we should come up with a 
 plan/roadmap when to do the switch and document it on the website, then it is 
 possible for upstream projects to take this into account.
 
 stefan 



Re: Moving to Java 7 ( was: Make ResourceResolver implement Closeable)

2015-05-29 Thread Carsten Ziegeler
Am 29.05.15 um 11:23 schrieb Stefan Seifert:
 it's just that we cannot use features like Closeable when we still support 
 JDK 1.6.

Yepp, that's why I said, if it makes sense for a bundle to be based on
1.7 then we're free to do it.

 
 if we do not want switch to JDK 1.7 now perhaps we should come up with a 
 plan/roadmap when 
 to do the switch and document it on the website, then it is possible
for upstream projects to take this into account.

The launchpad already requires Java 7, and everything runs on Java 7.
It's just that we should not blindly update everything to depend on 7

Regards
Carsten
-- 
Carsten Ziegeler
Adobe Research Switzerland
cziege...@apache.org


RE: Moving to Java 7 ( was: Make ResourceResolver implement Closeable)

2015-05-29 Thread Stefan Seifert
it's just that we cannot use features like Closeable when we still support JDK 
1.6.

if we do not want switch to JDK 1.7 now perhaps we should come up with a 
plan/roadmap when to do the switch and document it on the website, then it is 
possible for upstream projects to take this into account.

stefan 


Re: Moving to Java 7 ( was: Make ResourceResolver implement Closeable)

2015-05-29 Thread Robert Munteanu
On May 29, 2015 5:55 PM, Daniel Klco daniel.k...@gmail.com wrote:

 Considering that Oracle is already stopped public updates for both Java 6
 and that the Premium Support ends December 2015, it would seem to make
 sense to standardize on Java 7 for new development and change everything
 over at the end of the year.

That would be nice. However, there's also IBM and HP and they don't follow
the same support policies as Oracle.

Robert


 Either way this shakes out, we should create a Java support schedule to
 make sure it's clear to users and contributors what versions are
supported,
 default and end of life across the Sling Launchpad versions.

 -Dan

 On Fri, May 29, 2015 at 5:31 AM, Carsten Ziegeler cziege...@apache.org
 wrote:

  Am 29.05.15 um 11:23 schrieb Stefan Seifert:
   it's just that we cannot use features like Closeable when we still
  support JDK 1.6.
 
  Yepp, that's why I said, if it makes sense for a bundle to be based on
  1.7 then we're free to do it.
 
  
   if we do not want switch to JDK 1.7 now perhaps we should come up
with a
  plan/roadmap when
   to do the switch and document it on the website, then it is possible
  for upstream projects to take this into account.
 
  The launchpad already requires Java 7, and everything runs on Java 7.
  It's just that we should not blindly update everything to depend on 7
 
  Regards
  Carsten
  --
  Carsten Ziegeler
  Adobe Research Switzerland
  cziege...@apache.org
 


Re: Moving to Java 7 ( was: Make ResourceResolver implement Closeable)

2015-05-29 Thread Daniel Klco
Considering that Oracle is already stopped public updates for both Java 6
and that the Premium Support ends December 2015, it would seem to make
sense to standardize on Java 7 for new development and change everything
over at the end of the year.

Either way this shakes out, we should create a Java support schedule to
make sure it's clear to users and contributors what versions are supported,
default and end of life across the Sling Launchpad versions.

-Dan

On Fri, May 29, 2015 at 5:31 AM, Carsten Ziegeler cziege...@apache.org
wrote:

 Am 29.05.15 um 11:23 schrieb Stefan Seifert:
  it's just that we cannot use features like Closeable when we still
 support JDK 1.6.

 Yepp, that's why I said, if it makes sense for a bundle to be based on
 1.7 then we're free to do it.

 
  if we do not want switch to JDK 1.7 now perhaps we should come up with a
 plan/roadmap when
  to do the switch and document it on the website, then it is possible
 for upstream projects to take this into account.

 The launchpad already requires Java 7, and everything runs on Java 7.
 It's just that we should not blindly update everything to depend on 7

 Regards
 Carsten
 --
 Carsten Ziegeler
 Adobe Research Switzerland
 cziege...@apache.org



RE: Moving to Java 7 ( was: Make ResourceResolver implement Closeable)

2015-05-28 Thread Stefan Seifert
why not drop Java 6 support for new released bundles at all?

+1 for using Java 7 as default and minimum Java version.

stefan

-Original Message-
From: Robert Munteanu [mailto:romb...@apache.org]
Sent: Thursday, May 28, 2015 11:58 AM
To: dev@sling.apache.org
Subject: Moving to Java 7 ( was: Make ResourceResolver implement Closeable)

This might've been buried under the 'Closeable' thread so resending so
that it does not suprise anyone.

Currently our projects can use either Java 5 or 6, with 5 being the
default. This is very much out of date and we're missing out on
language improvements. I would suggest changing the supported Java
versions from

- 5 (default), 6
- 6, 7 (default)

I would have preferred

- 6, 7 (default), 8

But Java 8 support is blocked due to SLING-4702 [1].

Thoughts on the proposed change for the supported Java versions?

Cheers,

Robert

[1]: https://issues.apache.org/jira/browse/SLING-4702

On Tue, 2015-05-26 at 16:38 +0200, Carsten Ziegeler wrote:
 Am 26.05.15 um 16:14 schrieb Robert Munteanu:
  Hi Roy,
 
  On Tue, 2015-05-26 at 15:51 +0200, Roy Teeuwen wrote:
   Hello,
  
   As of Java 7, it is possible by implementing the Closeable or
   AutoCloseable to use the try-with-resources statement. This makes
   the
   notation a lot shorter than the try-finally block. Is there a
   reason
   that the ResourceResolver does not implement the Closeable
   interface,
   and would it be possible to let it implement it?
 
  We should just move to Java 7 by default.
 
 +1

 Carsten