Checkstyle cleanup for hibernate packages

I have no problem with using a tryLock/unlock; but I would expect them to
be in the same method.


On Wed, Jun 18, 2014 at 7:26 PM, Christoph Engelbert <
notifications@github.com> wrote:

> In
> hazelcast-hibernate/hazelcast-hibernate4/src/main/java/com/hazelcast/hibernate/distributed/IMapRegionCache.java:
>
> > @@ -174,4 +154,31 @@ private ILogger createLogger(final String name, final HazelcastInstance hazelcas
> >          }
> >      }
> >
> > +    private boolean compareVersion(Object key, Object value) {
> > +        final CacheEntry currentEntry = (CacheEntry) value;
> > +        try {
> > +            if (map.tryLock(key, tryLockAndGetTimeout, TimeUnit.MILLISECONDS)) {
>
> How would you do it? I don't like the tryLock design because it always
> forces you to do weird constructs with if / multiple try/catch/finally
> blocks
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/hazelcast/hazelcast/pull/2753/files#r13924741>.
>