You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by ba...@apache.org on 2007/02/06 23:40:13 UTC
svn commit: r504343 - in
/jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang:
Entities.java time/FastDateFormat.java
Author: bayard
Date: Tue Feb 6 14:40:12 2007
New Revision: 504343
URL: http://svn.apache.org/viewvc?view=rev&rev=504343
Log:
Fixing javadoc warnings from checkstyle
Modified:
jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/Entities.java
jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/time/FastDateFormat.java
Modified: jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/Entities.java
URL: http://svn.apache.org/viewvc/jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/Entities.java?view=diff&rev=504343&r1=504342&r2=504343
==============================================================================
--- jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/Entities.java (original)
+++ jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/Entities.java Tue Feb 6 14:40:12 2007
@@ -866,16 +866,21 @@
try {
this.doUnescape(stringWriter, str, firstAmp);
} catch (IOException e) {
- // This should never happen because ALL the StringWriter methods called by #escape(Writer, String) do not
- // throw IOExceptions.
+ // This should never happen because ALL the StringWriter methods called by #escape(Writer, String)
+ // do not throw IOExceptions.
throw new UnhandledException(e);
}
return stringWriter.toString();
}
}
+ /**
+ * Make the StringWriter 10% larger than the source String to avoid growing the writer
+ *
+ * @param str The source string
+ * @return A newly created StringWriter
+ */
private StringWriter createStringWriter(String str) {
- // Make the StringWriter 10% larger than the source String to avoid growing the writer
return new StringWriter((int) (str.length() + (str.length() * 0.1)));
}
@@ -888,7 +893,7 @@
* @param writer
* The <code>Writer</code> to write the results to; assumed to be non-null.
* @param str
- * The <code>String</code> to write the results to; assumed to be non-null.
+ * The source <code>String</code> to unescape; assumed to be non-null.
* @throws IOException
* when <code>Writer</code> passed throws the exception from calls to the {@link Writer#write(int)}
* methods.
@@ -906,6 +911,19 @@
}
}
+ /**
+ * Underlying unescape method that allows the optimisation of not starting from the 0 index again.
+ *
+ * @param writer
+ * The <code>Writer</code> to write the results to; assumed to be non-null.
+ * @param str
+ * The source <code>String</code> to unescape; assumed to be non-null.
+ * @param firstAmp
+ * The <code>int</code> index of the first ampersand in the source String.
+ * @throws IOException
+ * when <code>Writer</code> passed throws the exception from calls to the {@link Writer#write(int)}
+ * methods.
+ */
private void doUnescape(Writer writer, String str, int firstAmp) throws IOException {
writer.write(str, 0, firstAmp);
int len = str.length();
Modified: jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/time/FastDateFormat.java
URL: http://svn.apache.org/viewvc/jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/time/FastDateFormat.java?view=diff&rev=504343&r1=504342&r2=504343
==============================================================================
--- jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/time/FastDateFormat.java (original)
+++ jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/time/FastDateFormat.java Tue Feb 6 14:40:12 2007
@@ -1019,6 +1019,14 @@
// Serializing
//-----------------------------------------------------------------------
+ /**
+ * Create the object after serialization. This implementation reinitializes the
+ * transient properties.
+ *
+ * @param ObjectInputStream from which the object is being deserialized.
+ * @throws IOException if there is an IO issue.
+ * @throws ClassNotFoundException if a class cannot be found.
+ */
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
in.defaultReadObject();
init();
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org