You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Roshan Punnoose (JIRA)" <ji...@apache.org> on 2006/09/13 14:17:23 UTC
[jira] Created: (AXIS2-1148) Bug in TransportUtils with the file
caching
Bug in TransportUtils with the file caching
-------------------------------------------
Key: AXIS2-1148
URL: http://issues.apache.org/jira/browse/AXIS2-1148
Project: Apache Axis 2.0 (Axis2)
Issue Type: Bug
Components: core
Affects Versions: 1.0
Environment: Weblogic 8.1, Axis2 Client
Reporter: Roshan Punnoose
Ok, maybe I'm not looking at this right, but I think I see a bug in
TransportUtils.selectBuilderForMIME(...):
Object cacheAttachmentProperty = msgContext
.getProperty(Constants.Configuration.CACHE_ATTACHMENTS);
String cacheAttachmentString = null;
boolean fileCacheForAttachments;
if (cacheAttachmentProperty != null) {
cacheAttachmentProperty =
cacheAttachmentProperty;
fileCacheForAttachments = (Constants.VALUE_TRUE
.equals(cacheAttachmentString));
The cacheAttachmentString is always going to be null right? Then, the
client will never actually cache the attachment in the temp directory if
the properties have been set. Right? Am I going crazy?
If you want, I can post my fix for it.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org
[jira] Commented: (AXIS2-1148) Bug in TransportUtils with the file
caching
Posted by "Roshan Punnoose (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/AXIS2-1148?page=comments#action_12434460 ]
Roshan Punnoose commented on AXIS2-1148:
----------------------------------------
Instead of putting the whole file in here, here is the snippet I changed:
Two changes:
1. Line 179: cacheAttachmentString = (String) cacheAttachmentProperty
2. Line 212: attachmentSizeThreshold = (String) attachmentSizeThresholdProperty;
Below is the snippet of code from selectBuilderForMIME: (I added instanceofs because we can't assume the properties will be Strings)
Object cacheAttachmentProperty = msgContext
.getProperty(Constants.Configuration.CACHE_ATTACHMENTS);
String cacheAttachmentString = null;
boolean fileCacheForAttachments;
if (cacheAttachmentProperty != null && cacheAttachmentProperty instanceof String) {
cacheAttachmentString = (String) cacheAttachmentProperty;
fileCacheForAttachments = (Constants.VALUE_TRUE
.equals(cacheAttachmentString));
} else {
Parameter parameter_cache_attachment = msgContext
.getParameter(Constants.Configuration.CACHE_ATTACHMENTS);
cacheAttachmentString = (parameter_cache_attachment != null) ? (String) parameter_cache_attachment
.getValue()
: null;
}
fileCacheForAttachments = (Constants.VALUE_TRUE
.equals(cacheAttachmentString));
String attachmentRepoDir = null;
String attachmentSizeThreshold = null;
if (fileCacheForAttachments) {
Object attachmentRepoDirProperty = msgContext
.getProperty(Constants.Configuration.ATTACHMENT_TEMP_DIR);
if (attachmentRepoDirProperty != null) {
attachmentRepoDir = (String) attachmentRepoDirProperty;
} else {
Parameter attachmentRepoDirParameter = msgContext
.getParameter(Constants.Configuration.ATTACHMENT_TEMP_DIR);
attachmentRepoDir = (attachmentRepoDirParameter != null) ? (String) attachmentRepoDirParameter
.getValue()
: null;
}
Object attachmentSizeThresholdProperty = msgContext
.getProperty(Constants.Configuration.FILE_SIZE_THRESHOLD);
if (attachmentSizeThresholdProperty != null && attachmentSizeThresholdProperty instanceof String) {
attachmentSizeThreshold = (String) attachmentSizeThresholdProperty;
} else {
Parameter attachmentSizeThresholdParameter = msgContext
.getParameter(Constants.Configuration.FILE_SIZE_THRESHOLD);
attachmentSizeThreshold = attachmentSizeThresholdParameter
.getValue().toString();
}
}
> Bug in TransportUtils with the file caching
> -------------------------------------------
>
> Key: AXIS2-1148
> URL: http://issues.apache.org/jira/browse/AXIS2-1148
> Project: Apache Axis 2.0 (Axis2)
> Issue Type: Bug
> Components: core
> Affects Versions: 1.0
> Environment: Weblogic 8.1, Axis2 Client
> Reporter: Roshan Punnoose
>
> Ok, maybe I'm not looking at this right, but I think I see a bug in
> TransportUtils.selectBuilderForMIME(...):
> Object cacheAttachmentProperty = msgContext
> .getProperty(Constants.Configuration.CACHE_ATTACHMENTS);
> String cacheAttachmentString = null;
> boolean fileCacheForAttachments;
> if (cacheAttachmentProperty != null) {
> cacheAttachmentProperty =
> cacheAttachmentProperty;
> fileCacheForAttachments = (Constants.VALUE_TRUE
> .equals(cacheAttachmentString));
> The cacheAttachmentString is always going to be null right? Then, the
> client will never actually cache the attachment in the temp directory if
> the properties have been set. Right? Am I going crazy?
> If you want, I can post my fix for it.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org
[jira] Resolved: (AXIS2-1148) Bug in TransportUtils with the file
caching
Posted by "Thilina Gunarathne (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/AXIS2-1148?page=all ]
Thilina Gunarathne resolved AXIS2-1148.
---------------------------------------
Resolution: Fixed
Done...
Thanks Roshan for finding this out...
http://svn.apache.org/viewvc?view=rev&rev=443362
http://svn.apache.org/viewvc?view=rev&rev=443367
> Bug in TransportUtils with the file caching
> -------------------------------------------
>
> Key: AXIS2-1148
> URL: http://issues.apache.org/jira/browse/AXIS2-1148
> Project: Apache Axis 2.0 (Axis2)
> Issue Type: Bug
> Components: core
> Affects Versions: 1.0
> Environment: Weblogic 8.1, Axis2 Client
> Reporter: Roshan Punnoose
>
> Ok, maybe I'm not looking at this right, but I think I see a bug in
> TransportUtils.selectBuilderForMIME(...):
> Object cacheAttachmentProperty = msgContext
> .getProperty(Constants.Configuration.CACHE_ATTACHMENTS);
> String cacheAttachmentString = null;
> boolean fileCacheForAttachments;
> if (cacheAttachmentProperty != null) {
> cacheAttachmentProperty =
> cacheAttachmentProperty;
> fileCacheForAttachments = (Constants.VALUE_TRUE
> .equals(cacheAttachmentString));
> The cacheAttachmentString is always going to be null right? Then, the
> client will never actually cache the attachment in the temp directory if
> the properties have been set. Right? Am I going crazy?
> If you want, I can post my fix for it.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org