zookeeper 1.2.9-java → 1.2.10-java

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/CHANGELOG CHANGED
@@ -1,3 +1,7 @@
1
+ v1.2.10 minor bug fix in java code
2
+
3
+ * Don't obscure a legitimate exception because of an unexpected nil
4
+
1
5
  v1.2.7 further lock adjustments, deadlock risk reduction
2
6
 
3
7
  * Refactor ZookeeperBase to not hold onto the mutex while waiting
data/java/java_base.rb CHANGED
@@ -443,7 +443,7 @@ class JavaBase
443
443
  # this is a no-op in java-land
444
444
  end
445
445
 
446
- protected
446
+ private
447
447
  def jzk
448
448
  @mutex.synchronize { @jzk }
449
449
  end
@@ -451,9 +451,14 @@ class JavaBase
451
451
  def handle_keeper_exception
452
452
  yield
453
453
  rescue JZK::KeeperException => e
454
- e.cause.code.intValue
454
+ if e.respond_to?(:cause) and e.cause and e.cause.respond_to?(:code) and e.cause.code and e.cause.code.respond_to?(:intValue)
455
+ e.cause.code.intValue
456
+ else
457
+ raise e # dunno what happened, just raise it
458
+ end
455
459
  end
456
460
 
461
+
457
462
  def call_type(callback, watcher)
458
463
  if callback
459
464
  watcher ? :async_watch : :async
@@ -481,7 +486,6 @@ class JavaBase
481
486
  }
482
487
  end
483
488
 
484
- private
485
489
  def replace_jzk!
486
490
  orig_jzk = @jzk
487
491
  @jzk = JZK::ZooKeeper.new(@host, DEFAULT_SESSION_TIMEOUT, JavaCB::WatcherCallback.new(event_queue, :client => self))
@@ -1,4 +1,4 @@
1
1
  module Zookeeper
2
- VERSION = '1.2.9'
2
+ VERSION = '1.2.10'
3
3
  DRIVER_VERSION = '3.3.5'
4
4
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zookeeper
3
3
  version: !ruby/object:Gem::Version
4
- hash: 13
4
+ hash: 11
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 2
9
- - 9
10
- version: 1.2.9
9
+ - 10
10
+ version: 1.2.10
11
11
  platform: java
12
12
  authors:
13
13
  - Phillip Pearson
@@ -20,7 +20,7 @@ autorequire:
20
20
  bindir: bin
21
21
  cert_chain: []
22
22
 
23
- date: 2012-06-11 00:00:00 Z
23
+ date: 2012-07-02 00:00:00 Z
24
24
  dependencies:
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: backports