summaryrefslogtreecommitdiff
path: root/lang/java/src/com/sleepycat/util
diff options
context:
space:
mode:
Diffstat (limited to 'lang/java/src/com/sleepycat/util')
-rw-r--r--lang/java/src/com/sleepycat/util/ClassResolver.java2
-rw-r--r--lang/java/src/com/sleepycat/util/ConfigBeanInfoBase.java72
-rw-r--r--lang/java/src/com/sleepycat/util/ErrorBuffer.java2
-rw-r--r--lang/java/src/com/sleepycat/util/ExceptionUnwrapper.java2
-rw-r--r--lang/java/src/com/sleepycat/util/ExceptionWrapper.java2
-rw-r--r--lang/java/src/com/sleepycat/util/FastInputStream.java2
-rw-r--r--lang/java/src/com/sleepycat/util/FastOutputStream.java2
-rw-r--r--lang/java/src/com/sleepycat/util/IOExceptionWrapper.java2
-rw-r--r--lang/java/src/com/sleepycat/util/PackedInteger.java18
-rw-r--r--lang/java/src/com/sleepycat/util/RuntimeExceptionWrapper.java2
-rw-r--r--lang/java/src/com/sleepycat/util/UtfOps.java2
-rw-r--r--lang/java/src/com/sleepycat/util/keyrange/KeyRange.java2
-rw-r--r--lang/java/src/com/sleepycat/util/keyrange/KeyRangeException.java2
-rw-r--r--lang/java/src/com/sleepycat/util/keyrange/RangeCursor.java2
14 files changed, 57 insertions, 57 deletions
diff --git a/lang/java/src/com/sleepycat/util/ClassResolver.java b/lang/java/src/com/sleepycat/util/ClassResolver.java
index 2438557f..35f27765 100644
--- a/lang/java/src/com/sleepycat/util/ClassResolver.java
+++ b/lang/java/src/com/sleepycat/util/ClassResolver.java
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2000, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2015 Oracle and/or its affiliates. All rights reserved.
*
*/
diff --git a/lang/java/src/com/sleepycat/util/ConfigBeanInfoBase.java b/lang/java/src/com/sleepycat/util/ConfigBeanInfoBase.java
index 0b5128bf..e51389e7 100644
--- a/lang/java/src/com/sleepycat/util/ConfigBeanInfoBase.java
+++ b/lang/java/src/com/sleepycat/util/ConfigBeanInfoBase.java
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2002, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015 Oracle and/or its affiliates. All rights reserved.
*
*/
@@ -17,33 +17,33 @@ import java.util.ArrayList;
/*
* If someone add a property in some FooConfig.java,
- * (1) If the setter/getter methods are setFoo/getFoo, the name of the
+ * (1) If the setter/getter methods are setFoo/getFoo, the name of the
* property should be "foo", which means the first letter of the property
* name should be lower case.
- * (2) The setter method for this property setProperty should return "this",
+ * (2) The setter method for this property setProperty should return "this",
* and setPropertyVoid method which returns void value must be added.
- * The return type of the getter method should be the same as the
+ * The return type of the getter method should be the same as the
* parameter of the setter method.
- * (3) The setter method and getter method must be added into
+ * (3) The setter method and getter method must be added into
* FooConfigBeanInfo;
- * (4) If for some of the setter methods in the FooConfig.java, setterVoid
- * methods are not necessary, then add the name of such setter methods
- * into the ArrayList ignoreMethods within the corresponding
- * FooConfigBeanInfo.getPropertyDescriptors method. For example,
- * setMaxSeedTestHook method in DiskOrderedCursorConfig.java is only used
- * for unit tests, so "setMaxSeedTestHook" is added into ignoreMethods
+ * (4) If for some of the setter methods in the FooConfig.java, setterVoid
+ * methods are not necessary, then add the name of such setter methods
+ * into the ArrayList ignoreMethods within the corresponding
+ * FooConfigBeanInfo.getPropertyDescriptors method. For example,
+ * setMaxSeedTestHook method in DiskOrderedCursorConfig.java is only used
+ * for unit tests, so "setMaxSeedTestHook" is added into ignoreMethods
* list within DiskOrderedCursorConfigBeanInfo.getPropertyDescriptors.
- *
+ *
*
* If someone adds a new FooConfig.java,
* (1) The definition of setter/getter mehods and the names of the properties
- * should follow the rules described above.
+ * should follow the rules described above.
* (2) There must be FooConfigBeanInfo.java. You can write it according to
* the current beaninfo classes.
- * (3) "PackagePath.FooConfig" must be added into the unit test:
+ * (3) "PackagePath.FooConfig" must be added into the unit test:
* com.sleepycat.db.ConfigBeanInfoTest.
*
- * If someond remove an existing FooConfig.java, then "PackagePath.FooConfig"
+ * If someond remove an existing FooConfig.java, then "PackagePath.FooConfig"
* must be deleted in the unit test com.sleepycat.db.ConfigBeanInfoTest.
*/
public class ConfigBeanInfoBase extends SimpleBeanInfo {
@@ -58,22 +58,22 @@ public class ConfigBeanInfoBase extends SimpleBeanInfo {
private static final int defaultPropertyIndex = -1;
private static final int defaultEventIndex = -1;
-
+
protected static ArrayList<String> propertiesName = new ArrayList<String>();
- protected static ArrayList<String>
+ protected static ArrayList<String>
getterAndSetterMethods = new ArrayList<String>();
-
+
protected static ArrayList<String> ignoreMethods = new ArrayList<String>();
-
- /*
- * Get the propertis' infomation, including all the properties's names
+
+ /*
+ * Get the propertis' infomation, including all the properties's names
* and their getter/setter methods.
*/
- protected static void getPropertiesInfo(Class cls) {
+ protected static void getPropertiesInfo(Class cls) {
propertiesName.clear();
getterAndSetterMethods.clear();
try {
-
+
/* Get all of the public methods. */
ArrayList<String> allMethodNames = new ArrayList<String>();
Method[] methods = cls.getMethods();
@@ -83,7 +83,7 @@ public class ConfigBeanInfoBase extends SimpleBeanInfo {
for (int i = 0; i < allMethodNames.size(); i++) {
String name = allMethodNames.get(i);
String subName = name.substring(0, 3);
-
+
/* If it is a setter method. */
if (subName.equals("set")) {
if (isIgnoreMethods(name)) {
@@ -96,18 +96,18 @@ public class ConfigBeanInfoBase extends SimpleBeanInfo {
} catch (NoSuchMethodException e) {
getterMethod = null;
}
- if (getterMethod != null) {
+ if (getterMethod != null) {
getterAndSetterMethods.add("get" + propertyName);
getterAndSetterMethods.add(name + "Void");
-
- /*
- * Add the real property name into propertiesName.
- * if the names of setter/getter methods are
- * setFoo/getFoo, the name of the property should be
+
+ /*
+ * Add the real property name into propertiesName.
+ * if the names of setter/getter methods are
+ * setFoo/getFoo, the name of the property should be
* "foo".
*/
propertiesName.add
- (propertyName.substring(0, 1).toLowerCase() +
+ (propertyName.substring(0, 1).toLowerCase() +
propertyName.substring(1));
}
}
@@ -116,7 +116,7 @@ public class ConfigBeanInfoBase extends SimpleBeanInfo {
e.printStackTrace();
}
}
-
+
private static boolean isIgnoreMethods(String methodName) {
for (int i = 0; i < ignoreMethods.size(); i++) {
if (ignoreMethods.get(i).equals(methodName)) {
@@ -125,16 +125,16 @@ public class ConfigBeanInfoBase extends SimpleBeanInfo {
}
return false;
}
-
+
protected static PropertyDescriptor[] getPdescriptor(Class cls) {
getPropertiesInfo(cls);
final int propertyNum = propertiesName.size();
assert propertyNum * 2 == getterAndSetterMethods.size();
- PropertyDescriptor[] properties = new PropertyDescriptor[propertyNum];
+ PropertyDescriptor[] properties = new PropertyDescriptor[propertyNum];
try {
for (int i = 0, j = 0; i < propertyNum; i += 1, j += 2) {
properties[i] = new PropertyDescriptor
- (propertiesName.get(i), cls, getterAndSetterMethods.get(j),
+ (propertiesName.get(i), cls, getterAndSetterMethods.get(j),
getterAndSetterMethods.get(j + 1));
}
} catch(IntrospectionException e) {
@@ -142,7 +142,7 @@ public class ConfigBeanInfoBase extends SimpleBeanInfo {
}
return properties;
}
-
+
protected static BeanDescriptor getBdescriptor(Class cls) {
BeanDescriptor beanDescriptor = new BeanDescriptor(cls, null);
return beanDescriptor;
diff --git a/lang/java/src/com/sleepycat/util/ErrorBuffer.java b/lang/java/src/com/sleepycat/util/ErrorBuffer.java
index 82757c80..1d10672a 100644
--- a/lang/java/src/com/sleepycat/util/ErrorBuffer.java
+++ b/lang/java/src/com/sleepycat/util/ErrorBuffer.java
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2008, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id: ErrorBuffer.java,v 0f73af5ae3da 2010/05/10 05:38:40 alexander $
*/
diff --git a/lang/java/src/com/sleepycat/util/ExceptionUnwrapper.java b/lang/java/src/com/sleepycat/util/ExceptionUnwrapper.java
index f8a0204d..aaccc383 100644
--- a/lang/java/src/com/sleepycat/util/ExceptionUnwrapper.java
+++ b/lang/java/src/com/sleepycat/util/ExceptionUnwrapper.java
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2000, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2015 Oracle and/or its affiliates. All rights reserved.
*
*/
diff --git a/lang/java/src/com/sleepycat/util/ExceptionWrapper.java b/lang/java/src/com/sleepycat/util/ExceptionWrapper.java
index 689dc3b7..ac3f63ce 100644
--- a/lang/java/src/com/sleepycat/util/ExceptionWrapper.java
+++ b/lang/java/src/com/sleepycat/util/ExceptionWrapper.java
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2000, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2015 Oracle and/or its affiliates. All rights reserved.
*
*/
diff --git a/lang/java/src/com/sleepycat/util/FastInputStream.java b/lang/java/src/com/sleepycat/util/FastInputStream.java
index 86e7fac4..1bacba58 100644
--- a/lang/java/src/com/sleepycat/util/FastInputStream.java
+++ b/lang/java/src/com/sleepycat/util/FastInputStream.java
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2000, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2015 Oracle and/or its affiliates. All rights reserved.
*
*/
diff --git a/lang/java/src/com/sleepycat/util/FastOutputStream.java b/lang/java/src/com/sleepycat/util/FastOutputStream.java
index 4983c41c..e922e547 100644
--- a/lang/java/src/com/sleepycat/util/FastOutputStream.java
+++ b/lang/java/src/com/sleepycat/util/FastOutputStream.java
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2000, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2015 Oracle and/or its affiliates. All rights reserved.
*
*/
diff --git a/lang/java/src/com/sleepycat/util/IOExceptionWrapper.java b/lang/java/src/com/sleepycat/util/IOExceptionWrapper.java
index 8a1502d1..20b97c7a 100644
--- a/lang/java/src/com/sleepycat/util/IOExceptionWrapper.java
+++ b/lang/java/src/com/sleepycat/util/IOExceptionWrapper.java
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2000, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2015 Oracle and/or its affiliates. All rights reserved.
*
*/
diff --git a/lang/java/src/com/sleepycat/util/PackedInteger.java b/lang/java/src/com/sleepycat/util/PackedInteger.java
index 1614b664..baff10f2 100644
--- a/lang/java/src/com/sleepycat/util/PackedInteger.java
+++ b/lang/java/src/com/sleepycat/util/PackedInteger.java
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2000, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2015 Oracle and/or its affiliates. All rights reserved.
*
*/
@@ -602,15 +602,15 @@ public class PackedInteger {
/*
* valueLen is the length of the value part stored in buf. Because
- * the first byte of buf is used to stored the length, so we need
- * to minus one.
+ * the first byte of buf is used to stored the length, we need
+ * to subtract one.
*/
int valueLen = offset - byte1Off - 1;
/*
* The first byte stores the number of additional bytes. Here we
* store the result of 0x08 - valueLen, rather than directly store
- * valueLen. The reason is to implement nature sort order for
+ * valueLen. The reason is to implement natural sort order for
* byte-by-byte comparison.
*/
buf[byte1Off] = (byte) (0x08 - valueLen);
@@ -618,7 +618,7 @@ public class PackedInteger {
/*
* If the value > 120, then first adjust the value by subtracting
- * 119. Then the adjusted value is stored as an unsigned big endian
+ * 121. Then the adjusted value is stored as an unsigned big endian
* integer.
*/
value -= 121;
@@ -647,15 +647,15 @@ public class PackedInteger {
/*
* valueLen is the length of the value part stored in buf. Because
- * the first byte of buf is used to stored the length, so we need
- * to minus one.
+ * the first byte of buf is used to stored the length, we need to
+ * subtract one.
*/
int valueLen = offset - byte1Off - 1;
/*
* The first byte stores the number of additional bytes. Here we
* store the result of 0xF7 + valueLen, rather than directly store
- * valueLen. The reason is to implement nature sort order for
+ * valueLen. The reason is to implement natural sort order for
* byte-by-byte comparison.
*/
buf[byte1Off] = (byte) (0xF7 + valueLen);
@@ -663,7 +663,7 @@ public class PackedInteger {
/*
* If -119 <= value <= 120, only one byte is needed to store the
- * value. The stored value is the original value adds 127.
+ * value. The stored value is the original value plus 127.
*/
buf[byte1Off] = (byte) (value + 127);
}
diff --git a/lang/java/src/com/sleepycat/util/RuntimeExceptionWrapper.java b/lang/java/src/com/sleepycat/util/RuntimeExceptionWrapper.java
index 27078728..9b18bab1 100644
--- a/lang/java/src/com/sleepycat/util/RuntimeExceptionWrapper.java
+++ b/lang/java/src/com/sleepycat/util/RuntimeExceptionWrapper.java
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2000, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2015 Oracle and/or its affiliates. All rights reserved.
*
*/
diff --git a/lang/java/src/com/sleepycat/util/UtfOps.java b/lang/java/src/com/sleepycat/util/UtfOps.java
index 033f8904..6c50aec2 100644
--- a/lang/java/src/com/sleepycat/util/UtfOps.java
+++ b/lang/java/src/com/sleepycat/util/UtfOps.java
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2000, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2015 Oracle and/or its affiliates. All rights reserved.
*
*/
diff --git a/lang/java/src/com/sleepycat/util/keyrange/KeyRange.java b/lang/java/src/com/sleepycat/util/keyrange/KeyRange.java
index e2f368ad..8e835873 100644
--- a/lang/java/src/com/sleepycat/util/keyrange/KeyRange.java
+++ b/lang/java/src/com/sleepycat/util/keyrange/KeyRange.java
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2002, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015 Oracle and/or its affiliates. All rights reserved.
*
*/
diff --git a/lang/java/src/com/sleepycat/util/keyrange/KeyRangeException.java b/lang/java/src/com/sleepycat/util/keyrange/KeyRangeException.java
index 767dcfdb..22711011 100644
--- a/lang/java/src/com/sleepycat/util/keyrange/KeyRangeException.java
+++ b/lang/java/src/com/sleepycat/util/keyrange/KeyRangeException.java
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2000, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2015 Oracle and/or its affiliates. All rights reserved.
*
*/
diff --git a/lang/java/src/com/sleepycat/util/keyrange/RangeCursor.java b/lang/java/src/com/sleepycat/util/keyrange/RangeCursor.java
index facc46ba..981d3bbc 100644
--- a/lang/java/src/com/sleepycat/util/keyrange/RangeCursor.java
+++ b/lang/java/src/com/sleepycat/util/keyrange/RangeCursor.java
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2002, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015 Oracle and/or its affiliates. All rights reserved.
*
*/