http://git-wip-us.apache.org/repos/asf/commons-lang/blob/1da8ccdb/src/main/java/org/apache/commons/lang3/builder/EqualsBuilder.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/lang3/builder/EqualsBuilder.java b/src/main/java/org/apache/commons/lang3/builder/EqualsBuilder.java index aa7fb06..a07ea27 100644 --- a/src/main/java/org/apache/commons/lang3/builder/EqualsBuilder.java +++ b/src/main/java/org/apache/commons/lang3/builder/EqualsBuilder.java @@ -69,7 +69,7 @@ import org.apache.commons.lang3.tuple.Pair; * <code>reflectionEquals</code>, uses <code>AccessibleObject.setAccessible</code> to * change the visibility of the fields. This will fail under a security * manager, unless the appropriate permissions are set up correctly. It is - * also slower than testing explicitly. Non-primitive fields are compared using + * also slower than testing explicitly. Non-primitive fields are compared using * <code>equals()</code>.</p> * * <p> A typical invocation for this method would look like:</p> @@ -78,7 +78,7 @@ import org.apache.commons.lang3.tuple.Pair; * return EqualsBuilder.reflectionEquals(this, obj); * } * </pre> - * + * * <p>The {@link EqualsExclude} annotation can be used to exclude fields from being * used by the <code>reflectionEquals</code> methods.</p> * @@ -271,7 +271,7 @@ public class EqualsBuilder implements Builder<Boolean> { this.excludeFields = excludeFields; return this; } - + /** * <p>This method uses reflection to determine if the two <code>Object</code>s @@ -280,9 +280,9 @@ public class EqualsBuilder implements Builder<Boolean> { * <p>It uses <code>AccessibleObject.setAccessible</code> to gain access to private * fields. This means that it will throw a security exception if run under * a security manager, if the permissions are not set up correctly. It is also - * not as efficient as testing explicitly. Non-primitive fields are compared using + * not as efficient as testing explicitly. Non-primitive fields are compared using * <code>equals()</code>.</p> - * + * * <p>Transient members will be not be tested, as they are likely derived * fields, and not part of the value of the Object.</p> * @@ -292,7 +292,7 @@ public class EqualsBuilder implements Builder<Boolean> { * @param rhs the other object * @param excludeFields Collection of String field names to exclude from testing * @return <code>true</code> if the two Objects have tested equals. - * + * * @see EqualsExclude */ public static boolean reflectionEquals(final Object lhs, final Object rhs, final Collection<String> excludeFields) { @@ -306,7 +306,7 @@ public class EqualsBuilder implements Builder<Boolean> { * <p>It uses <code>AccessibleObject.setAccessible</code> to gain access to private * fields. This means that it will throw a security exception if run under * a security manager, if the permissions are not set up correctly. It is also - * not as efficient as testing explicitly. Non-primitive fields are compared using + * not as efficient as testing explicitly. Non-primitive fields are compared using * <code>equals()</code>.</p> * * <p>Transient members will be not be tested, as they are likely derived @@ -318,7 +318,7 @@ public class EqualsBuilder implements Builder<Boolean> { * @param rhs the other object * @param excludeFields array of field names to exclude from testing * @return <code>true</code> if the two Objects have tested equals. - * + * * @see EqualsExclude */ public static boolean reflectionEquals(final Object lhs, final Object rhs, final String... excludeFields) { @@ -332,7 +332,7 @@ public class EqualsBuilder implements Builder<Boolean> { * <p>It uses <code>AccessibleObject.setAccessible</code> to gain access to private * fields. This means that it will throw a security exception if run under * a security manager, if the permissions are not set up correctly. It is also - * not as efficient as testing explicitly. Non-primitive fields are compared using + * not as efficient as testing explicitly. Non-primitive fields are compared using * <code>equals()</code>.</p> * * <p>If the TestTransients parameter is set to <code>true</code>, transient @@ -345,7 +345,7 @@ public class EqualsBuilder implements Builder<Boolean> { * @param rhs the other object * @param testTransients whether to include transient fields * @return <code>true</code> if the two Objects have tested equals. - * + * * @see EqualsExclude */ public static boolean reflectionEquals(final Object lhs, final Object rhs, final boolean testTransients) { @@ -359,7 +359,7 @@ public class EqualsBuilder implements Builder<Boolean> { * <p>It uses <code>AccessibleObject.setAccessible</code> to gain access to private * fields. This means that it will throw a security exception if run under * a security manager, if the permissions are not set up correctly. It is also - * not as efficient as testing explicitly. Non-primitive fields are compared using + * not as efficient as testing explicitly. Non-primitive fields are compared using * <code>equals()</code>.</p> * * <p>If the testTransients parameter is set to <code>true</code>, transient @@ -377,7 +377,7 @@ public class EqualsBuilder implements Builder<Boolean> { * may be <code>null</code> * @param excludeFields array of field names to exclude from testing * @return <code>true</code> if the two Objects have tested equals. - * + * * @see EqualsExclude * @since 2.0 */ @@ -385,7 +385,7 @@ public class EqualsBuilder implements Builder<Boolean> { final String... excludeFields) { return reflectionEquals(lhs, rhs, testTransients, reflectUpToClass, false, excludeFields); } - + /** * <p>This method uses reflection to determine if the two <code>Object</code>s * are equal.</p> @@ -403,10 +403,10 @@ public class EqualsBuilder implements Builder<Boolean> { * <p>Static fields will not be included. Superclass fields will be appended * up to and including the specified superclass. A null superclass is treated * as java.lang.Object.</p> - * + * * <p>If the testRecursive parameter is set to <code>true</code>, non primitive - * (and non primitive wrapper) field types will be compared by - * <code>EqualsBuilder</code> recursively instead of invoking their + * (and non primitive wrapper) field types will be compared by + * <code>EqualsBuilder</code> recursively instead of invoking their * <code>equals()</code> method. Leading to a deep reflection equals test. * * @param lhs <code>this</code> object @@ -415,10 +415,10 @@ public class EqualsBuilder implements Builder<Boolean> { * @param reflectUpToClass the superclass to reflect up to (inclusive), * may be <code>null</code> * @param testRecursive whether to call reflection equals on non primitive - * fields recursively. + * fields recursively. * @param excludeFields array of field names to exclude from testing * @return <code>true</code> if the two Objects have tested equals. - * + * * @see EqualsExclude * @since 3.6 */ @@ -438,16 +438,16 @@ public class EqualsBuilder implements Builder<Boolean> { .reflectionAppend(lhs, rhs) .isEquals(); } - + /** * <p>Tests if two <code>objects</code> by using reflection.</p> - * + * * <p>It uses <code>AccessibleObject.setAccessible</code> to gain access to private * fields. This means that it will throw a security exception if run under * a security manager, if the permissions are not set up correctly. It is also - * not as efficient as testing explicitly. Non-primitive fields are compared using + * not as efficient as testing explicitly. Non-primitive fields are compared using * <code>equals()</code>.</p> - * + * * <p>If the testTransients field is set to <code>true</code>, transient * members will be tested, otherwise they are ignored, as they are likely * derived fields, and not part of the value of the <code>Object</code>.</p> @@ -455,9 +455,9 @@ public class EqualsBuilder implements Builder<Boolean> { * <p>Static fields will not be included. Superclass fields will be appended * up to and including the specified superclass in field <code>reflectUpToClass</code>. * A null superclass is treated as java.lang.Object.</p> - * + * * <p>Field names listed in field <code>excludeFields</code> will be ignored.</p> - * + * * @param lhs the left hand object * @param rhs the left hand object * @return EqualsBuilder - used to chain calls. @@ -583,10 +583,10 @@ public class EqualsBuilder implements Builder<Boolean> { //------------------------------------------------------------------------- /** - * <p>Test if two <code>Object</code>s are equal using either + * <p>Test if two <code>Object</code>s are equal using either * #{@link #reflectionAppend(Object, Object)}, if object are non - * primitives (or wrapper of primitives) or if field <code>testRecursive</code> - * is set to <code>false</code>. Otherwise, using their + * primitives (or wrapper of primitives) or if field <code>testRecursive</code> + * is set to <code>false</code>. Otherwise, using their * <code>equals</code> method.</p> * * @param lhs the left hand object @@ -794,7 +794,7 @@ public class EqualsBuilder implements Builder<Boolean> { * * <p>This also will be called for the top level of * multi-dimensional, ragged, and multi-typed arrays.</p> - * + * * <p>Note that this method does not compare the type of the arrays; it only * compares the contents.</p> *
http://git-wip-us.apache.org/repos/asf/commons-lang/blob/1da8ccdb/src/main/java/org/apache/commons/lang3/builder/HashCodeBuilder.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/lang3/builder/HashCodeBuilder.java b/src/main/java/org/apache/commons/lang3/builder/HashCodeBuilder.java index d68e36b..1c2d722 100644 --- a/src/main/java/org/apache/commons/lang3/builder/HashCodeBuilder.java +++ b/src/main/java/org/apache/commons/lang3/builder/HashCodeBuilder.java @@ -94,7 +94,7 @@ import org.apache.commons.lang3.Validate; * return HashCodeBuilder.reflectionHashCode(this); * } * </pre> - * + * * <p>The {@link HashCodeExclude} annotation can be used to exclude fields from being * used by the <code>reflectionHashCode</code> methods.</p> * @@ -105,12 +105,12 @@ public class HashCodeBuilder implements Builder<Integer> { * The default initial value to use in reflection hash code building. */ private static final int DEFAULT_INITIAL_VALUE = 17; - + /** * The default multiplier value to use in reflection hash code building. */ private static final int DEFAULT_MULTIPLIER_VALUE = 37; - + /** * <p> * A registry of objects used by reflection methods to detect cyclical object references and avoid infinite loops. @@ -401,7 +401,7 @@ public class HashCodeBuilder implements Builder<Integer> { * @see HashCodeExclude */ public static int reflectionHashCode(final Object object, final boolean testTransients) { - return reflectionHashCode(DEFAULT_INITIAL_VALUE, DEFAULT_MULTIPLIER_VALUE, object, + return reflectionHashCode(DEFAULT_INITIAL_VALUE, DEFAULT_MULTIPLIER_VALUE, object, testTransients, null); } @@ -482,7 +482,7 @@ public class HashCodeBuilder implements Builder<Integer> { * @see HashCodeExclude */ public static int reflectionHashCode(final Object object, final String... excludeFields) { - return reflectionHashCode(DEFAULT_INITIAL_VALUE, DEFAULT_MULTIPLIER_VALUE, object, false, + return reflectionHashCode(DEFAULT_INITIAL_VALUE, DEFAULT_MULTIPLIER_VALUE, object, false, null, excludeFields); } http://git-wip-us.apache.org/repos/asf/commons-lang/blob/1da8ccdb/src/main/java/org/apache/commons/lang3/builder/IDKey.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/lang3/builder/IDKey.java b/src/main/java/org/apache/commons/lang3/builder/IDKey.java index b66cdb8..8eab0ea 100644 --- a/src/main/java/org/apache/commons/lang3/builder/IDKey.java +++ b/src/main/java/org/apache/commons/lang3/builder/IDKey.java @@ -20,12 +20,12 @@ package org.apache.commons.lang3.builder; // adapted from org.apache.axis.utils.IDKey /** - * Wrap an identity key (System.identityHashCode()) + * Wrap an identity key (System.identityHashCode()) * so that an object can only be equal() to itself. - * + * * This is necessary to disambiguate the occasional duplicate * identityHashCodes that can occur. - */ + */ final class IDKey { private final Object value; private final int id; @@ -33,12 +33,12 @@ final class IDKey { /** * Constructor for IDKey * @param _value The value - */ + */ public IDKey(final Object _value) { - // This is the Object hash code - id = System.identityHashCode(_value); - // There have been some cases (LANG-459) that return the - // same identity hash code for different objects. So + // This is the Object hash code + id = System.identityHashCode(_value); + // There have been some cases (LANG-459) that return the + // same identity hash code for different objects. So // the value is also added to disambiguate these cases. value = _value; } @@ -46,7 +46,7 @@ final class IDKey { /** * returns hash code - i.e. the system identity hashcode. * @return the hashcode - */ + */ @Override public int hashCode() { return id; @@ -56,7 +56,7 @@ final class IDKey { * checks if instances are equal * @param other The other object to compare to * @return if the instances are for the same object - */ + */ @Override public boolean equals(final Object other) { if (!(other instanceof IDKey)) { http://git-wip-us.apache.org/repos/asf/commons-lang/blob/1da8ccdb/src/main/java/org/apache/commons/lang3/builder/MultilineRecursiveToStringStyle.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/lang3/builder/MultilineRecursiveToStringStyle.java b/src/main/java/org/apache/commons/lang3/builder/MultilineRecursiveToStringStyle.java index 7c0375a..cf89675 100644 --- a/src/main/java/org/apache/commons/lang3/builder/MultilineRecursiveToStringStyle.java +++ b/src/main/java/org/apache/commons/lang3/builder/MultilineRecursiveToStringStyle.java @@ -5,9 +5,9 @@ * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -21,9 +21,9 @@ import org.apache.commons.lang3.ClassUtils; /** * <p>Works with {@link ToStringBuilder} to create a "deep" <code>toString</code>. - * But instead a single line like the {@link RecursiveToStringStyle} this creates a multiline String + * But instead a single line like the {@link RecursiveToStringStyle} this creates a multiline String * similar to the {@link ToStringStyle#MULTI_LINE_STYLE}.</p> - * + * * <p>To use this class write code as follows:</p> * * <pre> @@ -31,15 +31,15 @@ import org.apache.commons.lang3.ClassUtils; * String title; * ... * } - * + * * public class Person { * String name; * int age; * boolean smoker; * Job job; - * + * * ... - * + * * public String toString() { * return new ReflectionToStringBuilder(this, new MultilineRecursiveToStringStyle()).toString(); * } @@ -58,7 +58,7 @@ import org.apache.commons.lang3.ClassUtils; * ] * </code> * </p> - * + * * @since 3.4 */ public class MultilineRecursiveToStringStyle extends RecursiveToStringStyle { @@ -84,7 +84,7 @@ public class MultilineRecursiveToStringStyle extends RecursiveToStringStyle { } /** - * Resets the fields responsible for the line breaks and indenting. + * Resets the fields responsible for the line breaks and indenting. * Must be invoked after changing the {@link #spaces} value. */ private void resetIndent() { @@ -99,7 +99,7 @@ public class MultilineRecursiveToStringStyle extends RecursiveToStringStyle { /** * Creates a StringBuilder responsible for the indenting. - * + * * @param spaces how far to indent * @return a StringBuilder with {spaces} leading space characters. */ @@ -142,7 +142,7 @@ public class MultilineRecursiveToStringStyle extends RecursiveToStringStyle { spaces -= INDENT; resetIndent(); } - + @Override protected void appendDetail(final StringBuffer buffer, final String fieldName, final long[] array) { spaces += INDENT; http://git-wip-us.apache.org/repos/asf/commons-lang/blob/1da8ccdb/src/main/java/org/apache/commons/lang3/builder/RecursiveToStringStyle.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/lang3/builder/RecursiveToStringStyle.java b/src/main/java/org/apache/commons/lang3/builder/RecursiveToStringStyle.java index b39e9ea..aa5dd71 100644 --- a/src/main/java/org/apache/commons/lang3/builder/RecursiveToStringStyle.java +++ b/src/main/java/org/apache/commons/lang3/builder/RecursiveToStringStyle.java @@ -30,7 +30,7 @@ import org.apache.commons.lang3.ClassUtils; * String title; * ... * } - * + * * public class Person { * String name; * int age; @@ -47,14 +47,14 @@ import org.apache.commons.lang3.ClassUtils; * * <p>This will produce a toString of the format: * <code>Person@7f54[name=Stephen,age=29,smoker=false,job=Job@43cd2[title=Manager]]</code></p> - * + * * @since 3.2 */ public class RecursiveToStringStyle extends ToStringStyle { /** * Required for serialization support. - * + * * @see java.io.Serializable */ private static final long serialVersionUID = 1L; @@ -83,7 +83,7 @@ public class RecursiveToStringStyle extends ToStringStyle { appendIdentityHashCode(buffer, coll); appendDetail(buffer, fieldName, coll.toArray()); } - + /** * Returns whether or not to recursively format the given <code>Class</code>. * By default, this method always returns {@code true}, but may be overwritten by http://git-wip-us.apache.org/repos/asf/commons-lang/blob/1da8ccdb/src/main/java/org/apache/commons/lang3/builder/ReflectionDiffBuilder.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/lang3/builder/ReflectionDiffBuilder.java b/src/main/java/org/apache/commons/lang3/builder/ReflectionDiffBuilder.java index b1952dd..887368e 100644 --- a/src/main/java/org/apache/commons/lang3/builder/ReflectionDiffBuilder.java +++ b/src/main/java/org/apache/commons/lang3/builder/ReflectionDiffBuilder.java @@ -33,18 +33,18 @@ import org.apache.commons.lang3.reflect.FieldUtils; * of the objects to diff are discovered using reflection and compared * for differences. * </p> - * + * * <p> * To use this class, write code as follows: * </p> - * + * * <pre> * public class Person implements Diffable<Person> { * String name; * int age; * boolean smoker; * ... - * + * * public DiffResult diff(Person obj) { * // No need for null check, as NullPointerException correct if obj is null * return new ReflectionDiffBuilder(this, obj, ToStringStyle.SHORT_PREFIX_STYLE) @@ -52,7 +52,7 @@ import org.apache.commons.lang3.reflect.FieldUtils; * } * } * </pre> - * + * * <p> * The {@code ToStringStyle} passed to the constructor is embedded in the * returned {@code DiffResult} and influences the style of the @@ -75,7 +75,7 @@ public class ReflectionDiffBuilder implements Builder<DiffResult> { * <p> * Constructs a builder for the specified objects with the specified style. * </p> - * + * * <p> * If {@code lhs == rhs} or {@code lhs.equals(rhs)} then the builder will * not evaluate any calls to {@code append(...)} and will return an empty http://git-wip-us.apache.org/repos/asf/commons-lang/blob/1da8ccdb/src/main/java/org/apache/commons/lang3/builder/ReflectionToStringBuilder.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/lang3/builder/ReflectionToStringBuilder.java b/src/main/java/org/apache/commons/lang3/builder/ReflectionToStringBuilder.java index 5e512d3..3716bc1 100644 --- a/src/main/java/org/apache/commons/lang3/builder/ReflectionToStringBuilder.java +++ b/src/main/java/org/apache/commons/lang3/builder/ReflectionToStringBuilder.java @@ -80,7 +80,7 @@ import org.apache.commons.lang3.Validate; * } * </pre> * <p> - * Alternatively the {@link ToStringExclude} annotation can be used to exclude fields from being incorporated in the + * Alternatively the {@link ToStringExclude} annotation can be used to exclude fields from being incorporated in the * result. * </p> * <p> @@ -238,7 +238,7 @@ public class ReflectionToStringBuilder extends ToStringBuilder { * @return the String result * @throws IllegalArgumentException * if the Object is <code>null</code> - * + * * @see ToStringExclude * @since 2.1 */ @@ -291,7 +291,7 @@ public class ReflectionToStringBuilder extends ToStringBuilder { * @return the String result * @throws IllegalArgumentException * if the Object is <code>null</code> - * + * * @see ToStringExclude * @since 2.1 */ @@ -301,7 +301,7 @@ public class ReflectionToStringBuilder extends ToStringBuilder { return new ReflectionToStringBuilder(object, style, null, reflectUpToClass, outputTransients, outputStatics) .toString(); } - + /** * <p> * Builds a <code>toString</code> value through reflection. @@ -349,7 +349,7 @@ public class ReflectionToStringBuilder extends ToStringBuilder { * @return the String result * @throws IllegalArgumentException * if the Object is <code>null</code> - * + * * @see ToStringExclude * @since 3.6 */ @@ -421,7 +421,7 @@ public class ReflectionToStringBuilder extends ToStringBuilder { public static String toStringExclude(final Object object, final String... excludeFieldNames) { return new ReflectionToStringBuilder(object).setExcludeFieldNames(excludeFieldNames).toString(); } - + private static Object checkNotNull(final Object obj) { Validate.isTrue(obj != null, "The Object passed in should not be null."); return obj; @@ -436,7 +436,7 @@ public class ReflectionToStringBuilder extends ToStringBuilder { * Whether or not to append transient fields. */ private boolean appendTransients = false; - + /** * Whether or not to append fields that are null. */ @@ -545,7 +545,7 @@ public class ReflectionToStringBuilder extends ToStringBuilder { this.setAppendTransients(outputTransients); this.setAppendStatics(outputStatics); } - + /** * Constructor. * @@ -715,7 +715,7 @@ public class ReflectionToStringBuilder extends ToStringBuilder { public boolean isAppendTransients() { return this.appendTransients; } - + /** * <p> * Gets whether or not to append fields whose values are null. @@ -766,7 +766,7 @@ public class ReflectionToStringBuilder extends ToStringBuilder { public void setAppendTransients(final boolean appendTransients) { this.appendTransients = appendTransients; } - + /** * <p> * Sets whether or not to append fields whose values are null. http://git-wip-us.apache.org/repos/asf/commons-lang/blob/1da8ccdb/src/main/java/org/apache/commons/lang3/builder/StandardToStringStyle.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/lang3/builder/StandardToStringStyle.java b/src/main/java/org/apache/commons/lang3/builder/StandardToStringStyle.java index b9ba30c..f87d5b5 100644 --- a/src/main/java/org/apache/commons/lang3/builder/StandardToStringStyle.java +++ b/src/main/java/org/apache/commons/lang3/builder/StandardToStringStyle.java @@ -5,9 +5,9 @@ * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -28,10 +28,10 @@ package org.apache.commons.lang3.builder; * @since 1.0 */ public class StandardToStringStyle extends ToStringStyle { - + /** * Required for serialization support. - * + * * @see java.io.Serializable */ private static final long serialVersionUID = 1L; @@ -42,9 +42,9 @@ public class StandardToStringStyle extends ToStringStyle { public StandardToStringStyle() { super(); } - + //--------------------------------------------------------------------- - + /** * <p>Gets whether to use the class name.</p> * @@ -66,7 +66,7 @@ public class StandardToStringStyle extends ToStringStyle { } //--------------------------------------------------------------------- - + /** * <p>Gets whether to output short or long class names.</p> * @@ -90,7 +90,7 @@ public class StandardToStringStyle extends ToStringStyle { } //--------------------------------------------------------------------- - + /** * <p>Gets whether to use the identity hash code.</p> * @return the current useIdentityHashCode flag @@ -111,7 +111,7 @@ public class StandardToStringStyle extends ToStringStyle { } //--------------------------------------------------------------------- - + /** * <p>Gets whether to use the field names passed in.</p> * @@ -133,7 +133,7 @@ public class StandardToStringStyle extends ToStringStyle { } //--------------------------------------------------------------------- - + /** * <p>Gets whether to use full detail when the caller doesn't * specify.</p> @@ -157,7 +157,7 @@ public class StandardToStringStyle extends ToStringStyle { } //--------------------------------------------------------------------- - + /** * <p>Gets whether to output array content detail.</p> * @@ -167,7 +167,7 @@ public class StandardToStringStyle extends ToStringStyle { public boolean isArrayContentDetail() { // NOPMD as this is implementing the abstract class return super.isArrayContentDetail(); } - + /** * <p>Sets whether to output array content detail.</p> * @@ -179,7 +179,7 @@ public class StandardToStringStyle extends ToStringStyle { } //--------------------------------------------------------------------- - + /** * <p>Gets the array start text.</p> * @@ -204,7 +204,7 @@ public class StandardToStringStyle extends ToStringStyle { } //--------------------------------------------------------------------- - + /** * <p>Gets the array end text.</p> * @@ -229,7 +229,7 @@ public class StandardToStringStyle extends ToStringStyle { } //--------------------------------------------------------------------- - + /** * <p>Gets the array separator text.</p> * @@ -254,7 +254,7 @@ public class StandardToStringStyle extends ToStringStyle { } //--------------------------------------------------------------------- - + /** * <p>Gets the content start text.</p> * @@ -279,7 +279,7 @@ public class StandardToStringStyle extends ToStringStyle { } //--------------------------------------------------------------------- - + /** * <p>Gets the content end text.</p> * @@ -304,7 +304,7 @@ public class StandardToStringStyle extends ToStringStyle { } //--------------------------------------------------------------------- - + /** * <p>Gets the field name value separator text.</p> * @@ -329,7 +329,7 @@ public class StandardToStringStyle extends ToStringStyle { } //--------------------------------------------------------------------- - + /** * <p>Gets the field separator text.</p> * @@ -354,11 +354,11 @@ public class StandardToStringStyle extends ToStringStyle { } //--------------------------------------------------------------------- - + /** - * <p>Gets whether the field separator should be added at the start + * <p>Gets whether the field separator should be added at the start * of each buffer.</p> - * + * * @return the fieldSeparatorAtStart flag * @since 2.0 */ @@ -368,9 +368,9 @@ public class StandardToStringStyle extends ToStringStyle { } /** - * <p>Sets whether the field separator should be added at the start + * <p>Sets whether the field separator should be added at the start * of each buffer.</p> - * + * * @param fieldSeparatorAtStart the fieldSeparatorAtStart flag * @since 2.0 */ @@ -380,11 +380,11 @@ public class StandardToStringStyle extends ToStringStyle { } //--------------------------------------------------------------------- - + /** - * <p>Gets whether the field separator should be added at the end + * <p>Gets whether the field separator should be added at the end * of each buffer.</p> - * + * * @return fieldSeparatorAtEnd flag * @since 2.0 */ @@ -394,9 +394,9 @@ public class StandardToStringStyle extends ToStringStyle { } /** - * <p>Sets whether the field separator should be added at the end + * <p>Sets whether the field separator should be added at the end * of each buffer.</p> - * + * * @param fieldSeparatorAtEnd the fieldSeparatorAtEnd flag * @since 2.0 */ @@ -406,7 +406,7 @@ public class StandardToStringStyle extends ToStringStyle { } //--------------------------------------------------------------------- - + /** * <p>Gets the text to output when <code>null</code> found.</p> * @@ -431,7 +431,7 @@ public class StandardToStringStyle extends ToStringStyle { } //--------------------------------------------------------------------- - + /** * <p>Gets the text to output when a <code>Collection</code>, * <code>Map</code> or <code>Array</code> size is output.</p> @@ -462,7 +462,7 @@ public class StandardToStringStyle extends ToStringStyle { } //--------------------------------------------------------------------- - + /** * <p>Gets the end text to output when a <code>Collection</code>, * <code>Map</code> or <code>Array</code> size is output.</p> @@ -493,7 +493,7 @@ public class StandardToStringStyle extends ToStringStyle { } //--------------------------------------------------------------------- - + /** * <p>Gets the start text to output when an <code>Object</code> is * output in summary mode.</p> @@ -524,7 +524,7 @@ public class StandardToStringStyle extends ToStringStyle { } //--------------------------------------------------------------------- - + /** * <p>Gets the end text to output when an <code>Object</code> is * output in summary mode.</p> @@ -555,5 +555,5 @@ public class StandardToStringStyle extends ToStringStyle { } //--------------------------------------------------------------------- - + } http://git-wip-us.apache.org/repos/asf/commons-lang/blob/1da8ccdb/src/main/java/org/apache/commons/lang3/builder/ToStringStyle.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/lang3/builder/ToStringStyle.java b/src/main/java/org/apache/commons/lang3/builder/ToStringStyle.java index 645525e..375efb7 100644 --- a/src/main/java/org/apache/commons/lang3/builder/ToStringStyle.java +++ b/src/main/java/org/apache/commons/lang3/builder/ToStringStyle.java @@ -168,10 +168,10 @@ public abstract class ToStringStyle implements Serializable { /* * Note that objects of this class are generally shared between threads, so * an instance variable would not be suitable here. - * + * * In normal use the registry should always be left empty, because the caller * should call toString() which will clean up. - * + * * See LANG-792 */ @@ -2602,7 +2602,7 @@ public abstract class ToStringStyle implements Serializable { /** * Appends the given String in parenthesis to the given StringBuffer. - * + * * @param buffer the StringBuffer to append the value to. * @param value the value to append. */ http://git-wip-us.apache.org/repos/asf/commons-lang/blob/1da8ccdb/src/main/java/org/apache/commons/lang3/concurrent/BasicThreadFactory.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/lang3/concurrent/BasicThreadFactory.java b/src/main/java/org/apache/commons/lang3/concurrent/BasicThreadFactory.java index b25a51a..3882b81 100644 --- a/src/main/java/org/apache/commons/lang3/concurrent/BasicThreadFactory.java +++ b/src/main/java/org/apache/commons/lang3/concurrent/BasicThreadFactory.java @@ -251,9 +251,9 @@ public class BasicThreadFactory implements ThreadFactory { * </p> * */ - public static class Builder + public static class Builder implements org.apache.commons.lang3.builder.Builder<BasicThreadFactory> { - + /** The wrapped factory. */ private ThreadFactory wrappedFactory; http://git-wip-us.apache.org/repos/asf/commons-lang/blob/1da8ccdb/src/main/java/org/apache/commons/lang3/concurrent/Computable.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/lang3/concurrent/Computable.java b/src/main/java/org/apache/commons/lang3/concurrent/Computable.java index 6cb37aa..c949f08 100644 --- a/src/main/java/org/apache/commons/lang3/concurrent/Computable.java +++ b/src/main/java/org/apache/commons/lang3/concurrent/Computable.java @@ -23,7 +23,7 @@ package org.apache.commons.lang3.concurrent; * * @param <I> the type of the input to the calculation * @param <O> the type of the output of the calculation - * + * * @since 3.6 */ public interface Computable<I, O> { http://git-wip-us.apache.org/repos/asf/commons-lang/blob/1da8ccdb/src/main/java/org/apache/commons/lang3/concurrent/ConcurrentUtils.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/lang3/concurrent/ConcurrentUtils.java b/src/main/java/org/apache/commons/lang3/concurrent/ConcurrentUtils.java index d024524..dcbea8a 100644 --- a/src/main/java/org/apache/commons/lang3/concurrent/ConcurrentUtils.java +++ b/src/main/java/org/apache/commons/lang3/concurrent/ConcurrentUtils.java @@ -144,7 +144,7 @@ public class ConcurrentUtils { static Throwable checkedException(final Throwable ex) { Validate.isTrue(ex != null && !(ex instanceof RuntimeException) && !(ex instanceof Error), "Not a checked exception: " + ex); - + return ex; } http://git-wip-us.apache.org/repos/asf/commons-lang/blob/1da8ccdb/src/main/java/org/apache/commons/lang3/concurrent/Memoizer.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/lang3/concurrent/Memoizer.java b/src/main/java/org/apache/commons/lang3/concurrent/Memoizer.java index fb2c154..cae0646 100644 --- a/src/main/java/org/apache/commons/lang3/concurrent/Memoizer.java +++ b/src/main/java/org/apache/commons/lang3/concurrent/Memoizer.java @@ -48,7 +48,7 @@ import java.util.concurrent.FutureTask; * the type of the input to the calculation * @param <O> * the type of the output of the calculation - * + * * @since 3.6 */ public class Memoizer<I, O> implements Computable<I, O> { http://git-wip-us.apache.org/repos/asf/commons-lang/blob/1da8ccdb/src/main/java/org/apache/commons/lang3/exception/CloneFailedException.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/lang3/exception/CloneFailedException.java b/src/main/java/org/apache/commons/lang3/exception/CloneFailedException.java index 138b250..ae534b4 100644 --- a/src/main/java/org/apache/commons/lang3/exception/CloneFailedException.java +++ b/src/main/java/org/apache/commons/lang3/exception/CloneFailedException.java @@ -5,9 +5,9 @@ * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -19,7 +19,7 @@ package org.apache.commons.lang3.exception; /** * Exception thrown when a clone cannot be created. In contrast to * {@link CloneNotSupportedException} this is a {@link RuntimeException}. - * + * * @since 3.0 */ public class CloneFailedException extends RuntimeException { @@ -31,7 +31,7 @@ public class CloneFailedException extends RuntimeException { /** * Constructs a CloneFailedException. - * + * * @param message description of the exception * @since upcoming */ @@ -41,7 +41,7 @@ public class CloneFailedException extends RuntimeException { /** * Constructs a CloneFailedException. - * + * * @param cause cause of the exception * @since upcoming */ @@ -51,7 +51,7 @@ public class CloneFailedException extends RuntimeException { /** * Constructs a CloneFailedException. - * + * * @param message description of the exception * @param cause cause of the exception * @since upcoming http://git-wip-us.apache.org/repos/asf/commons-lang/blob/1da8ccdb/src/main/java/org/apache/commons/lang3/exception/ContextedException.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/lang3/exception/ContextedException.java b/src/main/java/org/apache/commons/lang3/exception/ContextedException.java index 326152a..4ab95f3 100644 --- a/src/main/java/org/apache/commons/lang3/exception/ContextedException.java +++ b/src/main/java/org/apache/commons/lang3/exception/ContextedException.java @@ -5,9 +5,9 @@ * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -80,7 +80,7 @@ import org.apache.commons.lang3.tuple.Pair; * at org.apache.commons.lang3.exception.ContextedExceptionTest.testAddValue(ContextedExceptionTest.java:88) * ..... (rest of trace) * </pre> - * + * * @see ContextedRuntimeException * @since 3.0 */ @@ -105,7 +105,7 @@ public class ContextedException extends Exception implements ExceptionContext { * Instantiates ContextedException with message, but without cause. * <p> * The context information is stored using a default implementation. - * + * * @param message the exception message, may be null */ public ContextedException(final String message) { @@ -117,7 +117,7 @@ public class ContextedException extends Exception implements ExceptionContext { * Instantiates ContextedException with cause, but without message. * <p> * The context information is stored using a default implementation. - * + * * @param cause the underlying cause of the exception, may be null */ public ContextedException(final Throwable cause) { @@ -129,7 +129,7 @@ public class ContextedException extends Exception implements ExceptionContext { * Instantiates ContextedException with cause and message. * <p> * The context information is stored using a default implementation. - * + * * @param message the exception message, may be null * @param cause the underlying cause of the exception, may be null */ @@ -140,7 +140,7 @@ public class ContextedException extends Exception implements ExceptionContext { /** * Instantiates ContextedException with cause, message, and ExceptionContext. - * + * * @param message the exception message, may be null * @param cause the underlying cause of the exception, may be null * @param context the context used to store the additional information, null uses default implementation @@ -162,13 +162,13 @@ public class ContextedException extends Exception implements ExceptionContext { * <p> * Note: This exception is only serializable if the object added is serializable. * </p> - * + * * @param label a textual label associated with information, {@code null} not recommended * @param value information needed to understand exception, may be {@code null} * @return {@code this}, for method chaining, not {@code null} */ @Override - public ContextedException addContextValue(final String label, final Object value) { + public ContextedException addContextValue(final String label, final Object value) { exceptionContext.addContextValue(label, value); return this; } @@ -181,13 +181,13 @@ public class ContextedException extends Exception implements ExceptionContext { * <p> * Note: This exception is only serializable if the object added as value is serializable. * </p> - * + * * @param label a textual label associated with information, {@code null} not recommended * @param value information needed to understand exception, may be {@code null} * @return {@code this}, for method chaining, not {@code null} */ @Override - public ContextedException setContextValue(final String label, final Object value) { + public ContextedException setContextValue(final String label, final Object value) { exceptionContext.setContextValue(label, value); return this; } @@ -226,7 +226,7 @@ public class ContextedException extends Exception implements ExceptionContext { /** * Provides the message explaining the exception, including the contextual data. - * + * * @see java.lang.Throwable#getMessage() * @return the message, never null */ @@ -237,7 +237,7 @@ public class ContextedException extends Exception implements ExceptionContext { /** * Provides the message explaining the exception without the contextual data. - * + * * @see java.lang.Throwable#getMessage() * @return the message * @since 3.0.1 http://git-wip-us.apache.org/repos/asf/commons-lang/blob/1da8ccdb/src/main/java/org/apache/commons/lang3/exception/ContextedRuntimeException.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/lang3/exception/ContextedRuntimeException.java b/src/main/java/org/apache/commons/lang3/exception/ContextedRuntimeException.java index 0120883..9b904fc 100644 --- a/src/main/java/org/apache/commons/lang3/exception/ContextedRuntimeException.java +++ b/src/main/java/org/apache/commons/lang3/exception/ContextedRuntimeException.java @@ -5,9 +5,9 @@ * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -80,7 +80,7 @@ import org.apache.commons.lang3.tuple.Pair; * at org.apache.commons.lang3.exception.ContextedRuntimeExceptionTest.testAddValue(ContextedExceptionTest.java:88) * ..... (rest of trace) * </pre> - * + * * @see ContextedException * @since 3.0 */ @@ -105,7 +105,7 @@ public class ContextedRuntimeException extends RuntimeException implements Excep * Instantiates ContextedRuntimeException with message, but without cause. * <p> * The context information is stored using a default implementation. - * + * * @param message the exception message, may be null */ public ContextedRuntimeException(final String message) { @@ -117,7 +117,7 @@ public class ContextedRuntimeException extends RuntimeException implements Excep * Instantiates ContextedRuntimeException with cause, but without message. * <p> * The context information is stored using a default implementation. - * + * * @param cause the underlying cause of the exception, may be null */ public ContextedRuntimeException(final Throwable cause) { @@ -129,7 +129,7 @@ public class ContextedRuntimeException extends RuntimeException implements Excep * Instantiates ContextedRuntimeException with cause and message. * <p> * The context information is stored using a default implementation. - * + * * @param message the exception message, may be null * @param cause the underlying cause of the exception, may be null */ @@ -140,7 +140,7 @@ public class ContextedRuntimeException extends RuntimeException implements Excep /** * Instantiates ContextedRuntimeException with cause, message, and ExceptionContext. - * + * * @param message the exception message, may be null * @param cause the underlying cause of the exception, may be null * @param context the context used to store the additional information, null uses default implementation @@ -162,13 +162,13 @@ public class ContextedRuntimeException extends RuntimeException implements Excep * <p> * Note: This exception is only serializable if the object added is serializable. * </p> - * + * * @param label a textual label associated with information, {@code null} not recommended * @param value information needed to understand exception, may be {@code null} * @return {@code this}, for method chaining, not {@code null} */ @Override - public ContextedRuntimeException addContextValue(final String label, final Object value) { + public ContextedRuntimeException addContextValue(final String label, final Object value) { exceptionContext.addContextValue(label, value); return this; } @@ -181,13 +181,13 @@ public class ContextedRuntimeException extends RuntimeException implements Excep * <p> * Note: This exception is only serializable if the object added as value is serializable. * </p> - * + * * @param label a textual label associated with information, {@code null} not recommended * @param value information needed to understand exception, may be {@code null} * @return {@code this}, for method chaining, not {@code null} */ @Override - public ContextedRuntimeException setContextValue(final String label, final Object value) { + public ContextedRuntimeException setContextValue(final String label, final Object value) { exceptionContext.setContextValue(label, value); return this; } @@ -226,7 +226,7 @@ public class ContextedRuntimeException extends RuntimeException implements Excep /** * Provides the message explaining the exception, including the contextual data. - * + * * @see java.lang.Throwable#getMessage() * @return the message, never null */ @@ -237,7 +237,7 @@ public class ContextedRuntimeException extends RuntimeException implements Excep /** * Provides the message explaining the exception without the contextual data. - * + * * @see java.lang.Throwable#getMessage() * @return the message * @since 3.0.1 http://git-wip-us.apache.org/repos/asf/commons-lang/blob/1da8ccdb/src/main/java/org/apache/commons/lang3/exception/DefaultExceptionContext.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/lang3/exception/DefaultExceptionContext.java b/src/main/java/org/apache/commons/lang3/exception/DefaultExceptionContext.java index 17d98a4..69a4ccf 100644 --- a/src/main/java/org/apache/commons/lang3/exception/DefaultExceptionContext.java +++ b/src/main/java/org/apache/commons/lang3/exception/DefaultExceptionContext.java @@ -5,9 +5,9 @@ * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -33,7 +33,7 @@ import org.apache.commons.lang3.tuple.Pair; * This implementation is serializable, however this is dependent on the values that * are added also being serializable. * </p> - * + * * @see ContextedException * @see ContextedRuntimeException * @since 3.0 @@ -119,7 +119,7 @@ public class DefaultExceptionContext implements ExceptionContext, Serializable { /** * Builds the message containing the contextual information. - * + * * @param baseMessage the base exception message <b>without</b> context information appended * @return the exception message <b>with</b> context information appended, never null */ @@ -129,13 +129,13 @@ public class DefaultExceptionContext implements ExceptionContext, Serializable { if (baseMessage != null) { buffer.append(baseMessage); } - + if (contextValues.size() > 0) { if (buffer.length() > 0) { buffer.append('\n'); } buffer.append("Exception Context:\n"); - + int i = 0; for (final Pair<String, Object> pair : contextValues) { buffer.append("\t["); http://git-wip-us.apache.org/repos/asf/commons-lang/blob/1da8ccdb/src/main/java/org/apache/commons/lang3/exception/ExceptionContext.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/lang3/exception/ExceptionContext.java b/src/main/java/org/apache/commons/lang3/exception/ExceptionContext.java index 1e84659..f055d5b 100644 --- a/src/main/java/org/apache/commons/lang3/exception/ExceptionContext.java +++ b/src/main/java/org/apache/commons/lang3/exception/ExceptionContext.java @@ -5,9 +5,9 @@ * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -28,7 +28,7 @@ import org.apache.commons.lang3.tuple.Pair; * Implementations are expected to manage the pairs in a list-style collection * that keeps the pairs in the sequence of their addition. * </p> - * + * * @see ContextedException * @see ContextedRuntimeException * @since 3.0 @@ -41,7 +41,7 @@ public interface ExceptionContext { * The pair will be added to the context, independently of an already * existing pair with the same label. * </p> - * + * * @param label the label of the item to add, {@code null} not recommended * @param value the value of item to add, may be {@code null} * @return {@code this}, for method chaining, not {@code null} @@ -54,7 +54,7 @@ public interface ExceptionContext { * The pair will be added normally, but any existing label-value pair with * the same label is removed from the context. * </p> - * + * * @param label the label of the item to add, {@code null} not recommended * @param value the value of item to add, may be {@code null} * @return {@code this}, for method chaining, not {@code null} @@ -63,7 +63,7 @@ public interface ExceptionContext { /** * Retrieves all the contextual data values associated with the label. - * + * * @param label the label to get the contextual values for, may be {@code null} * @return the contextual values associated with the label, never {@code null} */ @@ -71,7 +71,7 @@ public interface ExceptionContext { /** * Retrieves the first available contextual data value associated with the label. - * + * * @param label the label to get the contextual value for, may be {@code null} * @return the first contextual value associated with the label, may be {@code null} */ @@ -79,14 +79,14 @@ public interface ExceptionContext { /** * Retrieves the full set of labels defined in the contextual data. - * + * * @return the set of labels, not {@code null} */ Set<String> getContextLabels(); /** * Retrieves the full list of label-value pairs defined in the contextual data. - * + * * @return the list of pairs, not {@code null} */ List<Pair<String, Object>> getContextEntries(); @@ -94,7 +94,7 @@ public interface ExceptionContext { /** * Gets the contextualized error message based on a base message. * This will add the context label-value pairs to the message. - * + * * @param baseMessage the base exception message <b>without</b> context information appended * @return the exception message <b>with</b> context information appended, not {@code null} */ http://git-wip-us.apache.org/repos/asf/commons-lang/blob/1da8ccdb/src/main/java/org/apache/commons/lang3/exception/ExceptionUtils.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/lang3/exception/ExceptionUtils.java b/src/main/java/org/apache/commons/lang3/exception/ExceptionUtils.java index 63510f0..0318512 100644 --- a/src/main/java/org/apache/commons/lang3/exception/ExceptionUtils.java +++ b/src/main/java/org/apache/commons/lang3/exception/ExceptionUtils.java @@ -5,9 +5,9 @@ * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -32,13 +32,13 @@ import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.Validate; /** - * <p>Provides utilities for manipulating and examining + * <p>Provides utilities for manipulating and examining * <code>Throwable</code> objects.</p> * * @since 1.0 */ public class ExceptionUtils { - + /** * <p>Used when printing stack frames to denote the start of a * wrapped exception.</p> @@ -95,7 +95,7 @@ public class ExceptionUtils { /** * <p>Introspects the <code>Throwable</code> to obtain the cause.</p> * - * <p>The method searches for methods with specific names that return a + * <p>The method searches for methods with specific names that return a * <code>Throwable</code> object. This will pick up most wrapping exceptions, * including those from JDK 1.4. * @@ -110,7 +110,7 @@ public class ExceptionUtils { * <li><code>getCausedByException()</code></li> * <li><code>getNested()</code></li> * </ul> - * + * * <p>If none of the above is found, returns <code>null</code>.</p> * * @param throwable the throwable to introspect for a cause, may be null @@ -628,7 +628,7 @@ public class ExceptionUtils { * <p>This works in most cases - it will only fail if the exception * message contains a line that starts with: * <code>" at".</code></p> - * + * * @param t is any throwable * @return List of stack frames */ http://git-wip-us.apache.org/repos/asf/commons-lang/blob/1da8ccdb/src/main/java/org/apache/commons/lang3/math/Fraction.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/lang3/math/Fraction.java b/src/main/java/org/apache/commons/lang3/math/Fraction.java index d4b8ae0..e59789d 100644 --- a/src/main/java/org/apache/commons/lang3/math/Fraction.java +++ b/src/main/java/org/apache/commons/lang3/math/Fraction.java @@ -5,9 +5,9 @@ * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -28,7 +28,7 @@ import org.apache.commons.lang3.Validate; * a <code>Number</code>.</p> * * <p>Note that this class is intended for common use cases, it is <i>int</i> - * based and thus suffers from various overflow issues. For a BigInteger based + * based and thus suffers from various overflow issues. For a BigInteger based * equivalent, please see the Commons Math BigFraction class. </p> * * @since 2.0 @@ -37,7 +37,7 @@ public final class Fraction extends Number implements Comparable<Fraction> { /** * Required for serialization support. Lang version 2.0. - * + * * @see java.io.Serializable */ private static final long serialVersionUID = 65382027393090L; @@ -166,7 +166,7 @@ public final class Fraction extends Number implements Comparable<Fraction> { * @throws ArithmeticException if the denominator is <code>zero</code> * @throws ArithmeticException if the denominator is negative * @throws ArithmeticException if the numerator is negative - * @throws ArithmeticException if the resulting numerator exceeds + * @throws ArithmeticException if the resulting numerator exceeds * <code>Integer.MAX_VALUE</code> */ public static Fraction getFraction(final int whole, final int numerator, final int denominator) { @@ -240,7 +240,7 @@ public final class Fraction extends Number implements Comparable<Fraction> { * * @param value the double value to convert * @return a new fraction instance that is close to the value - * @throws ArithmeticException if <code>|value| > Integer.MAX_VALUE</code> + * @throws ArithmeticException if <code>|value| > Integer.MAX_VALUE</code> * or <code>value = NaN</code> * @throws ArithmeticException if the calculated denominator is <code>zero</code> * @throws ArithmeticException if the the algorithm does not converge @@ -454,7 +454,7 @@ public final class Fraction extends Number implements Comparable<Fraction> { /** * <p>Reduce the fraction to the smallest values for the numerator and * denominator, returning the result.</p> - * + * * <p>For example, if this fraction represents 2/4, then the result * will be 1/2.</p> * @@ -473,7 +473,7 @@ public final class Fraction extends Number implements Comparable<Fraction> { /** * <p>Gets a fraction that is the inverse (1/fraction) of this one.</p> - * + * * <p>The returned fraction is not reduced.</p> * * @return a new fraction instance with the numerator and denominator @@ -531,7 +531,7 @@ public final class Fraction extends Number implements Comparable<Fraction> { * * @param power the power to raise the fraction to * @return <code>this</code> if the power is one, <code>ONE</code> if the power - * is zero (even if the fraction equals ZERO) or a new fraction instance + * is zero (even if the fraction equals ZERO) or a new fraction instance * raised to the appropriate power * @throws ArithmeticException if the resulting numerator or denominator exceeds * <code>Integer.MAX_VALUE</code> @@ -625,9 +625,9 @@ public final class Fraction extends Number implements Comparable<Fraction> { // Arithmetic //------------------------------------------------------------------- - /** + /** * Multiply two integers, checking for overflow. - * + * * @param x a factor * @param y a factor * @return the product <code>x*y</code> @@ -641,10 +641,10 @@ public final class Fraction extends Number implements Comparable<Fraction> { } return (int) m; } - + /** * Multiply two non-negative integers, checking for overflow. - * + * * @param x a non-negative factor * @param y a non-negative factor * @return the product <code>x*y</code> @@ -659,10 +659,10 @@ public final class Fraction extends Number implements Comparable<Fraction> { } return (int) m; } - - /** + + /** * Add two integers, checking for overflow. - * + * * @param x an addend * @param y an addend * @return the sum <code>x+y</code> @@ -676,10 +676,10 @@ public final class Fraction extends Number implements Comparable<Fraction> { } return (int) s; } - - /** + + /** * Subtract two integers, checking for overflow. - * + * * @param x the minuend * @param y the subtrahend * @return the difference <code>x-y</code> @@ -693,7 +693,7 @@ public final class Fraction extends Number implements Comparable<Fraction> { } return (int) s; } - + /** * <p>Adds the value of this fraction to another, returning the result in reduced form. * The algorithm follows Knuth, 4.5.1.</p> @@ -709,7 +709,7 @@ public final class Fraction extends Number implements Comparable<Fraction> { } /** - * <p>Subtracts the value of another fraction from the value of this one, + * <p>Subtracts the value of another fraction from the value of this one, * returning the result in reduced form.</p> * * @param fraction the fraction to subtract, must not be <code>null</code> @@ -722,9 +722,9 @@ public final class Fraction extends Number implements Comparable<Fraction> { return addSub(fraction, false /* subtract */); } - /** + /** * Implement add and subtract using algorithm described in Knuth 4.5.1. - * + * * @param fraction the fraction to subtract, must not be <code>null</code> * @param isAdd true to add, false to subtract * @return a <code>Fraction</code> instance with the resulting values @@ -771,7 +771,7 @@ public final class Fraction extends Number implements Comparable<Fraction> { } /** - * <p>Multiplies the value of this fraction by another, returning the + * <p>Multiplies the value of this fraction by another, returning the * result in reduced form.</p> * * @param fraction the fraction to multiply by, must not be <code>null</code> http://git-wip-us.apache.org/repos/asf/commons-lang/blob/1da8ccdb/src/main/java/org/apache/commons/lang3/math/IEEE754rUtils.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/lang3/math/IEEE754rUtils.java b/src/main/java/org/apache/commons/lang3/math/IEEE754rUtils.java index 6142832..8cd351b 100644 --- a/src/main/java/org/apache/commons/lang3/math/IEEE754rUtils.java +++ b/src/main/java/org/apache/commons/lang3/math/IEEE754rUtils.java @@ -5,9 +5,9 @@ * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -26,10 +26,10 @@ import org.apache.commons.lang3.Validate; * @since 2.4 */ public class IEEE754rUtils { - + /** * <p>Returns the minimum value in an array.</p> - * + * * @param array an array, must not be null or empty * @return the minimum value in the array * @throws IllegalArgumentException if <code>array</code> is <code>null</code> @@ -39,19 +39,19 @@ public class IEEE754rUtils { public static double min(final double... array) { Validate.isTrue(array != null, "The Array must not be null"); Validate.isTrue(array.length != 0, "Array cannot be empty."); - + // Finds and returns min double min = array[0]; for (int i = 1; i < array.length; i++) { min = min(array[i], min); } - + return min; } /** * <p>Returns the minimum value in an array.</p> - * + * * @param array an array, must not be null or empty * @return the minimum value in the array * @throws IllegalArgumentException if <code>array</code> is <code>null</code> @@ -61,21 +61,21 @@ public class IEEE754rUtils { public static float min(final float... array) { Validate.isTrue(array != null, "The Array must not be null"); Validate.isTrue(array.length != 0, "Array cannot be empty."); - + // Finds and returns min float min = array[0]; for (int i = 1; i < array.length; i++) { min = min(array[i], min); } - + return min; } /** * <p>Gets the minimum of three <code>double</code> values.</p> - * + * * <p>NaN is only returned if all numbers are NaN as per IEEE-754r. </p> - * + * * @param a value 1 * @param b value 2 * @param c value 3 @@ -87,9 +87,9 @@ public class IEEE754rUtils { /** * <p>Gets the minimum of two <code>double</code> values.</p> - * + * * <p>NaN is only returned if all numbers are NaN as per IEEE-754r. </p> - * + * * @param a value 1 * @param b value 2 * @return the smallest of the values @@ -107,7 +107,7 @@ public class IEEE754rUtils { /** * <p>Gets the minimum of three <code>float</code> values.</p> - * + * * <p>NaN is only returned if all numbers are NaN as per IEEE-754r. </p> * * @param a value 1 @@ -121,7 +121,7 @@ public class IEEE754rUtils { /** * <p>Gets the minimum of two <code>float</code> values.</p> - * + * * <p>NaN is only returned if all numbers are NaN as per IEEE-754r. </p> * * @param a value 1 @@ -141,7 +141,7 @@ public class IEEE754rUtils { /** * <p>Returns the maximum value in an array.</p> - * + * * @param array an array, must not be null or empty * @return the minimum value in the array * @throws IllegalArgumentException if <code>array</code> is <code>null</code> @@ -151,19 +151,19 @@ public class IEEE754rUtils { public static double max(final double... array) { Validate.isTrue(array != null, "The Array must not be null"); Validate.isTrue(array.length != 0, "Array cannot be empty."); - + // Finds and returns max double max = array[0]; for (int j = 1; j < array.length; j++) { max = max(array[j], max); } - + return max; } /** * <p>Returns the maximum value in an array.</p> - * + * * @param array an array, must not be null or empty * @return the minimum value in the array * @throws IllegalArgumentException if <code>array</code> is <code>null</code> @@ -173,7 +173,7 @@ public class IEEE754rUtils { public static float max(final float... array) { Validate.isTrue(array != null, "The Array must not be null"); Validate.isTrue(array.length != 0, "Array cannot be empty."); - + // Finds and returns max float max = array[0]; for (int j = 1; j < array.length; j++) { @@ -182,10 +182,10 @@ public class IEEE754rUtils { return max; } - + /** * <p>Gets the maximum of three <code>double</code> values.</p> - * + * * <p>NaN is only returned if all numbers are NaN as per IEEE-754r. </p> * * @param a value 1 @@ -199,7 +199,7 @@ public class IEEE754rUtils { /** * <p>Gets the maximum of two <code>double</code> values.</p> - * + * * <p>NaN is only returned if all numbers are NaN as per IEEE-754r. </p> * * @param a value 1 @@ -219,7 +219,7 @@ public class IEEE754rUtils { /** * <p>Gets the maximum of three <code>float</code> values.</p> - * + * * <p>NaN is only returned if all numbers are NaN as per IEEE-754r. </p> * * @param a value 1 @@ -233,7 +233,7 @@ public class IEEE754rUtils { /** * <p>Gets the maximum of two <code>float</code> values.</p> - * + * * <p>NaN is only returned if all numbers are NaN as per IEEE-754r. </p> * * @param a value 1