You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by dk...@apache.org on 2012/01/04 17:33:31 UTC
svn commit: r1227213 - in /camel/branches/camel-2.8.x: ./
camel-core/src/main/java/org/apache/camel/util/
Author: dkulp
Date: Wed Jan 4 16:33:31 2012
New Revision: 1227213
URL: http://svn.apache.org/viewvc?rev=1227213&view=rev
Log:
Merged revisions 1222526 via svnmerge from
https://svn.apache.org/repos/asf/camel/branches/camel-2.9.x
........
r1222526 | ningjiang | 2011-12-22 20:22:39 -0500 (Thu, 22 Dec 2011) | 1 line
CAMEL-4820 Applied the Javadoc patch of org.apache.camel.util package with thanks to Glen
........
Modified:
camel/branches/camel-2.8.x/ (props changed)
camel/branches/camel-2.8.x/camel-core/src/main/java/org/apache/camel/util/ExpressionComparator.java
camel/branches/camel-2.8.x/camel-core/src/main/java/org/apache/camel/util/LRUSoftCache.java
camel/branches/camel-2.8.x/camel-core/src/main/java/org/apache/camel/util/ObjectHelper.java
camel/branches/camel-2.8.x/camel-core/src/main/java/org/apache/camel/util/OgnlHelper.java
camel/branches/camel-2.8.x/camel-core/src/main/java/org/apache/camel/util/PackageHelper.java
camel/branches/camel-2.8.x/camel-core/src/main/java/org/apache/camel/util/PredicateAssertHelper.java
camel/branches/camel-2.8.x/camel-core/src/main/java/org/apache/camel/util/package.html
Propchange: camel/branches/camel-2.8.x/
('svn:mergeinfo' removed)
Propchange: camel/branches/camel-2.8.x/
------------------------------------------------------------------------------
Binary property 'svnmerge-blocked' - no diff available.
Propchange: camel/branches/camel-2.8.x/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.
Modified: camel/branches/camel-2.8.x/camel-core/src/main/java/org/apache/camel/util/ExpressionComparator.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.8.x/camel-core/src/main/java/org/apache/camel/util/ExpressionComparator.java?rev=1227213&r1=1227212&r2=1227213&view=diff
==============================================================================
--- camel/branches/camel-2.8.x/camel-core/src/main/java/org/apache/camel/util/ExpressionComparator.java (original)
+++ camel/branches/camel-2.8.x/camel-core/src/main/java/org/apache/camel/util/ExpressionComparator.java Wed Jan 4 16:33:31 2012
@@ -22,8 +22,8 @@ import org.apache.camel.Exchange;
import org.apache.camel.Expression;
/**
- * An implementation of {@link Comparator} which takes an {@link Expression} which is evaluated
- * on each exchange to compare
+ * An implementation of {@link Comparator} that takes an {@link Expression} which is evaluated
+ * on each exchange to be compared
*
* @version
*/
Modified: camel/branches/camel-2.8.x/camel-core/src/main/java/org/apache/camel/util/LRUSoftCache.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.8.x/camel-core/src/main/java/org/apache/camel/util/LRUSoftCache.java?rev=1227213&r1=1227212&r2=1227213&view=diff
==============================================================================
--- camel/branches/camel-2.8.x/camel-core/src/main/java/org/apache/camel/util/LRUSoftCache.java (original)
+++ camel/branches/camel-2.8.x/camel-core/src/main/java/org/apache/camel/util/LRUSoftCache.java Wed Jan 4 16:33:31 2012
@@ -27,7 +27,7 @@ import java.util.Set;
* A Least Recently Used Cache which uses {@link SoftReference}.
* <p/>
* This implementation uses {@link java.lang.ref.SoftReference} for stored values in the cache, to support the JVM
- * when it wants to reclaim objects when its running out of memory. Therefore this implementation does
+ * when it wants to reclaim objects when it's running out of memory. Therefore this implementation does
* not support <b>all</b> the {@link java.util.Map} methods.
* <p/>
* The following methods is <b>only</b> be be used:
Modified: camel/branches/camel-2.8.x/camel-core/src/main/java/org/apache/camel/util/ObjectHelper.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.8.x/camel-core/src/main/java/org/apache/camel/util/ObjectHelper.java?rev=1227213&r1=1227212&r2=1227213&view=diff
==============================================================================
--- camel/branches/camel-2.8.x/camel-core/src/main/java/org/apache/camel/util/ObjectHelper.java (original)
+++ camel/branches/camel-2.8.x/camel-core/src/main/java/org/apache/camel/util/ObjectHelper.java Wed Jan 4 16:33:31 2012
@@ -67,9 +67,9 @@ public final class ObjectHelper {
}
/**
- * A helper method for comparing objects for equality in which it uses type coerce to coerce
- * types between the left and right values. This allows you to equal test eg String and Integer as
- * Camel will be able to coerce the types.
+ * A helper method for comparing objects for equality in which it uses type coercion to coerce
+ * types between the left and right values. This allows you test for equality for example with
+ * a String and Integer type as Camel will be able to coerce the types.
*/
public static boolean typeCoerceEquals(TypeConverter converter, Object leftValue, Object rightValue) {
// sanity check
@@ -106,18 +106,18 @@ public final class ObjectHelper {
}
/**
- * A helper method for comparing objects for equality in which it uses type coerce to coerce
- * types between the left and right values. This allows you to equal test eg String and Integer as
- * Camel will be able to coerce the types
+ * A helper method for comparing objects for inequality in which it uses type coercion to coerce
+ * types between the left and right values. This allows you test for inequality for example with
+ * a String and Integer type as Camel will be able to coerce the types.
*/
public static boolean typeCoerceNotEquals(TypeConverter converter, Object leftValue, Object rightValue) {
return !typeCoerceEquals(converter, leftValue, rightValue);
}
/**
- * A helper method for comparing objects ordering in which it uses type coerce to coerce
- * types between the left and right values. This allows you to equal test eg String and Integer as
- * Camel will be able to coerce the types
+ * A helper method for comparing objects ordering in which it uses type coercion to coerce
+ * types between the left and right values. This allows you test for ordering for example with
+ * a String and Integer type as Camel will be able to coerce the types.
*/
@SuppressWarnings({"unchecked", "rawtypes"})
public static int typeCoerceCompare(TypeConverter converter, Object leftValue, Object rightValue) {
@@ -1181,7 +1181,7 @@ public final class ObjectHelper {
}
/**
- * Cleans the string to pure java identifier so we can use it for loading class names.
+ * Cleans the string to a pure Java identifier so we can use it for loading class names.
* <p/>
* Especially from Spring DSL people can have \n \t or other characters that otherwise
* would result in ClassNotFoundException
Modified: camel/branches/camel-2.8.x/camel-core/src/main/java/org/apache/camel/util/OgnlHelper.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.8.x/camel-core/src/main/java/org/apache/camel/util/OgnlHelper.java?rev=1227213&r1=1227212&r2=1227213&view=diff
==============================================================================
--- camel/branches/camel-2.8.x/camel-core/src/main/java/org/apache/camel/util/OgnlHelper.java (original)
+++ camel/branches/camel-2.8.x/camel-core/src/main/java/org/apache/camel/util/OgnlHelper.java Wed Jan 4 16:33:31 2012
@@ -22,7 +22,7 @@ import java.util.regex.Matcher;
import java.util.regex.Pattern;
/**
- * Helper for Camel OGNL expressions.
+ * Helper for Camel OGNL (Object-Graph Navigation Language) expressions.
*
* @version
*/
@@ -36,17 +36,17 @@ public final class OgnlHelper {
/**
* Tests whether or not the given String is a Camel OGNL expression.
* <p/>
- * Its consider Camel OGNL expression when it contains either one of the following chars: . or [
+ * An expression is considered an OGNL expression when it contains either one of the following chars: . or [
*
* @param expression the String
- * @return <tt>true</tt> if Camel OGNL expression, otherwise <tt>false</tt>.
+ * @return <tt>true</tt> if a Camel OGNL expression, otherwise <tt>false</tt>.
*/
public static boolean isValidOgnlExpression(String expression) {
if (ObjectHelper.isEmpty(expression)) {
return false;
}
- // the brackets should come in pair
+ // the brackets should come in a pair
int bracketBegin = StringHelper.countChar(expression, '[');
int bracketEnd = StringHelper.countChar(expression, ']');
if (bracketBegin > 0 && bracketEnd > 0) {
@@ -81,10 +81,10 @@ public final class OgnlHelper {
}
/**
- * Tests whether or not the given Camel OGNL expression is using the elvis operator or not.
+ * Tests whether or not the given Camel OGNL expression is using the Elvis operator or not.
*
* @param ognlExpression the Camel OGNL expression
- * @return <tt>true</tt> if the elvis operator is used, otherwise <tt>false</tt>.
+ * @return <tt>true</tt> if the Elvis operator is used, otherwise <tt>false</tt>.
*/
public static boolean isNullSafeOperator(String ognlExpression) {
if (ObjectHelper.isEmpty(ognlExpression)) {
@@ -163,7 +163,7 @@ public final class OgnlHelper {
/**
* Regular expression with repeating groups is a pain to get right
* and then nobody understands the reg exp afterwards.
- * So use a bit ugly/low-level java code to split the ognl into methods.
+ * So we use a bit ugly/low-level Java code to split the OGNL into methods.
*/
public static List<String> splitOgnl(String ognl) {
List<String> methods = new ArrayList<String>();
Modified: camel/branches/camel-2.8.x/camel-core/src/main/java/org/apache/camel/util/PackageHelper.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.8.x/camel-core/src/main/java/org/apache/camel/util/PackageHelper.java?rev=1227213&r1=1227212&r2=1227213&view=diff
==============================================================================
--- camel/branches/camel-2.8.x/camel-core/src/main/java/org/apache/camel/util/PackageHelper.java (original)
+++ camel/branches/camel-2.8.x/camel-core/src/main/java/org/apache/camel/util/PackageHelper.java Wed Jan 4 16:33:31 2012
@@ -34,12 +34,12 @@ public final class PackageHelper {
/**
* Returns true if the version number of the given package name can be found and is greater than or equal to the minimum version.
*
- * For package names which include multiple dots, the dots are removed. So for example a spring version of 2.5.1 is converted to
- * 2.51 so you can assert that its >= 2.51 (so above 2.50 and less than 2.52 etc).
+ * For package names which include multiple dots, dots after the leftmost are removed. So for example a spring version of 2.5.1
+ * is converted to 2.51 so you can assert that it's >= 2.51 (so above 2.50 and less than 2.52 etc).
*
* @param packageName the Java package name to compare
* @param minimumVersion the minimum version number
- * @return true if the package name can be determined and if its greater than or equal to the minimum value
+ * @return true if the package name can be determined and if it's greater than or equal to the minimum value
*/
public static boolean isValidVersion(String packageName, double minimumVersion) {
try {
@@ -65,13 +65,13 @@ public final class PackageHelper {
double number = Double.parseDouble(value);
return number >= minimumVersion;
} else {
- LOG.debug("Failed to find out version from package: " + packageName);
+ LOG.debug("Could not determine version of package: " + packageName);
}
}
}
} catch (Exception e) {
if (LOG.isDebugEnabled()) {
- LOG.debug("Failed to find out version from package: " + packageName, e);
+ LOG.debug("Could not determine version of package: " + packageName, e);
}
}
Modified: camel/branches/camel-2.8.x/camel-core/src/main/java/org/apache/camel/util/PredicateAssertHelper.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.8.x/camel-core/src/main/java/org/apache/camel/util/PredicateAssertHelper.java?rev=1227213&r1=1227212&r2=1227213&view=diff
==============================================================================
--- camel/branches/camel-2.8.x/camel-core/src/main/java/org/apache/camel/util/PredicateAssertHelper.java (original)
+++ camel/branches/camel-2.8.x/camel-core/src/main/java/org/apache/camel/util/PredicateAssertHelper.java Wed Jan 4 16:33:31 2012
@@ -36,7 +36,7 @@ public final class PredicateAssertHelper
ObjectHelper.notNull(exchange, "exchange");
if (predicate instanceof BinaryPredicate) {
- // special for binary evaluable as we can get more detailed information
+ // with binary evaluations as we can get more detailed information
BinaryPredicate eval = (BinaryPredicate) predicate;
String evalText = eval.matchesReturningFailureMessage(exchange);
if (evalText != null) {
Modified: camel/branches/camel-2.8.x/camel-core/src/main/java/org/apache/camel/util/package.html
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.8.x/camel-core/src/main/java/org/apache/camel/util/package.html?rev=1227213&r1=1227212&r2=1227213&view=diff
==============================================================================
--- camel/branches/camel-2.8.x/camel-core/src/main/java/org/apache/camel/util/package.html (original)
+++ camel/branches/camel-2.8.x/camel-core/src/main/java/org/apache/camel/util/package.html Wed Jan 4 16:33:31 2012
@@ -19,7 +19,7 @@
</head>
<body>
-Utility classes used by the core of Camel and useful for Camel component developers
+Utility classes used by the core of Camel. Also useful for Camel component developers.
</body>
</html>