svn commit: r537717 - /jakarta/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/impl/StandardFileSystemManager.java

2007-05-14 Thread imario
Author: imario
Date: Sun May 13 23:00:47 2007
New Revision: 537717

URL: http://svn.apache.org/viewvc?view=revrev=537717
Log:
VFS-136: Don't force-set the classloader - Thanks to Adam Heath for the patch

Modified:

jakarta/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/impl/StandardFileSystemManager.java

Modified: 
jakarta/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/impl/StandardFileSystemManager.java
URL: 
http://svn.apache.org/viewvc/jakarta/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/impl/StandardFileSystemManager.java?view=diffrev=537717r1=537716r2=537717
==
--- 
jakarta/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/impl/StandardFileSystemManager.java
 (original)
+++ 
jakarta/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/impl/StandardFileSystemManager.java
 Sun May 13 23:00:47 2007
@@ -103,12 +103,15 @@
 setReplicator(new PrivilegedFileReplicator(replicator));
 setTemporaryFileStore(replicator);
 
-if (classLoader == null)
+   /* replaced by findClassLoader
+   if (classLoader == null)
 {
 // Use default classloader
 classLoader = getClass().getClassLoader();
 }
-if (configUri == null)
+*/
+
+   if (configUri == null)
 {
 // Use default config
 final URL url = getClass().getResource(CONFIG_RESOURCE);
@@ -146,7 +149,7 @@
{
throw new FileSystemException(e);
}
-   
+
while (enumResources.hasMoreElements())
{
URL url = (URL) enumResources.nextElement();
@@ -156,6 +159,11 @@
 
private ClassLoader findClassLoader()
{
+   if (classLoader != null)
+   {
+   return classLoader;
+   }
+
ClassLoader cl = Thread.currentThread().getContextClassLoader();
if (cl == null)
{
@@ -261,7 +269,7 @@
 final Element operationProvider = (Element) 
operationProviders.item(i);
 addOperationProvider(operationProvider);
 }
-
+
 // Add the default provider
 final NodeList defProviders = 
config.getElementsByTagName(default-provider);
 if (defProviders.getLength()  0)
@@ -380,7 +388,7 @@
 }
 }
 }
-
+
 /**
  * Tests if a class is available.
  */
@@ -388,7 +396,7 @@
 {
 try
 {
-classLoader.loadClass(className);
+findClassLoader().loadClass(className);
 return true;
 }
 catch (final ClassNotFoundException e)
@@ -461,7 +469,7 @@
 {
 try
 {
-final Class clazz = classLoader.loadClass(className);
+final Class clazz = findClassLoader().loadClass(className);
 return clazz.newInstance();
 }
 catch (final Exception e)



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[jira] Resolved: (VFS-135) Don't force-set the classloader

2007-05-14 Thread Mario Ivankovits (JIRA)

 [ 
https://issues.apache.org/jira/browse/VFS-135?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Mario Ivankovits resolved VFS-135.
--

   Resolution: Fixed
Fix Version/s: 1.1

Makes sense ... just ... did you test it in a webapp environment?

 Don't force-set the classloader
 ---

 Key: VFS-135
 URL: https://issues.apache.org/jira/browse/VFS-135
 Project: Commons VFS
  Issue Type: Bug
Affects Versions: 1.1
Reporter: Adam Heath
Priority: Minor
 Fix For: 1.1

 Attachments: fix_StandardFileSystemManager-use-findClassLoader.patch


 StandardFileSystemManager is force-setting the classloader.  The attached 
 patch changes this.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[jira] Commented: (VFS-135) Don't force-set the classloader

2007-05-14 Thread Mario Ivankovits (JIRA)

[ 
https://issues.apache.org/jira/browse/VFS-135?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12495478
 ] 

Mario Ivankovits commented on VFS-135:
--

Thanks for the patch!

 Don't force-set the classloader
 ---

 Key: VFS-135
 URL: https://issues.apache.org/jira/browse/VFS-135
 Project: Commons VFS
  Issue Type: Bug
Affects Versions: 1.1
Reporter: Adam Heath
Priority: Minor
 Fix For: 1.1

 Attachments: fix_StandardFileSystemManager-use-findClassLoader.patch


 StandardFileSystemManager is force-setting the classloader.  The attached 
 patch changes this.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r537718 - /jakarta/commons/proper/math/trunk/src/java/org/apache/commons/math/ConvergenceException.java

2007-05-14 Thread psteitz
Author: psteitz
Date: Sun May 13 23:08:16 2007
New Revision: 537718

URL: http://svn.apache.org/viewvc?view=revrev=537718
Log:
Added back (deprecated) legacy constructors to restore backward compatibility.

Modified:

jakarta/commons/proper/math/trunk/src/java/org/apache/commons/math/ConvergenceException.java

Modified: 
jakarta/commons/proper/math/trunk/src/java/org/apache/commons/math/ConvergenceException.java
URL: 
http://svn.apache.org/viewvc/jakarta/commons/proper/math/trunk/src/java/org/apache/commons/math/ConvergenceException.java?view=diffrev=537718r1=537717r2=537718
==
--- 
jakarta/commons/proper/math/trunk/src/java/org/apache/commons/math/ConvergenceException.java
 (original)
+++ 
jakarta/commons/proper/math/trunk/src/java/org/apache/commons/math/ConvergenceException.java
 Sun May 13 23:08:16 2007
@@ -62,5 +62,31 @@
 public ConvergenceException(String pattern, Object[] arguments, Throwable 
cause) {
 super(pattern, arguments, cause);
 }
+
+/**
+ * Constructs a new codeConvergenceException/code with specified
+ * detail message and nested codeThrowable/code root cause.
+ *
+ * @param msg  the error message.
+ * @param rootCause  the exception or error that caused this exception
+ * to be thrown.
+ * @deprecated as of 1.2, replaced by 
+ * [EMAIL PROTECTED] #ConvergenceException(String, Object[], Throwable)}
+ */
+public ConvergenceException(String msg, Throwable rootCause) {
+super(msg, rootCause);
+}
+
+/**
+ * Constructs a new codeConvergenceException/code with specified
+ * detail message.
+ *
+ * @param msg  the error message.
+ * @deprecated as of 1.2, replaced by 
+ * [EMAIL PROTECTED] #ConvergenceException(String, Object[])}
+ */
+public ConvergenceException(String msg) {
+super(msg);
+}
 
 }



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[jira] Created: (VALIDATOR-229) Make validation constants accessible for code outside the validation framework

2007-05-14 Thread Florian Rampp (JIRA)
Make validation constants accessible for code outside the validation framework
--

 Key: VALIDATOR-229
 URL: https://issues.apache.org/jira/browse/VALIDATOR-229
 Project: Commons Validator
  Issue Type: Improvement
  Components: Routines
Affects Versions: 1.4
Reporter: Florian Rampp
 Fix For: 1.4


In ValidatorResources, the method getConstants() is protected. But I want to 
access the validation constants from other parts of the software, e.g. to set 
the maxlength attribute of fields in a jsp, etc.
So, it would really be reasonable to make this method public!

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 33340] - [cli] HelpFormatter doesn't function correctly for options with only LongOpt

2007-05-14 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://issues.apache.org/bugzilla/show_bug.cgi?id=33340.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=33340





--- Additional Comments From [EMAIL PROTECTED]  2007-05-14 03:10 ---
This bug still exists in the 1.0 Final version.  If it was fixed post-1.0, can
the Target of this bug please be set to the release target for the fix?

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [math] Release planning, IOC-friendlyness

2007-05-14 Thread luc . maisonobe
Phil Steitz [EMAIL PROTECTED] wrote:

 I think that modulo some cleanup, testing and review and the one
 dangling item below, we should be ready for a [math] release.

I first wanted to introduce SVD but now think I need to work more on this. This
would delay a release for quite long. I therefore agree with you and propose to
delay SVD to next release.

 I will
 RM if no one else wants to, but would appreciate it (and support by
 sharing gruntwork) if someone else volunteers.

I would be happy to help. However I never followed the release process before,
so it may be to early for this one. Regardless of who manages the release, I
will add the public subkey I have set up for releases signing in the KEYS file.

 Here are some
 questions to resolve in the release plan:

 1.  Is this 1.2 or 2.0?  There is so much in the added Mantissa
 classes that 2.0 makes sense from a functionality standpoint.  On the
 other hand, we have not broken backward compatibility with anything
 (yet) and if we decide to go 2.0, we could consider some API change.
 My vote is to keep compatibility in place, but still name it 2.0.

I also think we should use 2.0 as the release number. There are some API changes
as some methods have been deprecated. I also wonder if it would'nt be safer to
change some unchecked exceptions to checked exceptions. An example for this is
the solve method for UnivariateRealSover. Solvers may throw an
IllegalArgumentException when the provided interval doesn't bracket the root for
example. This is explained in javadoc but I would prefer to enforce it by
replacing this by something like SearchIntervalException or even a broad
SolverException. Of course, this would be break compatibility (but user code
would be easy to fix).

 2. What if anything should we add to make pluggability as designed
 in the library compatible with IOC frameworks?  It won't work to add
 setters for the main factories, since we use the static getInstance
 factory pattern (see e.g. UnivariateRealSoverFactory).  What might
 make more sense would be to add setters for the individual solvers in
 e.g. UnivariateRealSoverFactoryImpl.  Any ideas on how best to attack
 this?  For those not familiar with [math] who may have ideas, the
 basic setup is that we use abstract factories with static getInstance
 methods that return concrete factories looked up using
 commons-discovery.  The concrete factories themselves source multiple
 different object types .

Adding setters seems a bit strange to me. I thought either we use
abstract/concrete factories and let the user provide his own factories by
extending the default one overriding only the factory method he need, or we use
only one concrete factory and setters in the spirit of IOC. Providing both at
the same time is confusing. I personally prefer the IOC way but once again this
would be an incompatible change (this one is more difficult to fix in user code,
but I'm not sure many people used this feature).

Luc

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[nightly build] io failed.

2007-05-14 Thread Phil Steitz
Failed build logs:
http://vmbuild.apache.org/~commons/nightly/logs//20070514/io.log

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [nightly build] io failed.

2007-05-14 Thread Martin van den Bemt
You suck at betting :)

Mvgr,
Martin

Henri Yandell wrote:
 Bet this doesn't happen again tonight.
 
 On 5/11/07, Phil Steitz [EMAIL PROTECTED] wrote:
 Failed build logs:
 http://vmbuild.apache.org/~commons/nightly/logs//20070511/io.log

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [nightly build] io failed.

2007-05-14 Thread Martin van den Bemt
I suck at saying you suck at betting.. Should have checked the dates :)

Mvgr,
Martin

Martin van den Bemt wrote:
 You suck at betting :)
 
 Mvgr,
 Martin
 
 Henri Yandell wrote:
 Bet this doesn't happen again tonight.

 On 5/11/07, Phil Steitz [EMAIL PROTECTED] wrote:
 Failed build logs:
 http://vmbuild.apache.org/~commons/nightly/logs//20070511/io.log

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 33340] - [cli] HelpFormatter doesn't function correctly for options with only LongOpt

2007-05-14 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://issues.apache.org/bugzilla/show_bug.cgi?id=33340.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=33340





--- Additional Comments From [EMAIL PROTECTED]  2007-05-14 05:16 ---
(In reply to comment #6)
 This bug still exists in the 1.0 Final version.  If it was fixed post-1.0, can
 the Target of this bug please be set to the release target for the fix?

This is fixed in the CLI 1.0 branch.  We need to release a 1.1 binary soon.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 33340] - [cli] HelpFormatter doesn't function correctly for options with only LongOpt

2007-05-14 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://issues.apache.org/bugzilla/show_bug.cgi?id=33340.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=33340


[EMAIL PROTECTED] changed:

   What|Removed |Added

 AssignedTo|commons-|[EMAIL PROTECTED]
   |[EMAIL PROTECTED]  |
 Status|RESOLVED|ASSIGNED
 Resolution|FIXED   |




--- Additional Comments From [EMAIL PROTECTED]  2007-05-14 05:18 ---
Created an attachment (id=20190)
 -- (http://issues.apache.org/bugzilla/attachment.cgi?id=20190action=view)
Test case CLI_1_BRANCH/src/test/org/apache/commons/cli/bug/Bug33340Test.java


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[jira] Updated: (CLI-13) [cli] CommandLine.getOptionValue() behaves contrary to docs

2007-05-14 Thread Brian Egge (JIRA)

 [ 
https://issues.apache.org/jira/browse/CLI-13?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Brian Egge updated CLI-13:
--

Attachment: CL13.patch

Implemented hashCode and equals in the Option class, so CommandLine can just 
keep a set of the options.  Allow for looking up option with either the short 
or long option.

 [cli] CommandLine.getOptionValue() behaves contrary to docs
 ---

 Key: CLI-13
 URL: https://issues.apache.org/jira/browse/CLI-13
 Project: Commons CLI
  Issue Type: Bug
  Components: CLI-1.x
Affects Versions: 1.0
 Environment: Operating System: Linux
 Platform: PC
Reporter: C Rose
 Fix For: 1.1

 Attachments: CL13.patch


 Hi
 If I have:
 final String debugOpt = debug;
   Option debug = OptionBuilder
   .withArgName(debugOpt)
   .withDescription(turn on debugging)
   .withLongOpt(debugOpt)
   .create('d');
 and then later I do:
 String dbg = commandLine.getOptionValue(debugOpt);
 then dbg will be null. Instead, I have to use getOptionValue('d'). This seems
 contrary to the docs (see bottom of
 http://jakarta.apache.org/commons/cli/usage.html), which implies that I should
 be able to query the commandLine object using a full string, rather than just
 the string's first character.
 Can I suggest that the API of OptionBuilder be made clearer so that it is
 obvious that you can have long and short option names---perhaps make the
 create() method take no arguments (thus forcing long and short arg names to be
 set explicitly). (Also, there seems to be some confusion between the terms
 'argument' and 'option' in the API, but perhaps that is just me).
 Also, I would hop to be able to query commandLine by either a single char or 
 an
 entire string, as suggested by the docs.
 Thanks,
 Chris

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[jira] Commented: (VFS-135) Don't force-set the classloader

2007-05-14 Thread Adam Heath (JIRA)

[ 
https://issues.apache.org/jira/browse/VFS-135?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12495582
 ] 

Adam Heath commented on VFS-135:


All of these patches have been in use for an extended period in a long-running 
webapp.

 Don't force-set the classloader
 ---

 Key: VFS-135
 URL: https://issues.apache.org/jira/browse/VFS-135
 Project: Commons VFS
  Issue Type: Bug
Affects Versions: 1.1
Reporter: Adam Heath
Priority: Minor
 Fix For: 1.1

 Attachments: fix_StandardFileSystemManager-use-findClassLoader.patch


 StandardFileSystemManager is force-setting the classloader.  The attached 
 patch changes this.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[jira] Created: (VFS-136) Fix index in vfs.provider/get-attributes.error

2007-05-14 Thread Adam Heath (JIRA)
Fix index in vfs.provider/get-attributes.error
--

 Key: VFS-136
 URL: https://issues.apache.org/jira/browse/VFS-136
 Project: Commons VFS
  Issue Type: Bug
Affects Versions: 1.1
Reporter: Adam Heath
Priority: Trivial


See attached patch.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[jira] Updated: (VFS-136) Fix index in vfs.provider/get-attributes.error

2007-05-14 Thread Adam Heath (JIRA)

 [ 
https://issues.apache.org/jira/browse/VFS-136?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Adam Heath updated VFS-136:
---

Attachment: fix_attributes-not-exist-parameter-indices.patch

 Fix index in vfs.provider/get-attributes.error
 --

 Key: VFS-136
 URL: https://issues.apache.org/jira/browse/VFS-136
 Project: Commons VFS
  Issue Type: Bug
Affects Versions: 1.1
Reporter: Adam Heath
Priority: Trivial
 Attachments: fix_attributes-not-exist-parameter-indices.patch


 See attached patch.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r537813 - /jakarta/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/Resources.properties

2007-05-14 Thread imario
Author: imario
Date: Mon May 14 06:07:27 2007
New Revision: 537813

URL: http://svn.apache.org/viewvc?view=revrev=537813
Log:
VFS-136: wrong attribute index in message - Thanks to Adam Heath for the patch

Modified:

jakarta/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/Resources.properties

Modified: 
jakarta/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/Resources.properties
URL: 
http://svn.apache.org/viewvc/jakarta/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/Resources.properties?view=diffrev=537813r1=537812r2=537813
==
--- 
jakarta/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/Resources.properties
 (original)
+++ 
jakarta/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/Resources.properties
 Mon May 14 06:07:27 2007
@@ -83,7 +83,7 @@
 vfs.provider/close-instr.error=Could not close the input stream for file {0}.
 vfs.provider/close-outstr.error=Could not close the output stream for file 
{0}.
 vfs.provider/get-attributes-no-exist.error=Could not get attributes for file 
{0} because it does not exist.
-vfs.provider/get-attributes.error=Could not get attributes {1}.
+vfs.provider/get-attributes.error=Could not get attributes {0}.
 vfs.provider/set-attribute-no-exist.error=Could not set attribute {0} of 
{1} because it does not exist.
 vfs.provider/set-attribute.error=Could not set attribute {0} of {1}.
 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[jira] Resolved: (VFS-136) Fix index in vfs.provider/get-attributes.error

2007-05-14 Thread Mario Ivankovits (JIRA)

 [ 
https://issues.apache.org/jira/browse/VFS-136?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Mario Ivankovits resolved VFS-136.
--

   Resolution: Fixed
Fix Version/s: 1.1

Applied - Thanks for the patch!

 Fix index in vfs.provider/get-attributes.error
 --

 Key: VFS-136
 URL: https://issues.apache.org/jira/browse/VFS-136
 Project: Commons VFS
  Issue Type: Bug
Affects Versions: 1.1
Reporter: Adam Heath
Priority: Trivial
 Fix For: 1.1

 Attachments: fix_attributes-not-exist-parameter-indices.patch


 See attached patch.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[jira] Created: (VFS-137) Call handledChanged appropriately.

2007-05-14 Thread Adam Heath (JIRA)
Call handledChanged appropriately.
--

 Key: VFS-137
 URL: https://issues.apache.org/jira/browse/VFS-137
 Project: Commons VFS
  Issue Type: Bug
Affects Versions: 1.1
Reporter: Adam Heath
Priority: Minor
 Attachments: fix_AbstractFileObject-handleChange.patch

See attached patch.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[jira] Updated: (VFS-137) Call handledChanged appropriately.

2007-05-14 Thread Adam Heath (JIRA)

 [ 
https://issues.apache.org/jira/browse/VFS-137?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Adam Heath updated VFS-137:
---

Attachment: fix_AbstractFileObject-handleChange.patch

Against svn 501759.

 Call handledChanged appropriately.
 --

 Key: VFS-137
 URL: https://issues.apache.org/jira/browse/VFS-137
 Project: Commons VFS
  Issue Type: Bug
Affects Versions: 1.1
Reporter: Adam Heath
Priority: Minor
 Attachments: fix_AbstractFileObject-handleChange.patch


 See attached patch.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[jira] Created: (VFS-138) Fix ClassCastException in AbstractFileName

2007-05-14 Thread Adam Heath (JIRA)
Fix ClassCastException in AbstractFileName
--

 Key: VFS-138
 URL: https://issues.apache.org/jira/browse/VFS-138
 Project: Commons VFS
  Issue Type: Bug
Affects Versions: 1.1
Reporter: Adam Heath


The contract for equals doesn't allow you to throw a ClassCastException.  So, 
add an instanceof comparison.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[jira] Updated: (VFS-138) Fix ClassCastException in AbstractFileName

2007-05-14 Thread Adam Heath (JIRA)

 [ 
https://issues.apache.org/jira/browse/VFS-138?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Adam Heath updated VFS-138:
---

Attachment: fix_AbstractFileName-equals-ClassCastException.patch

Against svn 501759.

 Fix ClassCastException in AbstractFileName
 --

 Key: VFS-138
 URL: https://issues.apache.org/jira/browse/VFS-138
 Project: Commons VFS
  Issue Type: Bug
Affects Versions: 1.1
Reporter: Adam Heath
 Attachments: fix_AbstractFileName-equals-ClassCastException.patch


 The contract for equals doesn't allow you to throw a ClassCastException.  So, 
 add an instanceof comparison.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[jira] Commented: (VFS-137) Call handledChanged appropriately.

2007-05-14 Thread Mario Ivankovits (JIRA)

[ 
https://issues.apache.org/jira/browse/VFS-137?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12495588
 ] 

Mario Ivankovits commented on VFS-137:
--

In this case onChange() is just to allow subclasses to do some internal freshup 
in case we changed the file - e.g. in ftp and sftp

This has nothing to do with handleChanged which - as the comment states - will 
only be called by a FileMonitor.

This patch needs some thoughts if we really can change/combine it as proposed.

 Call handledChanged appropriately.
 --

 Key: VFS-137
 URL: https://issues.apache.org/jira/browse/VFS-137
 Project: Commons VFS
  Issue Type: Bug
Affects Versions: 1.1
Reporter: Adam Heath
Priority: Minor
 Attachments: fix_AbstractFileObject-handleChange.patch


 See attached patch.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r537829 - /jakarta/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/AbstractFileName.java

2007-05-14 Thread imario
Author: imario
Date: Mon May 14 06:31:48 2007
New Revision: 537829

URL: http://svn.apache.org/viewvc?view=revrev=537829
Log:
VFS-138: avoid CCE in equals - Thanks to Adam Heath for the patch!

Modified:

jakarta/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/AbstractFileName.java

Modified: 
jakarta/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/AbstractFileName.java
URL: 
http://svn.apache.org/viewvc/jakarta/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/AbstractFileName.java?view=diffrev=537829r1=537828r2=537829
==
--- 
jakarta/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/AbstractFileName.java
 (original)
+++ 
jakarta/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/AbstractFileName.java
 Mon May 14 06:31:48 2007
@@ -5,9 +5,9 @@
  * 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.
@@ -31,7 +31,7 @@
 public abstract class AbstractFileName
 implements FileName
 {
-
+
 private final String scheme;
 private final String absPath;
 private FileType type;
@@ -79,7 +79,11 @@
  */
 public boolean equals(final Object obj)
 {
-final AbstractFileName name = (AbstractFileName) obj;
+   if (!(obj instanceof AbstractFileName))
+   {
+   return false;
+   }
+   final AbstractFileName name = (AbstractFileName) obj;
 return (getRootURI().equals(name.getRootURI())  
getPath().equals(name.getPath()));
 }
 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[jira] Resolved: (VFS-138) Fix ClassCastException in AbstractFileName

2007-05-14 Thread Mario Ivankovits (JIRA)

 [ 
https://issues.apache.org/jira/browse/VFS-138?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Mario Ivankovits resolved VFS-138.
--

   Resolution: Fixed
Fix Version/s: 1.1

Applied - Thanks for the patch!

 Fix ClassCastException in AbstractFileName
 --

 Key: VFS-138
 URL: https://issues.apache.org/jira/browse/VFS-138
 Project: Commons VFS
  Issue Type: Bug
Affects Versions: 1.1
Reporter: Adam Heath
 Fix For: 1.1

 Attachments: fix_AbstractFileName-equals-ClassCastException.patch


 The contract for equals doesn't allow you to throw a ClassCastException.  So, 
 add an instanceof comparison.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[jira] Created: (VFS-139) Fix javac 1.5 warnings

2007-05-14 Thread Adam Heath (JIRA)
Fix javac 1.5 warnings
--

 Key: VFS-139
 URL: https://issues.apache.org/jira/browse/VFS-139
 Project: Commons VFS
  Issue Type: Improvement
Affects Versions: 1.1
Reporter: Adam Heath
Priority: Trivial


In java1.5, javac has support for varargs.  It does this by auto-creating an 
array of the appropriate type, when a variable number of parameters are passed.

However, in such cases, when a null is passed to such a method, it isn't 
completely sure how to proceed.  Should it create an array with a single null 
value, or should it just pass the null value straight thru?

In any event, the attached patch fixes it.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[jira] Updated: (VFS-139) Fix javac 1.5 warnings

2007-05-14 Thread Adam Heath (JIRA)

 [ 
https://issues.apache.org/jira/browse/VFS-139?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Adam Heath updated VFS-139:
---

Attachment: fix_java15-warnings.patch

Against svn 501759.

 Fix javac 1.5 warnings
 --

 Key: VFS-139
 URL: https://issues.apache.org/jira/browse/VFS-139
 Project: Commons VFS
  Issue Type: Improvement
Affects Versions: 1.1
Reporter: Adam Heath
Priority: Trivial
 Attachments: fix_java15-warnings.patch


 In java1.5, javac has support for varargs.  It does this by auto-creating an 
 array of the appropriate type, when a variable number of parameters are 
 passed.
 However, in such cases, when a null is passed to such a method, it isn't 
 completely sure how to proceed.  Should it create an array with a single null 
 value, or should it just pass the null value straight thru?
 In any event, the attached patch fixes it.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r537839 - in /jakarta/commons/proper/vfs/trunk/core/src: main/java/org/apache/commons/vfs/VFS.java test/java/org/apache/commons/AbstractVfsTestCase.java test/java/org/apache/commons/vfs/te

2007-05-14 Thread imario
Author: imario
Date: Mon May 14 06:44:20 2007
New Revision: 537839

URL: http://svn.apache.org/viewvc?view=revrev=537839
Log:
VFS-139: avoid jdk 1.5 warnings - Thanks to Adam Heath for the patch!

Modified:

jakarta/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/VFS.java

jakarta/commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/AbstractVfsTestCase.java

jakarta/commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs/test/AbstractProviderTestCase.java

Modified: 
jakarta/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/VFS.java
URL: 
http://svn.apache.org/viewvc/jakarta/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/VFS.java?view=diffrev=537839r1=537838r2=537839
==
--- 
jakarta/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/VFS.java
 (original)
+++ 
jakarta/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/VFS.java
 Mon May 14 06:44:20 2007
@@ -5,9 +5,9 @@
  * 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.
@@ -78,8 +78,8 @@
 try
 {
 // Initialise
-final Method initMethod = mgrClass.getMethod(init, null);
-initMethod.invoke(mgr, null);
+final Method initMethod = mgrClass.getMethod(init, (Class[]) 
null);
+initMethod.invoke(mgr, (Object[]) null);
 }
 catch (final NoSuchMethodException e)
 {

Modified: 
jakarta/commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/AbstractVfsTestCase.java
URL: 
http://svn.apache.org/viewvc/jakarta/commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/AbstractVfsTestCase.java?view=diffrev=537839r1=537838r2=537839
==
--- 
jakarta/commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/AbstractVfsTestCase.java
 (original)
+++ 
jakarta/commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/AbstractVfsTestCase.java
 Mon May 14 06:44:20 2007
@@ -5,9 +5,9 @@
  * 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.
@@ -175,8 +175,8 @@
 {
 try
 {
-Method method = throwable.getClass().getMethod(getCause, null);
-return (Throwable) method.invoke(throwable, null);
+Method method = throwable.getClass().getMethod(getCause, 
(Class[]) null);
+return (Throwable) method.invoke(throwable, (Object[]) null);
 }
 catch (Exception e)
 {

Modified: 
jakarta/commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs/test/AbstractProviderTestCase.java
URL: 
http://svn.apache.org/viewvc/jakarta/commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs/test/AbstractProviderTestCase.java?view=diffrev=537839r1=537838r2=537839
==
--- 
jakarta/commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs/test/AbstractProviderTestCase.java
 (original)
+++ 
jakarta/commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs/test/AbstractProviderTestCase.java
 Mon May 14 06:44:20 2007
@@ -5,9 +5,9 @@
  * 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.
@@ -95,7 +95,7 @@
 
 /**
  * creates a new uninitialized file system manager
- * @throws Exception 
+ * @throws Exception
  */
 protected DefaultFileSystemManager createManager() throws Exception
 {
@@ -117,7 +117,7 @@
 {
 return providerConfig.getBaseTestFolder(fs);
 }
-
+
 /**
 

[jira] Commented: (VFS-139) Fix javac 1.5 warnings

2007-05-14 Thread Joerg Schaible (JIRA)

[ 
https://issues.apache.org/jira/browse/VFS-139?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12495596
 ] 

Joerg Schaible commented on VFS-139:


Cast the null value.

 Fix javac 1.5 warnings
 --

 Key: VFS-139
 URL: https://issues.apache.org/jira/browse/VFS-139
 Project: Commons VFS
  Issue Type: Improvement
Affects Versions: 1.1
Reporter: Adam Heath
Priority: Trivial
 Fix For: 1.1

 Attachments: fix_java15-warnings.patch


 In java1.5, javac has support for varargs.  It does this by auto-creating an 
 array of the appropriate type, when a variable number of parameters are 
 passed.
 However, in such cases, when a null is passed to such a method, it isn't 
 completely sure how to proceed.  Should it create an array with a single null 
 value, or should it just pass the null value straight thru?
 In any event, the attached patch fixes it.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[jira] Resolved: (VFS-139) Fix javac 1.5 warnings

2007-05-14 Thread Mario Ivankovits (JIRA)

 [ 
https://issues.apache.org/jira/browse/VFS-139?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Mario Ivankovits resolved VFS-139.
--

   Resolution: Fixed
Fix Version/s: 1.1

Applied - Thanks for the patch!

 Fix javac 1.5 warnings
 --

 Key: VFS-139
 URL: https://issues.apache.org/jira/browse/VFS-139
 Project: Commons VFS
  Issue Type: Improvement
Affects Versions: 1.1
Reporter: Adam Heath
Priority: Trivial
 Fix For: 1.1

 Attachments: fix_java15-warnings.patch


 In java1.5, javac has support for varargs.  It does this by auto-creating an 
 array of the appropriate type, when a variable number of parameters are 
 passed.
 However, in such cases, when a null is passed to such a method, it isn't 
 completely sure how to proceed.  Should it create an array with a single null 
 value, or should it just pass the null value straight thru?
 In any event, the attached patch fixes it.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[jira] Created: (VFS-140) Fix memory leaking when closing a file.

2007-05-14 Thread Adam Heath (JIRA)
Fix memory leaking when closing a file.
---

 Key: VFS-140
 URL: https://issues.apache.org/jira/browse/VFS-140
 Project: Commons VFS
  Issue Type: Bug
Affects Versions: 1.1
Reporter: Adam Heath
Priority: Minor
 Attachments: fix_AbstractFileObject-null-content-close.patch

Unset content after the file is closed, to fix a memory leak.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[jira] Updated: (VFS-140) Fix memory leaking when closing a file.

2007-05-14 Thread Adam Heath (JIRA)

 [ 
https://issues.apache.org/jira/browse/VFS-140?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Adam Heath updated VFS-140:
---

Attachment: fix_AbstractFileObject-null-content-close.patch

Against svn 501759.

 Fix memory leaking when closing a file.
 ---

 Key: VFS-140
 URL: https://issues.apache.org/jira/browse/VFS-140
 Project: Commons VFS
  Issue Type: Bug
Affects Versions: 1.1
Reporter: Adam Heath
Priority: Minor
 Attachments: fix_AbstractFileObject-null-content-close.patch


 Unset content after the file is closed, to fix a memory leak.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[jira] Created: (VFS-141) Implement refresh in DelegateFileObject.

2007-05-14 Thread Adam Heath (JIRA)
Implement refresh in DelegateFileObject.


 Key: VFS-141
 URL: https://issues.apache.org/jira/browse/VFS-141
 Project: Commons VFS
  Issue Type: Bug
Affects Versions: 1.1
Reporter: Adam Heath
Priority: Minor


See $summary and patch.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[jira] Updated: (VFS-141) Implement refresh in DelegateFileObject.

2007-05-14 Thread Adam Heath (JIRA)

 [ 
https://issues.apache.org/jira/browse/VFS-141?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Adam Heath updated VFS-141:
---

Attachment: fix_DelegateFileObject-implement-refresh.patch

Against svn 501759.

 Implement refresh in DelegateFileObject.
 

 Key: VFS-141
 URL: https://issues.apache.org/jira/browse/VFS-141
 Project: Commons VFS
  Issue Type: Bug
Affects Versions: 1.1
Reporter: Adam Heath
Priority: Minor
 Attachments: fix_DelegateFileObject-implement-refresh.patch


 See $summary and patch.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r537846 - /jakarta/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/AbstractFileObject.java

2007-05-14 Thread imario
Author: imario
Date: Mon May 14 07:00:08 2007
New Revision: 537846

URL: http://svn.apache.org/viewvc?view=revrev=537846
Log:
VFS-140: nullify content to avoid memory consumption with inactive files - 
Thanks to Adam Heath for the patch!

Modified:

jakarta/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/AbstractFileObject.java

Modified: 
jakarta/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/AbstractFileObject.java
URL: 
http://svn.apache.org/viewvc/jakarta/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/AbstractFileObject.java?view=diffrev=537846r1=537845r2=537846
==
--- 
jakarta/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/AbstractFileObject.java
 (original)
+++ 
jakarta/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/AbstractFileObject.java
 Mon May 14 07:00:08 2007
@@ -1093,7 +1093,8 @@
 try
 {
 content.close();
-}
+   content = null;
+   }
 catch (FileSystemException e)
 {
 exc = e;



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[jira] Created: (VFS-142) Clear ThreadData after all streams are closed, fixes a memory leak

2007-05-14 Thread Adam Heath (JIRA)
Clear ThreadData after all streams are closed, fixes a memory leak
--

 Key: VFS-142
 URL: https://issues.apache.org/jira/browse/VFS-142
 Project: Commons VFS
  Issue Type: Bug
Affects Versions: 1.1
Reporter: Adam Heath


After all streams are closed in FileContentThreadData, clear the ThreadLocal.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[jira] Resolved: (VFS-140) Fix memory leaking when closing a file.

2007-05-14 Thread Mario Ivankovits (JIRA)

 [ 
https://issues.apache.org/jira/browse/VFS-140?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Mario Ivankovits resolved VFS-140.
--

   Resolution: Fixed
Fix Version/s: 1.1

Applied - thanks for the patch!

 Fix memory leaking when closing a file.
 ---

 Key: VFS-140
 URL: https://issues.apache.org/jira/browse/VFS-140
 Project: Commons VFS
  Issue Type: Bug
Affects Versions: 1.1
Reporter: Adam Heath
Priority: Minor
 Fix For: 1.1

 Attachments: fix_AbstractFileObject-null-content-close.patch


 Unset content after the file is closed, to fix a memory leak.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[jira] Updated: (VFS-142) Clear ThreadData after all streams are closed, fixes a memory leak

2007-05-14 Thread Adam Heath (JIRA)

 [ 
https://issues.apache.org/jira/browse/VFS-142?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Adam Heath updated VFS-142:
---

Attachment: fix_ThreadData-clear.patch

Against svn 501759.

 Clear ThreadData after all streams are closed, fixes a memory leak
 --

 Key: VFS-142
 URL: https://issues.apache.org/jira/browse/VFS-142
 Project: Commons VFS
  Issue Type: Bug
Affects Versions: 1.1
Reporter: Adam Heath
 Attachments: fix_ThreadData-clear.patch


 After all streams are closed in FileContentThreadData, clear the ThreadLocal.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r537847 - /jakarta/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/DelegateFileObject.java

2007-05-14 Thread imario
Author: imario
Date: Mon May 14 07:04:26 2007
New Revision: 537847

URL: http://svn.apache.org/viewvc?view=revrev=537847
Log:
VFS-141: implemented refresh() - Thanks to Adam Heath for the patch!

Modified:

jakarta/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/DelegateFileObject.java

Modified: 
jakarta/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/DelegateFileObject.java
URL: 
http://svn.apache.org/viewvc/jakarta/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/DelegateFileObject.java?view=diffrev=537847r1=537846r2=537847
==
--- 
jakarta/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/DelegateFileObject.java
 (original)
+++ 
jakarta/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/DelegateFileObject.java
 Mon May 14 07:04:26 2007
@@ -46,7 +46,7 @@
 private final Set children = new HashSet();
 private boolean ignoreEvent;
 
-public DelegateFileObject(final FileName name,
+   public DelegateFileObject(final FileName name,
   final AbstractFileSystem fileSystem,
   final FileObject file) throws FileSystemException
 {
@@ -338,4 +338,16 @@
 file.close();
 }
 }
+
+   /**
+* refresh file informations
+*/
+   public void refresh() throws FileSystemException
+   {
+   super.refresh();
+   if (file != null)
+   {
+   file.refresh();
+   }
+   }
 }



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[jira] Resolved: (VFS-141) Implement refresh in DelegateFileObject.

2007-05-14 Thread Mario Ivankovits (JIRA)

 [ 
https://issues.apache.org/jira/browse/VFS-141?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Mario Ivankovits resolved VFS-141.
--

   Resolution: Fixed
Fix Version/s: 1.1

Applied - Thanks for the patch!

 Implement refresh in DelegateFileObject.
 

 Key: VFS-141
 URL: https://issues.apache.org/jira/browse/VFS-141
 Project: Commons VFS
  Issue Type: Bug
Affects Versions: 1.1
Reporter: Adam Heath
Priority: Minor
 Fix For: 1.1

 Attachments: fix_DelegateFileObject-implement-refresh.patch


 See $summary and patch.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[jira] Created: (VFS-143) Fix memory leak in DelegateFileObject in it's handling of listeners

2007-05-14 Thread Adam Heath (JIRA)
Fix memory leak in DelegateFileObject in it's handling of listeners
---

 Key: VFS-143
 URL: https://issues.apache.org/jira/browse/VFS-143
 Project: Commons VFS
  Issue Type: Bug
Affects Versions: 1.1
Reporter: Adam Heath


DelegateFileObject adds itself as a listener to the wrapped file.  This adds a 
*hard* reference to the DelegateFileObject, which prevents it from being 
garbaged collected.  So, create a WeakRefFileListener proxy, to solve the 
problem.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[jira] Commented: (VFS-142) Clear ThreadData after all streams are closed, fixes a memory leak

2007-05-14 Thread Mario Ivankovits (JIRA)

[ 
https://issues.apache.org/jira/browse/VFS-142?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12495613
 ] 

Mario Ivankovits commented on VFS-142:
--

Is it really worth the hassle?

Having the FileContentThreadData around in an ThreadLocal might not necessarily 
introduce a memory leak and the object itself is not that big, two array lists 
and one reference.

 Clear ThreadData after all streams are closed, fixes a memory leak
 --

 Key: VFS-142
 URL: https://issues.apache.org/jira/browse/VFS-142
 Project: Commons VFS
  Issue Type: Bug
Affects Versions: 1.1
Reporter: Adam Heath
 Attachments: fix_ThreadData-clear.patch


 After all streams are closed in FileContentThreadData, clear the ThreadLocal.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[jira] Updated: (VFS-143) Fix memory leak in DelegateFileObject in it's handling of listeners

2007-05-14 Thread Adam Heath (JIRA)

 [ 
https://issues.apache.org/jira/browse/VFS-143?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Adam Heath updated VFS-143:
---

Attachment: fix_DelegateFile-listener-leak.patch

Against svn 501759.

 Fix memory leak in DelegateFileObject in it's handling of listeners
 ---

 Key: VFS-143
 URL: https://issues.apache.org/jira/browse/VFS-143
 Project: Commons VFS
  Issue Type: Bug
Affects Versions: 1.1
Reporter: Adam Heath
 Attachments: fix_DelegateFile-listener-leak.patch


 DelegateFileObject adds itself as a listener to the wrapped file.  This adds 
 a *hard* reference to the DelegateFileObject, which prevents it from being 
 garbaged collected.  So, create a WeakRefFileListener proxy, to solve the 
 problem.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[jira] Created: (VFS-144) Only take the first LocalFileProvider, not the last

2007-05-14 Thread Adam Heath (JIRA)
Only take the first LocalFileProvider, not the last
---

 Key: VFS-144
 URL: https://issues.apache.org/jira/browse/VFS-144
 Project: Commons VFS
  Issue Type: Bug
Affects Versions: 1.1
Reporter: Adam Heath
Priority: Minor


Modify DefaultFileSystemManager, to only take the first LocalFileProvider 
registered, not the last.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[jira] Updated: (VFS-144) Only take the first LocalFileProvider, not the last

2007-05-14 Thread Adam Heath (JIRA)

 [ 
https://issues.apache.org/jira/browse/VFS-144?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Adam Heath updated VFS-144:
---

Attachment: fix_DefaultFileSystemManager-first-LocalProvider.patch

Against svn 501759.

 Only take the first LocalFileProvider, not the last
 ---

 Key: VFS-144
 URL: https://issues.apache.org/jira/browse/VFS-144
 Project: Commons VFS
  Issue Type: Bug
Affects Versions: 1.1
Reporter: Adam Heath
Priority: Minor
 Attachments: fix_DefaultFileSystemManager-first-LocalProvider.patch


 Modify DefaultFileSystemManager, to only take the first LocalFileProvider 
 registered, not the last.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[jira] Created: (VFS-145) Switch the files caches implementations to HashMap, as it is faster

2007-05-14 Thread Adam Heath (JIRA)
Switch the files caches implementations to HashMap, as it is faster
---

 Key: VFS-145
 URL: https://issues.apache.org/jira/browse/VFS-145
 Project: Commons VFS
  Issue Type: Improvement
Affects Versions: 1.1
Reporter: Adam Heath
 Attachments: feature_FilesCache-TreeMap-HashMap.patch

There's no reason to use a TreeMap, as we aren't doing ordered traversal of the 
map.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[jira] Updated: (VFS-145) Switch the files caches implementations to HashMap, as it is faster

2007-05-14 Thread Adam Heath (JIRA)

 [ 
https://issues.apache.org/jira/browse/VFS-145?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Adam Heath updated VFS-145:
---

Attachment: feature_FilesCache-TreeMap-HashMap.patch

Against svn 501759.

 Switch the files caches implementations to HashMap, as it is faster
 ---

 Key: VFS-145
 URL: https://issues.apache.org/jira/browse/VFS-145
 Project: Commons VFS
  Issue Type: Improvement
Affects Versions: 1.1
Reporter: Adam Heath
 Attachments: feature_FilesCache-TreeMap-HashMap.patch


 There's no reason to use a TreeMap, as we aren't doing ordered traversal of 
 the map.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[jira] Created: (VFS-146) Add DelegateFileObject.getDelegateFile()

2007-05-14 Thread Adam Heath (JIRA)
Add DelegateFileObject.getDelegateFile()


 Key: VFS-146
 URL: https://issues.apache.org/jira/browse/VFS-146
 Project: Commons VFS
  Issue Type: New Feature
Affects Versions: 1.1
Reporter: Adam Heath
Priority: Trivial
 Attachments: feature_add-getDelegateFile.patch

See $summary and patch; this allows utility code to find the real underlying 
file, in the case we need the real file for processing(for code that requires 
java.io.File, etc).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[jira] Updated: (VFS-146) Add DelegateFileObject.getDelegateFile()

2007-05-14 Thread Adam Heath (JIRA)

 [ 
https://issues.apache.org/jira/browse/VFS-146?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Adam Heath updated VFS-146:
---

Attachment: feature_add-getDelegateFile.patch

Against svn 501759.

 Add DelegateFileObject.getDelegateFile()
 

 Key: VFS-146
 URL: https://issues.apache.org/jira/browse/VFS-146
 Project: Commons VFS
  Issue Type: New Feature
Affects Versions: 1.1
Reporter: Adam Heath
Priority: Trivial
 Attachments: feature_add-getDelegateFile.patch


 See $summary and patch; this allows utility code to find the real underlying 
 file, in the case we need the real file for processing(for code that requires 
 java.io.File, etc).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[jira] Created: (VFS-147) Don't call Thread.currentThread in DefaultFileMonitor

2007-05-14 Thread Adam Heath (JIRA)
Don't call Thread.currentThread in DefaultFileMonitor
-

 Key: VFS-147
 URL: https://issues.apache.org/jira/browse/VFS-147
 Project: Commons VFS
  Issue Type: Improvement
Affects Versions: 1.1
Reporter: Adam Heath
Priority: Minor


DefaultFileMonitor has a reference to the thread; no need to call 
Thread.currentThread().

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[jira] Updated: (VFS-147) Don't call Thread.currentThread in DefaultFileMonitor

2007-05-14 Thread Adam Heath (JIRA)

 [ 
https://issues.apache.org/jira/browse/VFS-147?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Adam Heath updated VFS-147:
---

Attachment: feature_use-monitorThread-not-Thread.currentThread.patch

Against svn 501759.

 Don't call Thread.currentThread in DefaultFileMonitor
 -

 Key: VFS-147
 URL: https://issues.apache.org/jira/browse/VFS-147
 Project: Commons VFS
  Issue Type: Improvement
Affects Versions: 1.1
Reporter: Adam Heath
Priority: Minor
 Attachments: feature_use-monitorThread-not-Thread.currentThread.patch


 DefaultFileMonitor has a reference to the thread; no need to call 
 Thread.currentThread().

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[jira] Created: (VFS-148) Make DefaultFileSelectInfo public

2007-05-14 Thread Adam Heath (JIRA)
Make DefaultFileSelectInfo public
-

 Key: VFS-148
 URL: https://issues.apache.org/jira/browse/VFS-148
 Project: Commons VFS
  Issue Type: New Feature
Affects Versions: 1.1
Reporter: Adam Heath
Priority: Trivial
 Attachments: feature_DefaultFileSelectorInfo_public.patch

See $summary, and patch.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[jira] Updated: (VFS-148) Make DefaultFileSelectInfo public

2007-05-14 Thread Adam Heath (JIRA)

 [ 
https://issues.apache.org/jira/browse/VFS-148?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Adam Heath updated VFS-148:
---

Attachment: feature_DefaultFileSelectorInfo_public.patch

Against svn 501759.

 Make DefaultFileSelectInfo public
 -

 Key: VFS-148
 URL: https://issues.apache.org/jira/browse/VFS-148
 Project: Commons VFS
  Issue Type: New Feature
Affects Versions: 1.1
Reporter: Adam Heath
Priority: Trivial
 Attachments: feature_DefaultFileSelectorInfo_public.patch


 See $summary, and patch.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[jira] Created: (VFS-149) Add FileContent.attributeExists and removeAttribute.

2007-05-14 Thread Adam Heath (JIRA)
Add FileContent.attributeExists and removeAttribute.


 Key: VFS-149
 URL: https://issues.apache.org/jira/browse/VFS-149
 Project: Commons VFS
  Issue Type: New Feature
Affects Versions: 1.1
Reporter: Adam Heath
Priority: Minor
 Attachments: feature_attributeExists-removeAttribute.patch

See $summary and patch.  Makes FileContent more like a map.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[jira] Updated: (VFS-149) Add FileContent.attributeExists and removeAttribute.

2007-05-14 Thread Adam Heath (JIRA)

 [ 
https://issues.apache.org/jira/browse/VFS-149?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Adam Heath updated VFS-149:
---

Attachment: feature_attributeExists-removeAttribute.patch

Against svn 501759.

 Add FileContent.attributeExists and removeAttribute.
 

 Key: VFS-149
 URL: https://issues.apache.org/jira/browse/VFS-149
 Project: Commons VFS
  Issue Type: New Feature
Affects Versions: 1.1
Reporter: Adam Heath
Priority: Minor
 Attachments: feature_attributeExists-removeAttribute.patch


 See $summary and patch.  Makes FileContent more like a map.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[jira] Created: (VFS-150) Make AbstractFileObject easier to extend

2007-05-14 Thread Adam Heath (JIRA)
Make AbstractFileObject easier to extend


 Key: VFS-150
 URL: https://issues.apache.org/jira/browse/VFS-150
 Project: Commons VFS
  Issue Type: Improvement
Affects Versions: 1.1
Reporter: Adam Heath
Priority: Minor
 Attachments: 
feature_AbstractFileObject-DefaultFileContext-easier-to-extend.patch

Add doGetContent(), a factory method that subclasses can override to return a 
different FileContent implementation.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[jira] Updated: (VFS-150) Make AbstractFileObject easier to extend

2007-05-14 Thread Adam Heath (JIRA)

 [ 
https://issues.apache.org/jira/browse/VFS-150?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Adam Heath updated VFS-150:
---

Attachment: 
feature_AbstractFileObject-DefaultFileContext-easier-to-extend.patch

Against svn 501759.

 Make AbstractFileObject easier to extend
 

 Key: VFS-150
 URL: https://issues.apache.org/jira/browse/VFS-150
 Project: Commons VFS
  Issue Type: Improvement
Affects Versions: 1.1
Reporter: Adam Heath
Priority: Minor
 Attachments: 
 feature_AbstractFileObject-DefaultFileContext-easier-to-extend.patch


 Add doGetContent(), a factory method that subclasses can override to return a 
 different FileContent implementation.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[jira] Created: (VFS-151) Allow files to return a custom FileContentInfo

2007-05-14 Thread Adam Heath (JIRA)
Allow files to return a custom FileContentInfo
--

 Key: VFS-151
 URL: https://issues.apache.org/jira/browse/VFS-151
 Project: Commons VFS
  Issue Type: Improvement
Affects Versions: 1.1
Reporter: Adam Heath
Priority: Minor


See attached patch.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[jira] Updated: (VFS-151) Allow files to return a custom FileContentInfo

2007-05-14 Thread Adam Heath (JIRA)

 [ 
https://issues.apache.org/jira/browse/VFS-151?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Adam Heath updated VFS-151:
---

Attachment: feature_FileContentInfo-subclass-overriding.patch

Against svn 501759.

 Allow files to return a custom FileContentInfo
 --

 Key: VFS-151
 URL: https://issues.apache.org/jira/browse/VFS-151
 Project: Commons VFS
  Issue Type: Improvement
Affects Versions: 1.1
Reporter: Adam Heath
Priority: Minor
 Attachments: feature_FileContentInfo-subclass-overriding.patch


 See attached patch.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[jira] Created: (VFS-152) Add DefaultFileObject.doGetContentInfo().

2007-05-14 Thread Adam Heath (JIRA)
Add DefaultFileObject.doGetContentInfo().
-

 Key: VFS-152
 URL: https://issues.apache.org/jira/browse/VFS-152
 Project: Commons VFS
  Issue Type: Bug
Affects Versions: 1.1
Reporter: Adam Heath
Priority: Minor
 Attachments: fix_DelegateFileObject-FileContentInfo.patch

Need to call this on the wrapped file.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[jira] Updated: (VFS-152) Add DefaultFileObject.doGetContentInfo().

2007-05-14 Thread Adam Heath (JIRA)

 [ 
https://issues.apache.org/jira/browse/VFS-152?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Adam Heath updated VFS-152:
---

Attachment: fix_DelegateFileObject-FileContentInfo.patch

Against svn 501759.

 Add DefaultFileObject.doGetContentInfo().
 -

 Key: VFS-152
 URL: https://issues.apache.org/jira/browse/VFS-152
 Project: Commons VFS
  Issue Type: Bug
Affects Versions: 1.1
Reporter: Adam Heath
Priority: Minor
 Attachments: fix_DelegateFileObject-FileContentInfo.patch


 Need to call this on the wrapped file.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[jira] Created: (VFS-153) Ignore .. at the top level

2007-05-14 Thread Adam Heath (JIRA)
Ignore .. at the top level
--

 Key: VFS-153
 URL: https://issues.apache.org/jira/browse/VFS-153
 Project: Commons VFS
  Issue Type: Improvement
Affects Versions: 1.1
Reporter: Adam Heath
Priority: Trivial
 Attachments: feature_ignore-dot-dot-at-top-level.patch

Change UriParser, to ignore .. at the top-level, instead of throwing an 
exception.  This makes it behave more like unix.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[jira] Updated: (VFS-153) Ignore .. at the top level

2007-05-14 Thread Adam Heath (JIRA)

 [ 
https://issues.apache.org/jira/browse/VFS-153?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Adam Heath updated VFS-153:
---

Attachment: feature_ignore-dot-dot-at-top-level.patch

Against svn 501759.

 Ignore .. at the top level
 --

 Key: VFS-153
 URL: https://issues.apache.org/jira/browse/VFS-153
 Project: Commons VFS
  Issue Type: Improvement
Affects Versions: 1.1
Reporter: Adam Heath
Priority: Trivial
 Attachments: feature_ignore-dot-dot-at-top-level.patch


 Change UriParser, to ignore .. at the top-level, instead of throwing an 
 exception.  This makes it behave more like unix.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[jira] Created: (VFS-154) Find all Resources.properties and merge them.

2007-05-14 Thread Adam Heath (JIRA)
Find all Resources.properties and merge them.
-

 Key: VFS-154
 URL: https://issues.apache.org/jira/browse/VFS-154
 Project: Commons VFS
  Issue Type: New Feature
Affects Versions: 1.1
Reporter: Adam Heath
 Attachments: feature_merged_message_resources.patch

Add CombinedResources, which fetches all Resources.properties.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[jira] Updated: (VFS-154) Find all Resources.properties and merge them.

2007-05-14 Thread Adam Heath (JIRA)

 [ 
https://issues.apache.org/jira/browse/VFS-154?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Adam Heath updated VFS-154:
---

Priority: Minor  (was: Major)

 Find all Resources.properties and merge them.
 -

 Key: VFS-154
 URL: https://issues.apache.org/jira/browse/VFS-154
 Project: Commons VFS
  Issue Type: New Feature
Affects Versions: 1.1
Reporter: Adam Heath
Priority: Minor
 Attachments: feature_merged_message_resources.patch


 Add CombinedResources, which fetches all Resources.properties.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[jira] Updated: (VFS-154) Find all Resources.properties and merge them.

2007-05-14 Thread Adam Heath (JIRA)

 [ 
https://issues.apache.org/jira/browse/VFS-154?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Adam Heath updated VFS-154:
---

Attachment: feature_merged_message_resources.patch

Against svn 501759.

 Find all Resources.properties and merge them.
 -

 Key: VFS-154
 URL: https://issues.apache.org/jira/browse/VFS-154
 Project: Commons VFS
  Issue Type: New Feature
Affects Versions: 1.1
Reporter: Adam Heath
Priority: Minor
 Attachments: feature_merged_message_resources.patch


 Add CombinedResources, which fetches all Resources.properties.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[jira] Created: (VFS-155) Implement more methods in DelegateFileObject

2007-05-14 Thread Adam Heath (JIRA)
Implement more methods in DelegateFileObject


 Key: VFS-155
 URL: https://issues.apache.org/jira/browse/VFS-155
 Project: Commons VFS
  Issue Type: Improvement
Affects Versions: 1.1
Reporter: Adam Heath
Priority: Minor
 Attachments: feature_DelegateFileObject-implement-more-doXXX.patch

In DelegateFileObject, implement doRename, doRemoveAttribute, and 
doGetRandomAccessContent.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[jira] Updated: (VFS-155) Implement more methods in DelegateFileObject

2007-05-14 Thread Adam Heath (JIRA)

 [ 
https://issues.apache.org/jira/browse/VFS-155?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Adam Heath updated VFS-155:
---

Attachment: feature_DelegateFileObject-implement-more-doXXX.patch

Against svn 501759.

 Implement more methods in DelegateFileObject
 

 Key: VFS-155
 URL: https://issues.apache.org/jira/browse/VFS-155
 Project: Commons VFS
  Issue Type: Improvement
Affects Versions: 1.1
Reporter: Adam Heath
Priority: Minor
 Attachments: feature_DelegateFileObject-implement-more-doXXX.patch


 In DelegateFileObject, implement doRename, doRemoveAttribute, and 
 doGetRandomAccessContent.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[jira] Created: (VFS-156) Use a set to hold the listeners in AbstractFileSystem

2007-05-14 Thread Adam Heath (JIRA)
Use a set to hold the listeners in AbstractFileSystem
-

 Key: VFS-156
 URL: https://issues.apache.org/jira/browse/VFS-156
 Project: Commons VFS
  Issue Type: Improvement
Affects Versions: 1.1
Reporter: Adam Heath
Priority: Minor


Use a set(from commons-collections) to hold the listeners, so that a listener 
isn't added multiple times.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[jira] Updated: (VFS-156) Use a set to hold the listeners in AbstractFileSystem

2007-05-14 Thread Adam Heath (JIRA)

 [ 
https://issues.apache.org/jira/browse/VFS-156?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Adam Heath updated VFS-156:
---

Attachment: feature_ListOrderedSet-listeners.patch

Against svn 501759.

 Use a set to hold the listeners in AbstractFileSystem
 -

 Key: VFS-156
 URL: https://issues.apache.org/jira/browse/VFS-156
 Project: Commons VFS
  Issue Type: Improvement
Affects Versions: 1.1
Reporter: Adam Heath
Priority: Minor
 Attachments: feature_ListOrderedSet-listeners.patch


 Use a set(from commons-collections) to hold the listeners, so that a listener 
 isn't added multiple times.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[jira] Created: (VFS-157) Cache the hashCode in AbstractFileName

2007-05-14 Thread Adam Heath (JIRA)
Cache the hashCode in AbstractFileName
--

 Key: VFS-157
 URL: https://issues.apache.org/jira/browse/VFS-157
 Project: Commons VFS
  Issue Type: Improvement
Reporter: Adam Heath


See $summary and patch.  Noticeable speedup.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[jira] Updated: (VFS-157) Cache the hashCode in AbstractFileName

2007-05-14 Thread Adam Heath (JIRA)

 [ 
https://issues.apache.org/jira/browse/VFS-157?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Adam Heath updated VFS-157:
---

Affects Version/s: 1.1

 Cache the hashCode in AbstractFileName
 --

 Key: VFS-157
 URL: https://issues.apache.org/jira/browse/VFS-157
 Project: Commons VFS
  Issue Type: Improvement
Affects Versions: 1.1
Reporter: Adam Heath
 Attachments: feature_cache-AbstractFileName-hashCode.patch


 See $summary and patch.  Noticeable speedup.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[jira] Updated: (VFS-157) Cache the hashCode in AbstractFileName

2007-05-14 Thread Adam Heath (JIRA)

 [ 
https://issues.apache.org/jira/browse/VFS-157?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Adam Heath updated VFS-157:
---

Attachment: feature_cache-AbstractFileName-hashCode.patch

Against svn 501759.

 Cache the hashCode in AbstractFileName
 --

 Key: VFS-157
 URL: https://issues.apache.org/jira/browse/VFS-157
 Project: Commons VFS
  Issue Type: Improvement
Affects Versions: 1.1
Reporter: Adam Heath
 Attachments: feature_cache-AbstractFileName-hashCode.patch


 See $summary and patch.  Noticeable speedup.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[jira] Created: (VFS-158) Call getLastModifiedTime once per loop in DefaultFileMonitor

2007-05-14 Thread Adam Heath (JIRA)
Call getLastModifiedTime once per loop in DefaultFileMonitor


 Key: VFS-158
 URL: https://issues.apache.org/jira/browse/VFS-158
 Project: Commons VFS
  Issue Type: Improvement
Affects Versions: 1.1
Reporter: Adam Heath
Priority: Minor


Don't call getLastModifiedTime multiple times in the loop, as it may change 
between calls.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[jira] Updated: (VFS-158) Call getLastModifiedTime once per loop in DefaultFileMonitor

2007-05-14 Thread Adam Heath (JIRA)

 [ 
https://issues.apache.org/jira/browse/VFS-158?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Adam Heath updated VFS-158:
---

Attachment: feature_getLastModifiedTime-inner-loop.patch

Against svn 501759.

 Call getLastModifiedTime once per loop in DefaultFileMonitor
 

 Key: VFS-158
 URL: https://issues.apache.org/jira/browse/VFS-158
 Project: Commons VFS
  Issue Type: Improvement
Affects Versions: 1.1
Reporter: Adam Heath
Priority: Minor
 Attachments: feature_getLastModifiedTime-inner-loop.patch


 Don't call getLastModifiedTime multiple times in the loop, as it may change 
 between calls.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[jira] Created: (VFS-159) Speed up VFS.isUriStyle and setUriStyle

2007-05-14 Thread Adam Heath (JIRA)
Speed up VFS.isUriStyle and setUriStyle
---

 Key: VFS-159
 URL: https://issues.apache.org/jira/browse/VFS-159
 Project: Commons VFS
  Issue Type: Improvement
Affects Versions: 1.1
Reporter: Adam Heath
Priority: Minor
 Attachments: feature_speed_up_VFS_URI_SET.patch

Don't use a Boolean object in these methods, to implement tri-state setting.  
Speedup that shows in high-volume call graphs.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[jira] Updated: (VFS-159) Speed up VFS.isUriStyle and setUriStyle

2007-05-14 Thread Adam Heath (JIRA)

 [ 
https://issues.apache.org/jira/browse/VFS-159?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Adam Heath updated VFS-159:
---

Attachment: feature_speed_up_VFS_URI_SET.patch

Against svn 501759.

 Speed up VFS.isUriStyle and setUriStyle
 ---

 Key: VFS-159
 URL: https://issues.apache.org/jira/browse/VFS-159
 Project: Commons VFS
  Issue Type: Improvement
Affects Versions: 1.1
Reporter: Adam Heath
Priority: Minor
 Attachments: feature_speed_up_VFS_URI_SET.patch


 Don't use a Boolean object in these methods, to implement tri-state setting.  
 Speedup that shows in high-volume call graphs.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[jira] Created: (VFS-160) Speedup FileNameParser.encodeCharacter

2007-05-14 Thread Adam Heath (JIRA)
Speedup FileNameParser.encodeCharacter
--

 Key: VFS-160
 URL: https://issues.apache.org/jira/browse/VFS-160
 Project: Commons VFS
  Issue Type: Improvement
Reporter: Adam Heath
 Attachments: feature_array-based-encodeCharacter.patch

Use an array for characters  256, and a BitSet for those larger.  Speedup 
improvement.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[jira] Updated: (VFS-160) Speedup FileNameParser.encodeCharacter

2007-05-14 Thread Adam Heath (JIRA)

 [ 
https://issues.apache.org/jira/browse/VFS-160?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Adam Heath updated VFS-160:
---

 Priority: Minor  (was: Major)
Affects Version/s: 1.1

 Speedup FileNameParser.encodeCharacter
 --

 Key: VFS-160
 URL: https://issues.apache.org/jira/browse/VFS-160
 Project: Commons VFS
  Issue Type: Improvement
Affects Versions: 1.1
Reporter: Adam Heath
Priority: Minor
 Attachments: feature_array-based-encodeCharacter.patch


 Use an array for characters  256, and a BitSet for those larger.  Speedup 
 improvement.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Suggestion for MapUtils

2007-05-14 Thread Sunnan

Hi, I'm relatively new to Java but I'm already a big fan of the Jakarta Commons.

I was wondering, is there something like the following already in
Commons, be it Lang or Collections? (I'm thinking
...collections.MapUtils.)

/**
* Creates a new Map containing some of the keys from another Map,
* optionally renamed.
* p
* @param orig   the map to get keys from
* @param keys the new-key-old-key map
*/
public static HashMap renameKeys (Map orig, Map keys) {
   HashMap ret = new HashMap();
   for (Object o : keys.entrySet()) {
   ret.put(((Entry)o).getKey(), orig.get(((Entry)o).getValue()));
   }
   return ret;
}

I typically use it when I have a map (often a BeanMap) and I need the
same values, but with other key names (in order to automatically
populate an LDAPEntry or some XML). (I usually use String key names.)

If there's nothing like this already, I'd like to submit this. I'm
open to improving it, of course.

Thangs for your time,
Sunnan

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[jira] Commented: (VFS-160) Speedup FileNameParser.encodeCharacter

2007-05-14 Thread Mario Ivankovits (JIRA)

[ 
https://issues.apache.org/jira/browse/VFS-160?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12495702
 ] 

Mario Ivankovits commented on VFS-160:
--

Could you explain a little bit why this would be a speedup improvement?

I don't think that our character comparison is really slower than the array 
access stuff.

 Speedup FileNameParser.encodeCharacter
 --

 Key: VFS-160
 URL: https://issues.apache.org/jira/browse/VFS-160
 Project: Commons VFS
  Issue Type: Improvement
Affects Versions: 1.1
Reporter: Adam Heath
Priority: Minor
 Attachments: feature_array-based-encodeCharacter.patch


 Use an array for characters  256, and a BitSet for those larger.  Speedup 
 improvement.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r537930 - in /jakarta/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs: provider/DelegateFileObject.java util/WeakRefFileListener.java

2007-05-14 Thread imario
Author: imario
Date: Mon May 14 11:17:52 2007
New Revision: 537930

URL: http://svn.apache.org/viewvc?view=revrev=537930
Log:
VFS-143: Fix memory leak in DelegateFileObject in it's handling of listeners - 
Thanks to Adam Heath for the patch!

Added:

jakarta/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/util/WeakRefFileListener.java
Modified:

jakarta/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/DelegateFileObject.java

Modified: 
jakarta/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/DelegateFileObject.java
URL: 
http://svn.apache.org/viewvc/jakarta/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/DelegateFileObject.java?view=diffrev=537930r1=537929r2=537930
==
--- 
jakarta/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/DelegateFileObject.java
 (original)
+++ 
jakarta/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/DelegateFileObject.java
 Mon May 14 11:17:52 2007
@@ -22,6 +22,7 @@
 import org.apache.commons.vfs.FileObject;
 import org.apache.commons.vfs.FileSystemException;
 import org.apache.commons.vfs.FileType;
+import org.apache.commons.vfs.util.WeakRefFileListener;
 
 import java.io.InputStream;
 import java.io.OutputStream;
@@ -54,7 +55,7 @@
 this.file = file;
 if (file != null)
 {
-file.getFileSystem().addListener(file, this);
+   WeakRefFileListener.installListener(file, this);
 }
 }
 
@@ -80,7 +81,7 @@
 
 if (file != null)
 {
-file.getFileSystem().addListener(file, this);
+   WeakRefFileListener.installListener(file, this);
 }
 this.file = file;
 maybeTypeChanged(oldType);
@@ -296,6 +297,7 @@
  */
 public void fileCreated(final FileChangeEvent event) throws Exception
 {
+if (event.getFile() != file) return;
 if (!ignoreEvent)
 {
 handleCreate(file.getType());
@@ -307,6 +309,7 @@
  */
 public void fileDeleted(final FileChangeEvent event) throws Exception
 {
+if (event.getFile() != file) return;
 if (!ignoreEvent)
 {
 handleDelete();
@@ -320,6 +323,7 @@
  */
 public void fileChanged(FileChangeEvent event) throws Exception
 {
+if (event.getFile() != file) return;
 if (!ignoreEvent)
 {
 handleChanged();

Added: 
jakarta/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/util/WeakRefFileListener.java
URL: 
http://svn.apache.org/viewvc/jakarta/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/util/WeakRefFileListener.java?view=autorev=537930
==
--- 
jakarta/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/util/WeakRefFileListener.java
 (added)
+++ 
jakarta/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/util/WeakRefFileListener.java
 Mon May 14 11:17:52 2007
@@ -0,0 +1,111 @@
+/*
+ * 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.commons.vfs.util;
+
+import org.apache.commons.vfs.FileChangeEvent;
+import org.apache.commons.vfs.FileListener;
+import org.apache.commons.vfs.FileName;
+import org.apache.commons.vfs.FileObject;
+import org.apache.commons.vfs.FileSystem;
+
+import java.lang.ref.WeakReference;
+
+/**
+ * Wrap a listener with a WeakReference.
+ *
+ * @author a href=mailto:[EMAIL PROTECTED]Adam Heath/a
+ * @version $Revision: 262 $ $Date: 2006-12-20T09:14:53.055649Z $
+ */
+public class WeakRefFileListener implements FileListener
+{
+   private final FileSystem fs;
+   private final FileName name;
+   private final WeakReference listener;
+
+   protected WeakRefFileListener(final FileObject file, final FileListener 
listener)
+   {
+   this.fs = file.getFileSystem();
+   this.name = file.getName();
+   this.listener = new WeakReference(listener);
+   }
+
+   /**
+* This will install the 

svn commit: r537931 - /jakarta/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/impl/DefaultFileSystemManager.java

2007-05-14 Thread imario
Author: imario
Date: Mon May 14 11:19:47 2007
New Revision: 537931

URL: http://svn.apache.org/viewvc?view=revrev=537931
Log:
VFS-144: Use the first registered LocalFileProvider. This follows the VFS rules 
of not allowing to override already registered providers - Thanks to Adam Heath 
for the patch!

Modified:

jakarta/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/impl/DefaultFileSystemManager.java

Modified: 
jakarta/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/impl/DefaultFileSystemManager.java
URL: 
http://svn.apache.org/viewvc/jakarta/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/impl/DefaultFileSystemManager.java?view=diffrev=537931r1=537930r2=537931
==
--- 
jakarta/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/impl/DefaultFileSystemManager.java
 (original)
+++ 
jakarta/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/impl/DefaultFileSystemManager.java
 Mon May 14 11:19:47 2007
@@ -16,17 +16,6 @@
  */
 package org.apache.commons.vfs.impl;
 
-import java.io.File;
-import java.net.URLStreamHandler;
-import java.net.URLStreamHandlerFactory;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.lang.reflect.Constructor;
-
 import org.apache.commons.logging.Log;
 import org.apache.commons.vfs.CacheStrategy;
 import org.apache.commons.vfs.FileContentInfoFactory;
@@ -53,6 +42,17 @@
 import org.apache.commons.vfs.provider.UriParser;
 import org.apache.commons.vfs.provider.VfsComponent;
 
+import java.io.File;
+import java.lang.reflect.Constructor;
+import java.net.URLStreamHandler;
+import java.net.URLStreamHandlerFactory;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
 /**
  * A default file system manager implementation.
  *
@@ -186,7 +186,7 @@
providers.put(scheme, provider);
}
 
-   if (provider instanceof LocalFileProvider)
+   if (provider instanceof LocalFileProvider  localFileProvider 
== null)
{
localFileProvider = (LocalFileProvider) provider;
}



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[jira] Resolved: (VFS-144) Only take the first LocalFileProvider, not the last

2007-05-14 Thread Mario Ivankovits (JIRA)

 [ 
https://issues.apache.org/jira/browse/VFS-144?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Mario Ivankovits resolved VFS-144.
--

   Resolution: Fixed
Fix Version/s: 1.1

Applied - Thanks for the patch!

 Only take the first LocalFileProvider, not the last
 ---

 Key: VFS-144
 URL: https://issues.apache.org/jira/browse/VFS-144
 Project: Commons VFS
  Issue Type: Bug
Affects Versions: 1.1
Reporter: Adam Heath
Priority: Minor
 Fix For: 1.1

 Attachments: fix_DefaultFileSystemManager-first-LocalProvider.patch


 Modify DefaultFileSystemManager, to only take the first LocalFileProvider 
 registered, not the last.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r537936 - in /jakarta/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs: cache/DefaultFilesCache.java cache/SoftRefFilesCache.java provider/AbstractFileName.java

2007-05-14 Thread imario
Author: imario
Date: Mon May 14 11:24:35 2007
New Revision: 537936

URL: http://svn.apache.org/viewvc?view=revrev=537936
Log:
VFS-145 + VFS-157: Use HashMap for caches and cache calculated hashCode in 
FileName - Thanks to Adam Heath for the patch!

Modified:

jakarta/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/cache/DefaultFilesCache.java

jakarta/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/cache/SoftRefFilesCache.java

jakarta/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/AbstractFileName.java

Modified: 
jakarta/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/cache/DefaultFilesCache.java
URL: 
http://svn.apache.org/viewvc/jakarta/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/cache/DefaultFilesCache.java?view=diffrev=537936r1=537935r2=537936
==
--- 
jakarta/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/cache/DefaultFilesCache.java
 (original)
+++ 
jakarta/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/cache/DefaultFilesCache.java
 Mon May 14 11:24:35 2007
@@ -22,7 +22,6 @@
 
 import java.util.HashMap;
 import java.util.Map;
-import java.util.TreeMap;
 
 /**
  * A [EMAIL PROTECTED] org.apache.commons.vfs.FilesCache} implementation.br
@@ -58,7 +57,7 @@
 Map files = (Map) filesystemCache.get(filesystem);
 if (files == null)
 {
-files = new TreeMap();
+files = new HashMap();
 filesystemCache.put(filesystem, files);
 }
 

Modified: 
jakarta/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/cache/SoftRefFilesCache.java
URL: 
http://svn.apache.org/viewvc/jakarta/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/cache/SoftRefFilesCache.java?view=diffrev=537936r1=537935r2=537936
==
--- 
jakarta/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/cache/SoftRefFilesCache.java
 (original)
+++ 
jakarta/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/cache/SoftRefFilesCache.java
 Mon May 14 11:24:35 2007
@@ -16,14 +16,6 @@
  */
 package org.apache.commons.vfs.cache;
 
-import java.lang.ref.Reference;
-import java.lang.ref.ReferenceQueue;
-import java.lang.ref.SoftReference;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.TreeMap;
-
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.commons.vfs.FileName;
@@ -33,6 +25,13 @@
 import org.apache.commons.vfs.impl.DefaultFileSystemManager;
 import org.apache.commons.vfs.util.Messages;
 
+import java.lang.ref.Reference;
+import java.lang.ref.ReferenceQueue;
+import java.lang.ref.SoftReference;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+
 /**
  * This implementation caches every file as long as it is strongly reachable by
  * the java vm. As soon as the vm needs memory - every softly reachable file
@@ -289,7 +288,7 @@
Map files = (Map) filesystemCache.get(filesystem);
if (files == null)
{
-   files = new TreeMap();
+   files = new HashMap();
filesystemCache.put(filesystem, files);
}
 

Modified: 
jakarta/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/AbstractFileName.java
URL: 
http://svn.apache.org/viewvc/jakarta/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/AbstractFileName.java?view=diffrev=537936r1=537935r2=537936
==
--- 
jakarta/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/AbstractFileName.java
 (original)
+++ 
jakarta/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/AbstractFileName.java
 Mon May 14 11:24:35 2007
@@ -29,479 +29,487 @@
  * @version $Revision$ $Date$
  */
 public abstract class AbstractFileName
-implements FileName
+   implements FileName
 {
 
-private final String scheme;
-private final String absPath;
-private FileType type;
-
-// Cached stuff
-private String uri;
-private String baseName;
-private String rootUri;
-private String extension;
-private String decodedAbsPath;
-
-public AbstractFileName(final String scheme,
-final String absPath, FileType type)
-{
-this.rootUri = null;
-this.scheme = scheme;
-this.type = type;
-if (absPath != null  absPath.length()  0)
-{
-if (absPath.length()  1  absPath.endsWith(/))
-{
-this.absPath = 

[jira] Resolved: (VFS-145) Switch the files caches implementations to HashMap, as it is faster

2007-05-14 Thread Mario Ivankovits (JIRA)

 [ 
https://issues.apache.org/jira/browse/VFS-145?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Mario Ivankovits resolved VFS-145.
--

   Resolution: Fixed
Fix Version/s: 1.1

A - TFTP! ;-)

 Switch the files caches implementations to HashMap, as it is faster
 ---

 Key: VFS-145
 URL: https://issues.apache.org/jira/browse/VFS-145
 Project: Commons VFS
  Issue Type: Improvement
Affects Versions: 1.1
Reporter: Adam Heath
 Fix For: 1.1

 Attachments: feature_FilesCache-TreeMap-HashMap.patch


 There's no reason to use a TreeMap, as we aren't doing ordered traversal of 
 the map.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[jira] Resolved: (VFS-157) Cache the hashCode in AbstractFileName

2007-05-14 Thread Mario Ivankovits (JIRA)

 [ 
https://issues.apache.org/jira/browse/VFS-157?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Mario Ivankovits resolved VFS-157.
--

   Resolution: Fixed
Fix Version/s: 1.1

A - TFTP! ;-)

 Cache the hashCode in AbstractFileName
 --

 Key: VFS-157
 URL: https://issues.apache.org/jira/browse/VFS-157
 Project: Commons VFS
  Issue Type: Improvement
Affects Versions: 1.1
Reporter: Adam Heath
 Fix For: 1.1

 Attachments: feature_cache-AbstractFileName-hashCode.patch


 See $summary and patch.  Noticeable speedup.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r537938 - /jakarta/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/impl/DefaultFileMonitor.java

2007-05-14 Thread imario
Author: imario
Date: Mon May 14 11:26:40 2007
New Revision: 537938

URL: http://svn.apache.org/viewvc?view=revrev=537938
Log:
VFS-147: Use monitorThread instead of Thread.currentThread - Thanks to Adam 
Heath for the patch!

Modified:

jakarta/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/impl/DefaultFileMonitor.java

Modified: 
jakarta/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/impl/DefaultFileMonitor.java
URL: 
http://svn.apache.org/viewvc/jakarta/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/impl/DefaultFileMonitor.java?view=diffrev=537938r1=537937r2=537938
==
--- 
jakarta/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/impl/DefaultFileMonitor.java
 (original)
+++ 
jakarta/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/impl/DefaultFileMonitor.java
 Mon May 14 11:26:40 2007
@@ -23,7 +23,6 @@
 import org.apache.commons.vfs.FileName;
 import org.apache.commons.vfs.FileObject;
 import org.apache.commons.vfs.FileSystemException;
-import org.apache.commons.vfs.FileType;
 import org.apache.commons.vfs.provider.AbstractFileSystem;
 
 import java.util.HashMap;
@@ -346,7 +345,7 @@
 public void run()
 {
 mainloop:
-while (!Thread.currentThread().isInterrupted()  this.shouldRun)
+while (!monitorThread.isInterrupted()  this.shouldRun)
 {
 while (!this.deleteStack.empty())
 {
@@ -388,7 +387,7 @@
 }
 }
 
-if (Thread.currentThread().isInterrupted() || !this.shouldRun)
+if (monitorThread.isInterrupted() || !this.shouldRun)
 {
 continue mainloop;
 }



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[jira] Resolved: (VFS-147) Don't call Thread.currentThread in DefaultFileMonitor

2007-05-14 Thread Mario Ivankovits (JIRA)

 [ 
https://issues.apache.org/jira/browse/VFS-147?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Mario Ivankovits resolved VFS-147.
--

   Resolution: Fixed
Fix Version/s: 1.1

Applied - Thanks for the patch!

 Don't call Thread.currentThread in DefaultFileMonitor
 -

 Key: VFS-147
 URL: https://issues.apache.org/jira/browse/VFS-147
 Project: Commons VFS
  Issue Type: Improvement
Affects Versions: 1.1
Reporter: Adam Heath
Priority: Minor
 Fix For: 1.1

 Attachments: feature_use-monitorThread-not-Thread.currentThread.patch


 DefaultFileMonitor has a reference to the thread; no need to call 
 Thread.currentThread().

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[jira] Commented: (VFS-148) Make DefaultFileSelectInfo public

2007-05-14 Thread Mario Ivankovits (JIRA)

[ 
https://issues.apache.org/jira/browse/VFS-148?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12495716
 ] 

Mario Ivankovits commented on VFS-148:
--

Whats the reason for making it public??
This allows one to cast the passed FileSelectInfo to the 
DefaultfileSelectorInfo class and call one of the set* methods.

Which is not what we want during traversing ... no?

 Make DefaultFileSelectInfo public
 -

 Key: VFS-148
 URL: https://issues.apache.org/jira/browse/VFS-148
 Project: Commons VFS
  Issue Type: New Feature
Affects Versions: 1.1
Reporter: Adam Heath
Priority: Trivial
 Attachments: feature_DefaultFileSelectorInfo_public.patch


 See $summary, and patch.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r537943 - in /jakarta/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs: FileContent.java Resources.properties provider/AbstractFileObject.java provider/DefaultFileContent

2007-05-14 Thread imario
Author: imario
Date: Mon May 14 11:37:14 2007
New Revision: 537943

URL: http://svn.apache.org/viewvc?view=revrev=537943
Log:
VFS-149: Add FileContent.hasAttribute and removeAttribute - Thanks to Adam 
Heath for the patch!

Modified:

jakarta/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/FileContent.java

jakarta/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/Resources.properties

jakarta/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/AbstractFileObject.java

jakarta/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/DefaultFileContent.java

Modified: 
jakarta/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/FileContent.java
URL: 
http://svn.apache.org/viewvc/jakarta/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/FileContent.java?view=diffrev=537943r1=537942r2=537943
==
--- 
jakarta/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/FileContent.java
 (original)
+++ 
jakarta/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/FileContent.java
 Mon May 14 11:37:14 2007
@@ -76,6 +76,16 @@
 void setLastModifiedTime(long modTime) throws FileSystemException;
 
 /**
+ * Checks if an attribute of the file's content exists.
+ *
+ * @param attrName The name of the attribute.
+ * @throws FileSystemException If the file does not exist, or does not 
support
+ * attributes.
+ */
+boolean hasAttribute(String attrName)
+throws FileSystemException;
+
+/**
  * Returns a read-only map of this file's attributes.
  *
  * @throws FileSystemException If the file does not exist, or does not 
support attributes.
@@ -110,6 +120,16 @@
  * attributes, or on error setting the 
attribute.
  */
 void setAttribute(String attrName, Object value)
+throws FileSystemException;
+
+/**
+ * Removes the value of an attribute of the file's content.
+ *
+ * @param attrName The name of the attribute.
+ * @throws FileSystemException If the file does not exist, or is 
read-only, or does not support
+ * attributes, or on error removing the 
attribute.
+ */
+void removeAttribute(String attrName)
 throws FileSystemException;
 
 /**

Modified: 
jakarta/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/Resources.properties
URL: 
http://svn.apache.org/viewvc/jakarta/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/Resources.properties?view=diffrev=537943r1=537942r2=537943
==
--- 
jakarta/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/Resources.properties
 (original)
+++ 
jakarta/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/Resources.properties
 Mon May 14 11:37:14 2007
@@ -29,6 +29,7 @@
 vfs.provider/get-last-modified-not-supported.error=This file type does not 
support retriving last modified time.
 vfs.provider/set-last-modified-not-supported.error=This file type does not 
support setting last modified time.
 vfs.provider/set-attribute-not-supported.error=This file type does not support 
setting attributes.
+vfs.provider/remove-attribute-not-supported.error=This file type does not 
support removing attributes.
 vfs.provider/get-attribute-not-supported.error=This file type does not support 
getting attributes.
 vfs.provider/write-not-supported.error=This file type cannot be written to.
 vfs.provider/get-type.error=Could not determine the type of file {0}.
@@ -82,10 +83,13 @@
 vfs.provider/get-certificates.error=Could not retrieve the certificates of 
{0}.
 vfs.provider/close-instr.error=Could not close the input stream for file {0}.
 vfs.provider/close-outstr.error=Could not close the output stream for file 
{0}.
+vfs.provider/exists-attribute-no-exist.error=Could not check if attribute 
{0} of {1} exists because attributes are not supported.
 vfs.provider/get-attributes-no-exist.error=Could not get attributes for file 
{0} because it does not exist.
 vfs.provider/get-attributes.error=Could not get attributes {0}.
 vfs.provider/set-attribute-no-exist.error=Could not set attribute {0} of 
{1} because it does not exist.
 vfs.provider/set-attribute.error=Could not set attribute {0} of {1}.
+vfs.provider/remove-attribute-no-exist.error=Could not check if attribute 
{0} of {1} exists because attributes are not supported.
+vfs.provider/remove-attribute.error=Could not remove attribute {0} of {1}.
 
 # AbstractFileSystemProvider
 vfs.provider/invalid-absolute-uri.error=Invalid absolute URI {0}.

Modified: 
jakarta/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/AbstractFileObject.java
URL: 

[jira] Resolved: (VFS-149) Add FileContent.attributeExists and removeAttribute.

2007-05-14 Thread Mario Ivankovits (JIRA)

 [ 
https://issues.apache.org/jira/browse/VFS-149?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Mario Ivankovits resolved VFS-149.
--

   Resolution: Fixed
Fix Version/s: 1.1

Applied - Thanks for the patch!

Renamed attributeExists to hasAttribute

 Add FileContent.attributeExists and removeAttribute.
 

 Key: VFS-149
 URL: https://issues.apache.org/jira/browse/VFS-149
 Project: Commons VFS
  Issue Type: New Feature
Affects Versions: 1.1
Reporter: Adam Heath
Priority: Minor
 Fix For: 1.1

 Attachments: feature_attributeExists-removeAttribute.patch


 See $summary and patch.  Makes FileContent more like a map.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r537944 - /jakarta/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/AbstractFileObject.java

2007-05-14 Thread imario
Author: imario
Date: Mon May 14 11:41:51 2007
New Revision: 537944

URL: http://svn.apache.org/viewvc?view=revrev=537944
Log:
VFS-150: Added doCreateFileContent to allow creating your own FileContent 
implementation - Thanks to Adam Heath for the patch!

Modified:

jakarta/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/AbstractFileObject.java

Modified: 
jakarta/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/AbstractFileObject.java
URL: 
http://svn.apache.org/viewvc/jakarta/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/AbstractFileObject.java?view=diffrev=537944r1=537943r2=537944
==
--- 
jakarta/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/AbstractFileObject.java
 (original)
+++ 
jakarta/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/AbstractFileObject.java
 Mon May 14 11:41:51 2007
@@ -68,7 +68,7 @@
 private final AbstractFileName name;
 private final AbstractFileSystem fs;
 
-private DefaultFileContent content;
+private FileContent content;
 
 // Cached info
 private boolean attached;
@@ -1072,13 +1072,21 @@
 attach();
 if (content == null)
 {
-content = new DefaultFileContent(this, 
getFileContentInfoFactory());
+content = doCreateFileContent();
 }
 return content;
 }
 }
 
-/**
+   /**
+* Create a FileContent implementation
+*/
+   protected FileContent doCreateFileContent() throws FileSystemException
+   {
+   return new DefaultFileContent(this, 
getFileContentInfoFactory());
+   }
+
+   /**
  * This will prepare the fileObject to get resynchronized with the 
underlaying filesystem if required
  */
 public void refresh() throws FileSystemException



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[jira] Commented: (VFS-150) Make AbstractFileObject easier to extend

2007-05-14 Thread Mario Ivankovits (JIRA)

[ 
https://issues.apache.org/jira/browse/VFS-150?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12495722
 ] 

Mario Ivankovits commented on VFS-150:
--

Applied - Thanks for the patch!

renamed method to doCreateFileContent, changed content var to FileContent type

 Make AbstractFileObject easier to extend
 

 Key: VFS-150
 URL: https://issues.apache.org/jira/browse/VFS-150
 Project: Commons VFS
  Issue Type: Improvement
Affects Versions: 1.1
Reporter: Adam Heath
Priority: Minor
 Fix For: 1.1

 Attachments: 
 feature_AbstractFileObject-DefaultFileContext-easier-to-extend.patch


 Add doGetContent(), a factory method that subclasses can override to return a 
 different FileContent implementation.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[jira] Resolved: (VFS-150) Make AbstractFileObject easier to extend

2007-05-14 Thread Mario Ivankovits (JIRA)

 [ 
https://issues.apache.org/jira/browse/VFS-150?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Mario Ivankovits resolved VFS-150.
--

   Resolution: Fixed
Fix Version/s: 1.1

 Make AbstractFileObject easier to extend
 

 Key: VFS-150
 URL: https://issues.apache.org/jira/browse/VFS-150
 Project: Commons VFS
  Issue Type: Improvement
Affects Versions: 1.1
Reporter: Adam Heath
Priority: Minor
 Fix For: 1.1

 Attachments: 
 feature_AbstractFileObject-DefaultFileContext-easier-to-extend.patch


 Add doGetContent(), a factory method that subclasses can override to return a 
 different FileContent implementation.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[jira] Commented: (VFS-142) Clear ThreadData after all streams are closed, fixes a memory leak

2007-05-14 Thread Adam Heath (JIRA)

[ 
https://issues.apache.org/jira/browse/VFS-142?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12495724
 ] 

Adam Heath commented on VFS-142:


It's not just the object itself, but everything it references.  It references 
DefaultFileContent, which references AbstractFileObject, which references 
AbstractFileSystem.  Then, if you have layered file systems, DelegateFileObject 
comes into play, which has it's own references.

I've got several layered file system implementations(one, that stores 
attributes as foo@/attr-name, and another, that implements COW(copy-on-write); 
yet another that does *proper* virtual mounts, meaning nested).

When the top-level file is a DelegateFileObject, from VirtualFileSystem, the 
whole chain of references underneath it gets very large.

I spent a great deal of time just a week ago chasing down memory usage.  This 
was a fairly large segment of memory freed up by this.  Most of the memory 
issues I ended up fixing were in commons-vfs; most were looped references being 
held in static fields(ThreadLocal is a global static field, so always maintains 
it's references).

 Clear ThreadData after all streams are closed, fixes a memory leak
 --

 Key: VFS-142
 URL: https://issues.apache.org/jira/browse/VFS-142
 Project: Commons VFS
  Issue Type: Bug
Affects Versions: 1.1
Reporter: Adam Heath
 Attachments: fix_ThreadData-clear.patch


 After all streams are closed in FileContentThreadData, clear the ThreadLocal.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[jira] Resolved: (VFS-151) Allow files to return a custom FileContentInfo

2007-05-14 Thread Mario Ivankovits (JIRA)

 [ 
https://issues.apache.org/jira/browse/VFS-151?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Mario Ivankovits resolved VFS-151.
--

Resolution: Won't Fix

The FileContentInfo is not meant to be in the responsibility of the FileObject. 
Like the file command in unix the factory should try to determine the best 
FileContentInfo depending on the real FileContent by looking up the first few 
bytes and visiting a magic file.

Though, if the FileObject would like to have its own FileContentInfo it could 
override AbstractFileObject.getFileContentInfoFactory

 Allow files to return a custom FileContentInfo
 --

 Key: VFS-151
 URL: https://issues.apache.org/jira/browse/VFS-151
 Project: Commons VFS
  Issue Type: Improvement
Affects Versions: 1.1
Reporter: Adam Heath
Priority: Minor
 Attachments: feature_FileContentInfo-subclass-overriding.patch


 See attached patch.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r537948 - /jakarta/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/DelegateFileObject.java

2007-05-14 Thread imario
Author: imario
Date: Mon May 14 11:48:43 2007
New Revision: 537948

URL: http://svn.apache.org/viewvc?view=revrev=537948
Log:
VFS-152: Added DelegateFileObject.doGetContentInfo - Thanks to Adam Heath for 
the patch!

Modified:

jakarta/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/DelegateFileObject.java

Modified: 
jakarta/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/DelegateFileObject.java
URL: 
http://svn.apache.org/viewvc/jakarta/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/DelegateFileObject.java?view=diffrev=537948r1=537947r2=537948
==
--- 
jakarta/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/DelegateFileObject.java
 (original)
+++ 
jakarta/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/DelegateFileObject.java
 Mon May 14 11:48:43 2007
@@ -22,6 +22,7 @@
 import org.apache.commons.vfs.FileObject;
 import org.apache.commons.vfs.FileSystemException;
 import org.apache.commons.vfs.FileType;
+import org.apache.commons.vfs.FileContentInfo;
 import org.apache.commons.vfs.util.WeakRefFileListener;
 
 import java.io.InputStream;
@@ -40,308 +41,317 @@
  * @todo Extract subclass that overlays the children
  */
 public class DelegateFileObject
-extends AbstractFileObject
-implements FileListener
+   extends AbstractFileObject
+   implements FileListener
 {
-private FileObject file;
-private final Set children = new HashSet();
-private boolean ignoreEvent;
+   private FileObject file;
+   private final Set children = new HashSet();
+   private boolean ignoreEvent;
 
public DelegateFileObject(final FileName name,
-  final AbstractFileSystem fileSystem,
-  final FileObject file) throws FileSystemException
-{
-super(name, fileSystem);
-this.file = file;
-if (file != null)
-{
+ final 
AbstractFileSystem fileSystem,
+ final FileObject 
file) throws FileSystemException
+   {
+   super(name, fileSystem);
+   this.file = file;
+   if (file != null)
+   {
WeakRefFileListener.installListener(file, this);
-}
-}
+   }
+   }
+
+   /**
+* Adds a child to this file.
+*/
+   public void attachChild(final FileName baseName, final FileType type) 
throws Exception
+   {
+   final FileType oldType = doGetType();
+   if (children.add(baseName.getBaseName()))
+   {
+   childrenChanged(baseName, type);
+   }
+   maybeTypeChanged(oldType);
+   }
 
-/**
- * Adds a child to this file.
- */
-public void attachChild(final FileName baseName, final FileType type) 
throws Exception
-{
-final FileType oldType = doGetType();
-if (children.add(baseName.getBaseName()))
-{
-childrenChanged(baseName, type);
-}
-maybeTypeChanged(oldType);
-}
-
-/**
- * Attaches or detaches the target file.
- */
-public void setFile(final FileObject file) throws Exception
-{
-final FileType oldType = doGetType();
+   /**
+* Attaches or detaches the target file.
+*/
+   public void setFile(final FileObject file) throws Exception
+   {
+   final FileType oldType = doGetType();
 
-if (file != null)
-{
+   if (file != null)
+   {
WeakRefFileListener.installListener(file, this);
-}
-this.file = file;
-maybeTypeChanged(oldType);
-}
-
-/**
- * Checks whether the file's type has changed, and fires the appropriate
- * events.
- */
-private void maybeTypeChanged(final FileType oldType) throws Exception
-{
-final FileType newType = doGetType();
-if (oldType == FileType.IMAGINARY  newType != FileType.IMAGINARY)
-{
-handleCreate(newType);
-}
-else if (oldType != FileType.IMAGINARY  newType == 
FileType.IMAGINARY)
-{
-handleDelete();
-}
-}
-
-/**
- * Determines the type of the file, returns null if the file does not
- * exist.
- */
-protected FileType doGetType() throws FileSystemException
-{
-if (file != null)
-{
-return file.getType();
-}
-else if (children.size()  0)
-{
-return FileType.FOLDER;
-}
-else
-{
-return FileType.IMAGINARY;
-}
-}
-
-/**
- * Determines if this file can be read.
- */
-protected 

[jira] Resolved: (VFS-152) Add DefaultFileObject.doGetContentInfo().

2007-05-14 Thread Mario Ivankovits (JIRA)

 [ 
https://issues.apache.org/jira/browse/VFS-152?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Mario Ivankovits resolved VFS-152.
--

   Resolution: Fixed
Fix Version/s: 1.1

Applied - Thanks for the patch!

 Add DefaultFileObject.doGetContentInfo().
 -

 Key: VFS-152
 URL: https://issues.apache.org/jira/browse/VFS-152
 Project: Commons VFS
  Issue Type: Bug
Affects Versions: 1.1
Reporter: Adam Heath
Priority: Minor
 Fix For: 1.1

 Attachments: fix_DelegateFileObject-FileContentInfo.patch


 Need to call this on the wrapped file.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[jira] Commented: (VFS-160) Speedup FileNameParser.encodeCharacter

2007-05-14 Thread Adam Heath (JIRA)

[ 
https://issues.apache.org/jira/browse/VFS-160?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12495732
 ] 

Adam Heath commented on VFS-160:


Method call overhead showed up in a profiling run, in high-volume repeated 
calls.  It's not enough to compare *just* this method, but when you have 
several layered files, and the name is parsed at each level, the overhead does 
add up.

It's the chained methods(super.encodeCharacter), and the chained comparisons, 
in the worst case, that show the slowdown.  When a character doesn't need to be 
encoded, the parents are all called, and each comparison in each child then has 
to fail, before it finally returns.

The patch reduces all that to a single array index, then a call to the BitSet.  
The time is now constant, no matter how many characters have to be encoded.  
Before, the time was not constant, as some characters would take longer to 
check whether they needed to be encoded, because more super.encodeCharacter 
calls would be invoked.

 Speedup FileNameParser.encodeCharacter
 --

 Key: VFS-160
 URL: https://issues.apache.org/jira/browse/VFS-160
 Project: Commons VFS
  Issue Type: Improvement
Affects Versions: 1.1
Reporter: Adam Heath
Priority: Minor
 Attachments: feature_array-based-encodeCharacter.patch


 Use an array for characters  256, and a BitSet for those larger.  Speedup 
 improvement.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



  1   2   >