Revision: 1028
http://stripes.svn.sourceforge.net/stripes/?rev=1028&view=rev
Author: bengunter
Date: 2008-12-23 21:47:14 +0000 (Tue, 23 Dec 2008)
Log Message:
-----------
Applied fix for STS-620 from trunk.
Modified Paths:
--------------
branches/1.5.x/stripes/src/net/sourceforge/stripes/config/BootstrapPropertyResolver.java
Modified:
branches/1.5.x/stripes/src/net/sourceforge/stripes/config/BootstrapPropertyResolver.java
===================================================================
---
branches/1.5.x/stripes/src/net/sourceforge/stripes/config/BootstrapPropertyResolver.java
2008-12-23 21:43:12 UTC (rev 1027)
+++
branches/1.5.x/stripes/src/net/sourceforge/stripes/config/BootstrapPropertyResolver.java
2008-12-23 21:47:14 UTC (rev 1028)
@@ -15,6 +15,7 @@
package net.sourceforge.stripes.config;
import java.lang.reflect.Modifier;
+import java.security.AccessControlException;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
@@ -75,14 +76,34 @@
* @return String the value of the configuration item or null
*/
public String getProperty(String key) {
- String value = this.filterConfig.getInitParameter(key);
+ String value = null;
+ try {
+ value = this.filterConfig.getInitParameter(key);
+ }
+ catch (AccessControlException e) {
+ log.debug("Security manager prevented " + getClass().getName()
+ + " from reading filter init-param" + key);
+ }
+
if (value == null) {
- value =
this.filterConfig.getServletContext().getInitParameter(key);
+ try {
+ value =
this.filterConfig.getServletContext().getInitParameter(key);
+ }
+ catch (AccessControlException e) {
+ log.debug("Security manager prevented " + getClass().getName()
+ + " from reading servlet context init-param" + key);
+ }
}
if (value == null) {
- value = System.getProperty(key);
+ try {
+ value = System.getProperty(key);
+ }
+ catch (AccessControlException e) {
+ log.debug("Security manager prevented " + getClass().getName()
+ + " from reading system property " + key);
+ }
}
return value;
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
_______________________________________________
Stripes-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-development