You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Gary Gregory <ga...@gmail.com> on 2012/03/29 23:55:55 UTC

[io] Moving to Java 6 for version 2.3

Hi All:

In order to add and use Charset APIs for encodings instead of encoding name
Strings with various APIs like String(byte[], Charset) and so on, I plan on
moving [io] to Java 6.

I have (not committed) changes to the IOUtils class as a start: all APIs
that can take a String encoding name (old school) have a sister API that
takes a Charset object (new school).

The refactoring I have is actually quite nice and gets rid of the odd noise
in the implementation "if encoding is null then call API1 else call API2."
Instead I convert the null to Charset.defaultCharset() in a new API (again,
not committed yet until I set the POM to Java 6).

Thank you,
Gary

-- 
E-Mail: garydgregory@gmail.com | ggregory@apache.org
JUnit in Action, 2nd Ed: <http://goog_1249600977>http://bit.ly/ECvg0
Spring Batch in Action: <http://s.apache.org/HOq>http://bit.ly/bqpbCK
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory

Re: [io] Moving to Java 6 for version 2.3

Posted by Jochen Wiedmann <jo...@gmail.com>.
On Fri, Mar 30, 2012 at 2:00 AM, Christian Grobmeier
<gr...@gmail.com> wrote:
> Hi,
>
> On Fri, Mar 30, 2012 at 1:53 AM, sebb <se...@gmail.com> wrot
>> However, a compatibility break would require a major version bump.
>
> if my lib does drop support for a specific jdk, isn't that a
> compatibility break? My argument is it is no longer compatible with
> jdk5.

Agreed. However, I think we can leave this discussion until the point
before the actual release when we have a better overview of what has
actually changed.

As I see it, this is a chance where we *can* do incompatible changes.
(That can be valuable, ever so often.)

Jochen


-- 
"Bildung kommt von Bildschirm und nicht von Buch, sonst hieße es ja Buchung."
Dieter Hildebrandt

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: [io] Moving to Java 6 for version 2.3

Posted by Jörg Schaible <jo...@gmx.de>.
Hi Christian,

Christian Grobmeier wrote:

> Hi,
> 
> On Fri, Mar 30, 2012 at 1:53 AM, sebb <se...@gmail.com> wrot
>> However, a compatibility break would require a major version bump.
> 
> if my lib does drop support for a specific jdk, isn't that a
> compatibility break? My argument is it is no longer compatible with
> jdk5.

The common rule has always been, that we're backward compatible, if you can 
replace the old jar with the new version. If this switch requires an upgrade 
of the environment, it's fine. The old version will (normally) run as well 
on the on the updated environment as the new one will. But the application 
itself has not to be modified or compiled.

> However, please do not consider my concerns a -1 on the version name,
> I am fine with 2.3 too.

Updating the major version is also always a signal to users for a migration 
effort. Chances are nowadays high, that we use a new package name ;-)

- Jörg


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: [io] Moving to Java 6 for version 2.3

Posted by Luc Maisonobe <Lu...@free.fr>.
Hello,

Le 30/03/2012 02:21, sebb a écrit :
> On 30 March 2012 01:00, Christian Grobmeier <gr...@gmail.com> wrote:
>> Hi,
>>
>> On Fri, Mar 30, 2012 at 1:53 AM, sebb <se...@gmail.com> wrot
>>> However, a compatibility break would require a major version bump.
>>
>> if my lib does drop support for a specific jdk, isn't that a
>> compatibility break? My argument is it is no longer compatible with
>> jdk5.
> 
> True, but that is not how the Commons versioning scheme currently works.
> 
> http://commons.apache.org/releases/versioning.html

According to this page, JRE changes are not in the fully-compatible
category, but it is not explained if they are in the
interface-compatible or external-interface-compatible category or even
if it is not compatible with anything (an unnamed fourth category ?).

I would say that in this case, it changes a signature in a public method
and hence is not in the interface-compatible. So it would imply a major
change.

Luc

> 
>> However, please do not consider my concerns a -1 on the version name,
>> I am fine with 2.3 too.
>>
>> Cheers
>> Christian
>>
>>
>>>
>>>> - Jörg
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>>>> For additional commands, e-mail: dev-help@commons.apache.org
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>>> For additional commands, e-mail: dev-help@commons.apache.org
>>>
>>
>>
>>
>> --
>> http://www.grobmeier.de
>> https://www.timeandbill.de
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>> For additional commands, e-mail: dev-help@commons.apache.org
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: [io] Moving to Java 6 for version 2.3

Posted by sebb <se...@gmail.com>.
On 30 March 2012 01:00, Christian Grobmeier <gr...@gmail.com> wrote:
> Hi,
>
> On Fri, Mar 30, 2012 at 1:53 AM, sebb <se...@gmail.com> wrot
>> However, a compatibility break would require a major version bump.
>
> if my lib does drop support for a specific jdk, isn't that a
> compatibility break? My argument is it is no longer compatible with
> jdk5.

True, but that is not how the Commons versioning scheme currently works.

http://commons.apache.org/releases/versioning.html

> However, please do not consider my concerns a -1 on the version name,
> I am fine with 2.3 too.
>
> Cheers
> Christian
>
>
>>
>>> - Jörg
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>>> For additional commands, e-mail: dev-help@commons.apache.org
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>> For additional commands, e-mail: dev-help@commons.apache.org
>>
>
>
>
> --
> http://www.grobmeier.de
> https://www.timeandbill.de
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: [io] Moving to Java 6 for version 2.3

Posted by Christian Grobmeier <gr...@gmail.com>.
Hi,

On Fri, Mar 30, 2012 at 1:53 AM, sebb <se...@gmail.com> wrot
> However, a compatibility break would require a major version bump.

if my lib does drop support for a specific jdk, isn't that a
compatibility break? My argument is it is no longer compatible with
jdk5.
However, please do not consider my concerns a -1 on the version name,
I am fine with 2.3 too.

Cheers
Christian


>
>> - Jörg
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>> For additional commands, e-mail: dev-help@commons.apache.org
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>



-- 
http://www.grobmeier.de
https://www.timeandbill.de

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: [io] Moving to Java 6 for version 2.3

Posted by sebb <se...@gmail.com>.
On 30 March 2012 00:36, Jörg Schaible <jo...@gmx.de> wrote:
> Gary Gregory wrote:
>
>> On Thu, Mar 29, 2012 at 6:39 PM, Christian Grobmeier
>> <gr...@gmail.com>wrote:
>>
>>> +1 on the move to java 6
>>>
>>> we should consider to go to 3.0... its a breaking change... but i
>>> leave it up to you
>>>
>>
>> Since you are the second person that suggests it, this Java move on this
>> particular component could be a 3.0. I can go for that. Thoughts from
>> others?
>
> Normally 3.0 would mean, that we can no longer provide this version as a
> binary drop in (at least for Java apps running JDK 6).

Not necessarily.
3.0 could just mean that there have been major (but compatible)
changes to the code.

Or perhaps the code used to require Java 1.3 and now requires Java 1.6.
In which case a major version bump might be appropriate.

> Just upgrading the JDK does not mean that we have to break the API.

Agreed.

> Then 2.3 is the better choice.

In this case 2.3 seems more appropriate (unless there are plans I've not seen!).

However, a compatibility break would require a major version bump.

> - Jörg
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: [io] Moving to Java 6 for version 2.3

Posted by Jörg Schaible <jo...@gmx.de>.
Gary Gregory wrote:

> On Thu, Mar 29, 2012 at 6:39 PM, Christian Grobmeier
> <gr...@gmail.com>wrote:
> 
>> +1 on the move to java 6
>>
>> we should consider to go to 3.0... its a breaking change... but i
>> leave it up to you
>>
> 
> Since you are the second person that suggests it, this Java move on this
> particular component could be a 3.0. I can go for that. Thoughts from
> others?

Normally 3.0 would mean, that we can no longer provide this version as a 
binary drop in (at least for Java apps running JDK 6). Just upgrading the 
JDK does not mean that we have to break the API. Then 2.3 is the better 
choice.

- Jörg


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: [io] Moving to Java 6 for version 2.3

Posted by Gary Gregory <ga...@gmail.com>.
On Thu, Mar 29, 2012 at 6:39 PM, Christian Grobmeier <gr...@gmail.com>wrote:

> +1 on the move to java 6
>
> we should consider to go to 3.0... its a breaking change... but i
> leave it up to you
>

Since you are the second person that suggests it, this Java move on this
particular component could be a 3.0. I can go for that. Thoughts from
others?

Gary

>
>
> On Fri, Mar 30, 2012 at 12:35 AM, Gary Gregory <ga...@gmail.com>
> wrote:
> > On Thu, Mar 29, 2012 at 6:15 PM, Paul Libbrecht <pa...@hoplahup.net>
> wrote:
> >
> >> Will the resulting jars still run on jdk 1.5?
> >> I think I would suggest a new major version if not.
> >>
> >
> > Hi Paul.
> >
> > No, if we use Java 6 APIs, you'll get errors on Java 5.
> >
> > We have not required major version change in the past for changing Java
> > versions on other Commons components.
> >
> > I happy to make the next release 3.0 instead of 2.3 but I do not see this
> > needed ATM.
> >
> > Thank you,
> > Gary
> >
> >
> >> paul
> >>
> >>
> >> Le 29 mars 2012 à 23:55, Gary Gregory a écrit :
> >>
> >> > Hi All:
> >> >
> >> > In order to add and use Charset APIs for encodings instead of encoding
> >> name
> >> > Strings with various APIs like String(byte[], Charset) and so on, I
> plan
> >> on
> >> > moving [io] to Java 6.
> >> >
> >> > I have (not committed) changes to the IOUtils class as a start: all
> APIs
> >> > that can take a String encoding name (old school) have a sister API
> that
> >> > takes a Charset object (new school).
> >> >
> >> > The refactoring I have is actually quite nice and gets rid of the odd
> >> noise
> >> > in the implementation "if encoding is null then call API1 else call
> >> API2."
> >> > Instead I convert the null to Charset.defaultCharset() in a new API
> >> (again,
> >> > not committed yet until I set the POM to Java 6).
> >> >
> >> > Thank you,
> >> > Gary
> >> >
> >> > --
> >> > E-Mail: garydgregory@gmail.com | ggregory@apache.org
> >> > JUnit in Action, 2nd Ed: <http://goog_1249600977>http://bit.ly/ECvg0
> >> > Spring Batch in Action: <http://s.apache.org/HOq>http://bit.ly/bqpbCK
> >> > Blog: http://garygregory.wordpress.com
> >> > Home: http://garygregory.com/
> >> > Tweet! http://twitter.com/GaryGregory
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> >> For additional commands, e-mail: dev-help@commons.apache.org
> >>
> >>
> >
> >
> > --
> > E-Mail: garydgregory@gmail.com | ggregory@apache.org
> > JUnit in Action, 2nd Ed: <http://goog_1249600977>http://bit.ly/ECvg0
> > Spring Batch in Action: <http://s.apache.org/HOq>http://bit.ly/bqpbCK
> > Blog: http://garygregory.wordpress.com
> > Home: http://garygregory.com/
> > Tweet! http://twitter.com/GaryGregory
>
>
>
> --
> http://www.grobmeier.de
> https://www.timeandbill.de
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
>


-- 
E-Mail: garydgregory@gmail.com | ggregory@apache.org
JUnit in Action, 2nd Ed: <http://goog_1249600977>http://bit.ly/ECvg0
Spring Batch in Action: <http://s.apache.org/HOq>http://bit.ly/bqpbCK
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory

Re: [io] Moving to Java 6 for version 2.3

Posted by Christian Grobmeier <gr...@gmail.com>.
+1 on the move to java 6

we should consider to go to 3.0... its a breaking change... but i
leave it up to you


On Fri, Mar 30, 2012 at 12:35 AM, Gary Gregory <ga...@gmail.com> wrote:
> On Thu, Mar 29, 2012 at 6:15 PM, Paul Libbrecht <pa...@hoplahup.net> wrote:
>
>> Will the resulting jars still run on jdk 1.5?
>> I think I would suggest a new major version if not.
>>
>
> Hi Paul.
>
> No, if we use Java 6 APIs, you'll get errors on Java 5.
>
> We have not required major version change in the past for changing Java
> versions on other Commons components.
>
> I happy to make the next release 3.0 instead of 2.3 but I do not see this
> needed ATM.
>
> Thank you,
> Gary
>
>
>> paul
>>
>>
>> Le 29 mars 2012 à 23:55, Gary Gregory a écrit :
>>
>> > Hi All:
>> >
>> > In order to add and use Charset APIs for encodings instead of encoding
>> name
>> > Strings with various APIs like String(byte[], Charset) and so on, I plan
>> on
>> > moving [io] to Java 6.
>> >
>> > I have (not committed) changes to the IOUtils class as a start: all APIs
>> > that can take a String encoding name (old school) have a sister API that
>> > takes a Charset object (new school).
>> >
>> > The refactoring I have is actually quite nice and gets rid of the odd
>> noise
>> > in the implementation "if encoding is null then call API1 else call
>> API2."
>> > Instead I convert the null to Charset.defaultCharset() in a new API
>> (again,
>> > not committed yet until I set the POM to Java 6).
>> >
>> > Thank you,
>> > Gary
>> >
>> > --
>> > E-Mail: garydgregory@gmail.com | ggregory@apache.org
>> > JUnit in Action, 2nd Ed: <http://goog_1249600977>http://bit.ly/ECvg0
>> > Spring Batch in Action: <http://s.apache.org/HOq>http://bit.ly/bqpbCK
>> > Blog: http://garygregory.wordpress.com
>> > Home: http://garygregory.com/
>> > Tweet! http://twitter.com/GaryGregory
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>> For additional commands, e-mail: dev-help@commons.apache.org
>>
>>
>
>
> --
> E-Mail: garydgregory@gmail.com | ggregory@apache.org
> JUnit in Action, 2nd Ed: <http://goog_1249600977>http://bit.ly/ECvg0
> Spring Batch in Action: <http://s.apache.org/HOq>http://bit.ly/bqpbCK
> Blog: http://garygregory.wordpress.com
> Home: http://garygregory.com/
> Tweet! http://twitter.com/GaryGregory



-- 
http://www.grobmeier.de
https://www.timeandbill.de

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: [io] Moving to Java 6 for version 2.3

Posted by Gary Gregory <ga...@gmail.com>.
On Thu, Mar 29, 2012 at 6:15 PM, Paul Libbrecht <pa...@hoplahup.net> wrote:

> Will the resulting jars still run on jdk 1.5?
> I think I would suggest a new major version if not.
>

Hi Paul.

No, if we use Java 6 APIs, you'll get errors on Java 5.

We have not required major version change in the past for changing Java
versions on other Commons components.

I happy to make the next release 3.0 instead of 2.3 but I do not see this
needed ATM.

Thank you,
Gary


> paul
>
>
> Le 29 mars 2012 à 23:55, Gary Gregory a écrit :
>
> > Hi All:
> >
> > In order to add and use Charset APIs for encodings instead of encoding
> name
> > Strings with various APIs like String(byte[], Charset) and so on, I plan
> on
> > moving [io] to Java 6.
> >
> > I have (not committed) changes to the IOUtils class as a start: all APIs
> > that can take a String encoding name (old school) have a sister API that
> > takes a Charset object (new school).
> >
> > The refactoring I have is actually quite nice and gets rid of the odd
> noise
> > in the implementation "if encoding is null then call API1 else call
> API2."
> > Instead I convert the null to Charset.defaultCharset() in a new API
> (again,
> > not committed yet until I set the POM to Java 6).
> >
> > Thank you,
> > Gary
> >
> > --
> > E-Mail: garydgregory@gmail.com | ggregory@apache.org
> > JUnit in Action, 2nd Ed: <http://goog_1249600977>http://bit.ly/ECvg0
> > Spring Batch in Action: <http://s.apache.org/HOq>http://bit.ly/bqpbCK
> > Blog: http://garygregory.wordpress.com
> > Home: http://garygregory.com/
> > Tweet! http://twitter.com/GaryGregory
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
>


-- 
E-Mail: garydgregory@gmail.com | ggregory@apache.org
JUnit in Action, 2nd Ed: <http://goog_1249600977>http://bit.ly/ECvg0
Spring Batch in Action: <http://s.apache.org/HOq>http://bit.ly/bqpbCK
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory

Re: [io] Moving to Java 6 for version 2.3

Posted by Paul Libbrecht <pa...@hoplahup.net>.
Will the resulting jars still run on jdk 1.5?
I think I would suggest a new major version if not.

paul


Le 29 mars 2012 à 23:55, Gary Gregory a écrit :

> Hi All:
> 
> In order to add and use Charset APIs for encodings instead of encoding name
> Strings with various APIs like String(byte[], Charset) and so on, I plan on
> moving [io] to Java 6.
> 
> I have (not committed) changes to the IOUtils class as a start: all APIs
> that can take a String encoding name (old school) have a sister API that
> takes a Charset object (new school).
> 
> The refactoring I have is actually quite nice and gets rid of the odd noise
> in the implementation "if encoding is null then call API1 else call API2."
> Instead I convert the null to Charset.defaultCharset() in a new API (again,
> not committed yet until I set the POM to Java 6).
> 
> Thank you,
> Gary
> 
> -- 
> E-Mail: garydgregory@gmail.com | ggregory@apache.org
> JUnit in Action, 2nd Ed: <http://goog_1249600977>http://bit.ly/ECvg0
> Spring Batch in Action: <http://s.apache.org/HOq>http://bit.ly/bqpbCK
> Blog: http://garygregory.wordpress.com
> Home: http://garygregory.com/
> Tweet! http://twitter.com/GaryGregory


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: [io] Moving to Java 6 for version 2.3

Posted by Niall Pemberton <ni...@gmail.com>.
+1 to doing CharSet stuff.

Niall

On Thu, Mar 29, 2012 at 10:55 PM, Gary Gregory <ga...@gmail.com> wrote:
> Hi All:
>
> In order to add and use Charset APIs for encodings instead of encoding name
> Strings with various APIs like String(byte[], Charset) and so on, I plan on
> moving [io] to Java 6.
>
> I have (not committed) changes to the IOUtils class as a start: all APIs
> that can take a String encoding name (old school) have a sister API that
> takes a Charset object (new school).
>
> The refactoring I have is actually quite nice and gets rid of the odd noise
> in the implementation "if encoding is null then call API1 else call API2."
> Instead I convert the null to Charset.defaultCharset() in a new API (again,
> not committed yet until I set the POM to Java 6).
>
> Thank you,
> Gary
>
> --
> E-Mail: garydgregory@gmail.com | ggregory@apache.org
> JUnit in Action, 2nd Ed: <http://goog_1249600977>http://bit.ly/ECvg0
> Spring Batch in Action: <http://s.apache.org/HOq>http://bit.ly/bqpbCK
> Blog: http://garygregory.wordpress.com
> Home: http://garygregory.com/
> Tweet! http://twitter.com/GaryGregory

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org