Author: remm Date: Fri Jan 15 14:13:28 2016 New Revision: 1724812 URL: http://svn.apache.org/viewvc?rev=1724812&view=rev Log: Javadoc fixes.
Modified: tomcat/trunk/java/org/apache/jasper/EmbeddedServletOptions.java tomcat/trunk/java/org/apache/jasper/JasperException.java tomcat/trunk/java/org/apache/jasper/JspC.java tomcat/trunk/java/org/apache/jasper/JspCompilationContext.java tomcat/trunk/java/org/apache/jasper/Options.java tomcat/trunk/java/org/apache/jasper/compiler/AntCompiler.java tomcat/trunk/java/org/apache/jasper/compiler/BeanRepository.java tomcat/trunk/java/org/apache/jasper/compiler/Compiler.java tomcat/trunk/java/org/apache/jasper/compiler/ELFunctionMapper.java tomcat/trunk/java/org/apache/jasper/compiler/ELInterpreter.java tomcat/trunk/java/org/apache/jasper/compiler/ELInterpreterFactory.java tomcat/trunk/java/org/apache/jasper/compiler/ErrorDispatcher.java tomcat/trunk/java/org/apache/jasper/compiler/ErrorHandler.java tomcat/trunk/java/org/apache/jasper/compiler/JarScannerFactory.java tomcat/trunk/java/org/apache/jasper/compiler/JspConfig.java tomcat/trunk/java/org/apache/jasper/compiler/JspRuntimeContext.java tomcat/trunk/java/org/apache/jasper/compiler/JspUtil.java tomcat/trunk/java/org/apache/jasper/compiler/ServletWriter.java tomcat/trunk/java/org/apache/jasper/compiler/SmapGenerator.java tomcat/trunk/java/org/apache/jasper/compiler/SmapStratum.java tomcat/trunk/java/org/apache/jasper/compiler/SmapUtil.java tomcat/trunk/java/org/apache/jasper/compiler/tagplugin/TagPluginContext.java tomcat/trunk/java/org/apache/jasper/runtime/BodyContentImpl.java tomcat/trunk/java/org/apache/jasper/runtime/JspRuntimeLibrary.java tomcat/trunk/java/org/apache/jasper/runtime/JspSourceDependent.java tomcat/trunk/java/org/apache/jasper/runtime/JspWriterImpl.java tomcat/trunk/java/org/apache/jasper/runtime/ProtectedFunctionMapper.java tomcat/trunk/java/org/apache/jasper/security/SecurityUtil.java tomcat/trunk/java/org/apache/jasper/servlet/JspCServletContext.java tomcat/trunk/java/org/apache/jasper/servlet/JspServletWrapper.java tomcat/trunk/java/org/apache/jasper/servlet/TldScanner.java tomcat/trunk/java/org/apache/jasper/tagplugins/jstl/Util.java tomcat/trunk/java/org/apache/jasper/xmlparser/EncodingMap.java tomcat/trunk/java/org/apache/jasper/xmlparser/SymbolTable.java tomcat/trunk/java/org/apache/jasper/xmlparser/XMLChar.java tomcat/trunk/java/org/apache/jasper/xmlparser/XMLEncodingDetector.java tomcat/trunk/java/org/apache/jasper/xmlparser/XMLString.java tomcat/trunk/java/org/apache/jasper/xmlparser/XMLStringBuffer.java Modified: tomcat/trunk/java/org/apache/jasper/EmbeddedServletOptions.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/EmbeddedServletOptions.java?rev=1724812&r1=1724811&r2=1724812&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/jasper/EmbeddedServletOptions.java (original) +++ tomcat/trunk/java/org/apache/jasper/EmbeddedServletOptions.java Fri Jan 15 14:13:28 2016 @@ -471,6 +471,8 @@ public final class EmbeddedServletOption /** * Create an EmbeddedServletOptions object using data available from * ServletConfig and ServletContext. + * @param config The Servlet config + * @param context The Servlet context */ public EmbeddedServletOptions(ServletConfig config, ServletContext context) { Modified: tomcat/trunk/java/org/apache/jasper/JasperException.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/JasperException.java?rev=1724812&r1=1724811&r2=1724812&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/jasper/JasperException.java (original) +++ tomcat/trunk/java/org/apache/jasper/JasperException.java Fri Jan 15 14:13:28 2016 @@ -33,16 +33,19 @@ public class JasperException extends jav /** * Creates a JasperException with the embedded exception and the reason for - * throwing a JasperException + * throwing a JasperException. + * @param reason The exception message + * @param exception The root cause */ - public JasperException (String reason, Throwable exception) { + public JasperException(String reason, Throwable exception) { super(reason, exception); } /** - * Creates a JasperException with the embedded exception + * Creates a JasperException with the embedded exception. + * @param exception The root cause */ - public JasperException (Throwable exception) { + public JasperException(Throwable exception) { super(exception); } } Modified: tomcat/trunk/java/org/apache/jasper/JspC.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/JspC.java?rev=1724812&r1=1724811&r2=1724812&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/jasper/JspC.java (original) +++ tomcat/trunk/java/org/apache/jasper/JspC.java Fri Jan 15 14:13:28 2016 @@ -293,9 +293,8 @@ public class JspC extends Task implement /** * Apply command-line arguments. - * - * @param arg - * The arguments + * @param arg The arguments + * @throws JasperException JSPC error */ public void setArgs(String[] arg) throws JasperException { args = arg; @@ -437,6 +436,7 @@ public class JspC extends Task implement /** * Sets the option to trim white spaces between directives or actions. + * @param ts New value */ public void setTrimSpaces(boolean ts) { this.trimSpaces = ts; @@ -452,6 +452,7 @@ public class JspC extends Task implement /** * Sets the option to enable the tag handler pooling. + * @param poolingEnabled New value */ public void setPoolingEnabled(boolean poolingEnabled) { this.poolingEnabled = poolingEnabled; @@ -467,6 +468,7 @@ public class JspC extends Task implement /** * Sets the option to enable generation of X-Powered-By response header. + * @param xpoweredBy New value */ public void setXpoweredBy(boolean xpoweredBy) { this.xpoweredBy = xpoweredBy; @@ -502,6 +504,7 @@ public class JspC extends Task implement /** * Sets the option to issue a compilation error if the class attribute * specified in useBean action is invalid. + * @param b New value */ public void setErrorOnUseBeanInvalidClassAttribute(boolean b) { errorOnUseBeanInvalidClassAttribute = b; @@ -521,6 +524,7 @@ public class JspC extends Task implement /** * Sets the option to include debug information in compiled class. + * @param b New value */ public void setClassDebugInfo( boolean b ) { classDebugInfo=b; @@ -545,6 +549,7 @@ public class JspC extends Task implement /** * Sets the option to enable caching. + * @param caching New value * * @see Options#isCaching() */ @@ -608,6 +613,7 @@ public class JspC extends Task implement /** * Sets smapSuppressed flag. + * @param smapSuppressed New value */ public void setSmapSuppressed(boolean smapSuppressed) { this.smapSuppressed = smapSuppressed; @@ -623,6 +629,7 @@ public class JspC extends Task implement /** * Sets smapDumped flag. + * @param smapDumped New value * * @see Options#isSmapDumped() */ @@ -687,6 +694,7 @@ public class JspC extends Task implement /** * Sets the option to determine what compiler to use. + * @param c New value * * @see Options#getCompiler() */ @@ -712,6 +720,7 @@ public class JspC extends Task implement /** * Sets the compiler target VM. + * @param vm New value * * @see Options#getCompilerTargetVM() */ @@ -729,6 +738,7 @@ public class JspC extends Task implement /** * Sets the compiler source VM. + * @param vm New value * * @see Options#getCompilerSourceVM() */ @@ -786,6 +796,7 @@ public class JspC extends Task implement /** * Sets the classpath used while compiling the servlets generated from JSP * files + * @param s New value */ public void setClassPath(String s) { classPath=s; @@ -820,6 +831,7 @@ public class JspC extends Task implement /** * Base dir for the webapp. Used to generate class names and resolve * includes. + * @param s New value */ public void setUriroot( String s ) { if (s == null) { @@ -933,6 +945,7 @@ public class JspC extends Task implement /** * Sets the package name to be used for the generated servlet classes. + * @param p New value */ public void setPackage( String p ) { targetPackage=p; @@ -942,6 +955,7 @@ public class JspC extends Task implement * Class name of the generated file ( without package ). * Can only be used if a single file is converted. * XXX Do we need this feature ? + * @param p New value */ public void setClassName( String p ) { targetClassName=p; @@ -949,6 +963,7 @@ public class JspC extends Task implement /** * File where we generate a web.xml fragment with the class definitions. + * @param s New value */ public void setWebXmlFragment( String s ) { webxmlFile=resolveFile(s).getAbsolutePath(); @@ -957,6 +972,7 @@ public class JspC extends Task implement /** * File where we generate a complete web.xml with the class definitions. + * @param s New value */ public void setWebXml( String s ) { webxmlFile=resolveFile(s).getAbsolutePath(); @@ -993,14 +1009,15 @@ public class JspC extends Task implement /** * Sets the option that throws an exception in case of a compilation error. + * @param b New value */ public void setFailOnError(final boolean b) { failOnError = b; } /** - * Returns true if an exception will be thrown in case of a compilation - * error. + * @return <code>true</code> if an exception will be thrown + * in case of a compilation error. */ public boolean getFailOnError() { return failOnError; @@ -1031,6 +1048,7 @@ public class JspC extends Task implement * <code>/index.jsp</code> * @param clctxt * Compilation context of the servlet + * @throws IOException An IO error occurred */ public void generateWebMapping( String file, JspCompilationContext clctxt ) throws IOException @@ -1069,6 +1087,7 @@ public class JspC extends Task implement /** * Include the generated web.xml inside the webapp's web.xml. + * @throws IOException An IO error occurred */ protected void mergeIntoWebXml() throws IOException { @@ -1285,6 +1304,7 @@ public class JspC extends Task implement /** * Locate all jsp files in the webapp. Used if no explicit * jsps are specified. + * @param base Base path */ public void scanFiles( File base ) { Stack<String> dirs = new Stack<>(); @@ -1532,7 +1552,7 @@ public class JspC extends Task implement /** * Initializes the classloader as/if needed for the given * compilation context. - * + * @return the classloader that will be used * @throws IOException If an error occurs */ protected ClassLoader initClassLoader() throws IOException { @@ -1617,6 +1637,7 @@ public class JspC extends Task implement * Find the WEB-INF dir by looking up in the directory tree. * This is used if no explicit docbase is set, but only files. * XXX Maybe we should require the docbase. + * @param f The path from which it will start looking */ protected void locateUriRoot( File f ) { String tUriBase = uriBase; Modified: tomcat/trunk/java/org/apache/jasper/JspCompilationContext.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/JspCompilationContext.java?rev=1724812&r1=1724811&r2=1724812&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/jasper/JspCompilationContext.java (original) +++ tomcat/trunk/java/org/apache/jasper/JspCompilationContext.java Fri Jan 15 14:13:28 2016 @@ -141,7 +141,7 @@ public class JspCompilationContext { /** ---------- Class path and loader ---------- */ /** - * The classpath that is passed off to the Java compiler. + * @return the classpath that is passed off to the Java compiler. */ public String getClassPath() { if( classPath != null ) { @@ -152,6 +152,7 @@ public class JspCompilationContext { /** * The classpath that is passed off to the Java compiler. + * @param classPath The class path to use */ public void setClassPath(String classPath) { this.classPath = classPath; @@ -160,6 +161,7 @@ public class JspCompilationContext { /** * What class loader to use for loading classes while compiling * this JSP? + * @return the class loader used to load all compiled classes */ public ClassLoader getClassLoader() { if( loader != null ) { @@ -193,6 +195,7 @@ public class JspCompilationContext { * The output directory to generate code into. The output directory * is make up of the scratch directory, which is provide in Options, * plus the directory derived from the package name. + * @return the output directory in which the generated sources are placed */ public String getOutputDir() { if (outputDir == null) { @@ -206,6 +209,7 @@ public class JspCompilationContext { * Create a "Compiler" object based on some init param data. This * is not done yet. Right now we're just hardcoding the actual * compilers that are created. + * @return the Java compiler wrapper */ public Compiler createCompiler() { if (jspCompiler != null ) { @@ -263,6 +267,8 @@ public class JspCompilationContext { /** * Get the full value of a URI relative to this compilations context * uses current file as the base. + * @param uri The relative URI + * @return absolute URI */ public String resolveRelativeUri(String uri) { // sometimes we get uri's massaged from File(String), so check for @@ -277,6 +283,7 @@ public class JspCompilationContext { /** * Gets a resource as a stream, relative to the meanings of this * context's implementation. + * @param res the resource to look for * @return a null if the resource cannot be found or represented * as an InputStream. */ @@ -297,6 +304,8 @@ public class JspCompilationContext { /** * Gets the actual path of a URI relative to the context of * the compilation. + * @param path The webapp path + * @return the corresponding path in the filesystem */ public String getRealPath(String path) { if (context != null) { @@ -310,6 +319,7 @@ public class JspCompilationContext { * JspCompilationContext was created is packaged, or null if this * JspCompilationContext does not correspond to a tag file, or if the * corresponding tag file is not packaged in a JAR. + * @return a JAR file */ public Jar getTagFileJar() { return this.tagJar; @@ -324,6 +334,7 @@ public class JspCompilationContext { /** * Just the class name (does not include package name) of the * generated class. + * @return the class name */ public String getServletClassName() { @@ -351,6 +362,7 @@ public class JspCompilationContext { /** * Path of the JSP URI. Note that this is not a file name. This is * the context rooted URI of the JSP file. + * @return the path to the JSP */ public String getJspFile() { return jspUri; @@ -424,9 +436,10 @@ public class JspCompilationContext { } /** - * True if we are compiling a tag file in prototype mode. - * ie we only generate codes with class for the tag handler with empty - * method bodies. + * @return <code>true</code> if we are compiling a tag file + * in prototype mode. + * ie we only generate codes with class for the tag handler with empty + * method bodies. */ public boolean isPrototypeMode() { return protoTypeMode; @@ -440,6 +453,7 @@ public class JspCompilationContext { * Package name for the generated class is make up of the base package * name, which is user settable, and the derived package name. The * derived package name directly mirrors the file hierarchy of the JSP page. + * @return the package name */ public String getServletPackageName() { if (isTagFile()) { @@ -470,13 +484,14 @@ public class JspCompilationContext { /** * The package name into which the servlet class is generated. + * @param servletPackageName The package name to use */ public void setServletPackageName(String servletPackageName) { this.basePackageName = servletPackageName; } /** - * Full path name of the Java file into which the servlet is being + * @return Full path name of the Java file into which the servlet is being * generated. */ public String getServletJavaFileName() { @@ -487,7 +502,7 @@ public class JspCompilationContext { } /** - * Get hold of the Options object for this context. + * @return the Options object for this context. */ public Options getOptions() { return options; @@ -502,7 +517,7 @@ public class JspCompilationContext { } /** - * Path of the Java file relative to the work directory. + * @return the path of the Java file relative to the work directory. */ public String getJavaPath() { @@ -528,7 +543,7 @@ public class JspCompilationContext { } /** - * Where is the servlet being generated? + * @return the writer that is used to write the generated Servlet source. */ public ServletWriter getWriter() { return writer; @@ -540,7 +555,7 @@ public class JspCompilationContext { /** * Gets the 'location' of the TLD associated with the given taglib 'uri'. - * + * @param uri The taglib URI * @return An array of two Strings: The first element denotes the real * path to the TLD. If the path to the TLD points to a jar file, then the * second element denotes the name of the TLD entry in the jar file. @@ -552,7 +567,7 @@ public class JspCompilationContext { } /** - * Are we keeping generated code around? + * @return <code>true</code> if generated code is kept. */ public boolean keepGenerated() { return getOptions().getKeepGenerated(); Modified: tomcat/trunk/java/org/apache/jasper/Options.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/Options.java?rev=1724812&r1=1724811&r2=1724812&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/jasper/Options.java (original) +++ tomcat/trunk/java/org/apache/jasper/Options.java Fri Jan 15 14:13:28 2016 @@ -38,78 +38,85 @@ public interface Options { * Returns true if Jasper issues a compilation error instead of a runtime * Instantiation error if the class attribute specified in useBean action * is invalid. + * @return <code>true</code> to get an error */ public boolean getErrorOnUseBeanInvalidClassAttribute(); /** - * Are we keeping generated code around? + * @return <code>true</code> to keep the generated source */ public boolean getKeepGenerated(); /** - * Returns true if tag handler pooling is enabled, false otherwise. + * @return <code>true</code> if tag handler pooling is enabled, + * <code>false</code> otherwise. */ public boolean isPoolingEnabled(); /** - * Are we supporting HTML mapped servlets? + * @return <code>true</code> if HTML mapped Servlets are supported. */ public boolean getMappedFile(); /** - * Should we include debug information in compiled class? + * @return <code>true</code> if debug information in included + * in compiled classes. */ public boolean getClassDebugInfo(); /** - * Background compile thread check interval in seconds + * @return background compile thread check interval in seconds */ public int getCheckInterval(); /** - * Is Jasper being used in development mode? + * Main development flag, which enables detailed error reports with + * sources, as well automatic recompilation of JSPs and tag files. + * This setting should usually be <code>false</code> when running + * in production. + * @return <code>true</code> if Jasper is in development mode */ public boolean getDevelopment(); /** - * Should we include a source fragment in exception messages, which could be displayed - * to the developer ? + * @return <code>true</code> to include a source fragment in exception + * messages. */ public boolean getDisplaySourceFragment(); /** - * Is the generation of SMAP info for JSR45 debugging suppressed? + * @return <code>true</code> to suppress generation of SMAP info for + * JSR45 debugging. */ public boolean isSmapSuppressed(); /** - * Indicates whether SMAP info for JSR45 debugging should be dumped to a + * This setting is ignored if suppressSmap() is <code>true</code>. + * @return <code>true</code> to write SMAP info for JSR45 debugging to a * file. - * Ignored if suppressSmap() is true. */ public boolean isSmapDumped(); /** - * Should white spaces between directives or actions be trimmed? + * @return <code>true</code> to trim white spaces between + * directives or actions. */ public boolean getTrimSpaces(); /** * Gets the class-id value that is sent to Internet Explorer when using * <jsp:plugin> tags. - * * @return Class-id value */ public String getIeClassId(); /** - * What is my scratch dir? + * @return the work folder */ public File getScratchDir(); /** - * What classpath should I use while compiling the servlets - * generated from JSP files? + * @return the classpath used to compile generated Servlets */ public String getClassPath(); @@ -122,21 +129,22 @@ public interface Options { * <code>javac</code> task from Apache Ant will be used to call an external * java compiler and the value of this option will be passed to it. See * Apache Ant documentation for the possible values. + * @return the compiler name */ public String getCompiler(); /** - * The compiler target VM, e.g. 1.8. + * @return the compiler target VM, e.g. 1.8. */ public String getCompilerTargetVM(); /** - * The compiler source VM, e.g. 1.8. + * @return the compiler source VM, e.g. 1.8. */ public String getCompilerSourceVM(); /** - * Jasper Java compiler class to use. + * @return Jasper Java compiler class to use. */ public String getCompilerClassName(); @@ -148,13 +156,12 @@ public interface Options { * of a taglib deployed in a jar file (WEB-INF/lib). * * @return the instance of the TldLocationsCache - * for the web-application. + * for the web-application. */ public TldCache getTldCache(); /** - * Java platform encoding to generate the JSP - * page servlet. + * @return Java platform encoding to generate the JSP page servlet. */ public String getJavaEncoding(); @@ -164,21 +171,22 @@ public interface Options { * <p> * Is used only when Jasper uses an external java compiler (wrapped through * a <code>javac</code> Apache Ant task). + * @return <code>true</code> to fork a process during compilation */ public boolean getFork(); /** - * Obtain JSP configuration information specified in web.xml. + * @return JSP configuration information specified in web.xml. */ public JspConfig getJspConfig(); /** - * Is generation of X-Powered-By response header enabled/disabled? + * @return <code>true</code> to generate a X-Powered-By response header. */ public boolean isXpoweredBy(); /** - * Obtain a Tag Plugin Manager + * @return a Tag Plugin Manager */ public TagPluginManager getTagPluginManager(); @@ -191,18 +199,19 @@ public interface Options { public boolean genStringAsCharArray(); /** - * Modification test interval. + * @return modification test interval. */ public int getModificationTestInterval(); /** - * Re-compile on failure. + * @return <code>true</code> if re-compile will occur on a failure. */ public boolean getRecompileOnFail(); /** - * Is caching enabled (used for precompilation). + * @return <code>true</code> is caching is enabled + * (used for precompilation). */ public boolean isCaching(); @@ -223,11 +232,12 @@ public interface Options { * The maximum number of loaded jsps per web-application. If there are more * jsps loaded, they will be unloaded. If unset or less than 0, no jsps * are unloaded. + * @return The JSP count */ public int getMaxLoadedJsps(); /** - * The idle time in seconds after which a JSP is unloaded. + * @return the idle time in seconds after which a JSP is unloaded. * If unset or less or equal than 0, no jsps are unloaded. */ public int getJspIdleTimeout(); Modified: tomcat/trunk/java/org/apache/jasper/compiler/AntCompiler.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/AntCompiler.java?rev=1724812&r1=1724811&r2=1724812&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/jasper/compiler/AntCompiler.java (original) +++ tomcat/trunk/java/org/apache/jasper/compiler/AntCompiler.java Fri Jan 15 14:13:28 2016 @@ -312,6 +312,7 @@ public class AntCompiler extends Compile /** * Construct the handler to capture the output of the given steam. + * @param wrapped The wrapped stream */ public SystemLogHandler(PrintStream wrapped) { super(wrapped); @@ -356,6 +357,7 @@ public class AntCompiler extends Compile /** * Stop capturing thread's output and return captured data as a String. + * @return the captured output */ public static String unsetThread() { ByteArrayOutputStream baos = data.get(); @@ -373,6 +375,7 @@ public class AntCompiler extends Compile /** * Find PrintStream to which the output must be written to. + * @return the current stream */ protected PrintStream findStream() { PrintStream ps = streams.get(); Modified: tomcat/trunk/java/org/apache/jasper/compiler/BeanRepository.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/BeanRepository.java?rev=1724812&r1=1724811&r2=1724812&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/jasper/compiler/BeanRepository.java (original) +++ tomcat/trunk/java/org/apache/jasper/compiler/BeanRepository.java Fri Jan 15 14:13:28 2016 @@ -35,6 +35,8 @@ public class BeanRepository { /** * Constructor. + * @param loader The class loader + * @param err The error dispatcher that will be used to report errors */ public BeanRepository(ClassLoader loader, ErrorDispatcher err) { this.loader = loader; Modified: tomcat/trunk/java/org/apache/jasper/compiler/Compiler.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/Compiler.java?rev=1724812&r1=1724811&r2=1724812&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/jasper/compiler/Compiler.java (original) +++ tomcat/trunk/java/org/apache/jasper/compiler/Compiler.java Fri Jan 15 14:13:28 2016 @@ -85,6 +85,7 @@ public abstract class Compiler { * return null. Used in development mode for generating detailed error * messages. http://bz.apache.org/bugzilla/show_bug.cgi?id=37062. * </p> + * @return the page nodes */ public Node.Nodes getPageNodes() { return this.pageNodes; @@ -95,6 +96,7 @@ public abstract class Compiler { * * @return a smap for the current JSP page, if one is generated, null * otherwise + * @throws Exception Error generating Java source */ protected String[] generateJava() throws Exception { @@ -310,13 +312,21 @@ public abstract class Compiler { } /** - * Compile the servlet from .java file to .class file + * Servlet compilation. This compiles the generated sources into + * Servlets. + * @param smap The SMAP files for source debugging + * @throws FileNotFoundException Source files not found + * @throws JasperException Compilation error + * @throws Exception Some other error */ protected abstract void generateClass(String[] smap) throws FileNotFoundException, JasperException, Exception; /** - * Compile the jsp file from the current engine context + * Compile the jsp file from the current engine context. + * @throws FileNotFoundException Source files not found + * @throws JasperException Compilation error + * @throws Exception Some other error */ public void compile() throws FileNotFoundException, JasperException, Exception { @@ -330,6 +340,9 @@ public abstract class Compiler { * @param compileClass * If true, generate both .java and .class file If false, * generate only .java file + * @throws FileNotFoundException Source files not found + * @throws JasperException Compilation error + * @throws Exception Some other error */ public void compile(boolean compileClass) throws FileNotFoundException, JasperException, Exception { @@ -345,6 +358,9 @@ public abstract class Compiler { * generate only .java file * @param jspcMode * true if invoked from JspC, false otherwise + * @throws FileNotFoundException Source files not found + * @throws JasperException Compilation error + * @throws Exception Some other error */ public void compile(boolean compileClass, boolean jspcMode) throws FileNotFoundException, JasperException, Exception { @@ -400,6 +416,8 @@ public abstract class Compiler { /** * This is a protected method intended to be overridden by subclasses of * Compiler. This is used by the compile method to do all the compilation. + * @return <code>true</code> if the source generation and compilation + * should occur */ public boolean isOutDated() { return isOutDated(true); @@ -414,6 +432,8 @@ public abstract class Compiler { * @param checkClass * If true, check against .class file, if false, check against * .java file. + * @return <code>true</code> if the source generation and compilation + * should occur */ public boolean isOutDated(boolean checkClass) { @@ -520,14 +540,14 @@ public abstract class Compiler { } /** - * Gets the error dispatcher. + * @return the error dispatcher. */ public ErrorDispatcher getErrorDispatcher() { return errDispatcher; } /** - * Gets the info about the page under compilation + * @return the info about the page under compilation */ public PageInfo getPageInfo() { return pageInfo; Modified: tomcat/trunk/java/org/apache/jasper/compiler/ELFunctionMapper.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/ELFunctionMapper.java?rev=1724812&r1=1724811&r2=1724812&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/jasper/compiler/ELFunctionMapper.java (original) +++ tomcat/trunk/java/org/apache/jasper/compiler/ELFunctionMapper.java Fri Jan 15 14:13:28 2016 @@ -49,6 +49,7 @@ public class ELFunctionMapper { * Creates the functions mappers for all EL expressions in the JSP page. * * @param page The current compilation unit. + * @throws JasperException EL error */ public static void map(Node.Nodes page) throws JasperException { Modified: tomcat/trunk/java/org/apache/jasper/compiler/ELInterpreter.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/ELInterpreter.java?rev=1724812&r1=1724811&r2=1724812&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/jasper/compiler/ELInterpreter.java (original) +++ tomcat/trunk/java/org/apache/jasper/compiler/ELInterpreter.java Fri Jan 15 14:13:28 2016 @@ -33,7 +33,8 @@ public interface ELInterpreter { * String, Class, javax.servlet.jsp.PageContext, * org.apache.jasper.runtime.ProtectedFunctionMapper)} but other * implementations may produce more optimised code. - * + * @param context The compilation context + * @param isTagFile <code>true</code> if in a tag file rather than a JSP * @param expression a String containing zero or more "${}" expressions * @param expectedType the expected type of the interpreted result * @param fnmapvar Variable pointing to a function map. Modified: tomcat/trunk/java/org/apache/jasper/compiler/ELInterpreterFactory.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/ELInterpreterFactory.java?rev=1724812&r1=1724811&r2=1724812&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/jasper/compiler/ELInterpreterFactory.java (original) +++ tomcat/trunk/java/org/apache/jasper/compiler/ELInterpreterFactory.java Fri Jan 15 14:13:28 2016 @@ -43,6 +43,9 @@ public class ELInterpreterFactory { /** * Obtain the correct EL Interpreter for the given web application. + * @param context The Servlet context + * @return the EL interpreter + * @throws Exception If an error occurs creating the interpreter */ public static ELInterpreter getELInterpreter(ServletContext context) throws Exception { Modified: tomcat/trunk/java/org/apache/jasper/compiler/ErrorDispatcher.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/ErrorDispatcher.java?rev=1724812&r1=1724811&r2=1724812&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/jasper/compiler/ErrorDispatcher.java (original) +++ tomcat/trunk/java/org/apache/jasper/compiler/ErrorDispatcher.java Fri Jan 15 14:13:28 2016 @@ -42,14 +42,18 @@ import org.xml.sax.SAXException; */ public class ErrorDispatcher { - // Custom error handler + /** + * Custom error handler + */ private final ErrorHandler errHandler; - // Indicates whether the compilation was initiated by JspServlet or JspC + /** + * Indicates whether the compilation was initiated by JspServlet or JspC + */ private final boolean jspcMode; - /* + /** * Constructor. * * @param jspcMode true if compilation has been initiated by JspC, false @@ -61,7 +65,7 @@ public class ErrorDispatcher { this.jspcMode = jspcMode; } - /* + /** * Dispatches the given JSP parse error to the configured error handler. * * The given error code is localized. If it is not found in the @@ -70,12 +74,13 @@ public class ErrorDispatcher { * * @param errCode Error code * @param args Arguments for parametric replacement + * @throws JasperException An error occurred */ public void jspError(String errCode, String... args) throws JasperException { dispatch(null, errCode, args, null); } - /* + /** * Dispatches the given JSP parse error to the configured error handler. * * The given error code is localized. If it is not found in the @@ -85,13 +90,14 @@ public class ErrorDispatcher { * @param where Error location * @param errCode Error code * @param args Arguments for parametric replacement + * @throws JasperException An error occurred */ public void jspError(Mark where, String errCode, String... args) throws JasperException { dispatch(where, errCode, args, null); } - /* + /** * Dispatches the given JSP parse error to the configured error handler. * * The given error code is localized. If it is not found in the @@ -101,22 +107,24 @@ public class ErrorDispatcher { * @param n Node that caused the error * @param errCode Error code * @param args Arguments for parametric replacement + * @throws JasperException An error occurred */ public void jspError(Node n, String errCode, String... args) throws JasperException { dispatch(n.getStart(), errCode, args, null); } - /* + /** * Dispatches the given parsing exception to the configured error handler. * * @param e Parsing exception + * @throws JasperException An error occurred */ public void jspError(Exception e) throws JasperException { dispatch(null, null, null, e); } - /* + /** * Dispatches the given JSP parse error to the configured error handler. * * The given error code is localized. If it is not found in the @@ -126,13 +134,14 @@ public class ErrorDispatcher { * @param errCode Error code * @param args Arguments for parametric replacement * @param e Parsing exception + * @throws JasperException An error occurred */ public void jspError(Exception e, String errCode, String... args) throws JasperException { dispatch(null, errCode, args, e); } - /* + /** * Dispatches the given JSP parse error to the configured error handler. * * The given error code is localized. If it is not found in the @@ -140,16 +149,17 @@ public class ErrorDispatcher { * message. * * @param where Error location + * @param e Parsing exception * @param errCode Error code * @param args Arguments for parametric replacement - * @param e Parsing exception + * @throws JasperException An error occurred */ public void jspError(Mark where, Exception e, String errCode, String... args) throws JasperException { dispatch(where, errCode, args, e); } - /* + /** * Dispatches the given JSP parse error to the configured error handler. * * The given error code is localized. If it is not found in the @@ -157,9 +167,10 @@ public class ErrorDispatcher { * message. * * @param n Node that caused the error + * @param e Parsing exception * @param errCode Error code * @param args Arguments for parametric replacement - * @param e Parsing exception + * @throws JasperException An error occurred */ public void jspError(Node n, Exception e, String errCode, String... args) throws JasperException { @@ -177,6 +188,8 @@ public class ErrorDispatcher { * * @return Array of javac compilation errors, or null if the given error * message does not contain any compilation error line numbers + * @throws JasperException An error occurred + * @throws IOException IO error which usually should not occur */ public static JavacErrorDetail[] parseJavacErrors(String errMsg, String fname, @@ -186,11 +199,12 @@ public class ErrorDispatcher { return parseJavacMessage(errMsg, fname, page); } - /* + /** * Dispatches the given javac compilation errors to the configured error * handler. * * @param javacErrors Array of javac compilation errors + * @throws JasperException An error occurred */ public void javacError(JavacErrorDetail[] javacErrors) throws JasperException { @@ -199,12 +213,13 @@ public class ErrorDispatcher { } - /* + /** * Dispatches the given compilation error report and exception to the * configured error handler. * * @param errorReport Compilation error report * @param e Compilation exception + * @throws JasperException An error occurred */ public void javacError(String errorReport, Exception e) throws JasperException { @@ -216,7 +231,7 @@ public class ErrorDispatcher { //********************************************************************* // Private utility methods - /* + /** * Dispatches the given JSP parse error to the configured error handler. * * The given error code is localized. If it is not found in the @@ -227,6 +242,7 @@ public class ErrorDispatcher { * @param errCode Error code * @param args Arguments for parametric replacement * @param e Parsing exception + * @throws JasperException An error occurred */ private void dispatch(Mark where, String errCode, Object[] args, Exception e) throws JasperException { @@ -278,7 +294,7 @@ public class ErrorDispatcher { } } - /* + /** * Parses the given Java compilation error message, which may contain one * or more compilation errors, into an array of JavacErrorDetail instances. * @@ -293,6 +309,8 @@ public class ErrorDispatcher { * * @return Array of JavacErrorDetail instances corresponding to the * compilation errors + * @throws JasperException An error occurred + * @throws IOException IO error which usually should not occur */ private static JavacErrorDetail[] parseJavacMessage( String errMsg, String fname, Node.Nodes page) @@ -363,12 +381,13 @@ public class ErrorDispatcher { /** - * @param fname - * @param page - * @param errMsgBuf - * @param lineNum + * Create a compilation error. + * @param fname The file name + * @param page The page nodes + * @param errMsgBuf The error message + * @param lineNum The source line number of the error * @return JavacErrorDetail The error details - * @throws JasperException + * @throws JasperException An error occurred */ public static JavacErrorDetail createJavacError(String fname, Node.Nodes page, StringBuilder errMsgBuf, int lineNum) @@ -378,13 +397,14 @@ public class ErrorDispatcher { /** - * @param fname - * @param page - * @param errMsgBuf - * @param lineNum - * @param ctxt + * Create a compilation error. + * @param fname The file name + * @param page The page nodes + * @param errMsgBuf The error message + * @param lineNum The source line number of the error + * @param ctxt The compilation context * @return JavacErrorDetail The error details - * @throws JasperException + * @throws JasperException An error occurred */ public static JavacErrorDetail createJavacError(String fname, Node.Nodes page, StringBuilder errMsgBuf, int lineNum, @@ -439,22 +459,24 @@ public class ErrorDispatcher { } - /* + /** * Visitor responsible for mapping a line number in the generated servlet * source code to the corresponding JSP node. */ private static class ErrorVisitor extends Node.Visitor { - // Java source line number to be mapped + /** + * Java source line number to be mapped + */ private final int lineNum; - /* + /** * JSP node whose Java source code range in the generated servlet * contains the Java source line number to be mapped */ private Node found; - /* + /** * Constructor. * * @param lineNum Source line number in the generated servlet code @@ -471,7 +493,7 @@ public class ErrorDispatcher { } } - /* + /** * Gets the JSP node to which the source line number in the generated * servlet code was mapped. * Modified: tomcat/trunk/java/org/apache/jasper/compiler/ErrorHandler.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/ErrorHandler.java?rev=1724812&r1=1724811&r2=1724812&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/jasper/compiler/ErrorHandler.java (original) +++ tomcat/trunk/java/org/apache/jasper/compiler/ErrorHandler.java Fri Jan 15 14:13:28 2016 @@ -40,6 +40,7 @@ public interface ErrorHandler { * @param column Parse error column number * @param msg Parse error message * @param exception Parse exception + * @throws JasperException An error occurred */ public void jspError(String fname, int line, int column, String msg, Exception exception) throws JasperException; @@ -49,6 +50,7 @@ public interface ErrorHandler { * * @param msg Parse error message * @param exception Parse exception + * @throws JasperException An error occurred */ public void jspError(String msg, Exception exception) throws JasperException; @@ -58,6 +60,7 @@ public interface ErrorHandler { * * @param details Array of JavacErrorDetail instances corresponding to the * compilation errors + * @throws JasperException An error occurred */ public void javacError(JavacErrorDetail[] details) throws JasperException; @@ -67,6 +70,7 @@ public interface ErrorHandler { * * @param errorReport Compilation error report * @param exception Compilation exception + * @throws JasperException An error occurred */ public void javacError(String errorReport, Exception exception) throws JasperException; Modified: tomcat/trunk/java/org/apache/jasper/compiler/JarScannerFactory.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/JarScannerFactory.java?rev=1724812&r1=1724811&r2=1724812&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/jasper/compiler/JarScannerFactory.java (original) +++ tomcat/trunk/java/org/apache/jasper/compiler/JarScannerFactory.java Fri Jan 15 14:13:28 2016 @@ -34,6 +34,8 @@ public class JarScannerFactory { /** * Obtain the {@link JarScanner} associated with the specified {@link * ServletContext}. It is obtained via a context parameter. + * @param ctxt The Servlet context + * @return a scanner instance */ public static JarScanner getJarScanner(ServletContext ctxt) { JarScanner jarScanner = Modified: tomcat/trunk/java/org/apache/jasper/compiler/JspConfig.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/JspConfig.java?rev=1724812&r1=1724811&r2=1724812&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/jasper/compiler/JspConfig.java (original) +++ tomcat/trunk/java/org/apache/jasper/compiler/JspConfig.java Fri Jan 15 14:13:28 2016 @@ -383,6 +383,8 @@ public class JspConfig { /** * To find out if an uri matches an url pattern in jsp config. If so, * then the uri is a JSP page. This is used primarily for jspc. + * @param uri The path to check + * @return <code>true</code> if the path denotes a JSP page */ public boolean isJspPage(String uri) { Modified: tomcat/trunk/java/org/apache/jasper/compiler/JspRuntimeContext.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/JspRuntimeContext.java?rev=1724812&r1=1724811&r2=1724812&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/jasper/compiler/JspRuntimeContext.java (original) +++ tomcat/trunk/java/org/apache/jasper/compiler/JspRuntimeContext.java Fri Jan 15 14:13:28 2016 @@ -59,15 +59,17 @@ import org.apache.juli.logging.LogFactor */ public final class JspRuntimeContext { - // Logger + /** + * Logger + */ private final Log log = LogFactory.getLog(JspRuntimeContext.class); - /* + /** * Counts how many times the webapp's JSPs have been reloaded. */ private final AtomicInteger jspReloadCount = new AtomicInteger(0); - /* + /** * Counts how many times JSPs have been unloaded in this webapp. */ private final AtomicInteger jspUnloadCount = new AtomicInteger(0); @@ -80,6 +82,7 @@ public final class JspRuntimeContext { * Loads in any previously generated dependencies from file. * * @param context ServletContext for web application + * @param options The main Jasper options */ public JspRuntimeContext(ServletContext context, Options options) { @@ -375,14 +378,14 @@ public final class JspRuntimeContext { } /** - * The classpath that is passed off to the Java compiler. + * @return the classpath that is passed off to the Java compiler. */ public String getClassPath() { return classpath; } /** - * Last time the update background task has run + * @return Last time the update background task has run */ public long getLastJspQueueUpdate() { return lastJspQueueUpdate; @@ -394,6 +397,7 @@ public final class JspRuntimeContext { /** * Method used to initialize classpath for compiles. + * @return the compilation classpath */ private String initClassPath() { @@ -435,7 +439,9 @@ public final class JspRuntimeContext { return path; } - // Helper class to allow initSecurity() to return two items + /** + * Helper class to allow initSecurity() to return two items + */ private static class SecurityHolder{ private final CodeSource cs; private final PermissionCollection pc; Modified: tomcat/trunk/java/org/apache/jasper/compiler/JspUtil.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/JspUtil.java?rev=1724812&r1=1724811&r2=1724812&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/jasper/compiler/JspUtil.java (original) +++ tomcat/trunk/java/org/apache/jasper/compiler/JspUtil.java Fri Jan 15 14:13:28 2016 @@ -63,7 +63,9 @@ public class JspUtil { public static final int CHUNKSIZE = 1024; /** - * Takes a potential expression and converts it into XML form + * Takes a potential expression and converts it into XML form. + * @param expression The expression to convert + * @return XML view */ public static String getExprInXml(String expression) { String returnString; @@ -108,6 +110,11 @@ public class JspUtil { * present have valid names. Checks attributes specified as XML-style * attributes as well as attributes specified using the jsp:attribute * standard action. + * @param typeOfTag The tag type + * @param n The corresponding node + * @param validAttributes The array with the valid attributes + * @param err Dispatcher for errors + * @throws JasperException An error occurred */ public static void checkAttributes(String typeOfTag, Node n, ValidAttribute[] validAttributes, ErrorDispatcher err) @@ -206,6 +213,8 @@ public class JspUtil { /** * Escape the 5 entities defined by XML. + * @param s String to escape + * @return XML escaped string */ public static String escapeXml(String s) { if (s == null) { @@ -276,6 +285,10 @@ public class JspUtil { * name to the <tt>Class.forName()</tt> method, unless the given string * name represents a primitive type, in which case it is converted to a * <tt>Class</tt> object by appending ".class" to it (e.g., "int.class"). + * @param type The class name, array or primitive type + * @param loader The class loader + * @return the loaded class + * @throws ClassNotFoundException Loading class failed */ public static Class<?> toClass(String type, ClassLoader loader) throws ClassNotFoundException { @@ -330,6 +343,8 @@ public class JspUtil { /** * Produces a String representing a call to the EL interpreter. * + * @param isTagFile <code>true</code> if the file is a tag file + * rather than a JSP * @param expression * a String containing zero or more "${}" expressions * @param expectedType @@ -683,13 +698,13 @@ public class JspUtil { * Gets the fully-qualified class name of the tag handler corresponding to * the given tag file path. * - * @param path - * Tag file path - * @param err - * Error dispatcher + * @param path Tag file path + * @param urn The tag identifier + * @param err Error dispatcher * * @return Fully-qualified class name of the tag handler corresponding to * the given tag file path + * @throws JasperException Failed to generate a class name for the tag */ public static String getTagHandlerClassName(String path, String urn, ErrorDispatcher err) throws JasperException { @@ -852,6 +867,8 @@ public class JspUtil { /** * Mangle the specified character to create a legal Java class name. + * @param ch The character + * @return the replacement charater as a string */ public static final String mangleChar(char ch) { char[] result = new char[5]; @@ -864,7 +881,9 @@ public class JspUtil { } /** - * Test whether the argument is a Java keyword + * Test whether the argument is a Java keyword. + * @param key The name + * @return <code>true</code> if the name is a java identifier */ public static boolean isJavaKeyword(String key) { int i = 0; @@ -914,7 +933,8 @@ public class JspUtil { * 'java.lang.Object.class' 'int' -> 'int.class' 'void' -> 'Void.TYPE' * 'int[]' -> 'int[].class' * - * @param type + * @param type The type from the TLD + * @return the Java type */ public static String toJavaSourceTypeFromTld(String type) { if (type == null || "void".equals(type)) { @@ -927,6 +947,8 @@ public class JspUtil { * Class.getName() return arrays in the form "[[[<et>", where et, the * element type can be one of ZBCDFIJS or L<classname>;. It is * converted into forms that can be understood by javac. + * @param type the type to convert + * @return the equivalent type in Java sources */ public static String toJavaSourceType(String type) { Modified: tomcat/trunk/java/org/apache/jasper/compiler/ServletWriter.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/ServletWriter.java?rev=1724812&r1=1724811&r2=1724812&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/jasper/compiler/ServletWriter.java (original) +++ tomcat/trunk/java/org/apache/jasper/compiler/ServletWriter.java Fri Jan 15 14:13:28 2016 @@ -29,14 +29,20 @@ public class ServletWriter implements Au private static final int TAB_WIDTH = 2; private static final String SPACES = " "; - // Current indent level: + /** + * Current indent level. + */ private int indent = 0; private int virtual_indent = 0; - // The sink writer: + /** + * The sink writer. + */ private final PrintWriter writer; - // servlet line numbers start from 1 + /** + * Servlet line numbers start from 1. + */ private int javaLine = 1; @@ -73,6 +79,7 @@ public class ServletWriter implements Au /** * Prints the given string followed by '\n' + * @param s The string */ public void println(String s) { javaLine++; @@ -96,6 +103,7 @@ public class ServletWriter implements Au /** * Prints the current indention, followed by the given string + * @param s The string */ public void printin(String s) { writer.print(SPACES.substring(0, indent)); @@ -104,6 +112,7 @@ public class ServletWriter implements Au /** * Prints the current indention, and then the string, and a '\n'. + * @param s The string */ public void printil(String s) { javaLine++; @@ -115,6 +124,7 @@ public class ServletWriter implements Au * Prints the given char. * * Use println() to print a '\n'. + * @param c The char */ public void print(char c) { writer.print(c); @@ -122,6 +132,7 @@ public class ServletWriter implements Au /** * Prints the given int. + * @param i The int */ public void print(int i) { writer.print(i); @@ -132,6 +143,7 @@ public class ServletWriter implements Au * * The string must not contain any '\n', otherwise the line count will be * off. + * @param s The string */ public void print(String s) { writer.print(s); @@ -142,6 +154,7 @@ public class ServletWriter implements Au * * If the string spans multiple lines, the line count will be adjusted * accordingly. + * @param s The string */ public void printMultiLn(String s) { int index = 0; Modified: tomcat/trunk/java/org/apache/jasper/compiler/SmapGenerator.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/SmapGenerator.java?rev=1724812&r1=1724811&r2=1724812&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/jasper/compiler/SmapGenerator.java (original) +++ tomcat/trunk/java/org/apache/jasper/compiler/SmapGenerator.java Fri Jan 15 14:13:28 2016 @@ -57,6 +57,7 @@ public class SmapGenerator { /** * Sets the filename (without path information) for the generated * source file. E.g., "foo$jsp.java". + * @param x The file name */ public synchronized void setOutputFileName(String x) { outputFileName = x; Modified: tomcat/trunk/java/org/apache/jasper/compiler/SmapStratum.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/SmapStratum.java?rev=1724812&r1=1724811&r2=1724812&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/jasper/compiler/SmapStratum.java (original) +++ tomcat/trunk/java/org/apache/jasper/compiler/SmapStratum.java Fri Jan 15 14:13:28 2016 @@ -44,14 +44,18 @@ public class SmapStratum { private int outputLineIncrement = 1; private boolean lineFileIDSet = false; - /** Sets InputStartLine. */ + /** + * Sets InputStartLine. + */ public void setInputStartLine(int inputStartLine) { if (inputStartLine < 0) throw new IllegalArgumentException("" + inputStartLine); this.inputStartLine = inputStartLine; } - /** Sets OutputStartLine. */ + /** + * Sets OutputStartLine. + */ public void setOutputStartLine(int outputStartLine) { if (outputStartLine < 0) throw new IllegalArgumentException("" + outputStartLine); @@ -59,11 +63,11 @@ public class SmapStratum { } /** - * Sets lineFileID. Should be called only when different from - * that of prior LineInfo object (in any given context) or 0 - * if the current LineInfo has no (logical) predecessor. - * <tt>LineInfo</tt> will print this file number no matter what. - */ + * Sets lineFileID. Should be called only when different from + * that of prior LineInfo object (in any given context) or 0 + * if the current LineInfo has no (logical) predecessor. + * <tt>LineInfo</tt> will print this file number no matter what. + */ public void setLineFileID(int lineFileID) { if (lineFileID < 0) throw new IllegalArgumentException("" + lineFileID); @@ -71,14 +75,18 @@ public class SmapStratum { this.lineFileIDSet = true; } - /** Sets InputLineCount. */ + /** + * Sets InputLineCount. + */ public void setInputLineCount(int inputLineCount) { if (inputLineCount < 0) throw new IllegalArgumentException("" + inputLineCount); this.inputLineCount = inputLineCount; } - /** Sets OutputLineIncrement. */ + /** + * Sets OutputLineIncrement. + */ public void setOutputLineIncrement(int outputLineIncrement) { if (outputLineIncrement < 0) throw new IllegalArgumentException("" + outputLineIncrement); @@ -281,14 +289,14 @@ public class SmapStratum { // Methods to retrieve information /** - * Returns the name of the stratum. + * @return the name of the stratum. */ public String getStratumName() { return stratumName; } /** - * Returns the given stratum as a String: a StratumSection, + * @return the given stratum as a String: a StratumSection, * followed by at least one FileSection and at least one LineSection. */ public String getString() { Modified: tomcat/trunk/java/org/apache/jasper/compiler/SmapUtil.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/SmapUtil.java?rev=1724812&r1=1724811&r2=1724812&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/jasper/compiler/SmapUtil.java (original) +++ tomcat/trunk/java/org/apache/jasper/compiler/SmapUtil.java Fri Jan 15 14:13:28 2016 @@ -62,6 +62,7 @@ public class SmapUtil { * @param ctxt Current compilation context * @param pageNodes The current JSP page * @return a SMAP for the page + * @throws IOException Error writing SMAP */ public static String[] generateSmap( JspCompilationContext ctxt, Modified: tomcat/trunk/java/org/apache/jasper/compiler/tagplugin/TagPluginContext.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/tagplugin/TagPluginContext.java?rev=1724812&r1=1724811&r2=1724812&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/jasper/compiler/tagplugin/TagPluginContext.java (original) +++ tomcat/trunk/java/org/apache/jasper/compiler/tagplugin/TagPluginContext.java Fri Jan 15 14:13:28 2016 @@ -56,21 +56,24 @@ public interface TagPluginContext { * invoked with the same id more than once in the translation * unit, only the first declaration will be taken. * @param text The text of the declaration. - **/ + */ void generateDeclaration(String id, String text); /** - * Generate Java source codes + * Generate Java source code scriptlet + * @param s the scriptlet (raw Java source) */ void generateJavaSource(String s); /** + * @param attribute The attribute name * @return true if the attribute is specified and its value is a * translation-time constant. */ boolean isConstantAttribute(String attribute); /** + * @param attribute The attribute name * @return A string that is the value of a constant attribute. Undefined * if the attribute is not a (translation-time) constant. * null if the attribute is not specified. @@ -113,16 +116,21 @@ public interface TagPluginContext { * Associate the attribute with a value in the current tagplugin context. * The plugin attributes can be used for communication among tags that * must work together as a group. See <c:when> for an example. + * @param attr The attribute name + * @param value The attribute value */ void setPluginAttribute(String attr, Object value); /** * Get the value of an attribute in the current tagplugin context. + * @param attr The attribute name + * @return the attribute value */ Object getPluginAttribute(String attr); /** * Is the tag being used inside a tag file? + * @return <code>true</code> if inside a tag file */ boolean isTagFile(); } Modified: tomcat/trunk/java/org/apache/jasper/runtime/BodyContentImpl.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/runtime/BodyContentImpl.java?rev=1724812&r1=1724811&r2=1724812&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/jasper/runtime/BodyContentImpl.java (original) +++ tomcat/trunk/java/org/apache/jasper/runtime/BodyContentImpl.java Fri Jan 15 14:13:28 2016 @@ -46,11 +46,14 @@ public class BodyContentImpl extends Bod private int nextChar; private boolean closed; - // Enclosed writer to which any output is written + /** + * Enclosed writer to which any output is written + */ private Writer writer; /** * Constructor. + * @param enclosingWriter The wrapped writer */ public BodyContentImpl(JspWriter enclosingWriter) { super(enclosingWriter); @@ -62,6 +65,8 @@ public class BodyContentImpl extends Bod /** * Write a single character. + * @param c The char to write + * @throws IOException Error writing to wrapped writer */ @Override public void write(int c) throws IOException { @@ -90,6 +95,7 @@ public class BodyContentImpl extends Bod * @param cbuf A character array * @param off Offset from which to start reading characters * @param len Number of characters to write + * @throws IOException Error writing to wrapped writer */ @Override public void write(char[] cbuf, int off, int len) throws IOException { @@ -116,6 +122,8 @@ public class BodyContentImpl extends Bod /** * Write an array of characters. This method cannot be inherited from the * Writer class because it must suppress I/O exceptions. + * @param buf Content to write + * @throws IOException Error writing to wrapped writer */ @Override public void write(char[] buf) throws IOException { @@ -132,6 +140,7 @@ public class BodyContentImpl extends Bod * @param s String to be written * @param off Offset from which to start reading characters * @param len Number of characters to be written + * @throws IOException Error writing to wrapped writer */ @Override public void write(String s, int off, int len) throws IOException { @@ -150,6 +159,8 @@ public class BodyContentImpl extends Bod /** * Write a string. This method cannot be inherited from the Writer class * because it must suppress I/O exceptions. + * @param s String to be written + * @throws IOException Error writing to wrapped writer */ @Override public void write(String s) throws IOException { @@ -165,7 +176,7 @@ public class BodyContentImpl extends Bod * system property <tt>line.separator</tt>, and is not necessarily a single * newline ('\n') character. * - * @throws IOException If an I/O error occurs + * @throws IOException Error writing to wrapped writer */ @Override public void newLine() throws IOException { @@ -184,7 +195,7 @@ public class BodyContentImpl extends Bod * #write(int)}</code> method. * * @param b The <code>boolean</code> to be printed - * @throws IOException + * @throws IOException Error writing to wrapped writer */ @Override public void print(boolean b) throws IOException { @@ -202,7 +213,7 @@ public class BodyContentImpl extends Bod * #write(int)}</code> method. * * @param c The <code>char</code> to be printed - * @throws IOException + * @throws IOException Error writing to wrapped writer */ @Override public void print(char c) throws IOException { @@ -221,7 +232,7 @@ public class BodyContentImpl extends Bod * method. * * @param i The <code>int</code> to be printed - * @throws IOException + * @throws IOException Error writing to wrapped writer */ @Override public void print(int i) throws IOException { @@ -240,7 +251,7 @@ public class BodyContentImpl extends Bod * <code>{@link #write(int)}</code> method. * * @param l The <code>long</code> to be printed - * @throws IOException + * @throws IOException Error writing to wrapped writer */ @Override public void print(long l) throws IOException { @@ -259,7 +270,7 @@ public class BodyContentImpl extends Bod * <code>{@link #write(int)}</code> method. * * @param f The <code>float</code> to be printed - * @throws IOException + * @throws IOException Error writing to wrapped writer */ @Override public void print(float f) throws IOException { @@ -278,7 +289,7 @@ public class BodyContentImpl extends Bod * #write(int)}</code> method. * * @param d The <code>double</code> to be printed - * @throws IOException + * @throws IOException Error writing to wrapped writer */ @Override public void print(double d) throws IOException { @@ -298,7 +309,7 @@ public class BodyContentImpl extends Bod * @param s The array of chars to be printed * * @throws NullPointerException If <code>s</code> is <code>null</code> - * @throws IOException + * @throws IOException Error writing to wrapped writer */ @Override public void print(char[] s) throws IOException { @@ -317,7 +328,7 @@ public class BodyContentImpl extends Bod * <code>{@link #write(int)}</code> method. * * @param s The <code>String</code> to be printed - * @throws IOException + * @throws IOException Error writing to wrapped writer */ @Override public void print(String s) throws IOException { @@ -337,7 +348,7 @@ public class BodyContentImpl extends Bod * <code>{@link #write(int)}</code> method. * * @param obj The <code>Object</code> to be printed - * @throws IOException + * @throws IOException Error writing to wrapped writer */ @Override public void print(Object obj) throws IOException { @@ -354,7 +365,7 @@ public class BodyContentImpl extends Bod * <code>line.separator</code>, and is not necessarily a single newline * character (<code>'\n'</code>). * - * @throws IOException + * @throws IOException Error writing to wrapped writer */ @Override public void println() throws IOException { @@ -366,7 +377,8 @@ public class BodyContentImpl extends Bod * as though it invokes <code>{@link #print(boolean)}</code> and then * <code>{@link #println()}</code>. * - * @throws IOException + * @param x The <code>boolean</code> to be printed + * @throws IOException Error writing to wrapped writer */ @Override public void println(boolean x) throws IOException { @@ -379,7 +391,8 @@ public class BodyContentImpl extends Bod * though it invokes <code>{@link #print(char)}</code> and then * <code>{@link #println()}</code>. * - * @throws IOException + * @param x The <code>char</code> to be printed + * @throws IOException Error writing to wrapped writer */ @Override public void println(char x) throws IOException { @@ -392,7 +405,8 @@ public class BodyContentImpl extends Bod * though it invokes <code>{@link #print(int)}</code> and then * <code>{@link #println()}</code>. * - * @throws IOException + * @param x The <code>int</code> to be printed + * @throws IOException Error writing to wrapped writer */ @Override public void println(int x) throws IOException { @@ -405,7 +419,8 @@ public class BodyContentImpl extends Bod * as though it invokes <code>{@link #print(long)}</code> and then * <code>{@link #println()}</code>. * - * @throws IOException + * @param x The <code>long</code> to be printed + * @throws IOException Error writing to wrapped writer */ @Override public void println(long x) throws IOException { @@ -418,7 +433,8 @@ public class BodyContentImpl extends Bod * behaves as though it invokes <code>{@link #print(float)}</code> and then * <code>{@link #println()}</code>. * - * @throws IOException + * @param x The <code>float</code> to be printed + * @throws IOException Error writing to wrapped writer */ @Override public void println(float x) throws IOException { @@ -431,7 +447,8 @@ public class BodyContentImpl extends Bod * line. This method behaves as though it invokes <code>{@link * #print(double)}</code> and then <code>{@link #println()}</code>. * - * @throws IOException + * @param x The <code>double</code> to be printed + * @throws IOException Error writing to wrapped writer */ @Override public void println(double x) throws IOException{ @@ -444,7 +461,8 @@ public class BodyContentImpl extends Bod * behaves as though it invokes <code>{@link #print(char[])}</code> and * then <code>{@link #println()}</code>. * - * @throws IOException + * @param x The <code>char</code> array to be printed + * @throws IOException Error writing to wrapped writer */ @Override public void println(char x[]) throws IOException { @@ -457,7 +475,8 @@ public class BodyContentImpl extends Bod * though it invokes <code>{@link #print(String)}</code> and then * <code>{@link #println()}</code>. * - * @throws IOException + * @param x The string to be printed + * @throws IOException Error writing to wrapped writer */ @Override public void println(String x) throws IOException { @@ -470,7 +489,8 @@ public class BodyContentImpl extends Bod * though it invokes <code>{@link #print(Object)}</code> and then * <code>{@link #println()}</code>. * - * @throws IOException + * @param x The object to be printed + * @throws IOException Error writing to wrapped writer */ @Override public void println(Object x) throws IOException { @@ -484,7 +504,7 @@ public class BodyContentImpl extends Bod * 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 there is no wrapped writer */ @Override public void clear() throws IOException { @@ -505,7 +525,7 @@ public class BodyContentImpl extends Bod * flushed. It merely clears the current content of the buffer and * returns. * - * @throws IOException If an I/O error occurs + * @throws IOException Should not happen */ @Override public void clearBuffer() throws IOException { @@ -519,7 +539,7 @@ public class BodyContentImpl extends Bod * further write() or flush() invocations will cause an IOException to be * thrown. Closing a previously-closed stream, however, has no effect. * - * @throws IOException If an I/O error occurs + * @throws IOException Error writing to wrapped writer */ @Override public void close() throws IOException { @@ -583,6 +603,7 @@ public class BodyContentImpl extends Bod * * @param out The writer into which to place the contents of this body * evaluation + * @throws IOException Error writing to writer */ @Override public void writeOut(Writer out) throws IOException { Modified: tomcat/trunk/java/org/apache/jasper/runtime/JspRuntimeLibrary.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/runtime/JspRuntimeLibrary.java?rev=1724812&r1=1724811&r2=1724812&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/jasper/runtime/JspRuntimeLibrary.java (original) +++ tomcat/trunk/java/org/apache/jasper/runtime/JspRuntimeLibrary.java Fri Jan 15 14:13:28 2016 @@ -94,6 +94,8 @@ public class JspRuntimeLibrary { * This method is called at the beginning of the generated servlet code * for a JSP error page, when the "exception" implicit scripting language * variable is initialized. + * @param request The Servlet request + * @return the throwable in the error attribute if any */ public static Throwable getThrowable(ServletRequest request) { Throwable error = (Throwable) request.getAttribute( @@ -424,6 +426,13 @@ public class JspRuntimeLibrary { * Create a typed array. * This is a special case where params are passed through * the request and the property is indexed. + * @param propertyName The property name + * @param bean The bean + * @param method The method + * @param values Array values + * @param t The class + * @param propertyEditorClass The editor for the property + * @throws JasperException An error occurred */ public static void createTypedArray(String propertyName, Object bean, @@ -870,6 +879,7 @@ public class JspRuntimeLibrary { * * @param request The servlet request we are processing * @param relativePath The possibly relative resource path + * @return an absolute path */ public static String getContextRelativePath(ServletRequest request, String relativePath) { Modified: tomcat/trunk/java/org/apache/jasper/runtime/JspSourceDependent.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/runtime/JspSourceDependent.java?rev=1724812&r1=1724811&r2=1724812&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/jasper/runtime/JspSourceDependent.java (original) +++ tomcat/trunk/java/org/apache/jasper/runtime/JspSourceDependent.java Fri Jan 15 14:13:28 2016 @@ -33,6 +33,7 @@ public interface JspSourceDependent { /** * Returns a map of file names and last modified time where the current page * has a source dependency on the file. + * @return the map of dependent resources */ public Map<String,Long> getDependants(); Modified: tomcat/trunk/java/org/apache/jasper/runtime/JspWriterImpl.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/runtime/JspWriterImpl.java?rev=1724812&r1=1724811&r2=1724812&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/jasper/runtime/JspWriterImpl.java (original) +++ tomcat/trunk/java/org/apache/jasper/runtime/JspWriterImpl.java Fri Jan 15 14:13:28 2016 @@ -61,7 +61,8 @@ public class JspWriterImpl extends JspWr * * @param response A Servlet Response * @param sz Output-buffer size, a positive integer - * + * @param autoFlush <code>true</code> to automatically flush on buffer + * full, <code>false</code> to throw an overflow exception in that case * @exception IllegalArgumentException If sz is <= 0 */ public JspWriterImpl(ServletResponse response, int sz, @@ -83,7 +84,8 @@ public class JspWriterImpl extends JspWr this.bufferSize=sz; } - /** Package-level access + /** + * Package-level access */ void recycle() { flushed = false; @@ -97,6 +99,7 @@ public class JspWriterImpl extends JspWr * Flush the output buffer to the underlying character stream, without * flushing the stream itself. This method is non-private only so that it * may be invoked by PrintStream. + * @throws IOException Error writing buffered data */ protected final void flushBuffer() throws IOException { if (bufferSize == 0) Modified: tomcat/trunk/java/org/apache/jasper/runtime/ProtectedFunctionMapper.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/runtime/ProtectedFunctionMapper.java?rev=1724812&r1=1724811&r2=1724812&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/jasper/runtime/ProtectedFunctionMapper.java (original) +++ tomcat/trunk/java/org/apache/jasper/runtime/ProtectedFunctionMapper.java Fri Jan 15 14:13:28 2016 @@ -111,6 +111,7 @@ public final class ProtectedFunctionMapp * The arguments of the Java method * @throws RuntimeException * if no method with the given signature could be found. + * @return the mapped function */ public static ProtectedFunctionMapper getMapForFunction(String fnQName, final Class<?> c, final String methodName, final Class<?>[] args) { Modified: tomcat/trunk/java/org/apache/jasper/security/SecurityUtil.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/security/SecurityUtil.java?rev=1724812&r1=1724811&r2=1724812&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/jasper/security/SecurityUtil.java (original) +++ tomcat/trunk/java/org/apache/jasper/security/SecurityUtil.java Fri Jan 15 14:13:28 2016 @@ -30,6 +30,7 @@ public final class SecurityUtil{ /** * Return the <code>SecurityManager</code> only if Security is enabled AND * package protection mechanism is enabled. + * @return <code>true</code> if package protection is enabled */ public static boolean isPackageProtectionEnabled(){ if (packageDefinitionEnabled && Constants.IS_SECURITY_ENABLED){ @@ -45,6 +46,7 @@ public final class SecurityUtil{ * codes in the request URL that is often reported in error messages. * * @param message The message string to be filtered + * @return the HTML filtered message */ public static String filter(String message) { Modified: tomcat/trunk/java/org/apache/jasper/servlet/JspCServletContext.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/servlet/JspCServletContext.java?rev=1724812&r1=1724811&r2=1724812&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/jasper/servlet/JspCServletContext.java (original) +++ tomcat/trunk/java/org/apache/jasper/servlet/JspCServletContext.java Fri Jan 15 14:13:28 2016 @@ -119,7 +119,7 @@ public class JspCServletContext implemen * @param validate Should a validating parser be used to parse web.xml? * @param blockExternal Should external entities be blocked when parsing * web.xml? - * @throws JasperException + * @throws JasperException An error occurred building the merged web.xml */ public JspCServletContext(PrintWriter aLogWriter, URL aResourceBaseURL, ClassLoader classLoader, boolean validate, boolean blockExternal) Modified: tomcat/trunk/java/org/apache/jasper/servlet/JspServletWrapper.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/servlet/JspServletWrapper.java?rev=1724812&r1=1724811&r2=1724812&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/jasper/servlet/JspServletWrapper.java (original) +++ tomcat/trunk/java/org/apache/jasper/servlet/JspServletWrapper.java Fri Jan 15 14:13:28 2016 @@ -232,7 +232,9 @@ public class JspServletWrapper { } /** - * Compile (if needed) and load a tag file + * Compile (if needed) and load a tag file. + * @return the loaded class + * @throws JasperException Error compiling or loading tag file */ public Class<?> loadTagFile() throws JasperException { @@ -267,6 +269,8 @@ public class JspServletWrapper { * when compiling tag files with circular dependencies. A prototype * (skeleton) with no dependencies on other other tag files is * generated and compiled. + * @return the loaded class + * @throws JasperException Error compiling or loading tag file */ public Class<?> loadTagFilePrototype() throws JasperException { @@ -280,6 +284,7 @@ public class JspServletWrapper { /** * Get a list of files that the current page has source dependency on. + * @return the map of dependent resources */ public java.util.Map<String,Long> getDependants() { try { Modified: tomcat/trunk/java/org/apache/jasper/servlet/TldScanner.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/servlet/TldScanner.java?rev=1724812&r1=1724811&r2=1724812&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/jasper/servlet/TldScanner.java (original) +++ tomcat/trunk/java/org/apache/jasper/servlet/TldScanner.java Fri Jan 15 14:13:28 2016 @@ -153,6 +153,8 @@ public class TldScanner { /** * Scan for TLDs defined in <jsp-config>. + * @throws IOException Error reading resources + * @throws SAXException XML parsing error */ protected void scanJspConfig() throws IOException, SAXException { JspConfigDescriptor jspConfigDescriptor = context.getJspConfigDescriptor(); --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org