[crypto] package access on ivars?

classic Classic list List threaded Threaded
14 messages Options
Reply | Threaded
Open this post in threaded view
|

[crypto] package access on ivars?

garydgregory
Reply | Threaded
Open this post in threaded view
|

RE: [crypto] package access on ivars?

Sun, Dapeng
Hi Gary,

>> I see ivars left at the package access level. This must be an oversight, right?
Thank you for the suggestion, I will fix it.

>> We can only fix that in 2.0 and a new package. What a bummer!
I'm agreed with you, the new package could also contain the recent fixes. Thank you :)

Regards,
Dapeng

-----Original Message-----
From: Gary Gregory [mailto:[hidden email]]
Sent: Monday, November 7, 2016 3:56 AM
To: Commons Developers List <[hidden email]>
Subject: [crypto] package access on ivars?

Hi all,

I see ivars left at the package access level. This must be an oversight, right?

We can only fix that in 2.0 and a new package. What a bummer!

Gary

--
E-Mail: [hidden email] | [hidden email] Java Persistence with Hibernate, Second Edition <https://www.amazon.com/gp/product/1617290459/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&linkCode=as2&tag=garygregory-20&linkId=cadb800f39946ec62ea2b1af9fe6a2b8>

<http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1617290459>
JUnit in Action, Second Edition
<https://www.amazon.com/gp/product/1935182021/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&linkCode=as2&tag=garygregory-20&linkId=31ecd1f6b6d1eaf8886ac902a24de418%22>

<http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1935182021>
Spring Batch in Action
<https://www.amazon.com/gp/product/1935182951/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
<http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1935182951>
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: [crypto] package access on ivars?

sebb-2-2
In reply to this post by garydgregory
On 6 November 2016 at 19:56, Gary Gregory <[hidden email]> wrote:
> Hi all,
>
> I see ivars left at the package access level. This must be an oversight,
> right?
>
> We can only fix that in 2.0 and a new package. What a bummer!

I'm not sure I understand.
Why would making package-protected fields private affect compatibility?

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: [crypto] package access on ivars?

garydgregory
On Mon, Nov 7, 2016 at 4:11 PM, sebb <[hidden email]> wrote:

> On 6 November 2016 at 19:56, Gary Gregory <[hidden email]> wrote:
> > Hi all,
> >
> > I see ivars left at the package access level. This must be an oversight,
> > right?
> >
> > We can only fix that in 2.0 and a new package. What a bummer!
>
> I'm not sure I understand.
> Why would making package-protected fields private affect compatibility?
>

As a user, I can add a class to a [crypto] package and access the ivars.
Then when change the access level, my code will no longer compile. If we do
not define BC like that due to a class living in a package it really has no
business being in, then I'm OK with it.

Gary

>
> > Gary
> >
> > --
> > E-Mail: [hidden email] | [hidden email]
> > Java Persistence with Hibernate, Second Edition
> > <https://www.amazon.com/gp/product/1617290459/ref=as_li_
> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&
> linkCode=as2&tag=garygregory-20&linkId=cadb800f39946ec62ea2b1af9fe6a2b8>
> >
> > <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
> 1617290459>
> > JUnit in Action, Second Edition
> > <https://www.amazon.com/gp/product/1935182021/ref=as_li_
> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&
> linkCode=as2&tag=garygregory-20&linkId=31ecd1f6b6d1eaf8886ac902a24de418%22
> >
> >
> > <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
> 1935182021>
> > Spring Batch in Action
> > <https://www.amazon.com/gp/product/1935182951/ref=as_li_
> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&
> linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%
> 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
> > <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
> 1935182951>
> > Blog: http://garygregory.wordpress.com
> > Home: http://garygregory.com/
> > Tweet! http://twitter.com/GaryGregory
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>


--
E-Mail: [hidden email] | [hidden email]
Java Persistence with Hibernate, Second Edition
<https://www.amazon.com/gp/product/1617290459/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&linkCode=as2&tag=garygregory-20&linkId=cadb800f39946ec62ea2b1af9fe6a2b8>

<http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1617290459>
JUnit in Action, Second Edition
<https://www.amazon.com/gp/product/1935182021/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&linkCode=as2&tag=garygregory-20&linkId=31ecd1f6b6d1eaf8886ac902a24de418%22>

<http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1935182021>
Spring Batch in Action
<https://www.amazon.com/gp/product/1935182951/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
<http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1935182951>
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory
Reply | Threaded
Open this post in threaded view
|

RE: [crypto] package access on ivars?

Sun, Dapeng
I think it should be access level should be protected, not package-protected.

Is the ivars in CryptoInputStream? Some fields are also needed by its subclass (not only for the classes in the package), such as CtrCryptoInputStream.

Regards,
Dapeng

-----Original Message-----
From: Gary Gregory [mailto:[hidden email]]
Sent: Tuesday, November 8, 2016 8:15 AM
To: Commons Developers List <[hidden email]>
Subject: Re: [crypto] package access on ivars?

On Mon, Nov 7, 2016 at 4:11 PM, sebb <[hidden email]> wrote:

> On 6 November 2016 at 19:56, Gary Gregory <[hidden email]> wrote:
> > Hi all,
> >
> > I see ivars left at the package access level. This must be an
> > oversight, right?
> >
> > We can only fix that in 2.0 and a new package. What a bummer!
>
> I'm not sure I understand.
> Why would making package-protected fields private affect compatibility?
>

As a user, I can add a class to a [crypto] package and access the ivars.
Then when change the access level, my code will no longer compile. If we do not define BC like that due to a class living in a package it really has no business being in, then I'm OK with it.

Gary

>
> > Gary
> >
> > --
> > E-Mail: [hidden email] | [hidden email] Java
> > Persistence with Hibernate, Second Edition
> > <https://www.amazon.com/gp/product/1617290459/ref=as_li_
> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&
> linkCode=as2&tag=garygregory-20&linkId=cadb800f39946ec62ea2b1af9fe6a2b
> 8>
> >
> > <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&
> > a=
> 1617290459>
> > JUnit in Action, Second Edition
> > <https://www.amazon.com/gp/product/1935182021/ref=as_li_
> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&
> linkCode=as2&tag=garygregory-20&linkId=31ecd1f6b6d1eaf8886ac902a24de41
> 8%22
> >
> >
> > <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&
> > a=
> 1935182021>
> > Spring Batch in Action
> > <https://www.amazon.com/gp/product/1935182951/ref=as_li_
> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&
> linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%
> 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
> > <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&
> > a=
> 1935182951>
> > Blog: http://garygregory.wordpress.com
> > Home: http://garygregory.com/
> > Tweet! http://twitter.com/GaryGregory
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>


--
E-Mail: [hidden email] | [hidden email] Java Persistence with Hibernate, Second Edition <https://www.amazon.com/gp/product/1617290459/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&linkCode=as2&tag=garygregory-20&linkId=cadb800f39946ec62ea2b1af9fe6a2b8>

<http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1617290459>
JUnit in Action, Second Edition
<https://www.amazon.com/gp/product/1935182021/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&linkCode=as2&tag=garygregory-20&linkId=31ecd1f6b6d1eaf8886ac902a24de418%22>

<http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1935182021>
Spring Batch in Action
<https://www.amazon.com/gp/product/1935182951/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
<http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1935182951>
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: [crypto] package access on ivars?

garydgregory
There are a bunch of ivars that are at the package level. A per-class scan
is warranted IMO.

Gary

On Mon, Nov 7, 2016 at 5:32 PM, Sun, Dapeng <[hidden email]> wrote:

> I think it should be access level should be protected, not
> package-protected.
>
> Is the ivars in CryptoInputStream? Some fields are also needed by its
> subclass (not only for the classes in the package), such as
> CtrCryptoInputStream.
>
> Regards,
> Dapeng
>
> -----Original Message-----
> From: Gary Gregory [mailto:[hidden email]]
> Sent: Tuesday, November 8, 2016 8:15 AM
> To: Commons Developers List <[hidden email]>
> Subject: Re: [crypto] package access on ivars?
>
> On Mon, Nov 7, 2016 at 4:11 PM, sebb <[hidden email]> wrote:
>
> > On 6 November 2016 at 19:56, Gary Gregory <[hidden email]>
> wrote:
> > > Hi all,
> > >
> > > I see ivars left at the package access level. This must be an
> > > oversight, right?
> > >
> > > We can only fix that in 2.0 and a new package. What a bummer!
> >
> > I'm not sure I understand.
> > Why would making package-protected fields private affect compatibility?
> >
>
> As a user, I can add a class to a [crypto] package and access the ivars.
> Then when change the access level, my code will no longer compile. If we
> do not define BC like that due to a class living in a package it really has
> no business being in, then I'm OK with it.
>
> Gary
>
> >
> > > Gary
> > >
> > > --
> > > E-Mail: [hidden email] | [hidden email] Java
> > > Persistence with Hibernate, Second Edition
> > > <https://www.amazon.com/gp/product/1617290459/ref=as_li_
> > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&
> > linkCode=as2&tag=garygregory-20&linkId=cadb800f39946ec62ea2b1af9fe6a2b
> > 8>
> > >
> > > <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&
> > > a=
> > 1617290459>
> > > JUnit in Action, Second Edition
> > > <https://www.amazon.com/gp/product/1935182021/ref=as_li_
> > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&
> > linkCode=as2&tag=garygregory-20&linkId=31ecd1f6b6d1eaf8886ac902a24de41
> > 8%22
> > >
> > >
> > > <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&
> > > a=
> > 1935182021>
> > > Spring Batch in Action
> > > <https://www.amazon.com/gp/product/1935182951/ref=as_li_
> > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&
> > linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%
> > 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
> > > <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&
> > > a=
> > 1935182951>
> > > Blog: http://garygregory.wordpress.com
> > > Home: http://garygregory.com/
> > > Tweet! http://twitter.com/GaryGregory
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [hidden email]
> > For additional commands, e-mail: [hidden email]
> >
> >
>
>
> --
> E-Mail: [hidden email] | [hidden email] Java Persistence
> with Hibernate, Second Edition <https://www.amazon.com/gp/
> product/1617290459/ref=as_li_tl?ie=UTF8&camp=1789&creative=
> 9325&creativeASIN=1617290459&linkCode=as2&tag=garygregory-20&linkId=
> cadb800f39946ec62ea2b1af9fe6a2b8>
>
> <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
> 1617290459>
> JUnit in Action, Second Edition
> <https://www.amazon.com/gp/product/1935182021/ref=as_li_
> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&
> linkCode=as2&tag=garygregory-20&linkId=31ecd1f6b6d1eaf8886ac902a24de418%22
> >
>
> <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
> 1935182021>
> Spring Batch in Action
> <https://www.amazon.com/gp/product/1935182951/ref=as_li_
> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&
> linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%
> 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
> <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
> 1935182951>
> Blog: http://garygregory.wordpress.com
> Home: http://garygregory.com/
> Tweet! http://twitter.com/GaryGregory
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>



--
E-Mail: [hidden email] | [hidden email]
Java Persistence with Hibernate, Second Edition
<https://www.amazon.com/gp/product/1617290459/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&linkCode=as2&tag=garygregory-20&linkId=cadb800f39946ec62ea2b1af9fe6a2b8>

<http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1617290459>
JUnit in Action, Second Edition
<https://www.amazon.com/gp/product/1935182021/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&linkCode=as2&tag=garygregory-20&linkId=31ecd1f6b6d1eaf8886ac902a24de418%22>

<http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1935182021>
Spring Batch in Action
<https://www.amazon.com/gp/product/1935182951/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
<http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1935182951>
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory
Reply | Threaded
Open this post in threaded view
|

RE: [crypto] package access on ivars?

Sun, Dapeng
I think so. Thank Gary, I will look into it.

Regards,
Dapeng

-----Original Message-----
From: Gary Gregory [mailto:[hidden email]]
Sent: Tuesday, November 8, 2016 9:34 AM
To: Commons Developers List <[hidden email]>
Subject: Re: [crypto] package access on ivars?

There are a bunch of ivars that are at the package level. A per-class scan is warranted IMO.

Gary

On Mon, Nov 7, 2016 at 5:32 PM, Sun, Dapeng <[hidden email]> wrote:

> I think it should be access level should be protected, not
> package-protected.
>
> Is the ivars in CryptoInputStream? Some fields are also needed by its
> subclass (not only for the classes in the package), such as
> CtrCryptoInputStream.
>
> Regards,
> Dapeng
>
> -----Original Message-----
> From: Gary Gregory [mailto:[hidden email]]
> Sent: Tuesday, November 8, 2016 8:15 AM
> To: Commons Developers List <[hidden email]>
> Subject: Re: [crypto] package access on ivars?
>
> On Mon, Nov 7, 2016 at 4:11 PM, sebb <[hidden email]> wrote:
>
> > On 6 November 2016 at 19:56, Gary Gregory <[hidden email]>
> wrote:
> > > Hi all,
> > >
> > > I see ivars left at the package access level. This must be an
> > > oversight, right?
> > >
> > > We can only fix that in 2.0 and a new package. What a bummer!
> >
> > I'm not sure I understand.
> > Why would making package-protected fields private affect compatibility?
> >
>
> As a user, I can add a class to a [crypto] package and access the ivars.
> Then when change the access level, my code will no longer compile. If
> we do not define BC like that due to a class living in a package it
> really has no business being in, then I'm OK with it.
>
> Gary
>
> >
> > > Gary
> > >
> > > --
> > > E-Mail: [hidden email] | [hidden email] Java
> > > Persistence with Hibernate, Second Edition
> > > <https://www.amazon.com/gp/product/1617290459/ref=as_li_
> > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&
> > linkCode=as2&tag=garygregory-20&linkId=cadb800f39946ec62ea2b1af9fe6a
> > 2b
> > 8>
> > >
> > > <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=
> > > 1&
> > > a=
> > 1617290459>
> > > JUnit in Action, Second Edition
> > > <https://www.amazon.com/gp/product/1935182021/ref=as_li_
> > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&
> > linkCode=as2&tag=garygregory-20&linkId=31ecd1f6b6d1eaf8886ac902a24de
> > 41
> > 8%22
> > >
> > >
> > > <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=
> > > 1&
> > > a=
> > 1935182021>
> > > Spring Batch in Action
> > > <https://www.amazon.com/gp/product/1935182951/ref=as_li_
> > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&
> > linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%
> > 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
> > > <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=
> > > 1&
> > > a=
> > 1935182951>
> > > Blog: http://garygregory.wordpress.com
> > > Home: http://garygregory.com/
> > > Tweet! http://twitter.com/GaryGregory
> >
> > --------------------------------------------------------------------
> > - To unsubscribe, e-mail: [hidden email]
> > For additional commands, e-mail: [hidden email]
> >
> >
>
>
> --
> E-Mail: [hidden email] | [hidden email] Java Persistence
> with Hibernate, Second Edition <https://www.amazon.com/gp/ 
> product/1617290459/ref=as_li_tl?ie=UTF8&camp=1789&creative=
> 9325&creativeASIN=1617290459&linkCode=as2&tag=garygregory-20&linkId=
> cadb800f39946ec62ea2b1af9fe6a2b8>
>
> <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
> 1617290459>
> JUnit in Action, Second Edition
> <https://www.amazon.com/gp/product/1935182021/ref=as_li_
> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&
> linkCode=as2&tag=garygregory-20&linkId=31ecd1f6b6d1eaf8886ac902a24de41
> 8%22
> >
>
> <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
> 1935182021>
> Spring Batch in Action
> <https://www.amazon.com/gp/product/1935182951/ref=as_li_
> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&
> linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%
> 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
> <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
> 1935182951>
> Blog: http://garygregory.wordpress.com
> Home: http://garygregory.com/
> Tweet! http://twitter.com/GaryGregory
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>



--
E-Mail: [hidden email] | [hidden email] Java Persistence with Hibernate, Second Edition <https://www.amazon.com/gp/product/1617290459/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&linkCode=as2&tag=garygregory-20&linkId=cadb800f39946ec62ea2b1af9fe6a2b8>

<http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1617290459>
JUnit in Action, Second Edition
<https://www.amazon.com/gp/product/1935182021/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&linkCode=as2&tag=garygregory-20&linkId=31ecd1f6b6d1eaf8886ac902a24de418%22>

<http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1935182021>
Spring Batch in Action
<https://www.amazon.com/gp/product/1935182951/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
<http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1935182951>
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: [crypto] package access on ivars?

Stian Soiland-Reyes
In reply to this post by garydgregory
I don't think binary compatibility should include package level access, as
long as that package is only used within a single Commons JAR, then we are
free to change those, at least in a new minor release. (I would say even
patch level unless serialisation is used).

In particular, package level access means "don't touch" - it is of course
possible to break into it by compiling into "our" package, but I don't see
that as much different than introspection that changes access modifiers and
is not something we should support.

So I would say we can fix it and release it as a new minor version.

On 8 Nov 2016 12:15 am, "Gary Gregory" <[hidden email]> wrote:

> On Mon, Nov 7, 2016 at 4:11 PM, sebb <[hidden email]> wrote:
>
> > On 6 November 2016 at 19:56, Gary Gregory <[hidden email]>
> wrote:
> > > Hi all,
> > >
> > > I see ivars left at the package access level. This must be an
> oversight,
> > > right?
> > >
> > > We can only fix that in 2.0 and a new package. What a bummer!
> >
> > I'm not sure I understand.
> > Why would making package-protected fields private affect compatibility?
> >
>
> As a user, I can add a class to a [crypto] package and access the ivars.
> Then when change the access level, my code will no longer compile. If we do
> not define BC like that due to a class living in a package it really has no
> business being in, then I'm OK with it.
>
> Gary
>
> >
> > > Gary
> > >
> > > --
> > > E-Mail: [hidden email] | [hidden email]
> > > Java Persistence with Hibernate, Second Edition
> > > <https://www.amazon.com/gp/product/1617290459/ref=as_li_
> > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&
> > linkCode=as2&tag=garygregory-20&linkId=cadb800f39946ec62ea2b1af9fe6a2b8>
> > >
> > > <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
> > 1617290459>
> > > JUnit in Action, Second Edition
> > > <https://www.amazon.com/gp/product/1935182021/ref=as_li_
> > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&
> > linkCode=as2&tag=garygregory-20&linkId=31ecd1f6b6d1eaf8886ac902a24de4
> 18%22
> > >
> > >
> > > <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
> > 1935182021>
> > > Spring Batch in Action
> > > <https://www.amazon.com/gp/product/1935182951/ref=as_li_
> > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&
> > linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%
> > 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
> > > <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
> > 1935182951>
> > > Blog: http://garygregory.wordpress.com
> > > Home: http://garygregory.com/
> > > Tweet! http://twitter.com/GaryGregory
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [hidden email]
> > For additional commands, e-mail: [hidden email]
> >
> >
>
>
> --
> E-Mail: [hidden email] | [hidden email]
> Java Persistence with Hibernate, Second Edition
> <https://www.amazon.com/gp/product/1617290459/ref=as_li_
> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&
> linkCode=as2&tag=garygregory-20&linkId=cadb800f39946ec62ea2b1af9fe6a2b8>
>
> <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
> 1617290459>
> JUnit in Action, Second Edition
> <https://www.amazon.com/gp/product/1935182021/ref=as_li_
> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&
> linkCode=as2&tag=garygregory-20&linkId=31ecd1f6b6d1eaf8886ac902a24de418%22
> >
>
> <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
> 1935182021>
> Spring Batch in Action
> <https://www.amazon.com/gp/product/1935182951/ref=as_li_
> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&
> linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%
> 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
> <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
> 1935182951>
> Blog: http://garygregory.wordpress.com
> Home: http://garygregory.com/
> Tweet! http://twitter.com/GaryGregory
>
Reply | Threaded
Open this post in threaded view
|

Re: [crypto] package access on ivars?

sebb-2-2
On 8 November 2016 at 07:34, Stian Soiland-Reyes <[hidden email]> wrote:

> I don't think binary compatibility should include package level access, as
> long as that package is only used within a single Commons JAR, then we are
> free to change those, at least in a new minor release. (I would say even
> patch level unless serialisation is used).
>
> In particular, package level access means "don't touch" - it is of course
> possible to break into it by compiling into "our" package, but I don't see
> that as much different than introspection that changes access modifiers and
> is not something we should support.
>
> So I would say we can fix it and release it as a new minor version.

+1

> On 8 Nov 2016 12:15 am, "Gary Gregory" <[hidden email]> wrote:
>
>> On Mon, Nov 7, 2016 at 4:11 PM, sebb <[hidden email]> wrote:
>>
>> > On 6 November 2016 at 19:56, Gary Gregory <[hidden email]>
>> wrote:
>> > > Hi all,
>> > >
>> > > I see ivars left at the package access level. This must be an
>> oversight,
>> > > right?
>> > >
>> > > We can only fix that in 2.0 and a new package. What a bummer!
>> >
>> > I'm not sure I understand.
>> > Why would making package-protected fields private affect compatibility?
>> >
>>
>> As a user, I can add a class to a [crypto] package and access the ivars.
>> Then when change the access level, my code will no longer compile. If we do
>> not define BC like that due to a class living in a package it really has no
>> business being in, then I'm OK with it.
>>
>> Gary
>>
>> >
>> > > Gary
>> > >
>> > > --
>> > > E-Mail: [hidden email] | [hidden email]
>> > > Java Persistence with Hibernate, Second Edition
>> > > <https://www.amazon.com/gp/product/1617290459/ref=as_li_
>> > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&
>> > linkCode=as2&tag=garygregory-20&linkId=cadb800f39946ec62ea2b1af9fe6a2b8>
>> > >
>> > > <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
>> > 1617290459>
>> > > JUnit in Action, Second Edition
>> > > <https://www.amazon.com/gp/product/1935182021/ref=as_li_
>> > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&
>> > linkCode=as2&tag=garygregory-20&linkId=31ecd1f6b6d1eaf8886ac902a24de4
>> 18%22
>> > >
>> > >
>> > > <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
>> > 1935182021>
>> > > Spring Batch in Action
>> > > <https://www.amazon.com/gp/product/1935182951/ref=as_li_
>> > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&
>> > linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%
>> > 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
>> > > <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
>> > 1935182951>
>> > > Blog: http://garygregory.wordpress.com
>> > > Home: http://garygregory.com/
>> > > Tweet! http://twitter.com/GaryGregory
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: [hidden email]
>> > For additional commands, e-mail: [hidden email]
>> >
>> >
>>
>>
>> --
>> E-Mail: [hidden email] | [hidden email]
>> Java Persistence with Hibernate, Second Edition
>> <https://www.amazon.com/gp/product/1617290459/ref=as_li_
>> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&
>> linkCode=as2&tag=garygregory-20&linkId=cadb800f39946ec62ea2b1af9fe6a2b8>
>>
>> <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
>> 1617290459>
>> JUnit in Action, Second Edition
>> <https://www.amazon.com/gp/product/1935182021/ref=as_li_
>> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&
>> linkCode=as2&tag=garygregory-20&linkId=31ecd1f6b6d1eaf8886ac902a24de418%22
>> >
>>
>> <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
>> 1935182021>
>> Spring Batch in Action
>> <https://www.amazon.com/gp/product/1935182951/ref=as_li_
>> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&
>> linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%
>> 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
>> <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
>> 1935182951>
>> Blog: http://garygregory.wordpress.com
>> Home: http://garygregory.com/
>> Tweet! http://twitter.com/GaryGregory
>>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: [crypto] package access on ivars?

garydgregory
On Tue, Nov 8, 2016 at 1:19 AM, sebb <[hidden email]> wrote:

> On 8 November 2016 at 07:34, Stian Soiland-Reyes <[hidden email]> wrote:
> > I don't think binary compatibility should include package level access,
> as
> > long as that package is only used within a single Commons JAR, then we
> are
> > free to change those, at least in a new minor release. (I would say even
> > patch level unless serialisation is used).
> >
> > In particular, package level access means "don't touch" - it is of course
> > possible to break into it by compiling into "our" package, but I don't
> see
> > that as much different than introspection that changes access modifiers
> and
> > is not something we should support.
> >
> > So I would say we can fix it and release it as a new minor version.
>
> +1
>

Sounds good. FTR: https://issues.apache.org/jira/browse/CRYPTO-129

Gary


>
> > On 8 Nov 2016 12:15 am, "Gary Gregory" <[hidden email]> wrote:
> >
> >> On Mon, Nov 7, 2016 at 4:11 PM, sebb <[hidden email]> wrote:
> >>
> >> > On 6 November 2016 at 19:56, Gary Gregory <[hidden email]>
> >> wrote:
> >> > > Hi all,
> >> > >
> >> > > I see ivars left at the package access level. This must be an
> >> oversight,
> >> > > right?
> >> > >
> >> > > We can only fix that in 2.0 and a new package. What a bummer!
> >> >
> >> > I'm not sure I understand.
> >> > Why would making package-protected fields private affect
> compatibility?
> >> >
> >>
> >> As a user, I can add a class to a [crypto] package and access the ivars.
> >> Then when change the access level, my code will no longer compile. If
> we do
> >> not define BC like that due to a class living in a package it really
> has no
> >> business being in, then I'm OK with it.
> >>
> >> Gary
> >>
> >> >
> >> > > Gary
> >> > >
> >> > > --
> >> > > E-Mail: [hidden email] | [hidden email]
> >> > > Java Persistence with Hibernate, Second Edition
> >> > > <https://www.amazon.com/gp/product/1617290459/ref=as_li_
> >> > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&
> >> > linkCode=as2&tag=garygregory-20&linkId=cadb800f39946ec62ea2b1af9fe6a2
> b8>
> >> > >
> >> > > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> garygregory-20&l=am2&o=1&a=
> >> > 1617290459>
> >> > > JUnit in Action, Second Edition
> >> > > <https://www.amazon.com/gp/product/1935182021/ref=as_li_
> >> > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&
> >> > linkCode=as2&tag=garygregory-20&linkId=31ecd1f6b6d1eaf8886ac902a24de4
> >> 18%22
> >> > >
> >> > >
> >> > > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> garygregory-20&l=am2&o=1&a=
> >> > 1935182021>
> >> > > Spring Batch in Action
> >> > > <https://www.amazon.com/gp/product/1935182951/ref=as_li_
> >> > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&
> >> > linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%
> >> > 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
> >> > > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> garygregory-20&l=am2&o=1&a=
> >> > 1935182951>
> >> > > Blog: http://garygregory.wordpress.com
> >> > > Home: http://garygregory.com/
> >> > > Tweet! http://twitter.com/GaryGregory
> >> >
> >> > ---------------------------------------------------------------------
> >> > To unsubscribe, e-mail: [hidden email]
> >> > For additional commands, e-mail: [hidden email]
> >> >
> >> >
> >>
> >>
> >> --
> >> E-Mail: [hidden email] | [hidden email]
> >> Java Persistence with Hibernate, Second Edition
> >> <https://www.amazon.com/gp/product/1617290459/ref=as_li_
> >> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&
> >> linkCode=as2&tag=garygregory-20&linkId=cadb800f39946ec62ea2b1af9fe6a2
> b8>
> >>
> >> <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
> >> 1617290459>
> >> JUnit in Action, Second Edition
> >> <https://www.amazon.com/gp/product/1935182021/ref=as_li_
> >> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&
> >> linkCode=as2&tag=garygregory-20&linkId=31ecd1f6b6d1eaf8886ac902a24de4
> 18%22
> >> >
> >>
> >> <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
> >> 1935182021>
> >> Spring Batch in Action
> >> <https://www.amazon.com/gp/product/1935182951/ref=as_li_
> >> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&
> >> linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%
> >> 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
> >> <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
> >> 1935182951>
> >> Blog: http://garygregory.wordpress.com
> >> Home: http://garygregory.com/
> >> Tweet! http://twitter.com/GaryGregory
> >>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>


--
E-Mail: [hidden email] | [hidden email]
Java Persistence with Hibernate, Second Edition
<https://www.amazon.com/gp/product/1617290459/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&linkCode=as2&tag=garygregory-20&linkId=cadb800f39946ec62ea2b1af9fe6a2b8>

<http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1617290459>
JUnit in Action, Second Edition
<https://www.amazon.com/gp/product/1935182021/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&linkCode=as2&tag=garygregory-20&linkId=31ecd1f6b6d1eaf8886ac902a24de418%22>

<http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1935182021>
Spring Batch in Action
<https://www.amazon.com/gp/product/1935182951/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
<http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1935182951>
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory
Reply | Threaded
Open this post in threaded view
|

Re: [crypto] package access on ivars?

sebb-2-2
On 8 November 2016 at 09:30, Gary Gregory <[hidden email]> wrote:

> On Tue, Nov 8, 2016 at 1:19 AM, sebb <[hidden email]> wrote:
>
>> On 8 November 2016 at 07:34, Stian Soiland-Reyes <[hidden email]> wrote:
>> > I don't think binary compatibility should include package level access,
>> as
>> > long as that package is only used within a single Commons JAR, then we
>> are
>> > free to change those, at least in a new minor release. (I would say even
>> > patch level unless serialisation is used).
>> >
>> > In particular, package level access means "don't touch" - it is of course
>> > possible to break into it by compiling into "our" package, but I don't
>> see
>> > that as much different than introspection that changes access modifiers
>> and
>> > is not something we should support.
>> >
>> > So I would say we can fix it and release it as a new minor version.
>>
>> +1
>>
>
> Sounds good. FTR: https://issues.apache.org/jira/browse/CRYPTO-129

Why allow changing package-private to protected?

That is a retrograde step.

If the code works without exposing the variables as protected, then
keep it like that otherwise we cannot change implementation later.

IMO the main reason for using p-p access is allowing access outside a
class but without affecting the external API.

Only constants should be part of the public/protected API, and even
those should be carefully considered.

> Gary
>
>
>>
>> > On 8 Nov 2016 12:15 am, "Gary Gregory" <[hidden email]> wrote:
>> >
>> >> On Mon, Nov 7, 2016 at 4:11 PM, sebb <[hidden email]> wrote:
>> >>
>> >> > On 6 November 2016 at 19:56, Gary Gregory <[hidden email]>
>> >> wrote:
>> >> > > Hi all,
>> >> > >
>> >> > > I see ivars left at the package access level. This must be an
>> >> oversight,
>> >> > > right?
>> >> > >
>> >> > > We can only fix that in 2.0 and a new package. What a bummer!
>> >> >
>> >> > I'm not sure I understand.
>> >> > Why would making package-protected fields private affect
>> compatibility?
>> >> >
>> >>
>> >> As a user, I can add a class to a [crypto] package and access the ivars.
>> >> Then when change the access level, my code will no longer compile. If
>> we do
>> >> not define BC like that due to a class living in a package it really
>> has no
>> >> business being in, then I'm OK with it.
>> >>
>> >> Gary
>> >>
>> >> >
>> >> > > Gary
>> >> > >
>> >> > > --
>> >> > > E-Mail: [hidden email] | [hidden email]
>> >> > > Java Persistence with Hibernate, Second Edition
>> >> > > <https://www.amazon.com/gp/product/1617290459/ref=as_li_
>> >> > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&
>> >> > linkCode=as2&tag=garygregory-20&linkId=cadb800f39946ec62ea2b1af9fe6a2
>> b8>
>> >> > >
>> >> > > <http:////ir-na.amazon-adsystem.com/e/ir?t=
>> garygregory-20&l=am2&o=1&a=
>> >> > 1617290459>
>> >> > > JUnit in Action, Second Edition
>> >> > > <https://www.amazon.com/gp/product/1935182021/ref=as_li_
>> >> > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&
>> >> > linkCode=as2&tag=garygregory-20&linkId=31ecd1f6b6d1eaf8886ac902a24de4
>> >> 18%22
>> >> > >
>> >> > >
>> >> > > <http:////ir-na.amazon-adsystem.com/e/ir?t=
>> garygregory-20&l=am2&o=1&a=
>> >> > 1935182021>
>> >> > > Spring Batch in Action
>> >> > > <https://www.amazon.com/gp/product/1935182951/ref=as_li_
>> >> > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&
>> >> > linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%
>> >> > 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
>> >> > > <http:////ir-na.amazon-adsystem.com/e/ir?t=
>> garygregory-20&l=am2&o=1&a=
>> >> > 1935182951>
>> >> > > Blog: http://garygregory.wordpress.com
>> >> > > Home: http://garygregory.com/
>> >> > > Tweet! http://twitter.com/GaryGregory
>> >> >
>> >> > ---------------------------------------------------------------------
>> >> > To unsubscribe, e-mail: [hidden email]
>> >> > For additional commands, e-mail: [hidden email]
>> >> >
>> >> >
>> >>
>> >>
>> >> --
>> >> E-Mail: [hidden email] | [hidden email]
>> >> Java Persistence with Hibernate, Second Edition
>> >> <https://www.amazon.com/gp/product/1617290459/ref=as_li_
>> >> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&
>> >> linkCode=as2&tag=garygregory-20&linkId=cadb800f39946ec62ea2b1af9fe6a2
>> b8>
>> >>
>> >> <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
>> >> 1617290459>
>> >> JUnit in Action, Second Edition
>> >> <https://www.amazon.com/gp/product/1935182021/ref=as_li_
>> >> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&
>> >> linkCode=as2&tag=garygregory-20&linkId=31ecd1f6b6d1eaf8886ac902a24de4
>> 18%22
>> >> >
>> >>
>> >> <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
>> >> 1935182021>
>> >> Spring Batch in Action
>> >> <https://www.amazon.com/gp/product/1935182951/ref=as_li_
>> >> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&
>> >> linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%
>> >> 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
>> >> <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
>> >> 1935182951>
>> >> Blog: http://garygregory.wordpress.com
>> >> Home: http://garygregory.com/
>> >> Tweet! http://twitter.com/GaryGregory
>> >>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [hidden email]
>> For additional commands, e-mail: [hidden email]
>>
>>
>
>
> --
> E-Mail: [hidden email] | [hidden email]
> Java Persistence with Hibernate, Second Edition
> <https://www.amazon.com/gp/product/1617290459/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&linkCode=as2&tag=garygregory-20&linkId=cadb800f39946ec62ea2b1af9fe6a2b8>
>
> <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1617290459>
> JUnit in Action, Second Edition
> <https://www.amazon.com/gp/product/1935182021/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&linkCode=as2&tag=garygregory-20&linkId=31ecd1f6b6d1eaf8886ac902a24de418%22>
>
> <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1935182021>
> Spring Batch in Action
> <https://www.amazon.com/gp/product/1935182951/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
> <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1935182951>
> Blog: http://garygregory.wordpress.com
> Home: http://garygregory.com/
> Tweet! http://twitter.com/GaryGregory

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: [crypto] package access on ivars?

garydgregory
On Tue, Nov 8, 2016 at 1:40 AM, sebb <[hidden email]> wrote:

> On 8 November 2016 at 09:30, Gary Gregory <[hidden email]> wrote:
> > On Tue, Nov 8, 2016 at 1:19 AM, sebb <[hidden email]> wrote:
> >
> >> On 8 November 2016 at 07:34, Stian Soiland-Reyes <[hidden email]>
> wrote:
> >> > I don't think binary compatibility should include package level
> access,
> >> as
> >> > long as that package is only used within a single Commons JAR, then we
> >> are
> >> > free to change those, at least in a new minor release. (I would say
> even
> >> > patch level unless serialisation is used).
> >> >
> >> > In particular, package level access means "don't touch" - it is of
> course
> >> > possible to break into it by compiling into "our" package, but I don't
> >> see
> >> > that as much different than introspection that changes access
> modifiers
> >> and
> >> > is not something we should support.
> >> >
> >> > So I would say we can fix it and release it as a new minor version.
> >>
> >> +1
> >>
> >
> > Sounds good. FTR: https://issues.apache.org/jira/browse/CRYPTO-129
>
> Why allow changing package-private to protected?
>
> That is a retrograde step.
>
> If the code works without exposing the variables as protected, then
> keep it like that otherwise we cannot change implementation later.
>
> IMO the main reason for using p-p access is allowing access outside a
> class but without affecting the external API.
>
> Only constants should be part of the public/protected API, and even
> those should be carefully considered.
>

I initially mentioned in this thread making the ivars private. A reply was
made that protected was possible or desired for some ivars. The title of
the ticket reflects and respects the two views. If it were up to me I would
make them all private.

Gary


> > Gary
> >
> >
> >>
> >> > On 8 Nov 2016 12:15 am, "Gary Gregory" <[hidden email]>
> wrote:
> >> >
> >> >> On Mon, Nov 7, 2016 at 4:11 PM, sebb <[hidden email]> wrote:
> >> >>
> >> >> > On 6 November 2016 at 19:56, Gary Gregory <[hidden email]>
> >> >> wrote:
> >> >> > > Hi all,
> >> >> > >
> >> >> > > I see ivars left at the package access level. This must be an
> >> >> oversight,
> >> >> > > right?
> >> >> > >
> >> >> > > We can only fix that in 2.0 and a new package. What a bummer!
> >> >> >
> >> >> > I'm not sure I understand.
> >> >> > Why would making package-protected fields private affect
> >> compatibility?
> >> >> >
> >> >>
> >> >> As a user, I can add a class to a [crypto] package and access the
> ivars.
> >> >> Then when change the access level, my code will no longer compile. If
> >> we do
> >> >> not define BC like that due to a class living in a package it really
> >> has no
> >> >> business being in, then I'm OK with it.
> >> >>
> >> >> Gary
> >> >>
> >> >> >
> >> >> > > Gary
> >> >> > >
> >> >> > > --
> >> >> > > E-Mail: [hidden email] | [hidden email]
> >> >> > > Java Persistence with Hibernate, Second Edition
> >> >> > > <https://www.amazon.com/gp/product/1617290459/ref=as_li_
> >> >> > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&
> >> >> > linkCode=as2&tag=garygregory-20&linkId=
> cadb800f39946ec62ea2b1af9fe6a2
> >> b8>
> >> >> > >
> >> >> > > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> >> garygregory-20&l=am2&o=1&a=
> >> >> > 1617290459>
> >> >> > > JUnit in Action, Second Edition
> >> >> > > <https://www.amazon.com/gp/product/1935182021/ref=as_li_
> >> >> > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&
> >> >> > linkCode=as2&tag=garygregory-20&linkId=
> 31ecd1f6b6d1eaf8886ac902a24de4
> >> >> 18%22
> >> >> > >
> >> >> > >
> >> >> > > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> >> garygregory-20&l=am2&o=1&a=
> >> >> > 1935182021>
> >> >> > > Spring Batch in Action
> >> >> > > <https://www.amazon.com/gp/product/1935182951/ref=as_li_
> >> >> > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&
> >> >> > linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%
> >> >> > 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
> >> >> > > <http:////ir-na.amazon-adsystem.com/e/ir?t=
> >> garygregory-20&l=am2&o=1&a=
> >> >> > 1935182951>
> >> >> > > Blog: http://garygregory.wordpress.com
> >> >> > > Home: http://garygregory.com/
> >> >> > > Tweet! http://twitter.com/GaryGregory
> >> >> >
> >> >> > ------------------------------------------------------------
> ---------
> >> >> > To unsubscribe, e-mail: [hidden email]
> >> >> > For additional commands, e-mail: [hidden email]
> >> >> >
> >> >> >
> >> >>
> >> >>
> >> >> --
> >> >> E-Mail: [hidden email] | [hidden email]
> >> >> Java Persistence with Hibernate, Second Edition
> >> >> <https://www.amazon.com/gp/product/1617290459/ref=as_li_
> >> >> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&
> >> >> linkCode=as2&tag=garygregory-20&linkId=
> cadb800f39946ec62ea2b1af9fe6a2
> >> b8>
> >> >>
> >> >> <http:////ir-na.amazon-adsystem.com/e/ir?t=
> garygregory-20&l=am2&o=1&a=
> >> >> 1617290459>
> >> >> JUnit in Action, Second Edition
> >> >> <https://www.amazon.com/gp/product/1935182021/ref=as_li_
> >> >> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&
> >> >> linkCode=as2&tag=garygregory-20&linkId=
> 31ecd1f6b6d1eaf8886ac902a24de4
> >> 18%22
> >> >> >
> >> >>
> >> >> <http:////ir-na.amazon-adsystem.com/e/ir?t=
> garygregory-20&l=am2&o=1&a=
> >> >> 1935182021>
> >> >> Spring Batch in Action
> >> >> <https://www.amazon.com/gp/product/1935182951/ref=as_li_
> >> >> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&
> >> >> linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%
> >> >> 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
> >> >> <http:////ir-na.amazon-adsystem.com/e/ir?t=
> garygregory-20&l=am2&o=1&a=
> >> >> 1935182951>
> >> >> Blog: http://garygregory.wordpress.com
> >> >> Home: http://garygregory.com/
> >> >> Tweet! http://twitter.com/GaryGregory
> >> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: [hidden email]
> >> For additional commands, e-mail: [hidden email]
> >>
> >>
> >
> >
> > --
> > E-Mail: [hidden email] | [hidden email]
> > Java Persistence with Hibernate, Second Edition
> > <https://www.amazon.com/gp/product/1617290459/ref=as_li_
> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&
> linkCode=as2&tag=garygregory-20&linkId=cadb800f39946ec62ea2b1af9fe6a2b8>
> >
> > <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
> 1617290459>
> > JUnit in Action, Second Edition
> > <https://www.amazon.com/gp/product/1935182021/ref=as_li_
> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&
> linkCode=as2&tag=garygregory-20&linkId=31ecd1f6b6d1eaf8886ac902a24de418%22
> >
> >
> > <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
> 1935182021>
> > Spring Batch in Action
> > <https://www.amazon.com/gp/product/1935182951/ref=as_li_
> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&
> linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%
> 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
> > <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
> 1935182951>
> > Blog: http://garygregory.wordpress.com
> > Home: http://garygregory.com/
> > Tweet! http://twitter.com/GaryGregory
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>


--
E-Mail: [hidden email] | [hidden email]
Java Persistence with Hibernate, Second Edition
<https://www.amazon.com/gp/product/1617290459/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&linkCode=as2&tag=garygregory-20&linkId=cadb800f39946ec62ea2b1af9fe6a2b8>

<http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1617290459>
JUnit in Action, Second Edition
<https://www.amazon.com/gp/product/1935182021/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&linkCode=as2&tag=garygregory-20&linkId=31ecd1f6b6d1eaf8886ac902a24de418%22>

<http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1935182021>
Spring Batch in Action
<https://www.amazon.com/gp/product/1935182951/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
<http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1935182951>
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory
Reply | Threaded
Open this post in threaded view
|

Re: [crypto] package access on ivars?

Stian Soiland-Reyes
Agree to change them to private. If there are particular fields that
are always needed by a subclass, then it should be exposed as a
protected method.  (The class is then later free to make those on
demand)

On 8 November 2016 at 09:43, Gary Gregory <[hidden email]> wrote:

> On Tue, Nov 8, 2016 at 1:40 AM, sebb <[hidden email]> wrote:
>
>> On 8 November 2016 at 09:30, Gary Gregory <[hidden email]> wrote:
>> > On Tue, Nov 8, 2016 at 1:19 AM, sebb <[hidden email]> wrote:
>> >
>> >> On 8 November 2016 at 07:34, Stian Soiland-Reyes <[hidden email]>
>> wrote:
>> >> > I don't think binary compatibility should include package level
>> access,
>> >> as
>> >> > long as that package is only used within a single Commons JAR, then we
>> >> are
>> >> > free to change those, at least in a new minor release. (I would say
>> even
>> >> > patch level unless serialisation is used).
>> >> >
>> >> > In particular, package level access means "don't touch" - it is of
>> course
>> >> > possible to break into it by compiling into "our" package, but I don't
>> >> see
>> >> > that as much different than introspection that changes access
>> modifiers
>> >> and
>> >> > is not something we should support.
>> >> >
>> >> > So I would say we can fix it and release it as a new minor version.
>> >>
>> >> +1
>> >>
>> >
>> > Sounds good. FTR: https://issues.apache.org/jira/browse/CRYPTO-129
>>
>> Why allow changing package-private to protected?
>>
>> That is a retrograde step.
>>
>> If the code works without exposing the variables as protected, then
>> keep it like that otherwise we cannot change implementation later.
>>
>> IMO the main reason for using p-p access is allowing access outside a
>> class but without affecting the external API.
>>
>> Only constants should be part of the public/protected API, and even
>> those should be carefully considered.
>>
>
> I initially mentioned in this thread making the ivars private. A reply was
> made that protected was possible or desired for some ivars. The title of
> the ticket reflects and respects the two views. If it were up to me I would
> make them all private.
>
> Gary
>
>
>> > Gary
>> >
>> >
>> >>
>> >> > On 8 Nov 2016 12:15 am, "Gary Gregory" <[hidden email]>
>> wrote:
>> >> >
>> >> >> On Mon, Nov 7, 2016 at 4:11 PM, sebb <[hidden email]> wrote:
>> >> >>
>> >> >> > On 6 November 2016 at 19:56, Gary Gregory <[hidden email]>
>> >> >> wrote:
>> >> >> > > Hi all,
>> >> >> > >
>> >> >> > > I see ivars left at the package access level. This must be an
>> >> >> oversight,
>> >> >> > > right?
>> >> >> > >
>> >> >> > > We can only fix that in 2.0 and a new package. What a bummer!
>> >> >> >
>> >> >> > I'm not sure I understand.
>> >> >> > Why would making package-protected fields private affect
>> >> compatibility?
>> >> >> >
>> >> >>
>> >> >> As a user, I can add a class to a [crypto] package and access the
>> ivars.
>> >> >> Then when change the access level, my code will no longer compile. If
>> >> we do
>> >> >> not define BC like that due to a class living in a package it really
>> >> has no
>> >> >> business being in, then I'm OK with it.
>> >> >>
>> >> >> Gary
>> >> >>
>> >> >> >
>> >> >> > > Gary
>> >> >> > >
>> >> >> > > --
>> >> >> > > E-Mail: [hidden email] | [hidden email]
>> >> >> > > Java Persistence with Hibernate, Second Edition
>> >> >> > > <https://www.amazon.com/gp/product/1617290459/ref=as_li_
>> >> >> > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&
>> >> >> > linkCode=as2&tag=garygregory-20&linkId=
>> cadb800f39946ec62ea2b1af9fe6a2
>> >> b8>
>> >> >> > >
>> >> >> > > <http:////ir-na.amazon-adsystem.com/e/ir?t=
>> >> garygregory-20&l=am2&o=1&a=
>> >> >> > 1617290459>
>> >> >> > > JUnit in Action, Second Edition
>> >> >> > > <https://www.amazon.com/gp/product/1935182021/ref=as_li_
>> >> >> > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&
>> >> >> > linkCode=as2&tag=garygregory-20&linkId=
>> 31ecd1f6b6d1eaf8886ac902a24de4
>> >> >> 18%22
>> >> >> > >
>> >> >> > >
>> >> >> > > <http:////ir-na.amazon-adsystem.com/e/ir?t=
>> >> garygregory-20&l=am2&o=1&a=
>> >> >> > 1935182021>
>> >> >> > > Spring Batch in Action
>> >> >> > > <https://www.amazon.com/gp/product/1935182951/ref=as_li_
>> >> >> > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&
>> >> >> > linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%
>> >> >> > 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
>> >> >> > > <http:////ir-na.amazon-adsystem.com/e/ir?t=
>> >> garygregory-20&l=am2&o=1&a=
>> >> >> > 1935182951>
>> >> >> > > Blog: http://garygregory.wordpress.com
>> >> >> > > Home: http://garygregory.com/
>> >> >> > > Tweet! http://twitter.com/GaryGregory
>> >> >> >
>> >> >> > ------------------------------------------------------------
>> ---------
>> >> >> > To unsubscribe, e-mail: [hidden email]
>> >> >> > For additional commands, e-mail: [hidden email]
>> >> >> >
>> >> >> >
>> >> >>
>> >> >>
>> >> >> --
>> >> >> E-Mail: [hidden email] | [hidden email]
>> >> >> Java Persistence with Hibernate, Second Edition
>> >> >> <https://www.amazon.com/gp/product/1617290459/ref=as_li_
>> >> >> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&
>> >> >> linkCode=as2&tag=garygregory-20&linkId=
>> cadb800f39946ec62ea2b1af9fe6a2
>> >> b8>
>> >> >>
>> >> >> <http:////ir-na.amazon-adsystem.com/e/ir?t=
>> garygregory-20&l=am2&o=1&a=
>> >> >> 1617290459>
>> >> >> JUnit in Action, Second Edition
>> >> >> <https://www.amazon.com/gp/product/1935182021/ref=as_li_
>> >> >> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&
>> >> >> linkCode=as2&tag=garygregory-20&linkId=
>> 31ecd1f6b6d1eaf8886ac902a24de4
>> >> 18%22
>> >> >> >
>> >> >>
>> >> >> <http:////ir-na.amazon-adsystem.com/e/ir?t=
>> garygregory-20&l=am2&o=1&a=
>> >> >> 1935182021>
>> >> >> Spring Batch in Action
>> >> >> <https://www.amazon.com/gp/product/1935182951/ref=as_li_
>> >> >> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&
>> >> >> linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%
>> >> >> 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
>> >> >> <http:////ir-na.amazon-adsystem.com/e/ir?t=
>> garygregory-20&l=am2&o=1&a=
>> >> >> 1935182951>
>> >> >> Blog: http://garygregory.wordpress.com
>> >> >> Home: http://garygregory.com/
>> >> >> Tweet! http://twitter.com/GaryGregory
>> >> >>
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: [hidden email]
>> >> For additional commands, e-mail: [hidden email]
>> >>
>> >>
>> >
>> >
>> > --
>> > E-Mail: [hidden email] | [hidden email]
>> > Java Persistence with Hibernate, Second Edition
>> > <https://www.amazon.com/gp/product/1617290459/ref=as_li_
>> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&
>> linkCode=as2&tag=garygregory-20&linkId=cadb800f39946ec62ea2b1af9fe6a2b8>
>> >
>> > <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
>> 1617290459>
>> > JUnit in Action, Second Edition
>> > <https://www.amazon.com/gp/product/1935182021/ref=as_li_
>> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&
>> linkCode=as2&tag=garygregory-20&linkId=31ecd1f6b6d1eaf8886ac902a24de418%22
>> >
>> >
>> > <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
>> 1935182021>
>> > Spring Batch in Action
>> > <https://www.amazon.com/gp/product/1935182951/ref=as_li_
>> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&
>> linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%
>> 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
>> > <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
>> 1935182951>
>> > Blog: http://garygregory.wordpress.com
>> > Home: http://garygregory.com/
>> > Tweet! http://twitter.com/GaryGregory
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [hidden email]
>> For additional commands, e-mail: [hidden email]
>>
>>
>
>
> --
> E-Mail: [hidden email] | [hidden email]
> Java Persistence with Hibernate, Second Edition
> <https://www.amazon.com/gp/product/1617290459/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&linkCode=as2&tag=garygregory-20&linkId=cadb800f39946ec62ea2b1af9fe6a2b8>
>
> <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1617290459>
> JUnit in Action, Second Edition
> <https://www.amazon.com/gp/product/1935182021/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&linkCode=as2&tag=garygregory-20&linkId=31ecd1f6b6d1eaf8886ac902a24de418%22>
>
> <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1935182021>
> Spring Batch in Action
> <https://www.amazon.com/gp/product/1935182951/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
> <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1935182951>
> Blog: http://garygregory.wordpress.com
> Home: http://garygregory.com/
> Tweet! http://twitter.com/GaryGregory



--
Stian Soiland-Reyes
http://orcid.org/0000-0001-9842-9718

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: [crypto] package access on ivars?

sebb-2-2
For vars that need to be accessed only within the package, there is
the choice of package-protected variable or p-p getter/setter.

The latter is simpler, and is my preference.

The problem with methods is that in theory they are easier to deal
with when maintaining API compat.
Protected and public fields are obvious potential issues and in theory
one can easily report on them; this is not the same for methods.
So less attention may be (is) paid to them. And they may be promoted
to protected or public with not much thought of the consequences.

However methods that are inadvertently exposed may not be easy to maintain.
For example if the method relates to a field that has changed type or usage.

On 8 November 2016 at 09:58, Stian Soiland-Reyes <[hidden email]> wrote:

> Agree to change them to private. If there are particular fields that
> are always needed by a subclass, then it should be exposed as a
> protected method.  (The class is then later free to make those on
> demand)
>
> On 8 November 2016 at 09:43, Gary Gregory <[hidden email]> wrote:
>> On Tue, Nov 8, 2016 at 1:40 AM, sebb <[hidden email]> wrote:
>>
>>> On 8 November 2016 at 09:30, Gary Gregory <[hidden email]> wrote:
>>> > On Tue, Nov 8, 2016 at 1:19 AM, sebb <[hidden email]> wrote:
>>> >
>>> >> On 8 November 2016 at 07:34, Stian Soiland-Reyes <[hidden email]>
>>> wrote:
>>> >> > I don't think binary compatibility should include package level
>>> access,
>>> >> as
>>> >> > long as that package is only used within a single Commons JAR, then we
>>> >> are
>>> >> > free to change those, at least in a new minor release. (I would say
>>> even
>>> >> > patch level unless serialisation is used).
>>> >> >
>>> >> > In particular, package level access means "don't touch" - it is of
>>> course
>>> >> > possible to break into it by compiling into "our" package, but I don't
>>> >> see
>>> >> > that as much different than introspection that changes access
>>> modifiers
>>> >> and
>>> >> > is not something we should support.
>>> >> >
>>> >> > So I would say we can fix it and release it as a new minor version.
>>> >>
>>> >> +1
>>> >>
>>> >
>>> > Sounds good. FTR: https://issues.apache.org/jira/browse/CRYPTO-129
>>>
>>> Why allow changing package-private to protected?
>>>
>>> That is a retrograde step.
>>>
>>> If the code works without exposing the variables as protected, then
>>> keep it like that otherwise we cannot change implementation later.
>>>
>>> IMO the main reason for using p-p access is allowing access outside a
>>> class but without affecting the external API.
>>>
>>> Only constants should be part of the public/protected API, and even
>>> those should be carefully considered.
>>>
>>
>> I initially mentioned in this thread making the ivars private. A reply was
>> made that protected was possible or desired for some ivars. The title of
>> the ticket reflects and respects the two views. If it were up to me I would
>> make them all private.
>>
>> Gary
>>
>>
>>> > Gary
>>> >
>>> >
>>> >>
>>> >> > On 8 Nov 2016 12:15 am, "Gary Gregory" <[hidden email]>
>>> wrote:
>>> >> >
>>> >> >> On Mon, Nov 7, 2016 at 4:11 PM, sebb <[hidden email]> wrote:
>>> >> >>
>>> >> >> > On 6 November 2016 at 19:56, Gary Gregory <[hidden email]>
>>> >> >> wrote:
>>> >> >> > > Hi all,
>>> >> >> > >
>>> >> >> > > I see ivars left at the package access level. This must be an
>>> >> >> oversight,
>>> >> >> > > right?
>>> >> >> > >
>>> >> >> > > We can only fix that in 2.0 and a new package. What a bummer!
>>> >> >> >
>>> >> >> > I'm not sure I understand.
>>> >> >> > Why would making package-protected fields private affect
>>> >> compatibility?
>>> >> >> >
>>> >> >>
>>> >> >> As a user, I can add a class to a [crypto] package and access the
>>> ivars.
>>> >> >> Then when change the access level, my code will no longer compile. If
>>> >> we do
>>> >> >> not define BC like that due to a class living in a package it really
>>> >> has no
>>> >> >> business being in, then I'm OK with it.
>>> >> >>
>>> >> >> Gary
>>> >> >>
>>> >> >> >
>>> >> >> > > Gary
>>> >> >> > >
>>> >> >> > > --
>>> >> >> > > E-Mail: [hidden email] | [hidden email]
>>> >> >> > > Java Persistence with Hibernate, Second Edition
>>> >> >> > > <https://www.amazon.com/gp/product/1617290459/ref=as_li_
>>> >> >> > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&
>>> >> >> > linkCode=as2&tag=garygregory-20&linkId=
>>> cadb800f39946ec62ea2b1af9fe6a2
>>> >> b8>
>>> >> >> > >
>>> >> >> > > <http:////ir-na.amazon-adsystem.com/e/ir?t=
>>> >> garygregory-20&l=am2&o=1&a=
>>> >> >> > 1617290459>
>>> >> >> > > JUnit in Action, Second Edition
>>> >> >> > > <https://www.amazon.com/gp/product/1935182021/ref=as_li_
>>> >> >> > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&
>>> >> >> > linkCode=as2&tag=garygregory-20&linkId=
>>> 31ecd1f6b6d1eaf8886ac902a24de4
>>> >> >> 18%22
>>> >> >> > >
>>> >> >> > >
>>> >> >> > > <http:////ir-na.amazon-adsystem.com/e/ir?t=
>>> >> garygregory-20&l=am2&o=1&a=
>>> >> >> > 1935182021>
>>> >> >> > > Spring Batch in Action
>>> >> >> > > <https://www.amazon.com/gp/product/1935182951/ref=as_li_
>>> >> >> > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&
>>> >> >> > linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%
>>> >> >> > 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
>>> >> >> > > <http:////ir-na.amazon-adsystem.com/e/ir?t=
>>> >> garygregory-20&l=am2&o=1&a=
>>> >> >> > 1935182951>
>>> >> >> > > Blog: http://garygregory.wordpress.com
>>> >> >> > > Home: http://garygregory.com/
>>> >> >> > > Tweet! http://twitter.com/GaryGregory
>>> >> >> >
>>> >> >> > ------------------------------------------------------------
>>> ---------
>>> >> >> > To unsubscribe, e-mail: [hidden email]
>>> >> >> > For additional commands, e-mail: [hidden email]
>>> >> >> >
>>> >> >> >
>>> >> >>
>>> >> >>
>>> >> >> --
>>> >> >> E-Mail: [hidden email] | [hidden email]
>>> >> >> Java Persistence with Hibernate, Second Edition
>>> >> >> <https://www.amazon.com/gp/product/1617290459/ref=as_li_
>>> >> >> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&
>>> >> >> linkCode=as2&tag=garygregory-20&linkId=
>>> cadb800f39946ec62ea2b1af9fe6a2
>>> >> b8>
>>> >> >>
>>> >> >> <http:////ir-na.amazon-adsystem.com/e/ir?t=
>>> garygregory-20&l=am2&o=1&a=
>>> >> >> 1617290459>
>>> >> >> JUnit in Action, Second Edition
>>> >> >> <https://www.amazon.com/gp/product/1935182021/ref=as_li_
>>> >> >> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&
>>> >> >> linkCode=as2&tag=garygregory-20&linkId=
>>> 31ecd1f6b6d1eaf8886ac902a24de4
>>> >> 18%22
>>> >> >> >
>>> >> >>
>>> >> >> <http:////ir-na.amazon-adsystem.com/e/ir?t=
>>> garygregory-20&l=am2&o=1&a=
>>> >> >> 1935182021>
>>> >> >> Spring Batch in Action
>>> >> >> <https://www.amazon.com/gp/product/1935182951/ref=as_li_
>>> >> >> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&
>>> >> >> linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%
>>> >> >> 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
>>> >> >> <http:////ir-na.amazon-adsystem.com/e/ir?t=
>>> garygregory-20&l=am2&o=1&a=
>>> >> >> 1935182951>
>>> >> >> Blog: http://garygregory.wordpress.com
>>> >> >> Home: http://garygregory.com/
>>> >> >> Tweet! http://twitter.com/GaryGregory
>>> >> >>
>>> >>
>>> >> ---------------------------------------------------------------------
>>> >> To unsubscribe, e-mail: [hidden email]
>>> >> For additional commands, e-mail: [hidden email]
>>> >>
>>> >>
>>> >
>>> >
>>> > --
>>> > E-Mail: [hidden email] | [hidden email]
>>> > Java Persistence with Hibernate, Second Edition
>>> > <https://www.amazon.com/gp/product/1617290459/ref=as_li_
>>> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&
>>> linkCode=as2&tag=garygregory-20&linkId=cadb800f39946ec62ea2b1af9fe6a2b8>
>>> >
>>> > <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
>>> 1617290459>
>>> > JUnit in Action, Second Edition
>>> > <https://www.amazon.com/gp/product/1935182021/ref=as_li_
>>> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&
>>> linkCode=as2&tag=garygregory-20&linkId=31ecd1f6b6d1eaf8886ac902a24de418%22
>>> >
>>> >
>>> > <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
>>> 1935182021>
>>> > Spring Batch in Action
>>> > <https://www.amazon.com/gp/product/1935182951/ref=as_li_
>>> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&
>>> linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%
>>> 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
>>> > <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
>>> 1935182951>
>>> > Blog: http://garygregory.wordpress.com
>>> > Home: http://garygregory.com/
>>> > Tweet! http://twitter.com/GaryGregory
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: [hidden email]
>>> For additional commands, e-mail: [hidden email]
>>>
>>>
>>
>>
>> --
>> E-Mail: [hidden email] | [hidden email]
>> Java Persistence with Hibernate, Second Edition
>> <https://www.amazon.com/gp/product/1617290459/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&linkCode=as2&tag=garygregory-20&linkId=cadb800f39946ec62ea2b1af9fe6a2b8>
>>
>> <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1617290459>
>> JUnit in Action, Second Edition
>> <https://www.amazon.com/gp/product/1935182021/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&linkCode=as2&tag=garygregory-20&linkId=31ecd1f6b6d1eaf8886ac902a24de418%22>
>>
>> <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1935182021>
>> Spring Batch in Action
>> <https://www.amazon.com/gp/product/1935182951/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
>> <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1935182951>
>> Blog: http://garygregory.wordpress.com
>> Home: http://garygregory.com/
>> Tweet! http://twitter.com/GaryGregory
>
>
>
> --
> Stian Soiland-Reyes
> http://orcid.org/0000-0001-9842-9718
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]