[validator] DomainValidator instance thread-safe?

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

[validator] DomainValidator instance thread-safe?

Cyril
Hello,
I am interested by using a few validator routines such as the
DomainValidator (package org.apache.commons.validator.routines). However,
looking at the javadoc, I cannot find information about thread-safety in
the description.

Is DomainValidator#getInstance() and resulting DomainValidator instance
thread-safe?

Thank you.

Regards,
Cyril
Reply | Threaded
Open this post in threaded view
|

Re: [validator] DomainValidator instance thread-safe?

Benedikt Ritter-4
Hello Cyrill,

2015-05-01 17:44 GMT+02:00 Cyril <[hidden email]>:

> Hello,
> I am interested by using a few validator routines such as the
> DomainValidator (package org.apache.commons.validator.routines). However,
> looking at the javadoc, I cannot find information about thread-safety in
> the description.
>
> Is DomainValidator#getInstance() and resulting DomainValidator instance
> thread-safe?
>

I've looked through the code of DomainValidator. It is immutable so
instances can be shared between threads. I've also created VALIDATOR-366
[1] for documenting this for all validators.

Thank you!
Benedikt

[1] https://issues.apache.org/jira/browse/VALIDATOR-366


>
> Thank you.
>
> Regards,
> Cyril
>



--
http://people.apache.org/~britter/
http://www.systemoutprintln.de/
http://twitter.com/BenediktRitter
http://github.com/britter
Reply | Threaded
Open this post in threaded view
|

Re: [validator] DomainValidator instance thread-safe?

Bruno P. Kinoshita
Had just looked through its code and was about to do the same :)
Looks immutable and thread-safe to me too, though I just quickly inspected with vim. Going to read it again in Eclipse later and watch VALIDATOR-366.

Thanks
Bruno
 
      From: Benedikt Ritter <[hidden email]>
 To: Commons Users List <[hidden email]>
 Sent: Saturday, May 2, 2015 10:51 AM
 Subject: Re: [validator] DomainValidator instance thread-safe?
   
Hello Cyrill,

2015-05-01 17:44 GMT+02:00 Cyril <[hidden email]>:

> Hello,
> I am interested by using a few validator routines such as the
> DomainValidator (package org.apache.commons.validator.routines). However,
> looking at the javadoc, I cannot find information about thread-safety in
> the description.
>
> Is DomainValidator#getInstance() and resulting DomainValidator instance
> thread-safe?
>

I've looked through the code of DomainValidator. It is immutable so
instances can be shared between threads. I've also created VALIDATOR-366
[1] for documenting this for all validators.

Thank you!
Benedikt

[1] https://issues.apache.org/jira/browse/VALIDATOR-366




>
> Thank you.
>
> Regards,
> Cyril
>



--
http://people.apache.org/~britter/
http://www.systemoutprintln.de/
http://twitter.com/BenediktRitter
http://github.com/britter


   
 
Reply | Threaded
Open this post in threaded view
|

Re: [validator] DomainValidator instance thread-safe?

Cyril
Hello,
thanks for looking into it. I added my vote for VALIDATOR-366 and watching.

Regards,
Cyril

On Sat, May 2, 2015 at 1:01 AM, Bruno P. Kinoshita <
[hidden email]> wrote:

> Had just looked through its code and was about to do the same :)
> Looks immutable and thread-safe to me too, though I just quickly inspected
> with vim. Going to read it again in Eclipse later and watch VALIDATOR-366.
>
> Thanks
> Bruno
>
>       From: Benedikt Ritter <[hidden email]>
>  To: Commons Users List <[hidden email]>
>  Sent: Saturday, May 2, 2015 10:51 AM
>  Subject: Re: [validator] DomainValidator instance thread-safe?
>
> Hello Cyrill,
>
> 2015-05-01 17:44 GMT+02:00 Cyril <[hidden email]>:
>
> > Hello,
> > I am interested by using a few validator routines such as the
> > DomainValidator (package org.apache.commons.validator.routines). However,
> > looking at the javadoc, I cannot find information about thread-safety in
> > the description.
> >
> > Is DomainValidator#getInstance() and resulting DomainValidator instance
> > thread-safe?
> >
>
> I've looked through the code of DomainValidator. It is immutable so
> instances can be shared between threads. I've also created VALIDATOR-366
> [1] for documenting this for all validators.
>
> Thank you!
> Benedikt
>
> [1] https://issues.apache.org/jira/browse/VALIDATOR-366
>
>
>
>
> >
> > Thank you.
> >
> > Regards,
> > Cyril
> >
>
>
>
> --
> http://people.apache.org/~britter/
> http://www.systemoutprintln.de/
> http://twitter.com/BenediktRitter
> http://github.com/britter
>
>
>
>
>