You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2014/01/18 22:29:52 UTC
svn commit: r1559421 - in /tomcat/tc7.0.x/trunk: ./
java/org/apache/jasper/compiler/PageInfo.java
java/org/apache/jasper/compiler/Validator.java webapps/docs/changelog.xml
Author: markt
Date: Sat Jan 18 21:29:52 2014
New Revision: 1559421
URL: http://svn.apache.org/r1559421
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=56012
Imports from unnamed packages are now explicitly illegal
Modified:
tomcat/tc7.0.x/trunk/ (props changed)
tomcat/tc7.0.x/trunk/java/org/apache/jasper/compiler/PageInfo.java
tomcat/tc7.0.x/trunk/java/org/apache/jasper/compiler/Validator.java
tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
Propchange: tomcat/tc7.0.x/trunk/
------------------------------------------------------------------------------
Merged /tomcat/trunk:r1559419
Modified: tomcat/tc7.0.x/trunk/java/org/apache/jasper/compiler/PageInfo.java
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/jasper/compiler/PageInfo.java?rev=1559421&r1=1559420&r2=1559421&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/java/org/apache/jasper/compiler/PageInfo.java (original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/jasper/compiler/PageInfo.java Sat Jan 18 21:29:52 2014
@@ -402,17 +402,16 @@ class PageInfo {
/*
* extends
*/
- public void setExtends(String value, Node.PageDirective n) {
-
+ public void setExtends(String value) {
xtends = value;
+ }
- /*
- * If page superclass is top level class (i.e. not in a package)
- * explicitly import it. If this is not done, the compiler will assume
- * the extended class is in the same pkg as the generated servlet.
- */
- if (value.indexOf('.') < 0)
- n.addImport(value);
+ /**
+ * @deprecated Use {@link #setExtends(String)}
+ */
+ @Deprecated
+ public void setExtends(String value, @SuppressWarnings("unused") Node.PageDirective n) {
+ xtends = value;
}
/**
Modified: tomcat/tc7.0.x/trunk/java/org/apache/jasper/compiler/Validator.java
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/jasper/compiler/Validator.java?rev=1559421&r1=1559420&r2=1559421&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/java/org/apache/jasper/compiler/Validator.java (original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/jasper/compiler/Validator.java Sat Jan 18 21:29:52 2014
@@ -123,7 +123,7 @@ class Validator {
}
} else if ("extends".equals(attr)) {
if (pageInfo.getExtends(false) == null) {
- pageInfo.setExtends(value, n);
+ pageInfo.setExtends(value);
} else if (!pageInfo.getExtends(false).equals(value)) {
err.jspError(n, "jsp.error.page.conflict.extends",
pageInfo.getExtends(false), value);
Modified: tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml?rev=1559421&r1=1559420&r2=1559421&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Sat Jan 18 21:29:52 2014
@@ -143,6 +143,11 @@
(markt)
</fix>
<fix>
+ <bug>56012</bug>: When using the extends attribute of the page directive
+ do not import the super class if it is in an unnamed package as imports
+ from unnamed packages are now explicitly illegal. (markt)
+ </fix>
+ <fix>
<bug>56029</bug>: A regression in the fix for <bug>55198</bug> meant
that when EL containing a ternary expression was used in an attribute
a compilation error would occur for some expressions. (markt)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org