geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From strub...@apache.org
Subject svn commit: r1858615 [2/32] - in /geronimo/specs/branches/jakarta: geronimo-jakarta-jsp_spec/ geronimo-jakarta-jsp_spec/src/main/java/jakarta/servlet/jsp/ geronimo-jakarta-jsp_spec/src/main/java/jakarta/servlet/jsp/el/ geronimo-jakarta-jsp_spec/src/mai...
Date Sat, 04 May 2019 21:29:41 GMT
Modified: geronimo/specs/branches/jakarta/geronimo-jakarta-jsp_spec/src/main/java/jakarta/servlet/jsp/JspWriter.java
URL: http://svn.apache.org/viewvc/geronimo/specs/branches/jakarta/geronimo-jakarta-jsp_spec/src/main/java/jakarta/servlet/jsp/JspWriter.java?rev=1858615&r1=1858614&r2=1858615&view=diff
==============================================================================
--- geronimo/specs/branches/jakarta/geronimo-jakarta-jsp_spec/src/main/java/jakarta/servlet/jsp/JspWriter.java (original)
+++ geronimo/specs/branches/jakarta/geronimo-jakarta-jsp_spec/src/main/java/jakarta/servlet/jsp/JspWriter.java Sat May  4 21:29:39 2019
@@ -1,76 +1,73 @@
 /*
-* Licensed to the Apache Software Foundation (ASF) under one or more
-* contributor license agreements.  See the NOTICE file distributed with
-* this work for additional information regarding copyright ownership.
-* 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.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
- 
-package javax.servlet.jsp;
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * 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.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package jakarta.servlet.jsp;
 
 import java.io.IOException;
 
 /**
  * <p>
- * The actions and template data in a JSP page is written using the
- * JspWriter object that is referenced by the implicit variable out which
- * is initialized automatically using methods in the PageContext object.
+ * The actions and template data in a JSP page is written using the JspWriter
+ * object that is referenced by the implicit variable out which is initialized
+ * automatically using methods in the PageContext object.
  *<p>
  * This abstract class emulates some of the functionality found in the
- * java.io.BufferedWriter and java.io.PrintWriter classes,
- * however it differs in that it throws java.io.IOException from the print
- * methods while PrintWriter does not.
- * <p><B>Buffering</B>
+ * java.io.BufferedWriter and java.io.PrintWriter classes, however it differs in
+ * that it throws java.io.IOException from the print methods while PrintWriter
+ * does not.
  * <p>
- * The initial JspWriter object is associated with the PrintWriter object
- * of the ServletResponse in a way that depends on whether the page is or
- * is not buffered. If the page is not buffered, output written to this
- * JspWriter object will be written through to the PrintWriter directly,
- * which will be created if necessary by invoking the getWriter() method
- * on the response object. But if the page is buffered, the PrintWriter
- * object will not be created until the buffer is flushed and
- * operations like setContentType() are legal. Since this flexibility
- * simplifies programming substantially, buffering is the default for JSP
- * pages.
+ * <B>Buffering</B>
  * <p>
- * Buffering raises the issue of what to do when the buffer is
- * exceeded. Two approaches can be taken:
+ * The initial JspWriter object is associated with the PrintWriter object of the
+ * ServletResponse in a way that depends on whether the page is or is not
+ * buffered. If the page is not buffered, output written to this JspWriter
+ * object will be written through to the PrintWriter directly, which will be
+ * created if necessary by invoking the getWriter() method on the response
+ * object. But if the page is buffered, the PrintWriter object will not be
+ * created until the buffer is flushed and operations like setContentType() are
+ * legal. Since this flexibility simplifies programming substantially, buffering
+ * is the default for JSP pages.
+ * <p>
+ * Buffering raises the issue of what to do when the buffer is exceeded. Two
+ * approaches can be taken:
  * <ul>
- * <li>
- * Exceeding the buffer is not a fatal error; when the buffer is
- * exceeded, just flush the output.
- * <li>
- * Exceeding the buffer is a fatal error; when the buffer is exceeded,
- * raise an exception.
+ * <li>Exceeding the buffer is not a fatal error; when the buffer is exceeded,
+ * just flush the output.
+ * <li>Exceeding the buffer is a fatal error; when the buffer is exceeded, raise
+ * an exception.
  * </ul>
  * <p>
- * Both approaches are valid, and thus both are supported in the JSP
- * technology. The behavior of a page is controlled by the autoFlush
- * attribute, which defaults to true. In general, JSP pages that need to
- * be sure that correct and complete data has been sent to their client
- * may want to set autoFlush to false, with a typical case being that
- * where the client is an application itself. On the other hand, JSP
- * pages that send data that is meaningful even when partially
- * constructed may want to set autoFlush to true; such as when the
- * data is sent for immediate display through a browser. Each application
+ * Both approaches are valid, and thus both are supported in the JSP technology.
+ * The behavior of a page is controlled by the autoFlush attribute, which
+ * defaults to true. In general, JSP pages that need to be sure that correct and
+ * complete data has been sent to their client may want to set autoFlush to
+ * false, with a typical case being that where the client is an application
+ * itself. On the other hand, JSP pages that send data that is meaningful even
+ * when partially constructed may want to set autoFlush to true; such as when
+ * the data is sent for immediate display through a browser. Each application
  * will need to consider their specific needs.
  * <p>
- * An alternative considered was to make the buffer size unbounded; but,
- * this had the disadvantage that runaway computations would consume an
- * unbounded amount of resources.
+ * An alternative considered was to make the buffer size unbounded; but, this
+ * had the disadvantage that runaway computations would consume an unbounded
+ * amount of resources.
  * <p>
- * The "out" implicit variable of a JSP implementation class is of this type.
- * If the page directive selects autoflush="true" then all the I/O operations
- * on this class shall automatically flush the contents of the buffer if an
+ * The "out" implicit variable of a JSP implementation class is of this type. If
+ * the page directive selects autoflush="true" then all the I/O operations on
+ * this class shall automatically flush the contents of the buffer if an
  * overflow condition would result if the current operation were performed
  * without a flush. If autoflush="false" then all the I/O operations on this
  * class shall throw an IOException if performing the current operation would
@@ -80,352 +77,370 @@ import java.io.IOException;
  * @see java.io.BufferedWriter
  * @see java.io.PrintWriter
  */
-
-abstract public class JspWriter extends java.io.Writer {
+public abstract class JspWriter extends java.io.Writer {
 
     /**
      * Constant indicating that the Writer is not buffering output.
      */
-
-    public static final int	NO_BUFFER = 0;
+    public static final int NO_BUFFER = 0;
 
     /**
      * Constant indicating that the Writer is buffered and is using the
      * implementation default buffer size.
      */
-
-    public static final int	DEFAULT_BUFFER = -1;
+    public static final int DEFAULT_BUFFER = -1;
 
     /**
-     * Constant indicating that the Writer is buffered and is unbounded; this
-     * is used in BodyContent.
+     * Constant indicating that the Writer is buffered and is unbounded; this is
+     * used in BodyContent.
      */
-
-    public static final int	UNBOUNDED_BUFFER = -2;
+    public static final int UNBOUNDED_BUFFER = -2;
 
     /**
      * Protected constructor.
      *
-     * @param bufferSize the size of the buffer to be used by the JspWriter
-     * @param autoFlush whether the JspWriter should be autoflushing
+     * @param bufferSize
+     *            the size of the buffer to be used by the JspWriter
+     * @param autoFlush
+     *            whether the JspWriter should be autoflushing
      */
-
     protected JspWriter(int bufferSize, boolean autoFlush) {
-	this.bufferSize = bufferSize;
-	this.autoFlush  = autoFlush;
+        this.bufferSize = bufferSize;
+        this.autoFlush = autoFlush;
     }
 
     /**
-     * Write a line separator.  The line separator string is defined by the
+     * Write a line separator. The line separator string is defined by the
      * system property <tt>line.separator</tt>, and is not necessarily a single
      * newline ('\n') character.
      *
-     * @exception  IOException  If an I/O error occurs
+     * @exception IOException
+     *                If an I/O error occurs
      */
-
-    abstract public void newLine() throws IOException;
+    public abstract void newLine() throws IOException;
 
     /**
-     * Print a boolean value.  The string produced by <code>{@link
-     * java.lang.String#valueOf(boolean)}</code> is written to the
-     * JspWriter's buffer or, if no buffer is used, directly to the 
-     * underlying writer.
+     * Print a boolean value. The string produced by <code>{@link
+     * java.lang.String#valueOf(boolean)}</code>
+     * is written to the JspWriter's buffer or, if no buffer is used, directly
+     * to the underlying writer.
      *
-     * @param      b   The <code>boolean</code> to be printed
-     * @throws	   java.io.IOException If an error occured while writing
+     * @param b
+     *            The <code>boolean</code> to be printed
+     * @throws java.io.IOException
+     *             If an error occurred while writing
      */
-
-    abstract public void print(boolean b) throws IOException;
+    public abstract void print(boolean b) throws IOException;
 
     /**
-     * Print a character.  The character is written to the
-     * JspWriter's buffer or, if no buffer is used, directly to the
-     * underlying writer.
+     * Print a character. The character is written to the JspWriter's buffer or,
+     * if no buffer is used, directly to the underlying writer.
      *
-     * @param      c   The <code>char</code> to be printed
-     * @throws	   java.io.IOException If an error occured while writing
+     * @param c
+     *            The <code>char</code> to be printed
+     * @throws java.io.IOException
+     *             If an error occurred while writing
      */
-
-    abstract public void print(char c) throws IOException;
+    public abstract void print(char c) throws IOException;
 
     /**
-     * Print an integer.  The string produced by <code>{@link
-     * java.lang.String#valueOf(int)}</code> is written to the
-     * JspWriter's buffer or, if no buffer is used, directly to the
-     * underlying writer.
+     * Print an integer. The string produced by <code>{@link
+     * java.lang.String#valueOf(int)}</code>
+     * is written to the JspWriter's buffer or, if no buffer is used, directly
+     * to the underlying writer.
      *
-     * @param      i   The <code>int</code> to be printed
-     * @see        java.lang.Integer#toString(int)
-     * @throws	   java.io.IOException If an error occured while writing
-     */
-
-    abstract public void print(int i) throws IOException;
+     * @param i
+     *            The <code>int</code> to be printed
+     * @see java.lang.Integer#toString(int)
+     * @throws java.io.IOException
+     *             If an error occurred while writing
+     */
+    public abstract void print(int i) throws IOException;
 
     /**
-     * Print a long integer.  The string produced by <code>{@link
-     * java.lang.String#valueOf(long)}</code> is written to the
-     * JspWriter's buffer or, if no buffer is used, directly to the
-     * underlying writer.
+     * Print a long integer. The string produced by <code>{@link
+     * java.lang.String#valueOf(long)}</code>
+     * is written to the JspWriter's buffer or, if no buffer is used, directly
+     * to the underlying writer.
      *
-     * @param      l   The <code>long</code> to be printed
-     * @see        java.lang.Long#toString(long)
-     * @throws	   java.io.IOException If an error occured while writing
-     */
-
-    abstract public void print(long l) throws IOException;
+     * @param l
+     *            The <code>long</code> to be printed
+     * @see java.lang.Long#toString(long)
+     * @throws java.io.IOException
+     *             If an error occurred while writing
+     */
+    public abstract void print(long l) throws IOException;
 
     /**
-     * Print a floating-point number.  The string produced by <code>{@link
-     * java.lang.String#valueOf(float)}</code> is written to the
-     * JspWriter's buffer or, if no buffer is used, directly to the
-     * underlying writer.
+     * Print a floating-point number. The string produced by <code>{@link
+     * java.lang.String#valueOf(float)}</code>
+     * is written to the JspWriter's buffer or, if no buffer is used, directly
+     * to the underlying writer.
      *
-     * @param      f   The <code>float</code> to be printed
-     * @see        java.lang.Float#toString(float)
-     * @throws	   java.io.IOException If an error occured while writing
+     * @param f
+     *            The <code>float</code> to be printed
+     * @see java.lang.Float#toString(float)
+     * @throws java.io.IOException
+     *             If an error occurred while writing
      */
-
-    abstract public void print(float f) throws IOException;
+    public abstract void print(float f) throws IOException;
 
     /**
-     * Print a double-precision floating-point number.  The string produced by
-     * <code>{@link java.lang.String#valueOf(double)}</code> is written to
-     * the JspWriter's buffer or, if no buffer is used, directly to the
-     * underlying writer.
+     * Print a double-precision floating-point number. The string produced by
+     * <code>{@link java.lang.String#valueOf(double)}</code> is written to the
+     * JspWriter's buffer or, if no buffer is used, directly to the underlying
+     * writer.
      *
-     * @param      d   The <code>double</code> to be printed
-     * @see        java.lang.Double#toString(double)
-     * @throws	   java.io.IOException If an error occured while writing
+     * @param d
+     *            The <code>double</code> to be printed
+     * @see java.lang.Double#toString(double)
+     * @throws java.io.IOException
+     *             If an error occurred while writing
      */
-
-    abstract public void print(double d) throws IOException;
+    public abstract void print(double d) throws IOException;
 
     /**
-     * Print an array of characters.  The characters are written to the
-     * JspWriter's buffer or, if no buffer is used, directly to the
-     * underlying writer.
-     *
-     * @param      s   The array of chars to be printed
+     * Print an array of characters. The characters are written to the
+     * JspWriter's buffer or, if no buffer is used, directly to the underlying
+     * writer.
      *
-     * @throws  NullPointerException  If <code>s</code> is <code>null</code>
-     * @throws	   java.io.IOException If an error occured while writing
+     * @param s
+     *            The array of chars to be printed
+     * @throws NullPointerException
+     *             If <code>s</code> is <code>null</code>
+     * @throws java.io.IOException
+     *             If an error occurred while writing
      */
-
-    abstract public void print(char s[]) throws IOException;
+    public abstract void print(char s[]) throws IOException;
 
     /**
-     * Print a string.  If the argument is <code>null</code> then the string
-     * <code>"null"</code> is printed.  Otherwise, the string's characters are
-     * written to the JspWriter's buffer or, if no buffer is used, directly
-     * to the underlying writer.
+     * Print a string. If the argument is <code>null</code> then the string
+     * <code>"null"</code> is printed. Otherwise, the string's characters are
+     * written to the JspWriter's buffer or, if no buffer is used, directly to
+     * the underlying writer.
      *
-     * @param      s   The <code>String</code> to be printed
-     * @throws	   java.io.IOException If an error occured while writing
+     * @param s
+     *            The <code>String</code> to be printed
+     * @throws java.io.IOException
+     *             If an error occurred while writing
      */
-
-    abstract public void print(String s) throws IOException;
+    public abstract void print(String s) throws IOException;
 
     /**
-     * Print an object.  The string produced by the <code>{@link
-     * java.lang.String#valueOf(Object)}</code> method is written to the
-     * JspWriter's buffer or, if no buffer is used, directly to the
-     * underlying writer.
+     * Print an object. The string produced by the <code>{@link
+     * java.lang.String#valueOf(Object)}</code>
+     * method is written to the JspWriter's buffer or, if no buffer is used,
+     * directly to the underlying writer.
      *
-     * @param      obj   The <code>Object</code> to be printed
-     * @see        java.lang.Object#toString()
-     * @throws	   java.io.IOException If an error occured while writing
+     * @param obj
+     *            The <code>Object</code> to be printed
+     * @see java.lang.Object#toString()
+     * @throws java.io.IOException
+     *             If an error occurred while writing
      */
-
-    abstract public void print(Object obj) throws IOException;
+    public abstract void print(Object obj) throws IOException;
 
     /**
-     * Terminate the current line by writing the line separator string.  The
-     * line separator string is defined by the system property
+     * Terminate the current line by writing the line separator string. The line
+     * separator string is defined by the system property
      * <code>line.separator</code>, and is not necessarily a single newline
      * character (<code>'\n'</code>).
-     * @throws	   java.io.IOException If an error occured while writing
+     *
+     * @throws java.io.IOException
+     *             If an error occurred while writing
      */
-
-    abstract public void println() throws IOException;
+    public abstract void println() throws IOException;
 
     /**
-     * Print a boolean value and then terminate the line.  This method behaves
-     * as though it invokes <code>{@link #print(boolean)}</code> and then
+     * Print a boolean value and then terminate the line. This method behaves as
+     * though it invokes <code>{@link #print(boolean)}</code> and then
      * <code>{@link #println()}</code>.
      *
-     * @param      x the boolean to write
-     * @throws	   java.io.IOException If an error occured while writing
+     * @param x
+     *            the boolean to write
+     * @throws java.io.IOException
+     *             If an error occurred while writing
      */
-
-    abstract public void println(boolean x) throws IOException;
+    public abstract void println(boolean x) throws IOException;
 
     /**
-     * Print a character and then terminate the line.  This method behaves as
+     * Print a character and then terminate the line. This method behaves as
      * though it invokes <code>{@link #print(char)}</code> and then <code>{@link
-     * #println()}</code>.
+     * #println()}</code>
+     * .
      *
-     * @param      x the char to write
-     * @throws	   java.io.IOException If an error occured while writing
+     * @param x
+     *            the char to write
+     * @throws java.io.IOException
+     *             If an error occurred while writing
      */
-
-    abstract public void println(char x) throws IOException;
+    public abstract void println(char x) throws IOException;
 
     /**
-     * Print an integer and then terminate the line.  This method behaves as
+     * Print an integer and then terminate the line. This method behaves as
      * though it invokes <code>{@link #print(int)}</code> and then <code>{@link
-     * #println()}</code>.
+     * #println()}</code>
+     * .
      *
-     * @param      x the int to write
-     * @throws	   java.io.IOException If an error occured while writing
+     * @param x
+     *            the int to write
+     * @throws java.io.IOException
+     *             If an error occurred while writing
      */
-
-    abstract public void println(int x) throws IOException;
+    public abstract void println(int x) throws IOException;
 
     /**
-     * Print a long integer and then terminate the line.  This method behaves
-     * as though it invokes <code>{@link #print(long)}</code> and then
+     * Print a long integer and then terminate the line. This method behaves as
+     * though it invokes <code>{@link #print(long)}</code> and then
      * <code>{@link #println()}</code>.
      *
-     * @param      x the long to write
-     * @throws	   java.io.IOException If an error occured while writing
+     * @param x
+     *            the long to write
+     * @throws java.io.IOException
+     *             If an error occurred while writing
      */
-
-    abstract public void println(long x) throws IOException;
+    public abstract void println(long x) throws IOException;
 
     /**
-     * Print a floating-point number and then terminate the line.  This method
+     * Print a floating-point number and then terminate the line. This method
      * behaves as though it invokes <code>{@link #print(float)}</code> and then
      * <code>{@link #println()}</code>.
      *
-     * @param      x the float to write
-     * @throws	   java.io.IOException If an error occured while writing
+     * @param x
+     *            the float to write
+     * @throws java.io.IOException
+     *             If an error occurred while writing
      */
-
-    abstract public void println(float x) throws IOException;
+    public abstract void println(float x) throws IOException;
 
     /**
      * Print a double-precision floating-point number and then terminate the
-     * line.  This method behaves as though it invokes <code>{@link
-     * #print(double)}</code> and then <code>{@link #println()}</code>.
+     * line. This method behaves as though it invokes <code>{@link
+     * #print(double)}</code> and
+     * then <code>{@link #println()}</code>.
      *
-     * @param      x the double to write
-     * @throws	   java.io.IOException If an error occured while writing
+     * @param x
+     *            the double to write
+     * @throws java.io.IOException
+     *             If an error occurred while writing
      */
-
-    abstract public void println(double x) throws IOException;
+    public abstract void println(double x) throws IOException;
 
     /**
-     * Print an array of characters and then terminate the line.  This method
+     * Print an array of characters and then terminate the line. This method
      * behaves as though it invokes <code>print(char[])</code> and then
      * <code>println()</code>.
      *
-     * @param      x the char[] to write
-     * @throws	   java.io.IOException If an error occured while writing
+     * @param x
+     *            the char[] to write
+     * @throws java.io.IOException
+     *             If an error occurred while writing
      */
-
-    abstract public void println(char x[]) throws IOException;
+    public abstract void println(char x[]) throws IOException;
 
     /**
-     * Print a String and then terminate the line.  This method behaves as
-     * though it invokes <code>{@link #print(String)}</code> and then
+     * Print a String and then terminate the line. This method behaves as though
+     * it invokes <code>{@link #print(String)}</code> and then
      * <code>{@link #println()}</code>.
      *
-     * @param      x the String to write
-     * @throws	   java.io.IOException If an error occured while writing
+     * @param x
+     *            the String to write
+     * @throws java.io.IOException
+     *             If an error occurred while writing
      */
-
-    abstract public void println(String x) throws IOException;
+    public abstract void println(String x) throws IOException;
 
     /**
-     * Print an Object and then terminate the line.  This method behaves as
+     * Print an Object and then terminate the line. This method behaves as
      * though it invokes <code>{@link #print(Object)}</code> and then
      * <code>{@link #println()}</code>.
      *
-     * @param      x the Object to write
-     * @throws	   java.io.IOException If an error occured while writing
+     * @param x
+     *            the Object to write
+     * @throws java.io.IOException
+     *             If an error occurred while writing
      */
-
-    abstract public void println(Object x) throws IOException;
-
+    public abstract void println(Object x) throws IOException;
 
     /**
-     * Clear the contents of the buffer. If the buffer has been already
-     * been flushed then the clear operation shall throw an IOException
-     * to signal the fact that some data has already been irrevocably 
-     * written to the client response stream.
+     * Clear the contents of the buffer. If the buffer has been already been
+     * flushed then the clear operation shall throw an IOException to signal the
+     * fact that some data has already been irrevocably written to the client
+     * response stream.
      *
-     * @throws IOException		If an I/O error occurs
+     * @throws IOException
+     *             If an I/O error occurs
      */
-
-    abstract public void clear() throws IOException;
+    public abstract void clear() throws IOException;
 
     /**
-     * Clears the current contents of the buffer. Unlike clear(), this
-     * method will not throw an IOException if the buffer has already been
-     * flushed. It merely clears the current content of the buffer and
-     * returns.
+     * Clears the current contents of the buffer. Unlike clear(), this method
+     * will not throw an IOException if the buffer has already been flushed. It
+     * merely clears the current content of the buffer and returns.
      *
-     * @throws IOException		If an I/O error occurs
+     * @throws IOException
+     *             If an I/O error occurs
      */
-
-    abstract public void clearBuffer() throws IOException;
+    public abstract void clearBuffer() throws IOException;
 
     /**
-     * Flush the stream.  If the stream has saved any characters from the
-     * various write() methods in a buffer, write them immediately to their
-     * intended destination.  Then, if that destination is another character or
-     * byte stream, flush it.  Thus one flush() invocation will flush all the
-     * buffers in a chain of Writers and OutputStreams.
+     * Flush the stream. If the stream has saved any characters from the various
+     * write() methods in a buffer, write them immediately to their intended
+     * destination. Then, if that destination is another character or byte
+     * stream, flush it. Thus one flush() invocation will flush all the buffers
+     * in a chain of Writers and OutputStreams.
      * <p>
      * The method may be invoked indirectly if the buffer size is exceeded.
      * <p>
-     * Once a stream has been closed,
-     * further write() or flush() invocations will cause an IOException to be
-     * thrown.
+     * Once a stream has been closed, further write() or flush() invocations
+     * will cause an IOException to be thrown.
      *
-     * @exception  IOException  If an I/O error occurs
+     * @exception IOException
+     *                If an I/O error occurs
      */
-
-    abstract public void flush() throws IOException;
+    @Override
+    public abstract void flush() throws IOException;
 
     /**
      * Close the stream, flushing it first.
      * <p>
-     * This method needs not be invoked explicitly for the initial JspWriter
-     * as the code generated by the JSP container will automatically
-     * include a call to close().
+     * This method needs not be invoked explicitly for the initial JspWriter as
+     * the code generated by the JSP container will automatically include a call
+     * to close().
      * <p>
      * Closing a previously-closed stream, unlike flush(), has no effect.
      *
-     * @exception  IOException  If an I/O error occurs
+     * @exception IOException
+     *                If an I/O error occurs
      */
-
-    abstract public void close() throws IOException;
+    @Override
+    public abstract void close() throws IOException;
 
     /**
      * This method returns the size of the buffer used by the JspWriter.
      *
      * @return the size of the buffer in bytes, or 0 is unbuffered.
      */
-
-    public int getBufferSize() { return bufferSize; }
+    public int getBufferSize() {
+        return bufferSize;
+    }
 
     /**
      * This method returns the number of unused bytes in the buffer.
      *
      * @return the number of bytes unused in the buffer
      */
-
-    abstract public int getRemaining();
+    public abstract int getRemaining();
 
     /**
      * This method indicates whether the JspWriter is autoFlushing.
      *
-     * @return if this JspWriter is auto flushing or throwing IOExceptions 
-     *     on buffer overflow conditions
+     * @return if this JspWriter is auto flushing or throwing IOExceptions on
+     *         buffer overflow conditions
      */
-
-    public boolean isAutoFlush() { return autoFlush; }
+    public boolean isAutoFlush() {
+        return autoFlush;
+    }
 
     /*
      * fields
@@ -434,8 +449,8 @@ abstract public class JspWriter extends
     /**
      * The size of the buffer used by the JspWriter.
      */
-    protected int     bufferSize;
-    
+    protected int bufferSize;
+
     /**
      * Whether the JspWriter is autoflushing.
      */

Modified: geronimo/specs/branches/jakarta/geronimo-jakarta-jsp_spec/src/main/java/jakarta/servlet/jsp/PageContext.java
URL: http://svn.apache.org/viewvc/geronimo/specs/branches/jakarta/geronimo-jakarta-jsp_spec/src/main/java/jakarta/servlet/jsp/PageContext.java?rev=1858615&r1=1858614&r2=1858615&view=diff
==============================================================================
--- geronimo/specs/branches/jakarta/geronimo-jakarta-jsp_spec/src/main/java/jakarta/servlet/jsp/PageContext.java (original)
+++ geronimo/specs/branches/jakarta/geronimo-jakarta-jsp_spec/src/main/java/jakarta/servlet/jsp/PageContext.java Sat May  4 21:29:39 2019
@@ -14,21 +14,20 @@
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
- 
-package javax.servlet.jsp;
 
-import java.io.IOException;
-
-import javax.servlet.Servlet;
-import javax.servlet.ServletConfig;
-import javax.servlet.ServletContext;
-import javax.servlet.ServletException;
-import javax.servlet.ServletRequest;
-import javax.servlet.ServletResponse;
+package jakarta.servlet.jsp;
 
-import javax.servlet.http.HttpSession;
+import java.io.IOException;
 
-import javax.servlet.jsp.tagext.BodyContent;
+import jakarta.servlet.RequestDispatcher;
+import jakarta.servlet.Servlet;
+import jakarta.servlet.ServletConfig;
+import jakarta.servlet.ServletContext;
+import jakarta.servlet.ServletException;
+import jakarta.servlet.ServletRequest;
+import jakarta.servlet.ServletResponse;
+import jakarta.servlet.http.HttpSession;
+import jakarta.servlet.jsp.tagext.BodyContent;
 
 /**
  * <p>
@@ -42,7 +41,7 @@ import javax.servlet.jsp.tagext.BodyCont
  *
  * <p> The <code> PageContext </code> class is an abstract class, designed to be
  * extended to provide implementation dependent implementations thereof, by
- * conformant JSP engine runtime environments. A PageContext instance is 
+ * conformant JSP engine runtime environments. A PageContext instance is
  * obtained by a JSP implementation class by calling the
  * JspFactory.getPageContext() method, and is released by calling
  * JspFactory.releasePageContext().
@@ -51,29 +50,29 @@ import javax.servlet.jsp.tagext.BodyCont
  * used  within a JSP Page Implementation object is given elsewhere.
  *
  * <p>
- * The PageContext provides a number of facilities to the page/component 
+ * The PageContext provides a number of facilities to the page/component
  * author and page implementor, including:
  * <ul>
  * <li>a single API to manage the various scoped namespaces
  * <li>a number of convenience API's to access various public objects
  * <li>a mechanism to obtain the JspWriter for output
  * <li>a mechanism to manage session usage by the page
- * <li>a mechanism to expose page directive attributes to the scripting 
+ * <li>a mechanism to expose page directive attributes to the scripting
  *     environment
- * <li>mechanisms to forward or include the current request to other active 
+ * <li>mechanisms to forward or include the current request to other active
  *     components in the application
  * <li>a mechanism to handle errorpage exception processing
  * </ul>
  *
  * <p><B>Methods Intended for Container Generated Code</B>
  * <p>Some methods are intended to be used by the code generated by the
- * container, not by code written by JSP page authors, or JSP tag library 
+ * container, not by code written by JSP page authors, or JSP tag library
  * authors.
  * <p>The methods supporting <B>lifecycle</B> are <code>initialize()</code>
  * and <code>release()</code>
  *
  * <p>
- * The following methods enable the <B>management of nested</B> JspWriter 
+ * The following methods enable the <B>management of nested</B> JspWriter
  * streams to implement Tag Extensions: <code>pushBody()</code>
  *
  * <p><B>Methods Intended for JSP authors</B>
@@ -91,32 +90,33 @@ import javax.servlet.jsp.tagext.BodyCont
  * and  <code>handlePageException()</code>.
  */
 
-abstract public class PageContext 
+public abstract class PageContext
     extends JspContext
 {
-    
+
     /**
-     * Sole constructor. (For invocation by subclass constructors, 
+     * Sole constructor. (For invocation by subclass constructors,
      * typically implicit.)
      */
     public PageContext() {
+        // NOOP by default
     }
-    
+
     /**
      * Page scope: (this is the default) the named reference remains available
      * in this PageContext until the return from the current Servlet.service()
      * invocation.
      */
 
-    public static final int PAGE_SCOPE		= 1;
+    public static final int PAGE_SCOPE = 1;
 
     /**
-     * Request scope: the named reference remains available from the 
-     * ServletRequest associated with the Servlet until the current request 
+     * Request scope: the named reference remains available from the
+     * ServletRequest associated with the Servlet until the current request
      * is completed.
      */
 
-    public static final int REQUEST_SCOPE	= 2;
+    public static final int REQUEST_SCOPE = 2;
 
     /**
      * Session scope (only valid if this page participates in a session):
@@ -124,14 +124,14 @@ abstract public class PageContext
      * associated with the Servlet until the HttpSession is invalidated.
      */
 
-    public static final int SESSION_SCOPE	= 3;
+    public static final int SESSION_SCOPE = 3;
 
     /**
-     * Application scope: named reference remains available in the 
+     * Application scope: named reference remains available in the
      * ServletContext until it is reclaimed.
      */
 
-    public static final int APPLICATION_SCOPE	= 4;
+    public static final int APPLICATION_SCOPE = 4;
 
     /**
      * Name used to store the Servlet in this PageContext's nametables.
@@ -181,7 +181,7 @@ abstract public class PageContext
     public static final String APPLICATION = "javax.servlet.jsp.jspApplication";
 
     /**
-     * Name used to store uncaught exception in ServletRequest attribute 
+     * Name used to store uncaught exception in ServletRequest attribute
      * list and PageContext name table.
      */
 
@@ -207,13 +207,13 @@ abstract public class PageContext
      * @param servlet The Servlet that is associated with this PageContext
      * @param request The currently pending request for this Servlet
      * @param response The currently pending response for this Servlet
-     * @param errorPageURL The value of the errorpage attribute from the page 
+     * @param errorPageURL The value of the errorpage attribute from the page
      *     directive or null
-     * @param needsSession The value of the session attribute from the 
+     * @param needsSession The value of the session attribute from the
      *     page directive
-     * @param bufferSize The value of the buffer attribute from the page 
+     * @param bufferSize The value of the buffer attribute from the page
      *     directive
-     * @param autoFlush The value of the autoflush attribute from the page 
+     * @param autoFlush The value of the autoflush attribute from the page
      *     directive
      *
      * @throws IOException during creation of JspWriter
@@ -221,10 +221,10 @@ abstract public class PageContext
      * @throws IllegalArgumentException If one of the given parameters
      *     is invalid
      */
- 
-    abstract public void initialize(Servlet servlet, ServletRequest request, 
-        ServletResponse response, String errorPageURL, boolean needsSession, 
-        int bufferSize, boolean autoFlush)  
+
+    public abstract void initialize(Servlet servlet, ServletRequest request,
+        ServletResponse response, String errorPageURL, boolean needsSession,
+        int bufferSize, boolean autoFlush)
         throws IOException, IllegalStateException, IllegalArgumentException;
 
     /**
@@ -242,7 +242,7 @@ abstract public class PageContext
      *
      */
 
-    abstract public void release();
+    public abstract void release();
 
     /**
      * The current value of the session object (an HttpSession).
@@ -250,17 +250,17 @@ abstract public class PageContext
      * @return the HttpSession for this PageContext or null
      */
 
-    abstract public HttpSession getSession();
+    public abstract HttpSession getSession();
 
     /**
-     * The current value of the page object (In a Servlet environment, 
+     * The current value of the page object (In a Servlet environment,
      * this is an instance of javax.servlet.Servlet).
      *
-     * @return the Page implementation class instance associated 
+     * @return the Page implementation class instance associated
      *     with this PageContext
      */
 
-    abstract public Object getPage();
+    public abstract Object getPage();
 
 
     /**
@@ -269,7 +269,7 @@ abstract public class PageContext
      * @return The ServletRequest for this PageContext
      */
 
-    abstract public ServletRequest getRequest();
+    public abstract ServletRequest getRequest();
 
     /**
      * The current value of the response object (a ServletResponse).
@@ -277,7 +277,7 @@ abstract public class PageContext
      * @return the ServletResponse for this PageContext
      */
 
-    abstract public ServletResponse getResponse();
+    public abstract ServletResponse getResponse();
 
     /**
      * The current value of the exception object (an Exception).
@@ -285,7 +285,7 @@ abstract public class PageContext
      * @return any exception passed to this as an errorpage
      */
 
-    abstract public Exception getException();
+    public abstract Exception getException();
 
     /**
      * The ServletConfig instance.
@@ -293,26 +293,26 @@ abstract public class PageContext
      * @return the ServletConfig for this PageContext
      */
 
-    abstract public ServletConfig getServletConfig();
+    public abstract ServletConfig getServletConfig();
 
     /**
      * The ServletContext instance.
-     * 
+     *
      * @return the ServletContext for this PageContext
      */
 
-    abstract public ServletContext getServletContext();
+    public abstract ServletContext getServletContext();
 
     /**
      * <p>
-     * This method is used to re-direct, or "forward" the current 
-     * ServletRequest and ServletResponse to another active component in 
+     * This method is used to re-direct, or "forward" the current
+     * ServletRequest and ServletResponse to another active component in
      * the application.
      * </p>
      * <p>
      * If the <I> relativeUrlPath </I> begins with a "/" then the URL specified
      * is calculated relative to the DOCROOT of the <code> ServletContext </code>
-     * for this JSP. If the path does not begin with a "/" then the URL 
+     * for this JSP. If the path does not begin with a "/" then the URL
      * specified is calculated relative to the URL of the request that was
      * mapped to the calling JSP.
      * </p>
@@ -324,21 +324,21 @@ abstract public class PageContext
      * Once this method has been called successfully, it is illegal for the
      * calling <code> Thread </code> to attempt to modify the <code>
      * ServletResponse </code> object.  Any such attempt to do so, shall result
-     * in undefined behavior. Typically, callers immediately return from 
+     * in undefined behavior. Typically, callers immediately return from
      * <code> _jspService(...) </code> after calling this method.
      * </p>
      *
-     * @param relativeUrlPath specifies the relative URL path to the target 
+     * @param relativeUrlPath specifies the relative URL path to the target
      *     resource as described above
      *
-     * @throws IllegalStateException if <code> ServletResponse </code> is not 
+     * @throws IllegalStateException if <code> ServletResponse </code> is not
      *     in a state where a forward can be performed
      * @throws ServletException if the page that was forwarded to throws
      *     a ServletException
      * @throws IOException if an I/O error occurred while forwarding
      */
 
-    abstract public void forward(String relativeUrlPath) 
+    public abstract void forward(String relativeUrlPath)
         throws ServletException, IOException;
 
     /**
@@ -355,7 +355,7 @@ abstract public class PageContext
      * <p>
      * If the <I> relativeUrlPath </I> begins with a "/" then the URL specified
      * is calculated relative to the DOCROOT of the <code>ServletContext</code>
-     * for this JSP. If the path does not begin with a "/" then the URL 
+     * for this JSP. If the path does not begin with a "/" then the URL
      * specified is calculated relative to the URL of the request that was
      * mapped to the calling JSP.
      * </p>
@@ -364,14 +364,14 @@ abstract public class PageContext
      * executing within a <code> _jspService(...) </code> method of a JSP.
      * </p>
      *
-     * @param relativeUrlPath specifies the relative URL path to the target 
+     * @param relativeUrlPath specifies the relative URL path to the target
      *     resource to be included
      *
      * @throws ServletException if the page that was forwarded to throws
      *     a ServletException
      * @throws IOException if an I/O error occurred while forwarding
      */
-    abstract public void include(String relativeUrlPath) 
+    public abstract void include(String relativeUrlPath)
         throws ServletException, IOException;
 
     /**
@@ -382,14 +382,14 @@ abstract public class PageContext
      * directly to the current JspWriter returned by a call to getOut().
      * </p>
      * <p>
-     * If flush is true, The current JspWriter "out" for this JSP 
-     * is flushed as a side-effect of this call, prior to processing 
+     * If flush is true, The current JspWriter "out" for this JSP
+     * is flushed as a side-effect of this call, prior to processing
      * the include.  Otherwise, the JspWriter "out" is not flushed.
      * </p>
      * <p>
      * If the <i>relativeUrlPath</i> begins with a "/" then the URL specified
      * is calculated relative to the DOCROOT of the <code>ServletContext</code>
-     * for this JSP. If the path does not begin with a "/" then the URL 
+     * for this JSP. If the path does not begin with a "/" then the URL
      * specified is calculated relative to the URL of the request that was
      * mapped to the calling JSP.
      * </p>
@@ -398,7 +398,7 @@ abstract public class PageContext
      * executing within a <code> _jspService(...) </code> method of a JSP.
      * </p>
      *
-     * @param relativeUrlPath specifies the relative URL path to the 
+     * @param relativeUrlPath specifies the relative URL path to the
      *     target resource to be included
      * @param flush True if the JspWriter is to be flushed before the include,
      *     or false if not.
@@ -408,8 +408,8 @@ abstract public class PageContext
      * @throws IOException if an I/O error occurred while forwarding
      * @since 2.0
      */
-    abstract public void include(String relativeUrlPath, boolean flush) 
-	throws ServletException, IOException;
+    public abstract void include(String relativeUrlPath, boolean flush)
+        throws ServletException, IOException;
 
     /**
      * <p>
@@ -428,11 +428,11 @@ abstract public class PageContext
      * <p>
      * A JSP implementation class shall typically clean up any local state
      * prior to invoking this and will return immediately thereafter. It is
-     * illegal to generate any output to the client, or to modify any 
+     * illegal to generate any output to the client, or to modify any
      * ServletResponse state after invoking this call.
      *
      * <p>
-     * This method is kept for backwards compatiblity reasons.  Newly
+     * This method is kept for backwards compatibility reasons.  Newly
      * generated code should use PageContext.handlePageException(Throwable).
      *
      * @param e the exception to be handled
@@ -445,7 +445,7 @@ abstract public class PageContext
      * @see #handlePageException(Throwable)
      */
 
-    abstract public void handlePageException(Exception e) 
+    public abstract void handlePageException(Exception e)
         throws ServletException, IOException;
 
     /**
@@ -471,7 +471,7 @@ abstract public class PageContext
      * <p>
      * A JSP implementation class shall typically clean up any local state
      * prior to invoking this and will return immediately thereafter. It is
-     * illegal to generate any output to the client, or to modify any 
+     * illegal to generate any output to the client, or to modify any
      * ServletResponse state after invoking this call.
      *
      * @param t the throwable to be handled
@@ -484,7 +484,7 @@ abstract public class PageContext
      * @see #handlePageException(Exception)
      */
 
-    abstract public void handlePageException(Throwable t) 
+    public abstract void handlePageException(Throwable t)
         throws ServletException, IOException;
 
     /**
@@ -498,13 +498,13 @@ abstract public class PageContext
     public BodyContent pushBody() {
         return null; // XXX to implement
     }
-         
+
 
     /**
      * Provides convenient access to error information.
      *
-     * @return an ErrorData instance containing information about the 
-     * error, as obtained from the request attributes, as per the 
+     * @return an ErrorData instance containing information about the
+     * error, as obtained from the request attributes, as per the
      * Servlet specification.  If this is not an error page (that is,
      * if the isErrorPage attribute of the page directive is not set
      * to "true"), the information is meaningless.
@@ -512,12 +512,24 @@ abstract public class PageContext
      * @since 2.0
      */
     public ErrorData getErrorData() {
-	return new ErrorData( 
-	    (Throwable)getRequest().getAttribute( "javax.servlet.error.exception" ),
-	    ((Integer)getRequest().getAttribute( 
-		"javax.servlet.error.status_code" )).intValue(),
-	    (String)getRequest().getAttribute( "javax.servlet.error.request_uri" ),
-	    (String)getRequest().getAttribute( "javax.servlet.error.servlet_name" ) );
+        int status = 0;
+
+        Integer status_code = (Integer)getRequest().getAttribute(
+                RequestDispatcher.ERROR_STATUS_CODE);
+        // Avoid NPE if attribute is not set
+        if (status_code != null) {
+            status = status_code.intValue();
+        }
+
+        return new ErrorData(
+            (Throwable)getRequest().getAttribute(
+                    RequestDispatcher.ERROR_EXCEPTION),
+            status,
+            (String)getRequest().getAttribute(
+                    RequestDispatcher.ERROR_REQUEST_URI),
+            (String)getRequest().getAttribute(
+                    RequestDispatcher.ERROR_SERVLET_NAME)
+            );
     }
-    
+
 }

Modified: geronimo/specs/branches/jakarta/geronimo-jakarta-jsp_spec/src/main/java/jakarta/servlet/jsp/SkipPageException.java
URL: http://svn.apache.org/viewvc/geronimo/specs/branches/jakarta/geronimo-jakarta-jsp_spec/src/main/java/jakarta/servlet/jsp/SkipPageException.java?rev=1858615&r1=1858614&r2=1858615&view=diff
==============================================================================
--- geronimo/specs/branches/jakarta/geronimo-jakarta-jsp_spec/src/main/java/jakarta/servlet/jsp/SkipPageException.java (original)
+++ geronimo/specs/branches/jakarta/geronimo-jakarta-jsp_spec/src/main/java/jakarta/servlet/jsp/SkipPageException.java Sat May  4 21:29:39 2019
@@ -1,76 +1,77 @@
 /*
-* Licensed to the Apache Software Foundation (ASF) under one or more
-* contributor license agreements.  See the NOTICE file distributed with
-* this work for additional information regarding copyright ownership.
-* 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.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package javax.servlet.jsp;
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * 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.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package jakarta.servlet.jsp;
 
 /**
- * Exception to indicate the calling page must cease evaluation.
- * Thrown by a simple tag handler to indicate that the remainder of 
- * the page must not be evaluated.  The result is propagated back to
- * the pagein the case where one tag invokes another (as can be
- * the case with tag files).  The effect is similar to that of a 
- * Classic Tag Handler returning Tag.SKIP_PAGE from doEndTag().
- * Jsp Fragments may also throw this exception.  This exception
+ * Exception to indicate the calling page must cease evaluation. Thrown by a
+ * simple tag handler to indicate that the remainder of the page must not be
+ * evaluated. The result is propagated back to the page in the case where one
+ * tag invokes another (as can be the case with tag files). The effect is
+ * similar to that of a Classic Tag Handler returning Tag.SKIP_PAGE from
+ * doEndTag(). Jsp Fragments may also throw this exception. This exception
  * should not be thrown manually in a JSP page or tag file - the behavior is
- * undefined.  The exception is intended to be thrown inside 
- * SimpleTag handlers and in JSP fragments.
- * 
+ * undefined. The exception is intended to be thrown inside SimpleTag handlers
+ * and in JSP fragments.
+ *
  * @see javax.servlet.jsp.tagext.SimpleTag#doTag
  * @see javax.servlet.jsp.tagext.JspFragment#invoke
  * @see javax.servlet.jsp.tagext.Tag#doEndTag
  * @since 2.0
  */
-public class SkipPageException
-    extends JspException
-{
+public class SkipPageException extends JspException {
+
+    private static final long serialVersionUID = 1L;
+
     /**
      * Creates a SkipPageException with no message.
      */
     public SkipPageException() {
         super();
     }
-    
+
     /**
      * Creates a SkipPageException with the provided message.
      *
-     * @param message the detail message
+     * @param message
+     *            the detail message
      */
-    public SkipPageException( String message ) {
-        super( message );
+    public SkipPageException(String message) {
+        super(message);
     }
 
     /**
      * Creates a SkipPageException with the provided message and root cause.
      *
-     * @param message the detail message
-     * @param rootCause the originating cause of this exception
+     * @param message
+     *            the detail message
+     * @param rootCause
+     *            the originating cause of this exception
      */
-    public SkipPageException( String message, Throwable rootCause ) {
-	super( message, rootCause );
+    public SkipPageException(String message, Throwable rootCause) {
+        super(message, rootCause);
     }
 
     /**
      * Creates a SkipPageException with the provided root cause.
      *
-     * @param rootCause the originating cause of this exception
+     * @param rootCause
+     *            the originating cause of this exception
      */
-    public SkipPageException( Throwable rootCause ) {
-	super( rootCause );
+    public SkipPageException(Throwable rootCause) {
+        super(rootCause);
     }
-    
 }
-
-

Modified: geronimo/specs/branches/jakarta/geronimo-jakarta-jsp_spec/src/main/java/jakarta/servlet/jsp/el/ELException.java
URL: http://svn.apache.org/viewvc/geronimo/specs/branches/jakarta/geronimo-jakarta-jsp_spec/src/main/java/jakarta/servlet/jsp/el/ELException.java?rev=1858615&r1=1858614&r2=1858615&view=diff
==============================================================================
--- geronimo/specs/branches/jakarta/geronimo-jakarta-jsp_spec/src/main/java/jakarta/servlet/jsp/el/ELException.java (original)
+++ geronimo/specs/branches/jakarta/geronimo-jakarta-jsp_spec/src/main/java/jakarta/servlet/jsp/el/ELException.java Sat May  4 21:29:39 2019
@@ -1,93 +1,81 @@
 /*
-* Licensed to the Apache Software Foundation (ASF) under one or more
-* contributor license agreements.  See the NOTICE file distributed with
-* this work for additional information regarding copyright ownership.
-* 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.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-
-package javax.servlet.jsp.el;
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * 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.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 
+package jakarta.servlet.jsp.el;
 
 /**
- * Represents any of the exception conditions that arise during the
- * operation evaluation of the evaluator.
+ * Represents any of the exception conditions that arise during the operation
+ * evaluation of the evaluator.
  *
  * @since 2.0
- * @deprecated
+ * @deprecated As of JSP 2.1, replaced by javax.el.ELException
  */
-public class ELException
-  extends Exception
-{
-  //-------------------------------------
-  // Member variables
-  //-------------------------------------
-
-  private Throwable mRootCause;
-
-  //-------------------------------------
-  /**
-   * Creates an ELException with no detail message.
-   **/
-  public ELException ()
-  {
-    super ();
-  }
-
-  //-------------------------------------
-  /**
-   * Creates an ELException with the provided detail message.
-   *
-   * @param pMessage the detail message
-   **/
-  public ELException (String pMessage)
-  {
-    super (pMessage);
-  }
-
-  //-------------------------------------
-  /**
-   * Creates an ELException with the given root cause.
-   *
-   * @param pRootCause the originating cause of this exception
-   **/
-  public ELException (Throwable pRootCause)
-  {
-    super( pRootCause.getLocalizedMessage() );
-    mRootCause = pRootCause;
-  }
-
-  //-------------------------------------
-  /**
-   * Creates an ELException with the given detail message and root cause.
-   *
-   * @param pMessage the detail message
-   * @param pRootCause the originating cause of this exception
-   **/
-  public ELException (String pMessage,
-		      Throwable pRootCause)
-  {
-    super (pMessage);
-    mRootCause = pRootCause;
-  }
-
-  //-------------------------------------
-  /**
-   * Returns the root cause.
-   *
-   * @return the root cause of this exception
-   */
-  public Throwable getRootCause ()
-  {
-    return mRootCause;
-  }
+@SuppressWarnings("dep-ann") // TCK signature test fails with annotation
+public class ELException extends Exception {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * Creates an ELException with no detail message.
+     **/
+    public ELException() {
+        super();
+    }
+
+    /**
+     * Creates an ELException with the provided detail message.
+     *
+     * @param pMessage
+     *            the detail message
+     **/
+    public ELException(String pMessage) {
+        super(pMessage);
+    }
+
+    /**
+     * Creates an ELException with the given root cause.
+     *
+     * @param pRootCause
+     *            the originating cause of this exception
+     **/
+    public ELException(Throwable pRootCause) {
+        super(pRootCause);
+    }
+
+    // -------------------------------------
+    /**
+     * Creates an ELException with the given detail message and root cause.
+     *
+     * @param pMessage
+     *            the detail message
+     * @param pRootCause
+     *            the originating cause of this exception
+     **/
+    public ELException(String pMessage, Throwable pRootCause) {
+        super(pMessage, pRootCause);
+    }
+
+    // -------------------------------------
+    /**
+     * Returns the root cause.
+     *
+     * @return the root cause of this exception
+     */
+    public Throwable getRootCause() {
+        return getCause();
+    }
 }

Modified: geronimo/specs/branches/jakarta/geronimo-jakarta-jsp_spec/src/main/java/jakarta/servlet/jsp/el/ELParseException.java
URL: http://svn.apache.org/viewvc/geronimo/specs/branches/jakarta/geronimo-jakarta-jsp_spec/src/main/java/jakarta/servlet/jsp/el/ELParseException.java?rev=1858615&r1=1858614&r2=1858615&view=diff
==============================================================================
--- geronimo/specs/branches/jakarta/geronimo-jakarta-jsp_spec/src/main/java/jakarta/servlet/jsp/el/ELParseException.java (original)
+++ geronimo/specs/branches/jakarta/geronimo-jakarta-jsp_spec/src/main/java/jakarta/servlet/jsp/el/ELParseException.java Sat May  4 21:29:39 2019
@@ -15,19 +15,21 @@
 * limitations under the License.
 */
 
-package javax.servlet.jsp.el;
+package jakarta.servlet.jsp.el;
 
 
 /**
  * Represents a parsing error encountered while parsing an EL expression.
  *
  * @since 2.0
- * @deprecated
+ * @deprecated As of JSP 2.1, replaced by javax.el.ELException
  */
-
+@SuppressWarnings("dep-ann") // TCK signature test fails with annotation
 public class ELParseException extends ELException {
 
- //-------------------------------------
+ private static final long serialVersionUID = 1L;
+
+//-------------------------------------
   /**
    * Creates an ELParseException with no detail message.
    */

Modified: geronimo/specs/branches/jakarta/geronimo-jakarta-jsp_spec/src/main/java/jakarta/servlet/jsp/el/Expression.java
URL: http://svn.apache.org/viewvc/geronimo/specs/branches/jakarta/geronimo-jakarta-jsp_spec/src/main/java/jakarta/servlet/jsp/el/Expression.java?rev=1858615&r1=1858614&r2=1858615&view=diff
==============================================================================
--- geronimo/specs/branches/jakarta/geronimo-jakarta-jsp_spec/src/main/java/jakarta/servlet/jsp/el/Expression.java (original)
+++ geronimo/specs/branches/jakarta/geronimo-jakarta-jsp_spec/src/main/java/jakarta/servlet/jsp/el/Expression.java Sat May  4 21:29:39 2019
@@ -16,37 +16,38 @@
 */
 
 
-package javax.servlet.jsp.el;
+package jakarta.servlet.jsp.el;
 
 
 /**
  * <p>The abstract class for a prepared expression.</p>
  *
- * <p>An instance of an Expression can be obtained via from an 
+ * <p>An instance of an Expression can be obtained via from an
  * ExpressionEvaluator instance.</p>
  *
  * <p>An Expression may or not have done a syntactic parse of the expression.
- * A client invoking the evaluate() method should be ready for the case 
+ * A client invoking the evaluate() method should be ready for the case
  * where ELParseException exceptions are raised. </p>
  *
  * @since 2.0
- * @deprecated
+ * @deprecated As of JSP 2.1, replaced by javax.el.ValueExpression
  */
+@SuppressWarnings("dep-ann") // TCK signature test fails with annotation
 public abstract class Expression {
 
-    /** 
-     * Evaluates an expression that was previously prepared.  In some 
-     * implementations preparing an expression involves full syntactic 
-     * validation, but others may not do so.  Evaluating the expression may 
-     * raise an ELParseException as well as other ELExceptions due to 
+    /**
+     * Evaluates an expression that was previously prepared.  In some
+     * implementations preparing an expression involves full syntactic
+     * validation, but others may not do so.  Evaluating the expression may
+     * raise an ELParseException as well as other ELExceptions due to
      * run-time evaluation.
      *
-     * @param vResolver A VariableResolver instance that can be used at 
+     * @param vResolver A VariableResolver instance that can be used at
      *   runtime to resolve the name of implicit objects into Objects.
      * @return The result of the expression evaluation.
      *
      * @exception ELException Thrown if the expression evaluation failed.
-     */ 
+     */
     public abstract Object evaluate( VariableResolver vResolver )
         throws ELException;
 }

Modified: geronimo/specs/branches/jakarta/geronimo-jakarta-jsp_spec/src/main/java/jakarta/servlet/jsp/el/ExpressionEvaluator.java
URL: http://svn.apache.org/viewvc/geronimo/specs/branches/jakarta/geronimo-jakarta-jsp_spec/src/main/java/jakarta/servlet/jsp/el/ExpressionEvaluator.java?rev=1858615&r1=1858614&r2=1858615&view=diff
==============================================================================
--- geronimo/specs/branches/jakarta/geronimo-jakarta-jsp_spec/src/main/java/jakarta/servlet/jsp/el/ExpressionEvaluator.java (original)
+++ geronimo/specs/branches/jakarta/geronimo-jakarta-jsp_spec/src/main/java/jakarta/servlet/jsp/el/ExpressionEvaluator.java Sat May  4 21:29:39 2019
@@ -1,108 +1,115 @@
 /*
-* Licensed to the Apache Software Foundation (ASF) under one or more
-* contributor license agreements.  See the NOTICE file distributed with
-* this work for additional information regarding copyright ownership.
-* 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.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-
-package javax.servlet.jsp.el;
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * 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.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 
+package jakarta.servlet.jsp.el;
 
 /**
- * <p>The abstract base class for an expression-language evaluator.
- * Classes that implement an expression language expose their functionality
- * via this abstract class.</p>
- *
- * <p>An instance of the ExpressionEvaluator can be obtained via the 
- * JspContext / PageContext</p>
- *
- * <p>The parseExpression() and evaluate() methods must be thread-safe.  
- * That is, multiple threads may call these methods on the same 
- * ExpressionEvaluator object simultaneously.  Implementations should 
- * synchronize access if they depend on transient state.  Implementations 
- * should not, however, assume that only one object of each 
- * ExpressionEvaluator type will be instantiated; global caching should 
- * therefore be static.</p>
- *
- * <p>Only a single EL expression, starting with '${' and ending with
- * '}', can be parsed or evaluated at a time.  EL expressions 
- * cannot be mixed with static text.  For example, attempting to 
- * parse or evaluate "<code>abc${1+1}def${1+1}ghi</code>" or even
- * "<code>${1+1}${1+1}</code>" will cause an <code>ELException</code> to
- * be thrown.</p>
- *
- * <p>The following are examples of syntactically legal EL expressions:
- *
+ * <p>
+ * The abstract base class for an expression-language evaluator. Classes that
+ * implement an expression language expose their functionality via this abstract
+ * class.
+ * </p>
+ * <p>
+ * An instance of the ExpressionEvaluator can be obtained via the JspContext /
+ * PageContext
+ * </p>
+ * <p>
+ * The parseExpression() and evaluate() methods must be thread-safe. That is,
+ * multiple threads may call these methods on the same ExpressionEvaluator
+ * object simultaneously. Implementations should synchronize access if they
+ * depend on transient state. Implementations should not, however, assume that
+ * only one object of each ExpressionEvaluator type will be instantiated; global
+ * caching should therefore be static.
+ * </p>
+ * <p>
+ * Only a single EL expression, starting with '${' and ending with '}', can be
+ * parsed or evaluated at a time. EL expressions cannot be mixed with static
+ * text. For example, attempting to parse or evaluate "
+ * <code>abc${1+1}def${1+1}ghi</code>" or even "<code>${1+1}${1+1}</code>" will
+ * cause an <code>ELException</code> to be thrown.
+ * </p>
+ * <p>
+ * The following are examples of syntactically legal EL expressions:
+ * </p>
  * <ul>
- *   <li><code>${person.lastName}</code></li>
- *   <li><code>${8 * 8}</code></li>
- *   <li><code>${my:reverse('hello')}</code></li>
+ * <li><code>${person.lastName}</code></li>
+ * <li><code>${8 * 8}</code></li>
+ * <li><code>${my:reverse('hello')}</code></li>
  * </ul>
- * </p>
  *
  * @since 2.0
- * @deprecated
+ * @deprecated As of JSP 2.1, replaced by javax.el.ExpressionFactory
  */
+@SuppressWarnings("dep-ann")
+// TCK signature test fails with annotation
 public abstract class ExpressionEvaluator {
 
     /**
-     * Prepare an expression for later evaluation.  This method should perform
-     * syntactic validation of the expression; if in doing so it detects 
-     * errors, it should raise an ELParseException.
+     * Prepare an expression for later evaluation. This method should perform
+     * syntactic validation of the expression; if in doing so it detects errors,
+     * it should raise an ELParseException.
      *
-     * @param expression The expression to be evaluated.
-     * @param expectedType The expected type of the result of the evaluation
-     * @param fMapper A FunctionMapper to resolve functions found in 
-     *     the expression.  It can be null, in which case no functions 
-     *     are supported for this invocation.  The ExpressionEvaluator 
-     *     must not hold on to the FunctionMapper reference after 
-     *     returning from <code>parseExpression()</code>.  The 
-     *     <code>Expression</code> object returned must invoke the same 
-     *     functions regardless of whether the mappings in the 
-     *     provided <code>FunctionMapper</code> instance change between 
-     *     calling <code>ExpressionEvaluator.parseExpression()</code>
-     *     and <code>Expression.evaluate()</code>.
+     * @param expression
+     *            The expression to be evaluated.
+     * @param expectedType
+     *            The expected type of the result of the evaluation
+     * @param fMapper
+     *            A FunctionMapper to resolve functions found in the expression.
+     *            It can be null, in which case no functions are supported for
+     *            this invocation. The ExpressionEvaluator must not hold on to
+     *            the FunctionMapper reference after returning from
+     *            <code>parseExpression()</code>. The <code>Expression</code>
+     *            object returned must invoke the same functions regardless of
+     *            whether the mappings in the provided
+     *            <code>FunctionMapper</code> instance change between calling
+     *            <code>ExpressionEvaluator.parseExpression()</code> and
+     *            <code>Expression.evaluate()</code>.
      * @return The Expression object encapsulating the arguments.
-     *
-     * @exception ELException Thrown if parsing errors were found.
-     */ 
-    public abstract Expression parseExpression( String expression, 
-                                Class expectedType, 
-                                FunctionMapper fMapper ) 
-      throws ELException; 
+     * @exception ELException
+     *                Thrown if parsing errors were found.
+     */
+    public abstract Expression parseExpression(String expression,
+            @SuppressWarnings("rawtypes")// TCK signature fails with generics
+            Class expectedType, FunctionMapper fMapper) throws ELException;
 
-
-    /** 
-     * Evaluates an expression.  This method may perform some syntactic 
-     * validation and, if so, it should raise an ELParseException error if 
-     * it encounters syntactic errors.  EL evaluation errors should cause 
-     * an ELException to be raised.
+    /**
+     * Evaluates an expression. This method may perform some syntactic
+     * validation and, if so, it should raise an ELParseException error if it
+     * encounters syntactic errors. EL evaluation errors should cause an
+     * ELException to be raised.
      *
-     * @param expression The expression to be evaluated.
-     * @param expectedType The expected type of the result of the evaluation
-     * @param vResolver A VariableResolver instance that can be used at 
-     *     runtime to resolve the name of implicit objects into Objects.
-     * @param fMapper A FunctionMapper to resolve functions found in 
-     *     the expression.  It can be null, in which case no functions 
-     *     are supported for this invocation.  
+     * @param expression
+     *            The expression to be evaluated.
+     * @param expectedType
+     *            The expected type of the result of the evaluation
+     * @param vResolver
+     *            A VariableResolver instance that can be used at runtime to
+     *            resolve the name of implicit objects into Objects.
+     * @param fMapper
+     *            A FunctionMapper to resolve functions found in the expression.
+     *            It can be null, in which case no functions are supported for
+     *            this invocation.
      * @return The result of the expression evaluation.
-     *
-     * @exception ELException Thrown if the expression evaluation failed.
-     */ 
-    public abstract Object evaluate( String expression, 
-                                Class expectedType, 
-                                VariableResolver vResolver,
-                                FunctionMapper fMapper ) 
-      throws ELException; 
+     * @exception ELException
+     *                Thrown if the expression evaluation failed.
+     */
+    public abstract Object evaluate(
+            String expression,
+            @SuppressWarnings("rawtypes")// TCK signature fails with generics
+            Class expectedType, VariableResolver vResolver,
+            FunctionMapper fMapper) throws ELException;
 }
-

Modified: geronimo/specs/branches/jakarta/geronimo-jakarta-jsp_spec/src/main/java/jakarta/servlet/jsp/el/FunctionMapper.java
URL: http://svn.apache.org/viewvc/geronimo/specs/branches/jakarta/geronimo-jakarta-jsp_spec/src/main/java/jakarta/servlet/jsp/el/FunctionMapper.java?rev=1858615&r1=1858614&r2=1858615&view=diff
==============================================================================
--- geronimo/specs/branches/jakarta/geronimo-jakarta-jsp_spec/src/main/java/jakarta/servlet/jsp/el/FunctionMapper.java (original)
+++ geronimo/specs/branches/jakarta/geronimo-jakarta-jsp_spec/src/main/java/jakarta/servlet/jsp/el/FunctionMapper.java Sat May  4 21:29:39 2019
@@ -15,7 +15,7 @@
 * limitations under the License.
 */
 
-package javax.servlet.jsp.el;
+package jakarta.servlet.jsp.el;
 
 /**
  * <p>The interface to a map between EL function names and methods.</p>
@@ -24,17 +24,18 @@ package javax.servlet.jsp.el;
  * information to resolve the map. </p>
  *
  * @since 2.0
- * @deprecated
+ * @deprecated As of JSP 2.1, replaced by javax.el.FunctionMapper
  */
+@SuppressWarnings("dep-ann") // TCK signature test fails with annotation
 public interface FunctionMapper {
   /**
    * Resolves the specified local name and prefix into a Java.lang.Method.
    * Returns null if the prefix and local name are not found.
-   * 
+   *
    * @param prefix the prefix of the function, or "" if no prefix.
    * @param localName the short name of the function
    * @return the result of the method mapping.  Null means no entry found.
    **/
-  public java.lang.reflect.Method resolveFunction(String prefix, 
+  public java.lang.reflect.Method resolveFunction(String prefix,
       String localName);
 }



Mime
View raw message