]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/rocksdb/java/src/main/java/org/rocksdb/MutableOptionValue.java
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / rocksdb / java / src / main / java / org / rocksdb / MutableOptionValue.java
index 8ec63269f8610ef975b1f650b4b4dbca9631c9ce..7f69eeb9ea2a18b37a147ae92f7011c810e72786 100644 (file)
@@ -17,7 +17,7 @@ public abstract class MutableOptionValue<T> {
       extends MutableOptionValue<T> {
     protected final T value;
 
-    private MutableOptionValueObject(final T value) {
+    protected MutableOptionValueObject(final T value) {
       this.value = value;
     }
 
@@ -153,10 +153,6 @@ public abstract class MutableOptionValue<T> {
 
     @Override
     double asDouble() {
-      if(value > Double.MAX_VALUE || value < Double.MIN_VALUE) {
-        throw new NumberFormatException(
-            "long value lies outside the bounds of int");
-      }
       return Long.valueOf(value).doubleValue();
     }
 
@@ -210,9 +206,6 @@ public abstract class MutableOptionValue<T> {
 
     @Override
     double asDouble() {
-      if(value > Double.MAX_VALUE || value < Double.MIN_VALUE) {
-        throw new NumberFormatException("int value lies outside the bounds of int");
-      }
       return Integer.valueOf(value).doubleValue();
     }
 
@@ -326,7 +319,7 @@ public abstract class MutableOptionValue<T> {
     String asString() {
       final StringBuilder builder = new StringBuilder();
       for(int i = 0; i < value.length; i++) {
-        builder.append(i);
+        builder.append(value[i]);
         if(i + 1 < value.length) {
           builder.append(INT_ARRAY_INT_SEPARATOR);
         }