JBossWeb SVN: r2124 - branches/7.2.x/src/main/java/org/apache/coyote/http11.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2012-11-14 10:18:42 -0500 (Wed, 14 Nov 2012)
New Revision: 2124
Modified:
branches/7.2.x/src/main/java/org/apache/coyote/http11/Http11AbstractProcessor.java
branches/7.2.x/src/main/java/org/apache/coyote/http11/Http11AprProcessor.java
branches/7.2.x/src/main/java/org/apache/coyote/http11/Http11NioProcessor.java
Log:
- Only event mode should touch the read notification flag on begin.
Modified: branches/7.2.x/src/main/java/org/apache/coyote/http11/Http11AbstractProcessor.java
===================================================================
--- branches/7.2.x/src/main/java/org/apache/coyote/http11/Http11AbstractProcessor.java 2012-11-14 15:10:19 UTC (rev 2123)
+++ branches/7.2.x/src/main/java/org/apache/coyote/http11/Http11AbstractProcessor.java 2012-11-14 15:18:42 UTC (rev 2124)
@@ -203,7 +203,7 @@
/**
* True if a read has been requested.
*/
- protected boolean readNotifications = true;
+ protected boolean readNotifications = false;
/**
* True if a write has been requested.
*/
@@ -480,7 +480,7 @@
*/
public void recycle() {
timeout = -1;
- readNotifications = true;
+ readNotifications = false;
writeNotification = false;
resumeNotification = false;
eventProcessing = true;
Modified: branches/7.2.x/src/main/java/org/apache/coyote/http11/Http11AprProcessor.java
===================================================================
--- branches/7.2.x/src/main/java/org/apache/coyote/http11/Http11AprProcessor.java 2012-11-14 15:10:19 UTC (rev 2123)
+++ branches/7.2.x/src/main/java/org/apache/coyote/http11/Http11AprProcessor.java 2012-11-14 15:18:42 UTC (rev 2124)
@@ -314,7 +314,7 @@
protected String server = null;
- protected boolean readNotifications = true;
+ protected boolean readNotifications = false;
protected boolean writeNotification = false;
protected boolean resumeNotification = false;
protected boolean eventProcessing = true;
@@ -988,7 +988,7 @@
outputBuffer.recycle();
this.socket = 0;
timeout = -1;
- readNotifications = true;
+ readNotifications = false;
writeNotification = false;
resumeNotification = false;
eventProcessing = true;
@@ -1250,6 +1250,7 @@
Socket.timeoutSet(socket, 0);
outputBuffer.setNonBlocking(true);
inputBuffer.setNonBlocking(true);
+ readNotifications = true;
}
} else if (actionCode == ActionCode.ACTION_EVENT_END) {
event = false;
Modified: branches/7.2.x/src/main/java/org/apache/coyote/http11/Http11NioProcessor.java
===================================================================
--- branches/7.2.x/src/main/java/org/apache/coyote/http11/Http11NioProcessor.java 2012-11-14 15:10:19 UTC (rev 2123)
+++ branches/7.2.x/src/main/java/org/apache/coyote/http11/Http11NioProcessor.java 2012-11-14 15:18:42 UTC (rev 2124)
@@ -706,6 +706,7 @@
if (param == Boolean.TRUE) {
outputBuffer.setNonBlocking(true);
inputBuffer.setNonBlocking(true);
+ readNotifications = true;
}
}
12 years, 1 month
JBossWeb SVN: r2123 - in branches/7.2.x/src/main/java/org/apache: coyote and 2 other directories.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2012-11-14 10:10:19 -0500 (Wed, 14 Nov 2012)
New Revision: 2123
Modified:
branches/7.2.x/src/main/java/org/apache/catalina/connector/Request.java
branches/7.2.x/src/main/java/org/apache/coyote/ActionCode.java
branches/7.2.x/src/main/java/org/apache/coyote/ajp/AjpAprProcessor.java
branches/7.2.x/src/main/java/org/apache/coyote/ajp/AjpProcessor.java
branches/7.2.x/src/main/java/org/apache/coyote/http11/Http11AprProcessor.java
branches/7.2.x/src/main/java/org/apache/coyote/http11/Http11NioProcessor.java
branches/7.2.x/src/main/java/org/apache/coyote/http11/Http11Processor.java
Log:
- AS7-5840: the clarification seems to lean towards destroying async listeners on recycle.
- Add a separate event for resuming async, since it enabled the read polling flag [probably not too problematic, but most certainly useless].
Modified: branches/7.2.x/src/main/java/org/apache/catalina/connector/Request.java
===================================================================
--- branches/7.2.x/src/main/java/org/apache/catalina/connector/Request.java 2012-11-14 14:08:45 UTC (rev 2122)
+++ branches/7.2.x/src/main/java/org/apache/catalina/connector/Request.java 2012-11-14 15:10:19 UTC (rev 2123)
@@ -37,6 +37,7 @@
import java.util.HashMap;
import java.util.Iterator;
import java.util.LinkedHashMap;
+import java.util.LinkedList;
import java.util.Locale;
import java.util.Map;
import java.util.Random;
@@ -474,7 +475,13 @@
* Random generator.
*/
protected Random random = null;
+
+ /**
+ * Async listener instances.
+ */
+ protected LinkedList<AsyncListener> asyncListenerInstances = new LinkedList<AsyncListener>();
+
// --------------------------------------------------------- Public Methods
@@ -485,6 +492,17 @@
*/
public void recycle() {
+ if (asyncContext != null && context != null) {
+ for (AsyncListener listener : asyncListenerInstances) {
+ try {
+ context.getInstanceManager().destroyInstance(listener);
+ } catch (Throwable t) {
+ context.getLogger().error(MESSAGES.preDestroyException(), t);
+ }
+ }
+ asyncListenerInstances.clear();
+ }
+
context = null;
wrapper = null;
@@ -2553,6 +2571,11 @@
}
+ public void wakeup() {
+ coyoteRequest.action(ActionCode.ACTION_EVENT_WAKEUP, null);
+ }
+
+
public void suspend() {
coyoteRequest.action(ActionCode.ACTION_EVENT_SUSPEND, null);
}
@@ -3324,7 +3347,7 @@
public void complete() {
setEventMode(false);
- resume();
+ wakeup();
}
public void dispatch() {
@@ -3342,21 +3365,21 @@
throw MESSAGES.cannotFindDispatchContext(requestURI);
}
}
- resume();
+ wakeup();
}
public void dispatch(String path) {
this.servletContext = null;
this.path = path;
useAttributes = true;
- resume();
+ wakeup();
}
public void dispatch(ServletContext servletContext, String path) {
this.servletContext = servletContext;
this.path = path;
useAttributes = true;
- resume();
+ wakeup();
}
public ServletRequest getRequest() {
@@ -3381,7 +3404,7 @@
public void start(Runnable runnable) {
this.runnable = runnable;
- resume();
+ wakeup();
}
public boolean isReady() {
@@ -3457,6 +3480,7 @@
} catch (Exception e) {
throw new ServletException(MESSAGES.listenerCreationFailed(clazz.getName()), e);
}
+ asyncListenerInstances.add(listenerInstance);
return listenerInstance;
}
Modified: branches/7.2.x/src/main/java/org/apache/coyote/ActionCode.java
===================================================================
--- branches/7.2.x/src/main/java/org/apache/coyote/ActionCode.java 2012-11-14 14:08:45 UTC (rev 2122)
+++ branches/7.2.x/src/main/java/org/apache/coyote/ActionCode.java 2012-11-14 15:10:19 UTC (rev 2123)
@@ -176,6 +176,11 @@
*/
public static final ActionCode UPGRADE = new ActionCode(28);
+ /**
+ * Ask for a callback event without reenabling read events
+ */
+ public static final ActionCode ACTION_EVENT_WAKEUP = new ActionCode(29);
+
// ----------------------------------------------------------- Constructors
int code;
Modified: branches/7.2.x/src/main/java/org/apache/coyote/ajp/AjpAprProcessor.java
===================================================================
--- branches/7.2.x/src/main/java/org/apache/coyote/ajp/AjpAprProcessor.java 2012-11-14 14:08:45 UTC (rev 2122)
+++ branches/7.2.x/src/main/java/org/apache/coyote/ajp/AjpAprProcessor.java 2012-11-14 15:10:19 UTC (rev 2123)
@@ -652,7 +652,7 @@
event = false;
} else if (actionCode == ActionCode.ACTION_EVENT_SUSPEND) {
// No action needed
- } else if (actionCode == ActionCode.ACTION_EVENT_RESUME) {
+ } else if (actionCode == ActionCode.ACTION_EVENT_WAKEUP) {
// An event is being processed already: adding for resume will be done
// when the socket gets back to the poller
if (!eventProcessing && !resumeNotification) {
Modified: branches/7.2.x/src/main/java/org/apache/coyote/ajp/AjpProcessor.java
===================================================================
--- branches/7.2.x/src/main/java/org/apache/coyote/ajp/AjpProcessor.java 2012-11-14 14:08:45 UTC (rev 2122)
+++ branches/7.2.x/src/main/java/org/apache/coyote/ajp/AjpProcessor.java 2012-11-14 15:10:19 UTC (rev 2123)
@@ -666,7 +666,7 @@
event = false;
} else if (actionCode == ActionCode.ACTION_EVENT_SUSPEND) {
// No action needed
- } else if (actionCode == ActionCode.ACTION_EVENT_RESUME) {
+ } else if (actionCode == ActionCode.ACTION_EVENT_WAKEUP) {
// An event is being processed already: adding for resume will be done
// when the socket gets back to the poller
if (!eventProcessing && !resumeNotification) {
Modified: branches/7.2.x/src/main/java/org/apache/coyote/http11/Http11AprProcessor.java
===================================================================
--- branches/7.2.x/src/main/java/org/apache/coyote/http11/Http11AprProcessor.java 2012-11-14 14:08:45 UTC (rev 2122)
+++ branches/7.2.x/src/main/java/org/apache/coyote/http11/Http11AprProcessor.java 2012-11-14 15:10:19 UTC (rev 2123)
@@ -1271,6 +1271,13 @@
endpoint.getEventPoller().add(socket, timeout, false, false, true, true);
}
resumeNotification = true;
+ } else if (actionCode == ActionCode.ACTION_EVENT_WAKEUP) {
+ // An event is being processed already: adding for resume will be done
+ // when the socket gets back to the poller
+ if (!eventProcessing && !resumeNotification) {
+ endpoint.getEventPoller().add(socket, timeout, false, false, true, true);
+ }
+ resumeNotification = true;
} else if (actionCode == ActionCode.ACTION_EVENT_WRITE) {
// An event is being processed already: adding for write will be done
// when the socket gets back to the poller
Modified: branches/7.2.x/src/main/java/org/apache/coyote/http11/Http11NioProcessor.java
===================================================================
--- branches/7.2.x/src/main/java/org/apache/coyote/http11/Http11NioProcessor.java 2012-11-14 14:08:45 UTC (rev 2122)
+++ branches/7.2.x/src/main/java/org/apache/coyote/http11/Http11NioProcessor.java 2012-11-14 15:10:19 UTC (rev 2123)
@@ -730,8 +730,10 @@
* @param param
* the vent parameter
*/
- private void resumeEvent(Object param) {
- readNotifications = true;
+ private void resumeEvent(Object param, boolean read) {
+ if (read) {
+ readNotifications = true;
+ }
// An event is being processed already: adding for resume will be
// done
// when the channel gets back to the poller
@@ -843,7 +845,10 @@
suspendEvent();
} else if (actionCode == ActionCode.ACTION_EVENT_RESUME) {
// Resume event
- resumeEvent(param);
+ resumeEvent(param, true);
+ } else if (actionCode == ActionCode.ACTION_EVENT_WAKEUP) {
+ // Resume event
+ resumeEvent(param, false);
} else if (actionCode == ActionCode.ACTION_EVENT_WRITE) {
// Write event
writeEvent(param);
Modified: branches/7.2.x/src/main/java/org/apache/coyote/http11/Http11Processor.java
===================================================================
--- branches/7.2.x/src/main/java/org/apache/coyote/http11/Http11Processor.java 2012-11-14 14:08:45 UTC (rev 2122)
+++ branches/7.2.x/src/main/java/org/apache/coyote/http11/Http11Processor.java 2012-11-14 15:10:19 UTC (rev 2123)
@@ -1144,7 +1144,7 @@
event = false;
} else if (actionCode == ActionCode.ACTION_EVENT_SUSPEND) {
// No action needed
- } else if (actionCode == ActionCode.ACTION_EVENT_RESUME) {
+ } else if (actionCode == ActionCode.ACTION_EVENT_WAKEUP) {
// An event is being processed already: adding for resume will be done
// when the socket gets back to the poller
if (!eventProcessing && !resumeNotification) {
12 years, 1 month
JBossWeb SVN: r2122 - branches/7.2.x/src/main/java/org/apache/coyote/http11.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2012-11-14 09:08:45 -0500 (Wed, 14 Nov 2012)
New Revision: 2122
Modified:
branches/7.2.x/src/main/java/org/apache/coyote/http11/AbstractInternalInputBuffer.java
branches/7.2.x/src/main/java/org/apache/coyote/http11/InternalAprInputBuffer.java
branches/7.2.x/src/main/java/org/apache/coyote/http11/InternalNioInputBuffer.java
Log:
- Probable fix for JBWEB-253 (a bit hard to test though since it depends on read size, and I can get a telnet to go high enough).
- The NIO2 connector used the APR connector algorithm for the read, but the read size is only constrained to the byte buffer size,
which may not fit in the array.
- Adjust the byte buffer size, the only relevant size being used on reading is always the header array size (saves a tiny bit of memory).
Modified: branches/7.2.x/src/main/java/org/apache/coyote/http11/AbstractInternalInputBuffer.java
===================================================================
--- branches/7.2.x/src/main/java/org/apache/coyote/http11/AbstractInternalInputBuffer.java 2012-11-13 12:55:22 UTC (rev 2121)
+++ branches/7.2.x/src/main/java/org/apache/coyote/http11/AbstractInternalInputBuffer.java 2012-11-14 14:08:45 UTC (rev 2122)
@@ -139,12 +139,7 @@
lastActiveFilter = -1;
parsingHeader = true;
swallowInput = true;
-
- if (headerBufferSize < (8 * 1024)) {
- bbuf = ByteBuffer.allocateDirect(6 * 1500);
- } else {
- bbuf = ByteBuffer.allocateDirect((headerBufferSize / 1500 + 1) * 1500);
- }
+ bbuf = ByteBuffer.allocateDirect(headerBufferSize);
}
/**
Modified: branches/7.2.x/src/main/java/org/apache/coyote/http11/InternalAprInputBuffer.java
===================================================================
--- branches/7.2.x/src/main/java/org/apache/coyote/http11/InternalAprInputBuffer.java 2012-11-13 12:55:22 UTC (rev 2121)
+++ branches/7.2.x/src/main/java/org/apache/coyote/http11/InternalAprInputBuffer.java 2012-11-14 14:08:45 UTC (rev 2122)
@@ -57,11 +57,7 @@
headers = request.getMimeHeaders();
buf = new byte[headerBufferSize];
- if (headerBufferSize < (8 * 1024)) {
- bbuf = ByteBuffer.allocateDirect(6 * 1500);
- } else {
- bbuf = ByteBuffer.allocateDirect((headerBufferSize / 1500 + 1) * 1500);
- }
+ bbuf = ByteBuffer.allocateDirect(headerBufferSize);
inputStreamInputBuffer = new SocketInputBuffer();
Modified: branches/7.2.x/src/main/java/org/apache/coyote/http11/InternalNioInputBuffer.java
===================================================================
--- branches/7.2.x/src/main/java/org/apache/coyote/http11/InternalNioInputBuffer.java 2012-11-13 12:55:22 UTC (rev 2121)
+++ branches/7.2.x/src/main/java/org/apache/coyote/http11/InternalNioInputBuffer.java 2012-11-14 14:08:45 UTC (rev 2122)
@@ -401,6 +401,14 @@
nRead = blockingRead(bbuf, readTimeout, unit);
if (nRead > 0) {
bbuf.flip();
+ if (nRead > (buf.length - end)) {
+ // An alternative is to bbuf.setLimit(buf.length - end) before the read,
+ // which may be less efficient
+ buf = new byte[buf.length];
+ end = 0;
+ pos = end;
+ lastValid = pos;
+ }
bbuf.get(buf, pos, nRead);
lastValid = pos + nRead;
} else if (nRead == NioChannel.OP_STATUS_CLOSED) {
@@ -421,18 +429,9 @@
if (parsingHeader) {
if (lastValid == buf.length) {
- throw new IllegalArgumentException(MESSAGES.requestHeaderTooLarge());
+ throw MESSAGES.requestHeaderTooLarge();
}
} else {
- if (buf.length - end < 4500) {
- // In this case, the request header was really large, so we
- // allocate a
- // brand new one; the old one will get GCed when subsequent
- // requests
- // clear all references
- buf = new byte[buf.length];
- end = 0;
- }
pos = end;
lastValid = pos;
}
12 years, 1 month
JBossWeb SVN: r2121 - branches/7.2.x/src/main/java/org/jboss/web.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2012-11-13 07:55:22 -0500 (Tue, 13 Nov 2012)
New Revision: 2121
Modified:
branches/7.2.x/src/main/java/org/jboss/web/CatalinaLogger.java
Log:
Fix typo submitted by Jaikiran
Modified: branches/7.2.x/src/main/java/org/jboss/web/CatalinaLogger.java
===================================================================
--- branches/7.2.x/src/main/java/org/jboss/web/CatalinaLogger.java 2012-11-12 15:55:36 UTC (rev 2120)
+++ branches/7.2.x/src/main/java/org/jboss/web/CatalinaLogger.java 2012-11-13 12:55:22 UTC (rev 2121)
@@ -98,19 +98,19 @@
void missingSecurityProvider(String provider, @Cause Throwable t);
@LogMessage(level = ERROR)
- @Message(id = 1003, value = "Error digesting user credentials.")
+ @Message(id = 1003, value = "Error digesting user credentials")
void errorDigestingCredentials(@Cause Throwable t);
@LogMessage(level = ERROR)
- @Message(id = 1004, value = "Failed realm [%s] JMX registration.")
+ @Message(id = 1004, value = "Failed realm [%s] JMX registration")
void failedRealmJmxRegistration(Object objectName, @Cause Throwable t);
@LogMessage(level = ERROR)
- @Message(id = 1005, value = "Failed realm [%s] JMX unregistration.")
+ @Message(id = 1005, value = "Failed realm [%s] JMX unregistration")
void failedRealmJmxUnregistration(Object objectName, @Cause Throwable t);
@LogMessage(level = ERROR)
- @Message(id = 1006, value = "Missing parent [%s].")
+ @Message(id = 1006, value = "Missing parent [%s]")
void missingParentJmxRegistration(Object objectName, @Cause Throwable t);
@LogMessage(level = INFO)
@@ -118,11 +118,11 @@
void connectorAlreadyInitialized();
@LogMessage(level = ERROR)
- @Message(id = 1008, value = "Failed connector [%s] JMX registration.")
+ @Message(id = 1008, value = "Failed connector [%s] JMX registration")
void failedConnectorJmxRegistration(Object objectName, @Cause Throwable t);
@LogMessage(level = ERROR)
- @Message(id = 1009, value = "Failed connector [%s] JMX unregistration.")
+ @Message(id = 1009, value = "Failed connector [%s] JMX unregistration")
void failedConnectorJmxUnregistration(Object objectName, @Cause Throwable t);
@LogMessage(level = ERROR)
@@ -138,7 +138,7 @@
void connectorAlreadyStarted();
@LogMessage(level = INFO)
- @Message(id = 1013, value = "Cannot proceed with protocol handler JMX registration.")
+ @Message(id = 1013, value = "Cannot proceed with protocol handler JMX registration")
void failedProtocolJmxRegistration();
@LogMessage(level = INFO)
@@ -186,11 +186,11 @@
void exceptionProcessingParameters(@Cause Throwable t);
@LogMessage(level = DEBUG)
- @Message(id = 1025, value = "Request [%s], can not apply ExpiresFilter on already committed response.")
+ @Message(id = 1025, value = "Request [%s], can not apply ExpiresFilter on already committed response")
void expiresResponseAlreadyCommitted(String uri);
@LogMessage(level = WARN)
- @Message(id = 1026, value = "Unknown parameter %s with value %s is ignored.")
+ @Message(id = 1026, value = "Unknown parameter %s with value %s is ignored")
void expiresUnknownParameter(String name, String value);
@LogMessage(level = DEBUG)
@@ -574,11 +574,11 @@
void pipelineNotStarted();
@LogMessage(level = ERROR)
- @Message(id = 1122, value = "Failed valve [%s] JMX registration.")
+ @Message(id = 1122, value = "Failed valve [%s] JMX registration")
void failedValveJmxRegistration(Object valve, @Cause Throwable t);
@LogMessage(level = ERROR)
- @Message(id = 1123, value = "Failed valve [%s] JMX unregistration.")
+ @Message(id = 1123, value = "Failed valve [%s] JMX unregistration")
void failedValveJmxUnregistration(Object valve, @Cause Throwable t);
@LogMessage(level = ERROR)
@@ -598,7 +598,7 @@
void errorInitializingService(@Cause Throwable t);
@LogMessage(level = ERROR)
- @Message(id = 1128, value = "Failed service [%s] JMX registration.")
+ @Message(id = 1128, value = "Failed service [%s] JMX registration")
void failedServiceJmxRegistration(Object objectName, @Cause Throwable t);
@LogMessage(level = ERROR)
@@ -638,7 +638,7 @@
void stoppingService(String serviceName);
@LogMessage(level = ERROR)
- @Message(id = 1138, value = "Failed server [%s] JMX registration.")
+ @Message(id = 1138, value = "Failed server [%s] JMX registration")
void failedServerJmxRegistration(Object objectName, @Cause Throwable t);
@LogMessage(level = INFO)
@@ -646,11 +646,11 @@
void contextJmxRegistrationFailed(String contextName, @Cause Throwable t);
@LogMessage(level = ERROR)
- @Message(id = 1140, value = "Failed protocol handler [%s] JMX registration.")
+ @Message(id = 1140, value = "Failed protocol handler [%s] JMX registration")
void failedProtocolJmxRegistration(Object objectName, @Cause Throwable t);
@LogMessage(level = INFO)
- @Message(id = 1141, value = "NIO 2 is not available, the java.io connector will be used insteaf")
+ @Message(id = 1141, value = "NIO 2 is not available, the java.io connector will be used instead")
void usingJavaIoConnector();
@LogMessage(level = ERROR)
12 years, 1 month
JBossWeb SVN: r2120 - in branches: 7.2.x/src/main/java/org/apache/catalina/authenticator and 1 other directory.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2012-11-12 10:55:36 -0500 (Mon, 12 Nov 2012)
New Revision: 2120
Modified:
branches/7.0.x/java/org/apache/catalina/authenticator/FormAuthenticator.java
branches/7.2.x/src/main/java/org/apache/catalina/authenticator/FormAuthenticator.java
Log:
Change session id (if configured) before forwarding to login page.
Modified: branches/7.0.x/java/org/apache/catalina/authenticator/FormAuthenticator.java
===================================================================
--- branches/7.0.x/java/org/apache/catalina/authenticator/FormAuthenticator.java 2012-11-09 16:52:26 UTC (rev 2119)
+++ branches/7.0.x/java/org/apache/catalina/authenticator/FormAuthenticator.java 2012-11-12 15:55:36 UTC (rev 2120)
@@ -31,6 +31,7 @@
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
+import org.apache.catalina.Manager;
import org.apache.catalina.Realm;
import org.apache.catalina.Session;
import org.apache.catalina.connector.Request;
@@ -356,6 +357,14 @@
*/
protected void forwardToLoginPage(Request request, HttpServletResponse response, LoginConfig config)
throws IOException {
+ if (changeSessionIdOnAuthentication) {
+ Session session = request.getSessionInternal(false);
+ if (session != null) {
+ Manager manager = request.getContext().getManager();
+ manager.changeSessionId(session, request.getRandom());
+ request.changeSessionId(session.getId());
+ }
+ }
RequestDispatcher disp =
context.getServletContext().getRequestDispatcher(config.getLoginPage());
try {
Modified: branches/7.2.x/src/main/java/org/apache/catalina/authenticator/FormAuthenticator.java
===================================================================
--- branches/7.2.x/src/main/java/org/apache/catalina/authenticator/FormAuthenticator.java 2012-11-09 16:52:26 UTC (rev 2119)
+++ branches/7.2.x/src/main/java/org/apache/catalina/authenticator/FormAuthenticator.java 2012-11-12 15:55:36 UTC (rev 2120)
@@ -33,6 +33,7 @@
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
+import org.apache.catalina.Manager;
import org.apache.catalina.Realm;
import org.apache.catalina.Session;
import org.apache.catalina.connector.Request;
@@ -357,6 +358,14 @@
*/
protected void forwardToLoginPage(Request request, HttpServletResponse response, LoginConfig config)
throws IOException {
+ if (changeSessionIdOnAuthentication) {
+ Session session = request.getSessionInternal(false);
+ if (session != null) {
+ Manager manager = request.getContext().getManager();
+ manager.changeSessionId(session, request.getRandom());
+ request.changeSessionId(session.getId());
+ }
+ }
RequestDispatcher disp =
context.getServletContext().getRequestDispatcher(config.getLoginPage());
try {
12 years, 1 month
JBossWeb SVN: r2119 - branches/7.2.x/src/main/java/org/apache/coyote/http11.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2012-11-09 11:52:26 -0500 (Fri, 09 Nov 2012)
New Revision: 2119
Modified:
branches/7.2.x/src/main/java/org/apache/coyote/http11/Http11NioProtocol.java
Log:
Remove difference with APR that causes async issues. The endpoint appears to be doing the right thing about listening anyway.
Modified: branches/7.2.x/src/main/java/org/apache/coyote/http11/Http11NioProtocol.java
===================================================================
--- branches/7.2.x/src/main/java/org/apache/coyote/http11/Http11NioProtocol.java 2012-11-09 15:13:33 UTC (rev 2118)
+++ branches/7.2.x/src/main/java/org/apache/coyote/http11/Http11NioProtocol.java 2012-11-09 16:52:26 UTC (rev 2119)
@@ -905,9 +905,9 @@
// a recycled processor.
connections.put(channel.getId(), processor);
- if ( /* processor.isAvailable() && */processor.getReadNotifications()) {
+ if (processor.isAvailable() && processor.getReadNotifications()) {
// Call a read event right away
- processor.inputBuffer.readAsync();
+ state = event(channel, SocketStatus.OPEN_READ);
} else {
proto.endpoint.addEventChannel(channel, processor.getTimeout(),
processor.getReadNotifications(), false,
12 years, 1 month
JBossWeb SVN: r2118 - in branches/7.2.x: src/main/java/org/apache/jasper/compiler/tagplugin and 4 other directories.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2012-11-09 10:13:33 -0500 (Fri, 09 Nov 2012)
New Revision: 2118
Added:
branches/7.2.x/src/main/java/org/apache/jasper/el/JasperELResolver.java
Modified:
branches/7.2.x/src/main/java/org/apache/jasper/compiler/Compiler.java
branches/7.2.x/src/main/java/org/apache/jasper/compiler/Generator.java
branches/7.2.x/src/main/java/org/apache/jasper/compiler/PageInfo.java
branches/7.2.x/src/main/java/org/apache/jasper/compiler/TagPluginManager.java
branches/7.2.x/src/main/java/org/apache/jasper/compiler/tagplugin/TagPluginContext.java
branches/7.2.x/src/main/java/org/apache/jasper/runtime/JspApplicationContextImpl.java
branches/7.2.x/src/main/java/org/apache/jasper/runtime/PageContextImpl.java
branches/7.2.x/src/main/java/org/apache/jasper/tagplugins/jstl/core/Out.java
branches/7.2.x/src/main/java/org/apache/jasper/tagplugins/jstl/core/Set.java
branches/7.2.x/webapps/docs/changelog.xml
Log:
- 54012: Allow tagplugins compatibility with tag files
- Misc minor optimizations
Modified: branches/7.2.x/src/main/java/org/apache/jasper/compiler/Compiler.java
===================================================================
--- branches/7.2.x/src/main/java/org/apache/jasper/compiler/Compiler.java 2012-11-07 22:53:07 UTC (rev 2117)
+++ branches/7.2.x/src/main/java/org/apache/jasper/compiler/Compiler.java 2012-11-09 15:13:33 UTC (rev 2118)
@@ -106,7 +106,7 @@
// Setup page info area
pageInfo = new PageInfo(new BeanRepository(ctxt.getClassLoader(),
- errDispatcher), ctxt.getJspFile());
+ errDispatcher), ctxt.getJspFile(), ctxt.isTagFile());
JspConfig jspConfig = options.getJspConfig();
JspConfig.JspProperty jspProperty = jspConfig.findJspProperty(ctxt
Modified: branches/7.2.x/src/main/java/org/apache/jasper/compiler/Generator.java
===================================================================
--- branches/7.2.x/src/main/java/org/apache/jasper/compiler/Generator.java 2012-11-07 22:53:07 UTC (rev 2117)
+++ branches/7.2.x/src/main/java/org/apache/jasper/compiler/Generator.java 2012-11-09 15:13:33 UTC (rev 2118)
@@ -3146,7 +3146,7 @@
} else if (c == Long.class) {
return JspUtil.coerceToLong(s, isNamedAttribute);
} else if (c == Object.class) {
- return "new String(" + quoted + ")";
+ return quoted;
} else {
String className = JspUtil.getCanonicalName(c);
return "("
Modified: branches/7.2.x/src/main/java/org/apache/jasper/compiler/PageInfo.java
===================================================================
--- branches/7.2.x/src/main/java/org/apache/jasper/compiler/PageInfo.java 2012-11-07 22:53:07 UTC (rev 2117)
+++ branches/7.2.x/src/main/java/org/apache/jasper/compiler/PageInfo.java 2012-11-09 15:13:33 UTC (rev 2118)
@@ -100,10 +100,12 @@
private ArrayList<String> includeCoda;
private Vector pluginDcls; // Id's for tagplugin declarations
+ private boolean isTagFile = false;
- PageInfo(BeanRepository beanRepository, String jspFile) {
+ PageInfo(BeanRepository beanRepository, String jspFile, boolean isTagFile) {
this.jspFile = jspFile;
+ this.isTagFile = isTagFile;
this.beanRepository = beanRepository;
this.varInfoNames = new HashSet<String>();
this.taglibsMap = new HashMap();
@@ -122,6 +124,10 @@
imports.add(Constants.STANDARD_IMPORTS[i]);
}
+ public boolean isTagFile() {
+ return isTagFile;
+ }
+
/**
* Check if the plugin ID has been previously declared. Make a not
* that this Id is now declared.
Modified: branches/7.2.x/src/main/java/org/apache/jasper/compiler/TagPluginManager.java
===================================================================
--- branches/7.2.x/src/main/java/org/apache/jasper/compiler/TagPluginManager.java 2012-11-07 22:53:07 UTC (rev 2117)
+++ branches/7.2.x/src/main/java/org/apache/jasper/compiler/TagPluginManager.java 2012-11-09 15:13:33 UTC (rev 2118)
@@ -256,6 +256,11 @@
curNodes = node.getAtETag();
}
+ @Override
+ public boolean isTagFile() {
+ return pageInfo.isTagFile();
+ }
+
private Node.JspAttribute getNodeAttribute(String attribute) {
Node.JspAttribute[] attrs = node.getJspAttributes();
for (int i=0; attrs != null && i < attrs.length; i++) {
Modified: branches/7.2.x/src/main/java/org/apache/jasper/compiler/tagplugin/TagPluginContext.java
===================================================================
--- branches/7.2.x/src/main/java/org/apache/jasper/compiler/tagplugin/TagPluginContext.java 2012-11-07 22:53:07 UTC (rev 2117)
+++ branches/7.2.x/src/main/java/org/apache/jasper/compiler/tagplugin/TagPluginContext.java 2012-11-09 15:13:33 UTC (rev 2118)
@@ -120,5 +120,10 @@
* Get the value of an attribute in the current tagplugin context.
*/
Object getPluginAttribute(String attr);
+
+ /**
+ * Is the tag being used inside a tag file?
+ */
+ boolean isTagFile();
}
Added: branches/7.2.x/src/main/java/org/apache/jasper/el/JasperELResolver.java
===================================================================
--- branches/7.2.x/src/main/java/org/apache/jasper/el/JasperELResolver.java (rev 0)
+++ branches/7.2.x/src/main/java/org/apache/jasper/el/JasperELResolver.java 2012-11-09 15:13:33 UTC (rev 2118)
@@ -0,0 +1,159 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.jasper.el;
+
+import java.util.List;
+
+import javax.el.ArrayELResolver;
+import javax.el.BeanELResolver;
+import javax.el.CompositeELResolver;
+import javax.el.ELContext;
+import javax.el.ELException;
+import javax.el.ELResolver;
+import javax.el.ListELResolver;
+import javax.el.MapELResolver;
+import javax.el.PropertyNotFoundException;
+import javax.el.ResourceBundleELResolver;
+import javax.servlet.jsp.el.ImplicitObjectELResolver;
+import javax.servlet.jsp.el.ScopedAttributeELResolver;
+
+/**
+ * Jasper-specific CompositeELResolver that optimizes certain functions to avoid
+ * unnecessary resolver calls.
+ */
+public class JasperELResolver extends CompositeELResolver {
+
+ private int size;
+ private ELResolver[] resolvers;
+ private int appResolversSize;
+
+ public JasperELResolver(List<ELResolver> appResolvers) {
+ appResolversSize = appResolvers.size();
+ resolvers = new ELResolver[0];
+ size = resolvers.length;
+
+ add(new ImplicitObjectELResolver());
+ for (ELResolver appResolver : appResolvers) {
+ add(appResolver);
+ }
+ add(new MapELResolver());
+ add(new ResourceBundleELResolver());
+ add(new ListELResolver());
+ add(new ArrayELResolver());
+ add(new BeanELResolver());
+ add(new ScopedAttributeELResolver());
+ }
+
+ @Override
+ public synchronized void add(ELResolver elResolver) {
+ super.add(elResolver);
+
+ ELResolver[] nr = new ELResolver[size + 1];
+ System.arraycopy(resolvers, 0, nr, 0, size);
+ nr[size] = elResolver;
+
+ resolvers = nr;
+ size ++;
+ }
+
+ @Override
+ public Object getValue(ELContext context, Object base, Object property)
+ throws NullPointerException, PropertyNotFoundException, ELException {
+ context.setPropertyResolved(false);
+
+ int start;
+ Object result = null;
+
+ if (base == null) {
+ // call implicit and app resolvers
+ int index = 1 /* implicit */ + appResolversSize;
+ for (int i = 0; i < index; i++) {
+ result = resolvers[i].getValue(context, base, property);
+ if (context.isPropertyResolved()) {
+ return result;
+ }
+ }
+ // skip collection-based resolvers (map, resource, list, array, and
+ // bean)
+ start = index + 5;
+ } else {
+ // skip implicit resolver only
+ start = 1;
+ }
+
+ for (int i = start; i < size; i++) {
+ result = resolvers[i].getValue(context, base, property);
+ if (context.isPropertyResolved()) {
+ return result;
+ }
+ }
+
+ return null;
+ }
+
+ @Override
+ public Object invoke(ELContext context, Object base, Object method,
+ Class<?>[] paramTypes, Object[] params) {
+ String targetMethod = coerceToString(method);
+ if (targetMethod.length() == 0) {
+ throw new ELException(new NoSuchMethodException());
+ }
+
+ context.setPropertyResolved(false);
+
+ Object result = null;
+
+ // skip implicit and call app resolvers
+ int index = 1 /* implicit */ + appResolversSize;
+ for (int i = 1; i < index; i++) {
+ result = resolvers[i].invoke(
+ context, base, targetMethod, paramTypes, params);
+ if (context.isPropertyResolved()) {
+ return result;
+ }
+ }
+
+ // skip map, resource, list, and array resolvers
+ index += 4;
+ // call bean and the rest of resolvers
+ for (int i = index; i < size; i++) {
+ result = resolvers[i].invoke(
+ context, base, targetMethod, paramTypes, params);
+ if (context.isPropertyResolved()) {
+ return result;
+ }
+ }
+
+ return null;
+ }
+
+ /**
+ * Copied from {@link org.apache.el.lang.ELSupport#coerceToString(Object)}.
+ */
+ private static final String coerceToString(final Object obj) {
+ if (obj == null) {
+ return "";
+ } else if (obj instanceof String) {
+ return (String) obj;
+ } else if (obj instanceof Enum<?>) {
+ return ((Enum<?>) obj).name();
+ } else {
+ return obj.toString();
+ }
+ }
+}
\ No newline at end of file
Modified: branches/7.2.x/src/main/java/org/apache/jasper/runtime/JspApplicationContextImpl.java
===================================================================
--- branches/7.2.x/src/main/java/org/apache/jasper/runtime/JspApplicationContextImpl.java 2012-11-07 22:53:07 UTC (rev 2117)
+++ branches/7.2.x/src/main/java/org/apache/jasper/runtime/JspApplicationContextImpl.java 2012-11-09 15:13:33 UTC (rev 2118)
@@ -21,27 +21,20 @@
import java.security.AccessController;
import java.security.PrivilegedAction;
import java.util.ArrayList;
-import java.util.Iterator;
import java.util.List;
-import javax.el.ArrayELResolver;
-import javax.el.BeanELResolver;
import javax.el.CompositeELResolver;
import javax.el.ELContextEvent;
import javax.el.ELContextListener;
import javax.el.ELResolver;
import javax.el.ExpressionFactory;
-import javax.el.ListELResolver;
-import javax.el.MapELResolver;
-import javax.el.ResourceBundleELResolver;
import javax.servlet.ServletContext;
import javax.servlet.jsp.JspApplicationContext;
import javax.servlet.jsp.JspContext;
-import javax.servlet.jsp.el.ImplicitObjectELResolver;
-import javax.servlet.jsp.el.ScopedAttributeELResolver;
import org.apache.jasper.Constants;
import org.apache.jasper.el.ELContextImpl;
+import org.apache.jasper.el.JasperELResolver;
/**
* Implementation of JspApplicationContext
@@ -119,17 +112,7 @@
private ELResolver createELResolver() {
this.instantiated = true;
if (this.resolver == null) {
- CompositeELResolver r = new CompositeELResolver();
- r.add(new ImplicitObjectELResolver());
- for (Iterator itr = this.resolvers.iterator(); itr.hasNext();) {
- r.add((ELResolver) itr.next());
- }
- r.add(new MapELResolver());
- r.add(new ResourceBundleELResolver());
- r.add(new ListELResolver());
- r.add(new ArrayELResolver());
- r.add(new BeanELResolver());
- r.add(new ScopedAttributeELResolver());
+ CompositeELResolver r = new JasperELResolver(this.resolvers);
this.resolver = r;
}
return this.resolver;
Modified: branches/7.2.x/src/main/java/org/apache/jasper/runtime/PageContextImpl.java
===================================================================
--- branches/7.2.x/src/main/java/org/apache/jasper/runtime/PageContextImpl.java 2012-11-07 22:53:07 UTC (rev 2117)
+++ branches/7.2.x/src/main/java/org/apache/jasper/runtime/PageContextImpl.java 2012-11-09 15:13:33 UTC (rev 2118)
@@ -846,30 +846,70 @@
}
}
- private static String XmlEscape(String s) {
- if (s == null)
- return null;
- StringBuilder sb = new StringBuilder();
- for (int i = 0; i < s.length(); i++) {
- char c = s.charAt(i);
- if (c == '<') {
- sb.append("<");
- } else if (c == '>') {
- sb.append(">");
- } else if (c == '\'') {
- sb.append("'"); // '
- } else if (c == '&') {
- sb.append("&");
- } else if (c == '"') {
- sb.append("""); // "
- } else {
- sb.append(c);
- }
- }
- return sb.toString();
- }
+ protected static String XmlEscape(String s) {
+ if (s == null) {
+ return null;
+ }
+ int len = s.length();
- /**
+ /*
+ * Look for any "bad" characters, Escape "bad" character was found
+ */
+ // ASCII " 34 & 38 ' 39 < 60 > 62
+ for (int i = 0; i < len; i++) {
+ char c = s.charAt(i);
+ if (c >= '\"' && c <= '>' &&
+ (c == '<' || c == '>' || c == '\'' || c == '&' || c == '"')) {
+ // need to escape them and then quote the whole string
+ StringBuilder sb = new StringBuilder((int) (len * 1.2));
+ sb.append(s, 0, i);
+ int pos = i + 1;
+ for (int j = i; j < len; j++) {
+ c = s.charAt(j);
+ if (c >= '\"' && c <= '>') {
+ if (c == '<') {
+ if (j > pos) {
+ sb.append(s, pos, j);
+ }
+ sb.append("<");
+ pos = j + 1;
+ } else if (c == '>') {
+ if (j > pos) {
+ sb.append(s, pos, j);
+ }
+ sb.append(">");
+ pos = j + 1;
+ } else if (c == '\'') {
+ if (j > pos) {
+ sb.append(s, pos, j);
+ }
+ sb.append("'"); // '
+ pos = j + 1;
+ } else if (c == '&') {
+ if (j > pos) {
+ sb.append(s, pos, j);
+ }
+ sb.append("&");
+ pos = j + 1;
+ } else if (c == '"') {
+ if (j > pos) {
+ sb.append(s, pos, j);
+ }
+ sb.append("""); // "
+ pos = j + 1;
+ }
+ }
+ }
+ if (pos < len) {
+ sb.append(s, pos, len);
+ }
+ return sb.toString();
+ }
+ }
+ return s;
+ }
+
+ /**
* Proprietary method to evaluate EL expressions. XXX - This method should
* go away once the EL interpreter moves out of JSTL and into its own
* project. For now, this is necessary because the standard machinery is too
Modified: branches/7.2.x/src/main/java/org/apache/jasper/tagplugins/jstl/core/Out.java
===================================================================
--- branches/7.2.x/src/main/java/org/apache/jasper/tagplugins/jstl/core/Out.java 2012-11-07 22:53:07 UTC (rev 2117)
+++ branches/7.2.x/src/main/java/org/apache/jasper/tagplugins/jstl/core/Out.java 2012-11-09 15:13:33 UTC (rev 2118)
@@ -18,6 +18,10 @@
package org.apache.jasper.tagplugins.jstl.core;
+import java.io.IOException;
+
+import javax.servlet.jsp.JspWriter;
+
import org.apache.jasper.compiler.tagplugin.TagPlugin;
import org.apache.jasper.compiler.tagplugin.TagPluginContext;
@@ -65,26 +69,26 @@
//if the escapeXml is specified, assign the value to it;
ctxt.generateJavaSource("boolean " + strEscapeXmlName + " = true;");
if(hasEscapeXml){
- ctxt.generateJavaSource(strEscapeXmlName + " = Boolean.parseBoolean((");
- ctxt.generateAttribute("default");
- ctxt.generateJavaSource(").toString());");
+ ctxt.generateJavaSource(strEscapeXmlName + " = ");
+ ctxt.generateAttribute("escapeXml");
+ ctxt.generateJavaSource(";");
}
//main part.
- ctxt.generateJavaSource("if(null != " + strValName +"){");
- ctxt.generateJavaSource(" if(" + strEscapeXmlName + "){");
- ctxt.generateJavaSource(" " + strValName + " = org.apache.jasper.tagplugins.jstl.Util.escapeXml(" + strValName + ");");
- ctxt.generateJavaSource(" }");
- ctxt.generateJavaSource(" out.write(" + strValName + ");");
- ctxt.generateJavaSource("}else{");
- ctxt.generateJavaSource(" if(null != " + strDefName + "){");
- ctxt.generateJavaSource(" if(" + strEscapeXmlName + "){");
- ctxt.generateJavaSource(" " + strDefName + " = org.apache.jasper.tagplugins.jstl.Util.escapeXml(" + strDefName + ");");
- ctxt.generateJavaSource(" }");
- ctxt.generateJavaSource(" out.write(" + strDefName + ");");
- ctxt.generateJavaSource(" }else{");
- ctxt.generateBody();
- ctxt.generateJavaSource(" }");
- ctxt.generateJavaSource("}");
+ ctxt.generateJavaSource(
+ "org.apache.jasper.tagplugins.jstl.core.Out.output(out, " +
+ strValName + ", " + strDefName + ", " + strEscapeXmlName +
+ ");");
}
+
+ public static void output(JspWriter out, String value, String defaultValue,
+ boolean escapeXml) throws IOException {
+ String v = value != null ? value : defaultValue;
+ if (v != null) {
+ if(escapeXml){
+ v = org.apache.jasper.tagplugins.jstl.Util.escapeXml(v);
+ }
+ out.write(v);
+ }
+ }
}
Modified: branches/7.2.x/src/main/java/org/apache/jasper/tagplugins/jstl/core/Set.java
===================================================================
--- branches/7.2.x/src/main/java/org/apache/jasper/tagplugins/jstl/core/Set.java 2012-11-07 22:53:07 UTC (rev 2117)
+++ branches/7.2.x/src/main/java/org/apache/jasper/tagplugins/jstl/core/Set.java 2012-11-09 15:13:33 UTC (rev 2118)
@@ -69,14 +69,20 @@
//if the attribute var has been specified then assign the result to the var;
if(hasVar){
+ String jspCtxt = null;
+ if (ctxt.isTagFile()) {
+ jspCtxt = "this.getJspContext()";
+ } else {
+ jspCtxt = "_jspx_page_context";
+ }
String strVar = ctxt.getConstantAttribute("var");
ctxt.generateJavaSource("if(null != " + resultName + "){");
- ctxt.generateJavaSource(" pageContext.setAttribute(\"" + strVar + "\"," + resultName + "," + iScope + ");");
+ ctxt.generateJavaSource(" " + jspCtxt + ".setAttribute(\"" + strVar + "\"," + resultName + "," + iScope + ");");
ctxt.generateJavaSource("} else {");
if(hasScope){
- ctxt.generateJavaSource(" pageContext.removeAttribute(\"" + strVar + "\"," + iScope + ");");
+ ctxt.generateJavaSource(" " + jspCtxt + ".removeAttribute(\"" + strVar + "\"," + iScope + ");");
}else{
- ctxt.generateJavaSource(" pageContext.removeAttribute(\"" + strVar + "\");");
+ ctxt.generateJavaSource(" " + jspCtxt + ".removeAttribute(\"" + strVar + "\");");
}
ctxt.generateJavaSource("}");
Modified: branches/7.2.x/webapps/docs/changelog.xml
===================================================================
--- branches/7.2.x/webapps/docs/changelog.xml 2012-11-07 22:53:07 UTC (rev 2117)
+++ branches/7.2.x/webapps/docs/changelog.xml 2012-11-09 15:13:33 UTC (rev 2118)
@@ -40,6 +40,12 @@
<fix>
<jira>251</jira>: Drop localization related class preload. (remm)
</fix>
+ <fix>
+ <bug>54012</bug>: Allow tagplugins compatibility with tag files. (markt)
+ </fix>
+ <fix>
+ Misc minor optimizations. (markt)
+ </fix>
</changelog>
</subsection>
</section>
12 years, 1 month
JBossWeb SVN: r2117 - branches/JBOSSWEB_2_0_0_GA_CP16_JBPAPP-10368/src/share/classes/org/apache/el/lang.
by jbossweb-commits@lists.jboss.org
Author: aogburn
Date: 2012-11-07 17:53:07 -0500 (Wed, 07 Nov 2012)
New Revision: 2117
Modified:
branches/JBOSSWEB_2_0_0_GA_CP16_JBPAPP-10368/src/share/classes/org/apache/el/lang/ELSupport.java
Log:
[JBPAPP-10368] merge fix to JBWEB-198 from branch 2.1.x
Modified: branches/JBOSSWEB_2_0_0_GA_CP16_JBPAPP-10368/src/share/classes/org/apache/el/lang/ELSupport.java
===================================================================
--- branches/JBOSSWEB_2_0_0_GA_CP16_JBPAPP-10368/src/share/classes/org/apache/el/lang/ELSupport.java 2012-11-07 22:29:00 UTC (rev 2116)
+++ branches/JBOSSWEB_2_0_0_GA_CP16_JBPAPP-10368/src/share/classes/org/apache/el/lang/ELSupport.java 2012-11-07 22:53:07 UTC (rev 2117)
@@ -246,6 +246,9 @@
if (Float.TYPE == type || Float.class.equals(type)) {
return new Float(number.floatValue());
}
+ if (Number.class.equals(type)) {
+ return number;
+ }
throw new IllegalArgumentException(MessageFactory.get("error.convert",
number, number.getClass(), type));
Property changes on: branches/JBOSSWEB_2_0_0_GA_CP16_JBPAPP-10368/src/share/classes/org/apache/el/lang/ELSupport.java
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/2.1.x/java/org/apache/el/lang/ELSupport.java:1714
12 years, 1 month
JBossWeb SVN: r2116 - branches.
by jbossweb-commits@lists.jboss.org
Author: aogburn
Date: 2012-11-07 17:29:00 -0500 (Wed, 07 Nov 2012)
New Revision: 2116
Added:
branches/JBOSSWEB_2_0_0_GA_CP16_JBPAPP-10368/
Log:
copy 2.0.0.GA_CP16 tag
12 years, 1 month