Author: markt
Date: Fri Jun 2 09:19:28 2017
New Revision: 1797338
URL: http://svn.apache.org/viewvc?rev=1797338&view=rev
Log:
Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=61145
Add missing @Documented annotation to annotations in the annotations API. Patch
provided by Katya Todorova.
Modified:
tomcat/trunk/java/javax/annotation/Generated.java
tomcat/trunk/java/javax/annotation/PostConstruct.java
tomcat/trunk/java/javax/annotation/PreDestroy.java
tomcat/trunk/java/javax/annotation/Priority.java
tomcat/trunk/java/javax/annotation/Resources.java
tomcat/trunk/java/javax/annotation/security/DeclareRoles.java
tomcat/trunk/java/javax/annotation/security/DenyAll.java
tomcat/trunk/java/javax/annotation/security/PermitAll.java
tomcat/trunk/java/javax/annotation/security/RolesAllowed.java
tomcat/trunk/java/javax/annotation/security/RunAs.java
tomcat/trunk/java/org/apache/jasper/compiler/Compiler.java
tomcat/trunk/webapps/docs/changelog.xml
Modified: tomcat/trunk/java/javax/annotation/Generated.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/java/javax/annotation/Generated.java?rev=1797338&r1=1797337&r2=1797338&view=diff
==============================================================================
--- tomcat/trunk/java/javax/annotation/Generated.java (original)
+++ tomcat/trunk/java/javax/annotation/Generated.java Fri Jun 2 09:19:28 2017
@@ -20,10 +20,12 @@ import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
+import java.lang.annotation.Documented;
/**
* @since Common Annotations 1.0
*/
+@Documented
@Target({ElementType.ANNOTATION_TYPE, ElementType.CONSTRUCTOR,
ElementType.FIELD, ElementType.LOCAL_VARIABLE, ElementType.METHOD,
ElementType.PACKAGE, ElementType.PARAMETER, ElementType.TYPE})
Modified: tomcat/trunk/java/javax/annotation/PostConstruct.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/java/javax/annotation/PostConstruct.java?rev=1797338&r1=1797337&r2=1797338&view=diff
==============================================================================
--- tomcat/trunk/java/javax/annotation/PostConstruct.java (original)
+++ tomcat/trunk/java/javax/annotation/PostConstruct.java Fri Jun 2 09:19:28
2017
@@ -20,10 +20,12 @@ import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
+import java.lang.annotation.Documented;
/**
* @since Common Annotations 1.0
*/
+@Documented
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
public @interface PostConstruct {
Modified: tomcat/trunk/java/javax/annotation/PreDestroy.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/java/javax/annotation/PreDestroy.java?rev=1797338&r1=1797337&r2=1797338&view=diff
==============================================================================
--- tomcat/trunk/java/javax/annotation/PreDestroy.java (original)
+++ tomcat/trunk/java/javax/annotation/PreDestroy.java Fri Jun 2 09:19:28 2017
@@ -20,10 +20,12 @@ import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
+import java.lang.annotation.Documented;
/**
* @since Common Annotations 1.0
*/
+@Documented
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
public @interface PreDestroy {
Modified: tomcat/trunk/java/javax/annotation/Priority.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/java/javax/annotation/Priority.java?rev=1797338&r1=1797337&r2=1797338&view=diff
==============================================================================
--- tomcat/trunk/java/javax/annotation/Priority.java (original)
+++ tomcat/trunk/java/javax/annotation/Priority.java Fri Jun 2 09:19:28 2017
@@ -20,10 +20,12 @@ import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
+import java.lang.annotation.Documented;
/**
* @since Common Annotations 1.2
*/
+@Documented
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
public @interface Priority {
Modified: tomcat/trunk/java/javax/annotation/Resources.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/java/javax/annotation/Resources.java?rev=1797338&r1=1797337&r2=1797338&view=diff
==============================================================================
--- tomcat/trunk/java/javax/annotation/Resources.java (original)
+++ tomcat/trunk/java/javax/annotation/Resources.java Fri Jun 2 09:19:28 2017
@@ -20,10 +20,12 @@ import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
+import java.lang.annotation.Documented;
/**
* @since Common Annotations 1.0
*/
+@Documented
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
public @interface Resources {
Modified: tomcat/trunk/java/javax/annotation/security/DeclareRoles.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/java/javax/annotation/security/DeclareRoles.java?rev=1797338&r1=1797337&r2=1797338&view=diff
==============================================================================
--- tomcat/trunk/java/javax/annotation/security/DeclareRoles.java (original)
+++ tomcat/trunk/java/javax/annotation/security/DeclareRoles.java Fri Jun 2
09:19:28 2017
@@ -20,10 +20,12 @@ import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
+import java.lang.annotation.Documented;
/**
* @since Common Annotations 1.0
*/
+@Documented
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
public @interface DeclareRoles {
Modified: tomcat/trunk/java/javax/annotation/security/DenyAll.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/java/javax/annotation/security/DenyAll.java?rev=1797338&r1=1797337&r2=1797338&view=diff
==============================================================================
--- tomcat/trunk/java/javax/annotation/security/DenyAll.java (original)
+++ tomcat/trunk/java/javax/annotation/security/DenyAll.java Fri Jun 2
09:19:28 2017
@@ -20,10 +20,12 @@ import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
+import java.lang.annotation.Documented;
/**
* @since Common Annotations 1.0
*/
+@Documented
@Target({ElementType.METHOD, ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
public @interface DenyAll {
Modified: tomcat/trunk/java/javax/annotation/security/PermitAll.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/java/javax/annotation/security/PermitAll.java?rev=1797338&r1=1797337&r2=1797338&view=diff
==============================================================================
--- tomcat/trunk/java/javax/annotation/security/PermitAll.java (original)
+++ tomcat/trunk/java/javax/annotation/security/PermitAll.java Fri Jun 2
09:19:28 2017
@@ -20,10 +20,12 @@ import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
+import java.lang.annotation.Documented;
/**
* @since Common Annotations 1.0
*/
+@Documented
@Target({ElementType.TYPE, ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
public @interface PermitAll {
Modified: tomcat/trunk/java/javax/annotation/security/RolesAllowed.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/java/javax/annotation/security/RolesAllowed.java?rev=1797338&r1=1797337&r2=1797338&view=diff
==============================================================================
--- tomcat/trunk/java/javax/annotation/security/RolesAllowed.java (original)
+++ tomcat/trunk/java/javax/annotation/security/RolesAllowed.java Fri Jun 2
09:19:28 2017
@@ -20,10 +20,12 @@ import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
+import java.lang.annotation.Documented;
/**
* @since Common Annotations 1.0
*/
+@Documented
@Target({ElementType.TYPE, ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
public @interface RolesAllowed {
Modified: tomcat/trunk/java/javax/annotation/security/RunAs.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/java/javax/annotation/security/RunAs.java?rev=1797338&r1=1797337&r2=1797338&view=diff
==============================================================================
--- tomcat/trunk/java/javax/annotation/security/RunAs.java (original)
+++ tomcat/trunk/java/javax/annotation/security/RunAs.java Fri Jun 2 09:19:28
2017
@@ -20,10 +20,12 @@ import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
+import java.lang.annotation.Documented;
/**
* @since Common Annotations 1.0
*/
+@Documented
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
public @interface RunAs {
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=1797338&r1=1797337&r2=1797338&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/jasper/compiler/Compiler.java (original)
+++ tomcat/trunk/java/org/apache/jasper/compiler/Compiler.java Fri Jun 2
09:19:28 2017
@@ -68,6 +68,9 @@ public abstract class Compiler {
protected Node.Nodes pageNodes;
+ private String[] smap;
+
+
// ------------------------------------------------------------ Constructor
public void init(JspCompilationContext ctxt, JspServletWrapper jsw) {
@@ -90,6 +93,21 @@ public abstract class Compiler {
return this.pageNodes;
}
+
+ /**
+ * Obtain the source map for this file. This is cached on compilation. If
+ * the process has been restarted since compilation, null will be returned.
+ * TODO: Extract the SMAP from the class file if the cached copy is not
+ * available (assumes SMAP is not suppressed)
+ *
+ * @return The source map in the format it is written to the class file or
+ * {@code null} if not available.
+ */
+ public String[] getSmap() {
+ return smap;
+ }
+
+
/**
* Compile the jsp file into equivalent servlet in .java file
*
@@ -368,7 +386,7 @@ public abstract class Compiler {
}
try {
- String[] smap = generateJava();
+ smap = generateJava();
File javaFile = new File(ctxt.getServletJavaFileName());
Long jspLastModified = ctxt.getLastModified(ctxt.getJspFile());
javaFile.setLastModified(jspLastModified.longValue());
Modified: tomcat/trunk/webapps/docs/changelog.xml
URL:
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1797338&r1=1797337&r2=1797338&view=diff
==============================================================================
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Fri Jun 2 09:19:28 2017
@@ -138,6 +138,11 @@
Correct the requirement for the minimum Java SE version in Application
Developer's Guide. Issue reported via comments.apache.org. (violetagg)
</fix>
+ <fix>
+ <bug>61145</bug>: Add missing <code>@Documented</code> annotation to
+ annotations in the annotations API. Patch provided by Katya Todorova.
+ (markt)
+ </fix>
</changelog>
</subsection>
</section>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]