Skip to content

Commit

Permalink
Code and javadoc cleanup in Jasper
Browse files Browse the repository at this point in the history
  • Loading branch information
rmaucher committed May 27, 2024
1 parent 9e02925 commit 8d9ef91
Show file tree
Hide file tree
Showing 13 changed files with 26 additions and 716 deletions.
64 changes: 0 additions & 64 deletions java/org/apache/jasper/EmbeddedServletOptions.java
Original file line number Diff line number Diff line change
Expand Up @@ -248,9 +248,6 @@ public boolean getQuoteAttributeEL() {
return quoteAttributeEL;
}

/**
* Are we keeping generated code around?
*/
@Override
public boolean getKeepGenerated() {
return keepGenerated;
Expand All @@ -266,130 +263,81 @@ public boolean isPoolingEnabled() {
return isPoolingEnabled;
}

/**
* Are we supporting HTML mapped servlets?
*/
@Override
public boolean getMappedFile() {
return mappedFile;
}

/**
* Should class files be compiled with debug information?
*/
@Override
public boolean getClassDebugInfo() {
return classDebugInfo;
}

/**
* Background JSP compile thread check interval
*/
@Override
public int getCheckInterval() {
return checkInterval;
}

/**
* Modification test interval.
*/
@Override
public int getModificationTestInterval() {
return modificationTestInterval;
}

/**
* Re-compile on failure.
*/
@Override
public boolean getRecompileOnFail() {
return recompileOnFail;
}

/**
* Is Jasper being used in development mode?
*/
@Override
public boolean getDevelopment() {
return development;
}

/**
* Is the generation of SMAP info for JSR45 debugging suppressed?
*/
@Override
public boolean isSmapSuppressed() {
return isSmapSuppressed;
}

/**
* Should SMAP info for JSR45 debugging be dumped to a file?
*/
@Override
public boolean isSmapDumped() {
return isSmapDumped;
}

/**
* Are Text strings to be generated as char arrays?
*/
@Override
public boolean genStringAsCharArray() {
return this.genStringAsCharArray;
}

/**
* What is my scratch dir?
*/
@Override
public File getScratchDir() {
return scratchDir;
}

/**
* What classpath should I use while compiling the servlets
* generated from JSP files?
*/
@Override
public String getClassPath() {
return classpath;
}

/**
* Is generation of X-Powered-By response header enabled/disabled?
*/
@Override
public boolean isXpoweredBy() {
return xpoweredBy;
}

/**
* Compiler to use.
*/
@Override
public String getCompiler() {
return compiler;
}

/**
* @see Options#getCompilerTargetVM
*/
@Override
public String getCompilerTargetVM() {
return compilerTargetVM;
}

/**
* @see Options#getCompilerSourceVM
*/
@Override
public String getCompilerSourceVM() {
return compilerSourceVM;
}

/**
* Java compiler class to use.
*/
@Override
public String getCompilerClassName() {
return compilerClassName;
Expand Down Expand Up @@ -443,28 +391,16 @@ public Map<String, TagLibraryInfo> getCache() {
return null;
}

/**
* Should we include a source fragment in exception messages, which could be displayed
* to the developer ?
*/
@Override
public boolean getDisplaySourceFragment() {
return displaySourceFragment;
}

/**
* Should jsps be unloaded if to many are loaded?
* If set to a value greater than 0 eviction of jsps is started. Default: -1
*/
@Override
public int getMaxLoadedJsps() {
return maxLoadedJsps;
}

/**
* Should any jsps be unloaded when being idle for this time in seconds?
* If set to a value greater than 0 eviction of jsps is started. Default: -1
*/
@Override
public int getJspIdleTimeout() {
return jspIdleTimeout;
Expand Down
3 changes: 0 additions & 3 deletions java/org/apache/jasper/compiler/AntCompiler.java
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,6 @@ protected String getReport() {
// --------------------------------------------------------- Public Methods


/**
* Compile the servlet from .java file to .class file
*/
@Override
protected void generateClass(Map<String,SmapStratum> smaps)
throws FileNotFoundException, JasperException, Exception {
Expand Down
27 changes: 0 additions & 27 deletions java/org/apache/jasper/compiler/DefaultErrorHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,6 @@
*/
class DefaultErrorHandler implements ErrorHandler {

/*
* Processes the given JSP parse error.
*
* @param fname Name of the JSP file in which the parse error occurred
* @param line Parse error line number
* @param column Parse error column number
* @param errMsg Parse error message
* @param exception Parse exception
*/
@Override
public void jspError(String fname, int line, int column, String errMsg,
Exception ex) throws JasperException {
Expand All @@ -43,23 +34,11 @@ public void jspError(String fname, int line, int column, String errMsg,
") " + errMsg, ex);
}

/*
* Processes the given JSP parse error.
*
* @param errMsg Parse error message
* @param exception Parse exception
*/
@Override
public void jspError(String errMsg, Exception ex) throws JasperException {
throw new JasperException(errMsg, ex);
}

/*
* Processes the given javac compilation errors.
*
* @param details Array of JavacErrorDetail instances corresponding to the
* compilation errors
*/
@Override
public void javacError(JavacErrorDetail[] details) throws JasperException {

Expand Down Expand Up @@ -102,12 +81,6 @@ public void javacError(JavacErrorDetail[] details) throws JasperException {
Localizer.getMessage("jsp.error.unable.compile") + ": " + buf);
}

/**
* Processes the given javac error report and exception.
*
* @param errorReport Compilation error report
* @param exception Compilation exception
*/
@Override
public void javacError(String errorReport, Exception exception)
throws JasperException {
Expand Down
3 changes: 0 additions & 3 deletions java/org/apache/jasper/compiler/JDTCompiler.java
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,6 @@ public class JDTCompiler extends org.apache.jasper.compiler.Compiler {

private final Log log = LogFactory.getLog(JDTCompiler.class); // must not be static

/**
* Compile the servlet from .java file to .class file
*/
@Override
protected void generateClass(Map<String,SmapStratum> smaps)
throws FileNotFoundException, JasperException, Exception {
Expand Down
20 changes: 0 additions & 20 deletions java/org/apache/jasper/compiler/JspDocumentParser.java
Original file line number Diff line number Diff line change
Expand Up @@ -632,9 +632,6 @@ private void processChars() throws SAXException {
charBuffer = null;
}

/*
* Receives notification of the end of an element.
*/
@Override
public void endElement(String uri, String localName, String qName)
throws SAXException {
Expand Down Expand Up @@ -712,11 +709,6 @@ public void endElement(String uri, String localName, String qName)
}
}

/*
* Receives the document locator.
*
* @param locator the document locator
*/
@Override
public void setDocumentLocator(Locator locator) {
this.locator = locator;
Expand Down Expand Up @@ -796,25 +788,16 @@ public void endDTD() throws SAXException {
inDTD = false;
}

/*
* Receives notification of a non-recoverable error.
*/
@Override
public void fatalError(SAXParseException e) throws SAXException {
throw e;
}

/*
* Receives notification of a recoverable error.
*/
@Override
public void error(SAXParseException e) throws SAXException {
throw e;
}

/*
* Receives notification of the start of a Namespace mapping.
*/
@Override
public void startPrefixMapping(String prefix, String uri)
throws SAXException {
Expand Down Expand Up @@ -843,9 +826,6 @@ public void startPrefixMapping(String prefix, String uri)
}
}

/*
* Receives notification of the end of a Namespace mapping.
*/
@Override
public void endPrefixMapping(String prefix) throws SAXException {

Expand Down
Loading

0 comments on commit 8d9ef91

Please sign in to comment.