You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xmlgraphics.apache.org by je...@apache.org on 2008/05/06 10:26:30 UTC
svn commit: r653704 -
/xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/loader/impl/AbstractImageSessionContext.java
Author: jeremias
Date: Tue May 6 01:26:30 2008
New Revision: 653704
URL: http://svn.apache.org/viewvc?rev=653704&view=rev
Log:
Temporary measure to track down a problem with source reuse (HTTP timeouts).
Set
-Dorg.apache.xmlgraphics.image.loader.impl.AbstractImageSessionContext.no-source-reuse=true
to disable source reuse.
Modified:
xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/loader/impl/AbstractImageSessionContext.java
Modified: xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/loader/impl/AbstractImageSessionContext.java
URL: http://svn.apache.org/viewvc/xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/loader/impl/AbstractImageSessionContext.java?rev=653704&r1=653703&r2=653704&view=diff
==============================================================================
--- xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/loader/impl/AbstractImageSessionContext.java (original)
+++ xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/loader/impl/AbstractImageSessionContext.java Tue May 6 01:26:30 2008
@@ -52,6 +52,16 @@
/** logger */
private static Log log = LogFactory.getLog(AbstractImageSessionContext.class);
+ private static boolean noSourceReuse = false;
+
+ static {
+ //TODO Temporary measure to track down a problem
+ //See: http://markmail.org/message/k6mno3jsxmovaz2e
+ String v = System.getProperty(
+ AbstractImageSessionContext.class.getName() + ".no-source-reuse");
+ noSourceReuse = Boolean.valueOf(v).booleanValue();
+ }
+
/**
* Attempts to resolve the given URI.
* @param uri URI to access
@@ -221,6 +231,9 @@
* @return true if the Source is reusable
*/
protected boolean isReusable(Source src) {
+ if (noSourceReuse) {
+ return false;
+ }
if (src instanceof ImageSource) {
ImageSource is = (ImageSource)src;
if (is.getImageInputStream() != null) {
---------------------------------------------------------------------
Apache XML Graphics Project URL: http://xmlgraphics.apache.org/
To unsubscribe, e-mail: commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: commits-help@xmlgraphics.apache.org