Re: Commons not building

2005-09-05 Thread Craig McClanahan
On 9/5/05, Phil Steitz <[EMAIL PROTECTED]> wrote:
> 
> [pool] has a working maven build, but the ant build is hand-crafted and
> refers to unversioned jars that must depend on the build order (and which 
> I
> don't think are still being created) - e.g.
> property name="commons-collections.jar"
> value="${basedir}/../collections/dist/commons-collections.jar"/
> 
> Any objections if I check in a maven-generated build.xml for pool?


The nightly builds (at least as long as *I* host them :-) depend on the fact 
that "ant clean dist" works. This sounds like a good approach to the problem 
with [pool].

Craig

dbcp does not have a working maven build. There are test failures.
> 
> Phil
> 
> On 9/4/05, netsql <[EMAIL PROTECTED]> wrote:
> >
> > I wanted to try nightly Pool and DBCP.
> > They are each 45 bytes.
> >
> > help. tia,
> > .V
> >
> >
> >
> > 
> -
> > Broadband interface (RIA) + mail box saftey = http://Jakarta_Commons_Developer_List.roomity.com";>Roomity.com
> 
> > 
> > *Your* clubs, no sign up to read, ad supported; try broadband internet.
> > ~~1125875112740~~
> >
> > 
> -
> >
> >
> 
>


DO NOT REPLY [Bug 36473] - [Net] FTPClient.storeFile keeps returning false on XP only, stores nothing to FTP server

2005-09-05 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
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=36473





--- Additional Comments From [EMAIL PROTECTED]  2005-09-06 07:40 ---
Hi Daniel, 
 
That's fine - at least I now have working code, and I know what to check for if 
something similar happens again. Maybe it will be suffiecient for the interim 
to just note this as a feature of using commons.net on Windows - when using the 
FTP module, be very sure to correctly specify the FileInputStream's source file 
for all calls to storeFile? 
 
Thanks to you and Steve! 

-- 
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]



svn commit: r278908 - /jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/interceptor/ExecutorMethodInterceptor.java

2005-09-05 Thread jcarman
Author: jcarman
Date: Mon Sep  5 21:08:44 2005
New Revision: 278908

URL: http://svn.apache.org/viewcvs?rev=278908&view=rev
Log:
Added special case for finalize() method.

Modified:

jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/interceptor/ExecutorMethodInterceptor.java

Modified: 
jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/interceptor/ExecutorMethodInterceptor.java
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/interceptor/ExecutorMethodInterceptor.java?rev=278908&r1=278907&r2=278908&view=diff
==
--- 
jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/interceptor/ExecutorMethodInterceptor.java
 (original)
+++ 
jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/interceptor/ExecutorMethodInterceptor.java
 Mon Sep  5 21:08:44 2005
@@ -44,7 +44,7 @@
 {
 if( Void.TYPE.equals( methodInvocation.getMethod().getReturnType() ) )
 {
-// Special case for finalize() method (should not be run in a 
different thread...
+// Special case for finalize() method (should not be run in a 
different thread)...
 if( !( methodInvocation.getMethod().getName().equals( "finalize" ) 
&&
methodInvocation.getMethod().getParameterTypes().length == 
0 ) )
 {



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



svn commit: r278903 - /jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/interceptor/ExecutorMethodInterceptor.java

2005-09-05 Thread jcarman
Author: jcarman
Date: Mon Sep  5 20:40:08 2005
New Revision: 278903

URL: http://svn.apache.org/viewcvs?rev=278903&view=rev
Log:
Added special case for finalize() method.

Modified:

jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/interceptor/ExecutorMethodInterceptor.java

Modified: 
jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/interceptor/ExecutorMethodInterceptor.java
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/interceptor/ExecutorMethodInterceptor.java?rev=278903&r1=278902&r2=278903&view=diff
==
--- 
jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/interceptor/ExecutorMethodInterceptor.java
 (original)
+++ 
jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/interceptor/ExecutorMethodInterceptor.java
 Mon Sep  5 20:40:08 2005
@@ -22,10 +22,12 @@
 
 /**
  * A method interceptor that uses an [EMAIL PROTECTED] Executor} to execute 
the method invocation.
- * 
- * Note: Only void methods can be intercepted using this 
class!  Any attempts to intercept
- * non-void methods will result in an [EMAIL PROTECTED] 
IllegalArgumentException}.  If the proxy interfaces include non-void
- * methods, try using a [EMAIL PROTECTED] FilteredMethodInterceptor} along 
with a [EMAIL PROTECTED] 
org.apache.commons.proxy.interceptor.filter.ReturnTypeFilter} to wrap an 
instance of this class.
+ * 
+ * Note: Only void methods can be intercepted using this 
class!  Any attempts to intercept non-void
+ * methods will result in an [EMAIL PROTECTED] IllegalArgumentException}.  If 
the proxy interfaces include non-void methods, try
+ * using a [EMAIL PROTECTED] FilteredMethodInterceptor} along with a [EMAIL 
PROTECTED] org.apache.commons.proxy.interceptor.filter.ReturnTypeFilter}
+ * to wrap an instance of this class.
+ *
  * @author James Carman
  * @version 1.0
  */
@@ -42,21 +44,30 @@
 {
 if( Void.TYPE.equals( methodInvocation.getMethod().getReturnType() ) )
 {
-executor.execute( new Runnable()
+// Special case for finalize() method (should not be run in a 
different thread...
+if( !( methodInvocation.getMethod().getName().equals( "finalize" ) 
&&
+   methodInvocation.getMethod().getParameterTypes().length == 
0 ) )
 {
-public void run()
+executor.execute( new Runnable()
 {
-try
+public void run()
 {
-methodInvocation.proceed();
+try
+{
+methodInvocation.proceed();
+}
+catch( Throwable t )
+{
+getLog().error( "Method invocation threw an 
exception.", t );
+}
 }
-catch( Throwable t )
-{
-getLog().error( "Method invocation threw an 
exception.", t );
-}
-}
-} );
-return null;
+} );
+return null;
+}
+else
+{
+return methodInvocation.proceed();
+}
 }
 else
 {



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



RE: [lang] enhanced version of Class.forName

2005-09-05 Thread James Carman
Sorry, I meant "forCanonicalName" of course.

-Original Message-
From: James Carman [mailto:[EMAIL PROTECTED] 
Sent: Monday, September 05, 2005 11:26 PM
To: 'Jakarta Commons Developers List'; [EMAIL PROTECTED]
Subject: RE: [lang] enhanced version of Class.forName

I have the code added to ClassUtils in "lang" right now in my IDE.  What
would be a good name for the method, though?  I don't really like
"extendedForName."  What about "getCanonicalName"?  Any other suggestions?
We could just use "forName", but the distinction between the Class.forName()
and the ClassUtils.forName() wouldn't be that obvious.  

Would the "lang" folks care if I checked in this code (with test cases of
course) once we decide on what the name of the method should be (or whether
or not it should be in there in the first place)?

-Original Message-
From: Henri Yandell [mailto:[EMAIL PROTECTED] 
Sent: Monday, September 05, 2005 8:26 PM
To: Jakarta Commons Developers List; [EMAIL PROTECTED]
Subject: Re: [lang] enhanced version of Class.forName

Deja Vu :) +1

Jan-2005:http://mail-archives.apache.org/mod_mbox/jakarta-commons-dev/200501
.mbox/[EMAIL PROTECTED]
Feb-2005:http://mail-archives.apache.org/mod_mbox/jakarta-commons-dev/200502
.mbox/[EMAIL PROTECTED]

Various ClassLoader issues raised by Stephen, we agreed to hold off
until after 2.1; so now is a good time.

Hen

On 9/5/05, Thomas Dudziak <[EMAIL PROTECTED]> wrote:
> (Ups, only replied to Wade, not the list)
> 
> On 9/5/05, Wade Chandler <[EMAIL PROTECTED]> wrote:
> 
> > What's a use case for it Tom?  curious.
> 
> I just checked-in an enhancement for OJB that allows to specify which
> constructor/factory-method to utilize for constructing objects read
> from the database. These can have parameters which are described by
> corresponding parameter element:
> 
>  type="factory"
>   factory-class="org.apache.ojb.broker.ObjectTestFactory"
>   factory-method="createInstance"
>   >
> 
> 
>   
> 
> The optional type attribute allows the user to explicitly specify the
> parameter type thus helping OJB finding the correct constructor/method
> (in case of overload).
> 
> Now if I'd use plain Class.forName, the user would have to specify:
> 
> [LI
> 
> for this int array which is hardly user-friendly. The solution that I
> added, allows for the normal type specification as is used in variable
> declarations or for method parameters.
> 
> Tom
> 
> -
> 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]



RE: [lang] enhanced version of Class.forName

2005-09-05 Thread James Carman
I have the code added to ClassUtils in "lang" right now in my IDE.  What
would be a good name for the method, though?  I don't really like
"extendedForName."  What about "getCanonicalName"?  Any other suggestions?
We could just use "forName", but the distinction between the Class.forName()
and the ClassUtils.forName() wouldn't be that obvious.  

Would the "lang" folks care if I checked in this code (with test cases of
course) once we decide on what the name of the method should be (or whether
or not it should be in there in the first place)?

-Original Message-
From: Henri Yandell [mailto:[EMAIL PROTECTED] 
Sent: Monday, September 05, 2005 8:26 PM
To: Jakarta Commons Developers List; [EMAIL PROTECTED]
Subject: Re: [lang] enhanced version of Class.forName

Deja Vu :) +1

Jan-2005:http://mail-archives.apache.org/mod_mbox/jakarta-commons-dev/200501
.mbox/[EMAIL PROTECTED]
Feb-2005:http://mail-archives.apache.org/mod_mbox/jakarta-commons-dev/200502
.mbox/[EMAIL PROTECTED]

Various ClassLoader issues raised by Stephen, we agreed to hold off
until after 2.1; so now is a good time.

Hen

On 9/5/05, Thomas Dudziak <[EMAIL PROTECTED]> wrote:
> (Ups, only replied to Wade, not the list)
> 
> On 9/5/05, Wade Chandler <[EMAIL PROTECTED]> wrote:
> 
> > What's a use case for it Tom?  curious.
> 
> I just checked-in an enhancement for OJB that allows to specify which
> constructor/factory-method to utilize for constructing objects read
> from the database. These can have parameters which are described by
> corresponding parameter element:
> 
>  type="factory"
>   factory-class="org.apache.ojb.broker.ObjectTestFactory"
>   factory-method="createInstance"
>   >
> 
> 
>   
> 
> The optional type attribute allows the user to explicitly specify the
> parameter type thus helping OJB finding the correct constructor/method
> (in case of overload).
> 
> Now if I'd use plain Class.forName, the user would have to specify:
> 
> [LI
> 
> for this int array which is hardly user-friendly. The solution that I
> added, allows for the normal type specification as is used in variable
> declarations or for method parameters.
> 
> Tom
> 
> -
> 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: Commons not building

2005-09-05 Thread Phil Steitz
[pool] has a working maven build, but the ant build is hand-crafted and 
refers to unversioned jars that must depend on the build order (and which I 
don't think are still being created) - e.g.
property name="commons-collections.jar" 
value="${basedir}/../collections/dist/commons-collections.jar"/

Any objections if I check in a maven-generated build.xml for pool?

dbcp does not have a working maven build. There are test failures. 

Phil

On 9/4/05, netsql <[EMAIL PROTECTED]> wrote:
> 
> I wanted to try nightly Pool and DBCP.
> They are each 45 bytes.
> 
> help. tia,
> .V
> 
> 
> 
> -
> Broadband interface (RIA) + mail box saftey = http://Jakarta_Commons_Developer_List.roomity.com";>Roomity.com
> 
> *Your* clubs, no sign up to read, ad supported; try broadband internet. 
> ~~1125875112740~~
> 
> -
> 
>


svn commit: r278902 - in /jakarta/commons/sandbox/proxy/trunk/src: java/org/apache/commons/proxy/handler/NullInvocationHandler.java test/org/apache/commons/proxy/handler/TestNullInvocationHandler.java

2005-09-05 Thread jcarman
Author: jcarman
Date: Mon Sep  5 19:56:55 2005
New Revision: 278902

URL: http://svn.apache.org/viewcvs?rev=278902&view=rev
Log:
Added support for boolean values.

Modified:

jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/handler/NullInvocationHandler.java

jakarta/commons/sandbox/proxy/trunk/src/test/org/apache/commons/proxy/handler/TestNullInvocationHandler.java

Modified: 
jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/handler/NullInvocationHandler.java
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/handler/NullInvocationHandler.java?rev=278902&r1=278901&r2=278902&view=diff
==
--- 
jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/handler/NullInvocationHandler.java
 (original)
+++ 
jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/handler/NullInvocationHandler.java
 Mon Sep  5 19:56:55 2005
@@ -40,6 +40,7 @@
 primitiveValueMap.put( Float.TYPE, new Float( 0.0f ) );
 primitiveValueMap.put( Double.TYPE, new Double( 0.0 ) );
 primitiveValueMap.put( Character.TYPE, new Character( ( char )0 ) );
+primitiveValueMap.put( Boolean.TYPE, Boolean.FALSE );
 }
 
//--
 // InvocationHandler Implementation

Modified: 
jakarta/commons/sandbox/proxy/trunk/src/test/org/apache/commons/proxy/handler/TestNullInvocationHandler.java
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/sandbox/proxy/trunk/src/test/org/apache/commons/proxy/handler/TestNullInvocationHandler.java?rev=278902&r1=278901&r2=278902&view=diff
==
--- 
jakarta/commons/sandbox/proxy/trunk/src/test/org/apache/commons/proxy/handler/TestNullInvocationHandler.java
 (original)
+++ 
jakarta/commons/sandbox/proxy/trunk/src/test/org/apache/commons/proxy/handler/TestNullInvocationHandler.java
 Mon Sep  5 19:56:55 2005
@@ -31,6 +31,7 @@
 assertEquals( ( char )0, tester.charMethod() );
 assertEquals( 0.0f, tester.floatMethod() );
 assertEquals( 0.0, tester.doubleMethod() );
+assertFalse( tester.booleanMethod() );
 assertNull( tester.stringMethod() );
 }
 
@@ -44,5 +45,6 @@
 public double doubleMethod();
 public float floatMethod();
 public String stringMethod();
+public boolean booleanMethod();
 }
 }



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



RE: [lang] enhanced version of Class.forName

2005-09-05 Thread James Carman
The code in "clazz" looks somewhat similar to what I have, but they used a
bunch of if/else statements rather than maps to do what I did.  I personally
like my implementation a bit better (well, DUH), though.  I couldn't find
any code in "reflect" which did what we are looking to do.  The obvious
place for it would be in ClassUtils, but I didn't see anything. 

-Original Message-
From: Martin Cooper [mailto:[EMAIL PROTECTED] 
Sent: Monday, September 05, 2005 10:19 PM
To: Jakarta Commons Developers List
Cc: [EMAIL PROTECTED]
Subject: Re: [lang] enhanced version of Class.forName

This might be a good time to mention two dormant sandbox components that 
(tried to) address similar needs. One, at least, has a stated relationship 
with Lang.

http://svn.apache.org/viewcvs.cgi/jakarta/commons/dormant/clazz/trunk/
http://svn.apache.org/viewcvs.cgi/jakarta/commons/dormant/reflect/trunk/

--
Martin Cooper


On 9/5/05, James Carman <[EMAIL PROTECTED]> wrote:
> 
> I would say that this is something that would be very useful. We did
> something similar in HiveMind. I can imagine an implementation like:
> 
> private static Map typeMap = new HashMap();
> private static Map abbreviationMap = new HashMap();
> 
> static
> {
> typeMap.put( "int", Integer.TYPE );
> typeMap.put( "boolean", Boolean.TYPE );
> typeMap.put( "float", Float.TYPE );
> typeMap.put( "long", Long.TYPE );
> typeMap.put( "short", Short.TYPE );
> typeMap.put( "byte", Byte.TYPE );
> typeMap.put( "double", Double.TYPE );
> typeMap.put( "char", Character.TYPE );
> 
> abbreviationMap.put( "int", "I" );
> abbreviationMap.put( "boolean", "Z" );
> abbreviationMap.put( "float", "F" );
> abbreviationMap.put( "long", "J" );
> abbreviationMap.put( "short", "S" );
> abbreviationMap.put( "byte", "B" );
> abbreviationMap.put( "double", "D" );
> abbreviationMap.put( "char", "C" );
> }
> 
> public static Class enhancedForName( String className ) throws
> ClassNotFoundException
> {
> Class clazz = ( Class )typeMap.get( className );
> if( clazz == null )
> {
> if( className.endsWith( "[]" ) )
> {
> final StringBuffer actualNameBuffer = new StringBuffer();
> while( className.endsWith( "[]" ) )
> {
> className = className.substring( 0, className.length() - 2 );
> actualNameBuffer.append( "[" );
> }
> final String abbreviation = ( String )abbreviationMap.get( className
> );
> if( abbreviation != null )
> {
> actualNameBuffer.append( abbreviation );
> }
> else
> {
> actualNameBuffer.append( "L" + className + ";" );
> }
> clazz = Class.forName( actualNameBuffer.toString() );
> }
> else
> {
> clazz = Class.forName( className );
> }
> }
> return clazz;
> }
> 
> -Original Message-
> From: Thomas Dudziak [mailto:[EMAIL PROTECTED]
> Sent: Monday, September 05, 2005 5:05 PM
> To: Jakarta Commons Developers List
> Subject: [lang] enhanced version of Class.forName
> 
> Hi folks,
> 
> I had this problem that I needed to create class objects for things
> like "int" and "boolean", eg. the type specification that you would
> use for a variable declaration or method parameter.
> Since the normal Class.forName does not handle this really well, and
> commons-lang does not provide such a function (please correct me if
> I'm wrong here), I implemented it myself.
> Now I wonder, would this be useful enhancement to ClassUtils ? If so,
> I could provide a patch in BugZilla.
> 
> regards,
> Tom
> 
> -
> 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: [lang] enhanced version of Class.forName

2005-09-05 Thread Martin Cooper
This might be a good time to mention two dormant sandbox components that 
(tried to) address similar needs. One, at least, has a stated relationship 
with Lang.

http://svn.apache.org/viewcvs.cgi/jakarta/commons/dormant/clazz/trunk/
http://svn.apache.org/viewcvs.cgi/jakarta/commons/dormant/reflect/trunk/

--
Martin Cooper


On 9/5/05, James Carman <[EMAIL PROTECTED]> wrote:
> 
> I would say that this is something that would be very useful. We did
> something similar in HiveMind. I can imagine an implementation like:
> 
> private static Map typeMap = new HashMap();
> private static Map abbreviationMap = new HashMap();
> 
> static
> {
> typeMap.put( "int", Integer.TYPE );
> typeMap.put( "boolean", Boolean.TYPE );
> typeMap.put( "float", Float.TYPE );
> typeMap.put( "long", Long.TYPE );
> typeMap.put( "short", Short.TYPE );
> typeMap.put( "byte", Byte.TYPE );
> typeMap.put( "double", Double.TYPE );
> typeMap.put( "char", Character.TYPE );
> 
> abbreviationMap.put( "int", "I" );
> abbreviationMap.put( "boolean", "Z" );
> abbreviationMap.put( "float", "F" );
> abbreviationMap.put( "long", "J" );
> abbreviationMap.put( "short", "S" );
> abbreviationMap.put( "byte", "B" );
> abbreviationMap.put( "double", "D" );
> abbreviationMap.put( "char", "C" );
> }
> 
> public static Class enhancedForName( String className ) throws
> ClassNotFoundException
> {
> Class clazz = ( Class )typeMap.get( className );
> if( clazz == null )
> {
> if( className.endsWith( "[]" ) )
> {
> final StringBuffer actualNameBuffer = new StringBuffer();
> while( className.endsWith( "[]" ) )
> {
> className = className.substring( 0, className.length() - 2 );
> actualNameBuffer.append( "[" );
> }
> final String abbreviation = ( String )abbreviationMap.get( className
> );
> if( abbreviation != null )
> {
> actualNameBuffer.append( abbreviation );
> }
> else
> {
> actualNameBuffer.append( "L" + className + ";" );
> }
> clazz = Class.forName( actualNameBuffer.toString() );
> }
> else
> {
> clazz = Class.forName( className );
> }
> }
> return clazz;
> }
> 
> -Original Message-
> From: Thomas Dudziak [mailto:[EMAIL PROTECTED]
> Sent: Monday, September 05, 2005 5:05 PM
> To: Jakarta Commons Developers List
> Subject: [lang] enhanced version of Class.forName
> 
> Hi folks,
> 
> I had this problem that I needed to create class objects for things
> like "int" and "boolean", eg. the type specification that you would
> use for a variable declaration or method parameter.
> Since the normal Class.forName does not handle this really well, and
> commons-lang does not provide such a function (please correct me if
> I'm wrong here), I implemented it myself.
> Now I wonder, would this be useful enhancement to ClassUtils ? If so,
> I could provide a patch in BugZilla.
> 
> regards,
> Tom
> 
> -
> 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: [lang] enhanced version of Class.forName

2005-09-05 Thread James Carman
I would say that this is something that would be very useful.  We did
something similar in HiveMind.  I can imagine an implementation like:

private static Map typeMap = new HashMap();
private static Map abbreviationMap = new HashMap();

static
{
  typeMap.put( "int", Integer.TYPE );
  typeMap.put( "boolean", Boolean.TYPE );
  typeMap.put( "float", Float.TYPE );
  typeMap.put( "long", Long.TYPE );
  typeMap.put( "short", Short.TYPE );
  typeMap.put( "byte", Byte.TYPE );
  typeMap.put( "double", Double.TYPE );
  typeMap.put( "char", Character.TYPE );

  abbreviationMap.put( "int", "I" );
  abbreviationMap.put( "boolean", "Z" );
  abbreviationMap.put( "float", "F" );
  abbreviationMap.put( "long", "J" );
  abbreviationMap.put( "short", "S" );
  abbreviationMap.put( "byte", "B" );
  abbreviationMap.put( "double", "D" );
  abbreviationMap.put( "char", "C" );
}

public static Class enhancedForName( String className ) throws
ClassNotFoundException
{
  Class clazz = ( Class )typeMap.get( className );
  if( clazz == null )
  {
if( className.endsWith( "[]" ) )
{
  final StringBuffer actualNameBuffer = new StringBuffer();
  while( className.endsWith( "[]" ) )
  {
className = className.substring( 0, className.length() - 2 );
actualNameBuffer.append( "[" );
  }
  final String abbreviation = ( String )abbreviationMap.get( className
);
  if( abbreviation != null )
  {
actualNameBuffer.append( abbreviation );
  }
  else
  {
actualNameBuffer.append( "L" + className + ";" );  
  }
  clazz = Class.forName( actualNameBuffer.toString() );
}
else
{
  clazz = Class.forName( className );
}
  }
  return clazz;
}

-Original Message-
From: Thomas Dudziak [mailto:[EMAIL PROTECTED] 
Sent: Monday, September 05, 2005 5:05 PM
To: Jakarta Commons Developers List
Subject: [lang] enhanced version of Class.forName

Hi folks,

I had this problem that I needed to create class objects for things
like "int" and "boolean", eg. the type specification that you would
use for a variable declaration or method parameter.
Since the normal Class.forName does not handle this really well, and
commons-lang does not provide such a function (please correct me if
I'm wrong here), I implemented it myself.
Now I wonder, would this be useful enhancement to ClassUtils ? If so,
I could provide a patch in BugZilla.

regards,
Tom

-
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: [lang] enhanced version of Class.forName

2005-09-05 Thread Henri Yandell
Deja Vu :) +1

Jan-2005:http://mail-archives.apache.org/mod_mbox/jakarta-commons-dev/200501.mbox/[EMAIL
 PROTECTED]
Feb-2005:http://mail-archives.apache.org/mod_mbox/jakarta-commons-dev/200502.mbox/[EMAIL
 PROTECTED]

Various ClassLoader issues raised by Stephen, we agreed to hold off
until after 2.1; so now is a good time.

Hen

On 9/5/05, Thomas Dudziak <[EMAIL PROTECTED]> wrote:
> (Ups, only replied to Wade, not the list)
> 
> On 9/5/05, Wade Chandler <[EMAIL PROTECTED]> wrote:
> 
> > What's a use case for it Tom?  curious.
> 
> I just checked-in an enhancement for OJB that allows to specify which
> constructor/factory-method to utilize for constructing objects read
> from the database. These can have parameters which are described by
> corresponding parameter element:
> 
>  type="factory"
>   factory-class="org.apache.ojb.broker.ObjectTestFactory"
>   factory-method="createInstance"
>   >
> 
> 
>   
> 
> The optional type attribute allows the user to explicitly specify the
> parameter type thus helping OJB finding the correct constructor/method
> (in case of overload).
> 
> Now if I'd use plain Class.forName, the user would have to specify:
> 
> [LI
> 
> for this int array which is hardly user-friendly. The solution that I
> added, allows for the normal type specification as is used in variable
> declarations or for method parameters.
> 
> Tom
> 
> -
> 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]



svn commit: r278885 - /jakarta/commons/proper/cli/trunk/src/test/org/apache/commons/cli2/util/HelpFormatterTest.java

2005-09-05 Thread jkeyes
Author: jkeyes
Date: Mon Sep  5 16:34:50 2005
New Revision: 278885

URL: http://svn.apache.org/viewcvs?rev=278885&view=rev
Log:
- added comparator test

Modified:

jakarta/commons/proper/cli/trunk/src/test/org/apache/commons/cli2/util/HelpFormatterTest.java

Modified: 
jakarta/commons/proper/cli/trunk/src/test/org/apache/commons/cli2/util/HelpFormatterTest.java
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/proper/cli/trunk/src/test/org/apache/commons/cli2/util/HelpFormatterTest.java?rev=278885&r1=278884&r2=278885&view=diff
==
--- 
jakarta/commons/proper/cli/trunk/src/test/org/apache/commons/cli2/util/HelpFormatterTest.java
 (original)
+++ 
jakarta/commons/proper/cli/trunk/src/test/org/apache/commons/cli2/util/HelpFormatterTest.java
 Mon Sep  5 16:34:50 2005
@@ -21,6 +21,7 @@
 import java.io.StringReader;
 import java.io.StringWriter;
 import java.util.Collections;
+import java.util.Comparator;
 import java.util.HashSet;
 import java.util.Iterator;
 import java.util.List;
@@ -168,6 +169,75 @@
 assertNull(reader.readLine());
 }
 
+public void testComparator() throws IOException {
+final StringWriter writer = new StringWriter();
+final PrintWriter pw = new PrintWriter(writer);
+helpFormatter.setPrintWriter(pw);
+final Comparator comparator = new OptionComparator();
+helpFormatter.setComparator(comparator);
+helpFormatter.print();
+
+// test comparator
+assertEquals("invalid comparator", comparator, 
helpFormatter.getComparator());
+final BufferedReader reader =
+new BufferedReader(new StringReader(writer.toString()));
+assertEquals(
+
"+--+",
+reader.readLine());
+assertEquals(
+"|*Jakarta Commons CLI 
*|",
+reader.readLine());
+assertEquals(
+
"+--+",
+reader.readLine());
+assertEquals(
+"|*Usage:  
*|",
+reader.readLine());
+assertEquals(
+"|*ant [--verbose --projecthelp --help --diagnostics] [ 
[*|",
+reader.readLine());
+assertEquals(
+"|*...]]   
*|",
+reader.readLine());
+assertEquals(
+
"+--+",
+reader.readLine());
+assertEquals(
+"|*options  *-*
*|",
+reader.readLine());
+assertEquals(
+"|*  --verbose  *-*print the version information and exit  
*|",
+reader.readLine());
+assertEquals(
+"|*  --projecthelp  *-*print project help information  
*|",
+reader.readLine());
+assertEquals(
+"|*  --help (-?,-h) *-*Displays the help   
*|",
+reader.readLine());
+assertEquals(
+"|*  --diagnostics  *-*print information that might be helpful 
to diagnose *|",
+reader.readLine());
+assertEquals(
+"|* *-*or report problems. 
*|",
+reader.readLine());
+assertEquals(
+"|*  target [target ...]*-*The targets ant should build
*|",
+reader.readLine());
+assertEquals(
+
"+--+",
+reader.readLine());
+assertEquals(
+"|*Copyright 2003  
*|",
+reader.readLine());
+assertEquals(
+"|*Apache Software Foundation  
*|",
+reader.readLine());
+assertEquals(
+
"+--+",
+reader.readLine());
+assertNull(reader.readLine());
+}
+
 public void testPrintHelp() throws IOException {
 final StringWriter writer = new StringWriter();
 helpFormatter.setPrintWriter(new PrintWriter(writer));
@@ -528,5 +598,15 @@
 "  target [target ...]The targets ant should build 
  ",
 reader.readLine());
 assertNull(reader.readLine());
+}
+}
+
+
+class OptionComparator implements Comparator {
+
+public int compare(Object o1, Obj

svn commit: r278882 - in /jakarta/commons/proper/cli/trunk/src: java/org/apache/commons/cli2/util/HelpFormatter.java test/org/apache/commons/cli2/util/HelpFormatterTest.java

2005-09-05 Thread jkeyes
Author: jkeyes
Date: Mon Sep  5 16:18:36 2005
New Revision: 278882

URL: http://svn.apache.org/viewcvs?rev=278882&view=rev
Log:
- added more HelpFormatter tests

- fixed default gutter bug

Modified:

jakarta/commons/proper/cli/trunk/src/java/org/apache/commons/cli2/util/HelpFormatter.java

jakarta/commons/proper/cli/trunk/src/test/org/apache/commons/cli2/util/HelpFormatterTest.java

Modified: 
jakarta/commons/proper/cli/trunk/src/java/org/apache/commons/cli2/util/HelpFormatter.java
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/proper/cli/trunk/src/java/org/apache/commons/cli2/util/HelpFormatter.java?rev=278882&r1=278881&r2=278882&view=diff
==
--- 
jakarta/commons/proper/cli/trunk/src/java/org/apache/commons/cli2/util/HelpFormatter.java
 (original)
+++ 
jakarta/commons/proper/cli/trunk/src/java/org/apache/commons/cli2/util/HelpFormatter.java
 Mon Sep  5 16:18:36 2005
@@ -145,34 +145,20 @@
 final int fullWidth) {
 
 // default the left gutter to empty string
-if (gutterLeft == null) {
-this.gutterLeft = "";
-}
-else {
-this.gutterLeft = gutterLeft;
-}
+this.gutterLeft = (gutterLeft == null) ? DEFAULT_GUTTER_LEFT : 
gutterLeft;
 
-// default the center gutter to empty string
-if (gutterCenter == null) {
-this.gutterCenter = "";
-}
-else {
-this.gutterCenter = gutterCenter;
-}
+// default the center gutter to a single space
+this.gutterCenter = (gutterCenter == null) ? DEFAULT_GUTTER_CENTER : 
gutterCenter;
 
 // default the right gutter to empty string
-if (gutterRight == null) {
-this.gutterRight = "";
-}
-else {
-this.gutterRight = gutterRight;
-}
+this.gutterRight = (gutterRight == null) ? DEFAULT_GUTTER_RIGHT : 
gutterRight;
 
 // calculate the available page width
-this.pageWidth = fullWidth - gutterLeft.length() - 
gutterRight.length();
+this.pageWidth = fullWidth - this.gutterLeft.length() - 
this.gutterRight.length();
 
 // check available page width is valid
-if (fullWidth - pageWidth + gutterCenter.length() < 2) {
+int availableWidth = fullWidth - pageWidth + 
this.gutterCenter.length(); 
+if ( availableWidth < 2 ) {
 throw new IllegalArgumentException(
 "The gutter strings leave no space for output! "
 + "Supply shorter gutters or more width.");

Modified: 
jakarta/commons/proper/cli/trunk/src/test/org/apache/commons/cli2/util/HelpFormatterTest.java
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/proper/cli/trunk/src/test/org/apache/commons/cli2/util/HelpFormatterTest.java?rev=278882&r1=278881&r2=278882&view=diff
==
--- 
jakarta/commons/proper/cli/trunk/src/test/org/apache/commons/cli2/util/HelpFormatterTest.java
 (original)
+++ 
jakarta/commons/proper/cli/trunk/src/test/org/apache/commons/cli2/util/HelpFormatterTest.java
 Mon Sep  5 16:18:36 2005
@@ -20,11 +20,15 @@
 import java.io.PrintWriter;
 import java.io.StringReader;
 import java.io.StringWriter;
+import java.util.Collections;
+import java.util.HashSet;
 import java.util.Iterator;
 import java.util.List;
+import java.util.Set;
 
 import junit.framework.TestCase;
 
+import org.apache.commons.cli2.DisplaySetting;
 import org.apache.commons.cli2.Group;
 import org.apache.commons.cli2.Option;
 import org.apache.commons.cli2.OptionException;
@@ -74,10 +78,36 @@
 
 public void testPrint() throws IOException {
 final StringWriter writer = new StringWriter();
-helpFormatter.setPrintWriter(new PrintWriter(writer));
+final PrintWriter pw = new PrintWriter(writer);
+helpFormatter.setPrintWriter(pw);
 helpFormatter.print();
 
-//System.out.println(writer.toString());
+// test group
+assertEquals("incorrect group", this.options, 
helpFormatter.getGroup());
+
+// test pagewidth
+assertEquals("incorrect page width", 76, helpFormatter.getPageWidth());
+
+// test pw
+assertEquals("incorrect print writer", pw, 
helpFormatter.getPrintWriter());
+
+// test divider
+assertEquals("incorrect divider", 
+
"+--+",
+helpFormatter.getDivider());
+
+// test header
+assertEquals("incorrect header", "Jakarta Commons CLI", 
helpFormatter.getHeader());
+
+// test footer
+assertEquals("incorrect footer", "Copyright 2003\nApache Software 
Foundation",
+helpFormatter.getFooter());
+
+// test gutters
+assertEquals("incorrect left gutter", "|*", 
helpFormatter.getGutterLeft());
+  

[EMAIL PROTECTED]: Project commons-vfs (in module jakarta-commons) failed

2005-09-05 Thread commons-vfs development
To whom it may engage...

This is an automated request, but not an unsolicited one. For 
more information please visit http://gump.apache.org/nagged.html, 
and/or contact the folk at [EMAIL PROTECTED]

Project commons-vfs has an issue affecting its community integration.
This issue affects 57 projects.
The current state of this project is 'Failed', with reason 'Build Failed'.
For reference only, the following projects are affected by this:
- cocoon :  Java XML Framework
- cocoon-block-apples :  Java XML Framework
- cocoon-block-asciiart :  Java XML Framework
- cocoon-block-authentication-fw :  Java XML Framework
- cocoon-block-axis :  Java XML Framework
- cocoon-block-batik :  Java XML Framework
- cocoon-block-bsf :  Java XML Framework
- cocoon-block-chaperon :  Java XML Framework
- cocoon-block-cron :  Java XML Framework
- cocoon-block-databases :  Java XML Framework
- cocoon-block-deli :  Java XML Framework
- cocoon-block-eventcache :  Java XML Framework
- cocoon-block-fop :  Java XML Framework
- cocoon-block-forms :  Java XML Framework
- cocoon-block-hsqldb :  Java XML Framework
- cocoon-block-html :  Java XML Framework
- cocoon-block-itext :  Java XML Framework
- cocoon-block-jcr :  A "jcr:" protocol for Cocoon
- cocoon-block-jfor :  Java XML Framework
- cocoon-block-jms :  Java XML Framework
- cocoon-block-jsp :  Java XML Framework
- cocoon-block-linkrewriter :  Java XML Framework
- cocoon-block-lucene :  Java XML Framework
- cocoon-block-midi :  Java XML Framework
- cocoon-block-naming :  Java XML Framework
- cocoon-block-ojb :  Java XML Framework
- cocoon-block-paranoid :  Java XML Framework
- cocoon-block-petstore :  Java XML Framework
- cocoon-block-portal :  Java XML Framework
- cocoon-block-profiler :  Java XML Framework
- cocoon-block-proxy :  Java XML Framework
- cocoon-block-python :  Java XML Framework
- cocoon-block-qdox :  Java XML Framework
- cocoon-block-querybean :  Java XML Framework
- cocoon-block-repository :  Java XML Framework
- cocoon-block-serializers :  Java XML Framework
- cocoon-block-session-fw :  Java XML Framework
- cocoon-block-slop :  Java XML Framework
- cocoon-block-spring-app :  A demo for Spring and Cocoon
- cocoon-block-stx :  Java XML Framework
- cocoon-block-taglib :  Java XML Framework
- cocoon-block-template :  Java XML Framework
- cocoon-block-tour :  Java XML Framework
- cocoon-block-velocity :  Java XML Framework
- cocoon-block-web3 :  Java XML Framework
- cocoon-block-xmldb :  Java XML Framework
- cocoon-block-xsp :  Java XML Framework
- commons-vfs :  Jakarta commons
- excalibur-fortress-bean :  Repository of reusable components.
- excalibur-fortress-container-impl :  Repository of reusable components.
- excalibur-fortress-container-test :  Repository of reusable components.
- excalibur-monitor :  Repository of reusable components.
- excalibur-sourceresolve :  Repository of reusable components.
- excalibur-xmlutil :  Repository of reusable components.
- forrest :  Apache Forrest is an XML standards-oriented documentation fr...
- forrest-test :  Apache Forrest is an XML standards-oriented documentation 
fr...
- logging-log4j-chainsaw :  Chainsaw log viewer


Full details are available at:
http://vmgump.apache.org/gump/public/jakarta-commons/commons-vfs/index.html

That said, some information snippets are provided here.

The following annotations (debug/informational/warning/error messages) were 
provided:
 -DEBUG- Sole output [commons-vfs-05092005.jar] identifier set to project name
 -INFO- Failed with reason build failed
 -DEBUG- Extracted fallback artifacts from Gump Repository



The following work was performed:
http://vmgump.apache.org/gump/public/jakarta-commons/commons-vfs/gump_work/build_jakarta-commons_commons-vfs.html
Work Name: build_jakarta-commons_commons-vfs (Type: Build)
Work ended in a state of : Failed
Elapsed: 4 secs
Command Line: java -Djava.awt.headless=true 
-Xbootclasspath/p:/usr/local/gump/public/workspace/xml-commons/java/external/build/xml-apis.jar:/usr/local/gump/public/workspace/xml-xerces2/java/build/xercesImpl.jar
 org.apache.tools.ant.Main -Dgump.merge=/x1/gump/public/gump/work/merge.xml 
-Dbuild.sysclasspath=only -Dfinal.name=commons-vfs-05092005 dist 
[Working Directory: /usr/local/gump/public/workspace/jakarta-commons/vfs]
CLASSPATH: 
/opt/jdk1.4/lib/tools.jar:/usr/local/gump/public/workspace/jakarta-commons/vfs/target/classes:/usr/local/gump/public/workspace/ant/dist/lib/ant-jmf.jar:/usr/local/gump/public/workspace/ant/dist/lib/ant-swing.jar:/usr/local/gump/public/workspace/ant/dist/lib/ant-apache-resolver.jar:/usr/local/gump/public/workspace/ant/dist/lib/ant-trax.jar:/usr/local/gump/public/workspace/ant/dist/lib/ant-junit.jar:/usr/local/gump/public/workspace/ant/dist/lib/ant-launcher.jar:/

[EMAIL PROTECTED]: Project commons-vfs (in module jakarta-commons) failed

2005-09-05 Thread commons-vfs development
To whom it may engage...

This is an automated request, but not an unsolicited one. For 
more information please visit http://gump.apache.org/nagged.html, 
and/or contact the folk at [EMAIL PROTECTED]

Project commons-vfs has an issue affecting its community integration.
This issue affects 57 projects.
The current state of this project is 'Failed', with reason 'Build Failed'.
For reference only, the following projects are affected by this:
- cocoon :  Java XML Framework
- cocoon-block-apples :  Java XML Framework
- cocoon-block-asciiart :  Java XML Framework
- cocoon-block-authentication-fw :  Java XML Framework
- cocoon-block-axis :  Java XML Framework
- cocoon-block-batik :  Java XML Framework
- cocoon-block-bsf :  Java XML Framework
- cocoon-block-chaperon :  Java XML Framework
- cocoon-block-cron :  Java XML Framework
- cocoon-block-databases :  Java XML Framework
- cocoon-block-deli :  Java XML Framework
- cocoon-block-eventcache :  Java XML Framework
- cocoon-block-fop :  Java XML Framework
- cocoon-block-forms :  Java XML Framework
- cocoon-block-hsqldb :  Java XML Framework
- cocoon-block-html :  Java XML Framework
- cocoon-block-itext :  Java XML Framework
- cocoon-block-jcr :  A "jcr:" protocol for Cocoon
- cocoon-block-jfor :  Java XML Framework
- cocoon-block-jms :  Java XML Framework
- cocoon-block-jsp :  Java XML Framework
- cocoon-block-linkrewriter :  Java XML Framework
- cocoon-block-lucene :  Java XML Framework
- cocoon-block-midi :  Java XML Framework
- cocoon-block-naming :  Java XML Framework
- cocoon-block-ojb :  Java XML Framework
- cocoon-block-paranoid :  Java XML Framework
- cocoon-block-petstore :  Java XML Framework
- cocoon-block-portal :  Java XML Framework
- cocoon-block-profiler :  Java XML Framework
- cocoon-block-proxy :  Java XML Framework
- cocoon-block-python :  Java XML Framework
- cocoon-block-qdox :  Java XML Framework
- cocoon-block-querybean :  Java XML Framework
- cocoon-block-repository :  Java XML Framework
- cocoon-block-serializers :  Java XML Framework
- cocoon-block-session-fw :  Java XML Framework
- cocoon-block-slop :  Java XML Framework
- cocoon-block-spring-app :  A demo for Spring and Cocoon
- cocoon-block-stx :  Java XML Framework
- cocoon-block-taglib :  Java XML Framework
- cocoon-block-template :  Java XML Framework
- cocoon-block-tour :  Java XML Framework
- cocoon-block-velocity :  Java XML Framework
- cocoon-block-web3 :  Java XML Framework
- cocoon-block-xmldb :  Java XML Framework
- cocoon-block-xsp :  Java XML Framework
- commons-vfs :  Jakarta commons
- excalibur-fortress-bean :  Repository of reusable components.
- excalibur-fortress-container-impl :  Repository of reusable components.
- excalibur-fortress-container-test :  Repository of reusable components.
- excalibur-monitor :  Repository of reusable components.
- excalibur-sourceresolve :  Repository of reusable components.
- excalibur-xmlutil :  Repository of reusable components.
- forrest :  Apache Forrest is an XML standards-oriented documentation fr...
- forrest-test :  Apache Forrest is an XML standards-oriented documentation 
fr...
- logging-log4j-chainsaw :  Chainsaw log viewer


Full details are available at:
http://vmgump.apache.org/gump/public/jakarta-commons/commons-vfs/index.html

That said, some information snippets are provided here.

The following annotations (debug/informational/warning/error messages) were 
provided:
 -DEBUG- Sole output [commons-vfs-05092005.jar] identifier set to project name
 -INFO- Failed with reason build failed
 -DEBUG- Extracted fallback artifacts from Gump Repository



The following work was performed:
http://vmgump.apache.org/gump/public/jakarta-commons/commons-vfs/gump_work/build_jakarta-commons_commons-vfs.html
Work Name: build_jakarta-commons_commons-vfs (Type: Build)
Work ended in a state of : Failed
Elapsed: 4 secs
Command Line: java -Djava.awt.headless=true 
-Xbootclasspath/p:/usr/local/gump/public/workspace/xml-commons/java/external/build/xml-apis.jar:/usr/local/gump/public/workspace/xml-xerces2/java/build/xercesImpl.jar
 org.apache.tools.ant.Main -Dgump.merge=/x1/gump/public/gump/work/merge.xml 
-Dbuild.sysclasspath=only -Dfinal.name=commons-vfs-05092005 dist 
[Working Directory: /usr/local/gump/public/workspace/jakarta-commons/vfs]
CLASSPATH: 
/opt/jdk1.4/lib/tools.jar:/usr/local/gump/public/workspace/jakarta-commons/vfs/target/classes:/usr/local/gump/public/workspace/ant/dist/lib/ant-jmf.jar:/usr/local/gump/public/workspace/ant/dist/lib/ant-swing.jar:/usr/local/gump/public/workspace/ant/dist/lib/ant-apache-resolver.jar:/usr/local/gump/public/workspace/ant/dist/lib/ant-trax.jar:/usr/local/gump/public/workspace/ant/dist/lib/ant-junit.jar:/usr/local/gump/public/workspace/ant/dist/lib/ant-launcher.jar:/

svn commit: r278880 - in /jakarta/commons/sandbox/proxy/trunk/src: java/org/apache/commons/proxy/factory/util/ java/org/apache/commons/proxy/handler/ java/org/apache/commons/proxy/interceptor/ test/or

2005-09-05 Thread jcarman
Author: jcarman
Date: Mon Sep  5 15:58:17 2005
New Revision: 278880

URL: http://svn.apache.org/viewcvs?rev=278880&view=rev
Log:
Improving test coverage.

Added:

jakarta/commons/sandbox/proxy/trunk/src/test/org/apache/commons/proxy/handler/

jakarta/commons/sandbox/proxy/trunk/src/test/org/apache/commons/proxy/handler/TestNullInvocationHandler.java
   (with props)

jakarta/commons/sandbox/proxy/trunk/src/test/org/apache/commons/proxy/interceptor/filter/TestReturnTypeFilter.java
   (with props)
Modified:

jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/factory/util/AbstractSubclassingProxyFactory.java

jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/handler/NullInvocationHandler.java

jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/interceptor/AbstractMethodInterceptor.java

jakarta/commons/sandbox/proxy/trunk/src/test/org/apache/commons/proxy/TestProxyUtils.java

jakarta/commons/sandbox/proxy/trunk/src/test/org/apache/commons/proxy/factory/AbstractSubclassingProxyFactoryTestCase.java

Modified: 
jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/factory/util/AbstractSubclassingProxyFactory.java
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/factory/util/AbstractSubclassingProxyFactory.java?rev=278880&r1=278879&r2=278880&view=diff
==
--- 
jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/factory/util/AbstractSubclassingProxyFactory.java
 (original)
+++ 
jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/factory/util/AbstractSubclassingProxyFactory.java
 Mon Sep  5 15:58:17 2005
@@ -87,6 +87,7 @@
 
 /**
  * Returns true if a suitable superclass can be found, given the desired 
proxyClasses.
+ *
  * @param proxyClasses the proxy classes
  * @return true if a suitable superclass can be found, given the desired 
proxyClasses
  */

Modified: 
jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/handler/NullInvocationHandler.java
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/handler/NullInvocationHandler.java?rev=278880&r1=278879&r2=278880&view=diff
==
--- 
jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/handler/NullInvocationHandler.java
 (original)
+++ 
jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/handler/NullInvocationHandler.java
 Mon Sep  5 15:58:17 2005
@@ -18,6 +18,8 @@
 
 import java.lang.reflect.InvocationHandler;
 import java.lang.reflect.Method;
+import java.util.HashMap;
+import java.util.Map;
 
 /**
  * An [EMAIL PROTECTED] InvocationHandler} implementation which merely returns 
null for all method invocations.  This class is
@@ -28,6 +30,17 @@
  */
 public class NullInvocationHandler implements InvocationHandler
 {
+private static Map primitiveValueMap = new 
HashMap();
+static
+{
+primitiveValueMap.put( Integer.TYPE, new Integer( 0 ) );
+primitiveValueMap.put( Long.TYPE, new Long( 0 ) );
+primitiveValueMap.put( Short.TYPE, new Short( ( short )0 ) );
+primitiveValueMap.put( Byte.TYPE, new Byte( ( byte )0 ) );
+primitiveValueMap.put( Float.TYPE, new Float( 0.0f ) );
+primitiveValueMap.put( Double.TYPE, new Double( 0.0 ) );
+primitiveValueMap.put( Character.TYPE, new Character( ( char )0 ) );
+}
 
//--
 // InvocationHandler Implementation
 
//--
@@ -37,35 +50,7 @@
 final Class returnType = method.getReturnType();
 if( returnType.isPrimitive() )
 {
-if( Integer.TYPE.equals( returnType ) )
-{
-return 0;
-}
-else if( Long.TYPE.equals( returnType ) )
-{
-return 0L;
-}
-else if( Double.TYPE.equals( returnType ) )
-{
-return 0.0;
-}
-else if( Float.TYPE.equals( returnType ) )
-{
-return 0.0f;
-}
-else if( Short.TYPE.equals( returnType ) )
-{
-return ( short )0;
-}
-else if( Character.TYPE.equals( returnType ) )
-{
-return ( char )0;
-}
-else if( Byte.TYPE.equals( returnType ) )
-{
-return ( byte )0;
-}
-return 0;
+return primitiveValueMap.get( returnType );
 }
 else
 {

Modif

DO NOT REPLY [Bug 36363] - [betwixt] Multiple polymorphic collections don't work

2005-09-05 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
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=36363


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |ASSIGNED




--- Additional Comments From [EMAIL PROTECTED]  2005-09-05 23:58 ---
This is a little interesting...

Need to go through and retry all the other candidate polymorphic descriptors if
the first doesn't match. But there's not really anywhere good to do this...

Nearly there but going to need to a little more time to debug some 
sideeffects...

-- 
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]



svn commit: r278863 - in /jakarta/commons/proper/cli/trunk/src/test/org/apache/commons/cli2/validation: FileValidatorTest.java UrlValidatorTest.java

2005-09-05 Thread jkeyes
Author: jkeyes
Date: Mon Sep  5 14:51:40 2005
New Revision: 278863

URL: http://svn.apache.org/viewcvs?rev=278863&view=rev
Log:
- add tests for UrlValidator

- fix FileValidator hidden file test

Modified:

jakarta/commons/proper/cli/trunk/src/test/org/apache/commons/cli2/validation/FileValidatorTest.java

jakarta/commons/proper/cli/trunk/src/test/org/apache/commons/cli2/validation/UrlValidatorTest.java

Modified: 
jakarta/commons/proper/cli/trunk/src/test/org/apache/commons/cli2/validation/FileValidatorTest.java
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/proper/cli/trunk/src/test/org/apache/commons/cli2/validation/FileValidatorTest.java?rev=278863&r1=278862&r2=278863&view=diff
==
--- 
jakarta/commons/proper/cli/trunk/src/test/org/apache/commons/cli2/validation/FileValidatorTest.java
 (original)
+++ 
jakarta/commons/proper/cli/trunk/src/test/org/apache/commons/cli2/validation/FileValidatorTest.java
 Mon Sep  5 14:51:40 2005
@@ -121,7 +121,7 @@
 // make file hidden on Windows
 attribute("H");
 
-final Object[] array = new Object[] { ".hidden", "src" };
+final Object[] array = new Object[] { "src/test/data/.hidden.txt", 
"src" };
 final List list = Arrays.asList(array);
 final FileValidator validator = 
FileValidator.getExistingFileInstance();
 validator.setHidden(true);

Modified: 
jakarta/commons/proper/cli/trunk/src/test/org/apache/commons/cli2/validation/UrlValidatorTest.java
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/proper/cli/trunk/src/test/org/apache/commons/cli2/validation/UrlValidatorTest.java?rev=278863&r1=278862&r2=278863&view=diff
==
--- 
jakarta/commons/proper/cli/trunk/src/test/org/apache/commons/cli2/validation/UrlValidatorTest.java
 (original)
+++ 
jakarta/commons/proper/cli/trunk/src/test/org/apache/commons/cli2/validation/UrlValidatorTest.java
 Mon Sep  5 14:51:40 2005
@@ -37,19 +37,49 @@
 assertEquals(new URL("file:///etc"), i.next());
 assertFalse(i.hasNext());
 }
-
-public void testBadProtocol() {
-final Object[] array = new Object[] { "http://www.apache.org/";, 
"file:///etc"};
+
+public void testMalformedURL() throws InvalidArgumentException, 
MalformedURLException {
+final Object[] array = new Object[] { "www.apache.org"};
 final List list = Arrays.asList(array);
-final UrlValidator validator = new UrlValidator();
-validator.setProtocol("http");
+final Validator validator = new UrlValidator();
 
-try{
+try {
 validator.validate(list);
-fail("Expected InvalidArgumentException");
 }
 catch(InvalidArgumentException e){
-assertEquals("file:///etc",e.getMessage());
+assertEquals("Cannot understand url: 
www.apache.org",e.getMessage());
+}
+
+}
+
+public void testBadProtocol() {
+{
+final Object[] array = new Object[] { "http://www.apache.org/";, 
"file:///etc"};
+final List list = Arrays.asList(array);
+final UrlValidator validator = new UrlValidator();
+validator.setProtocol("http");
+
+assertEquals("incorrect protocol", "http", 
validator.getProtocol());
+try{
+validator.validate(list);
+fail("Expected InvalidArgumentException");
+}
+catch(InvalidArgumentException e){
+assertEquals("file:///etc",e.getMessage());
+}
+}
+{
+final Object[] array = new Object[] { "http://www.apache.org/";, 
"file:///etc"};
+final List list = Arrays.asList(array);
+final UrlValidator validator = new UrlValidator("http");
+
+try{
+validator.validate(list);
+fail("Expected InvalidArgumentException");
+}
+catch(InvalidArgumentException e){
+assertEquals("file:///etc",e.getMessage());
+}
 }
 }
 }



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



Re: [lang] enhanced version of Class.forName

2005-09-05 Thread Thomas Dudziak
(Ups, only replied to Wade, not the list)

On 9/5/05, Wade Chandler <[EMAIL PROTECTED]> wrote:

> What's a use case for it Tom?  curious.

I just checked-in an enhancement for OJB that allows to specify which
constructor/factory-method to utilize for constructing objects read
from the database. These can have parameters which are described by
corresponding parameter element:

  


  

The optional type attribute allows the user to explicitly specify the
parameter type thus helping OJB finding the correct constructor/method
(in case of overload).

Now if I'd use plain Class.forName, the user would have to specify:

[LI

for this int array which is hardly user-friendly. The solution that I
added, allows for the normal type specification as is used in variable
declarations or for method parameters.

Tom

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



Re: [lang] enhanced version of Class.forName

2005-09-05 Thread Wade Chandler
--- Thomas Dudziak <[EMAIL PROTECTED]> wrote:

> Hi folks,
> 
> I had this problem that I needed to create class
> objects for things
> like "int" and "boolean", eg. the type specification
> that you would
> use for a variable declaration or method parameter.
> Since the normal Class.forName does not handle this
> really well, and
> commons-lang does not provide such a function
> (please correct me if
> I'm wrong here), I implemented it myself.
> Now I wonder, would this be useful enhancement to
> ClassUtils ? If so,
> I could provide a patch in BugZilla.
> 
> regards,
> Tom
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 

What's a use case for it Tom?  curious.

Wade

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



svn commit: r278849 - /jakarta/commons/proper/cli/trunk/src/test/org/apache/commons/cli2/validation/FileValidatorTest.java

2005-09-05 Thread jkeyes
Author: jkeyes
Date: Mon Sep  5 14:20:22 2005
New Revision: 278849

URL: http://svn.apache.org/viewcvs?rev=278849&view=rev
Log:
- replaced tags with spaces

Modified:

jakarta/commons/proper/cli/trunk/src/test/org/apache/commons/cli2/validation/FileValidatorTest.java

Modified: 
jakarta/commons/proper/cli/trunk/src/test/org/apache/commons/cli2/validation/FileValidatorTest.java
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/proper/cli/trunk/src/test/org/apache/commons/cli2/validation/FileValidatorTest.java?rev=278849&r1=278848&r2=278849&view=diff
==
--- 
jakarta/commons/proper/cli/trunk/src/test/org/apache/commons/cli2/validation/FileValidatorTest.java
 (original)
+++ 
jakarta/commons/proper/cli/trunk/src/test/org/apache/commons/cli2/validation/FileValidatorTest.java
 Mon Sep  5 14:20:22 2005
@@ -16,7 +16,6 @@
 package org.apache.commons.cli2.validation;
 
 import java.io.File;
-import java.io.FileOutputStream;
 import java.io.IOException;
 import java.util.Arrays;
 import java.util.Iterator;
@@ -26,14 +25,15 @@
 
 /**
  * JUnit test case for the FileValidator.
- *
+ * 
  * @author Rob Oxspring
  * @author John Keyes
  */
 public class FileValidatorTest extends TestCase {
 
 public void testValidate() throws InvalidArgumentException {
-final Object[] array = new Object[] { "src", "project.xml", 
"veryunlikelyfilename"};
+final Object[] array = new Object[] { "src", "project.xml",
+"veryunlikelyfilename" };
 final List list = Arrays.asList(array);
 final FileValidator validator = new FileValidator();
 
@@ -47,30 +47,31 @@
 }
 
 public void testValidate_Directory() {
-final Object[] array = new Object[] { "src", "project.xml"};
+final Object[] array = new Object[] { "src", "project.xml" };
 final List list = Arrays.asList(array);
-final FileValidator validator = 
FileValidator.getExistingDirectoryInstance();
+final FileValidator validator = FileValidator
+.getExistingDirectoryInstance();
 
 assertTrue("is a directory validator", validator.isDirectory());
 assertFalse("is not a file validator", validator.isFile());
 assertTrue("is an existing file validator", validator.isExisting());
 assertFalse("is not a hidden file validator", validator.isHidden());
 
-try{
+try {
 validator.validate(list);
 fail("InvalidArgumentException");
-}
-catch(InvalidArgumentException e){
-assertEquals("project.xml",e.getMessage());
+} catch (InvalidArgumentException e) {
+assertEquals("project.xml", e.getMessage());
 }
 }
 
 public void testValidate_ReadableFile() {
-   // make file readonly
-   File file = new File("src/test/data/readable.txt");
-   file.setReadOnly();
+// make file readonly
+File file = new File("src/test/data/readable.txt");
+file.setReadOnly();
 
-final Object[] array = new Object[] { "src/test/data/readable.txt", 
"src/test/data/notreadable.txt"};
+final Object[] array = new Object[] { "src/test/data/readable.txt",
+"src/test/data/notreadable.txt" };
 final List list = Arrays.asList(array);
 final FileValidator validator = 
FileValidator.getExistingFileInstance();
 validator.setReadable(true);
@@ -82,21 +83,21 @@
 assertTrue("is a readable file validator", validator.isReadable());
 assertFalse("is not a writable file validator", 
validator.isWritable());
 
-try{
+try {
 validator.validate(list);
 fail("InvalidArgumentException");
-}
-catch(InvalidArgumentException e){
-assertEquals("src/test/data/notreadable.txt",e.getMessage());
+} catch (InvalidArgumentException e) {
+assertEquals("src/test/data/notreadable.txt", e.getMessage());
 }
 }
 
 public void testValidate_WritableFile() {
-   // make file readonly
-   File file = new File("src/test/data/readable.txt");
-   file.setReadOnly();
+// make file readonly
+File file = new File("src/test/data/readable.txt");
+file.setReadOnly();
 
-   final Object[] array = new Object[] { "src/test/data/writable.txt", 
"src/test/data/readable.txt"};
+final Object[] array = new Object[] { "src/test/data/writable.txt",
+"src/test/data/readable.txt" };
 final List list = Arrays.asList(array);
 final FileValidator validator = 
FileValidator.getExistingFileInstance();
 validator.setWritable(true);
@@ -108,57 +109,57 @@
 assertFalse("is not a readable file validator", 
validator.isReadable());
 assertTrue("is a writable file validator", validator.isWritable());
 
-try{
+try {
 validator.validate(list);
  

svn commit: r278844 - /jakarta/commons/proper/cli/trunk/src/test/data/hidden.txt

2005-09-05 Thread jkeyes
Author: jkeyes
Date: Mon Sep  5 14:14:11 2005
New Revision: 278844

URL: http://svn.apache.org/viewcvs?rev=278844&view=rev
Log:
- replaced by .hidden.txt

Removed:
jakarta/commons/proper/cli/trunk/src/test/data/hidden.txt


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



svn commit: r278841 - /jakarta/commons/proper/cli/trunk/src/test/org/apache/commons/cli2/validation/FileValidatorTest.java

2005-09-05 Thread jkeyes
Author: jkeyes
Date: Mon Sep  5 14:07:43 2005
New Revision: 278841

URL: http://svn.apache.org/viewcvs?rev=278841&view=rev
Log:
- set hidden attribute when running on windows

- set readable.txt to read-only prior to running tests

Modified:

jakarta/commons/proper/cli/trunk/src/test/org/apache/commons/cli2/validation/FileValidatorTest.java

Modified: 
jakarta/commons/proper/cli/trunk/src/test/org/apache/commons/cli2/validation/FileValidatorTest.java
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/proper/cli/trunk/src/test/org/apache/commons/cli2/validation/FileValidatorTest.java?rev=278841&r1=278840&r2=278841&view=diff
==
--- 
jakarta/commons/proper/cli/trunk/src/test/org/apache/commons/cli2/validation/FileValidatorTest.java
 (original)
+++ 
jakarta/commons/proper/cli/trunk/src/test/org/apache/commons/cli2/validation/FileValidatorTest.java
 Mon Sep  5 14:07:43 2005
@@ -16,6 +16,8 @@
 package org.apache.commons.cli2.validation;
 
 import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
 import java.util.Arrays;
 import java.util.Iterator;
 import java.util.List;
@@ -64,6 +66,10 @@
 }
 
 public void testValidate_ReadableFile() {
+   // make file readonly
+   File file = new File("src/test/data/readable.txt");
+   file.setReadOnly();
+
 final Object[] array = new Object[] { "src/test/data/readable.txt", 
"src/test/data/notreadable.txt"};
 final List list = Arrays.asList(array);
 final FileValidator validator = 
FileValidator.getExistingFileInstance();
@@ -86,7 +92,11 @@
 }
 
 public void testValidate_WritableFile() {
-final Object[] array = new Object[] { "src/test/data/writable.txt", 
"src/test/data/readable.txt"};
+   // make file readonly
+   File file = new File("src/test/data/readable.txt");
+   file.setReadOnly();
+
+   final Object[] array = new Object[] { "src/test/data/writable.txt", 
"src/test/data/readable.txt"};
 final List list = Arrays.asList(array);
 final FileValidator validator = 
FileValidator.getExistingFileInstance();
 validator.setWritable(true);
@@ -108,23 +118,43 @@
 }
 
 public void testValidate_HiddenFile() throws InvalidArgumentException {
-final Object[] array = new Object[] { "src/test/data/hidden.txt", 
"src"};
-final List list = Arrays.asList(array);
-final FileValidator validator = 
FileValidator.getExistingFileInstance();
-validator.setHidden(true);
+   // make file hidden on Windows
+   attribute("H");
+   
+   final Object[] array = new Object[] { ".hidden", "src"};
+   final List list = Arrays.asList(array);
+   final FileValidator validator = 
FileValidator.getExistingFileInstance();
+   validator.setHidden(true);
+   
+   assertFalse("is not a directory validator", 
validator.isDirectory());
+   assertTrue("is a file validator", validator.isFile());
+   assertTrue("is an existing file validator", 
validator.isExisting());
+   assertTrue("is a hidden file validator", validator.isHidden());
+   
+   try{
+   validator.validate(list);
+   fail("InvalidArgumentException");
+   }
+   catch(InvalidArgumentException e){
+   assertEquals("src",e.getMessage());
+   }
+}
 
-assertFalse("is not a directory validator", validator.isDirectory());
-assertTrue("is a file validator", validator.isFile());
-assertTrue("is an existing file validator", validator.isExisting());
-assertTrue("is a hidden file validator", validator.isHidden());
+private void attribute(String attr) {
+   final String os = System.getProperty("os.name").toLowerCase();
 
-try{
-validator.validate(list);
-fail("InvalidArgumentException");
-}
-catch(InvalidArgumentException e){
-assertEquals("src",e.getMessage());
-}
+   // if the test is run on windows, run the attrib program
+   // to set the hidden attribute
+   if (os.indexOf("windows") != -1) {
+   // windows
+   try {
+   Process proc = 
Runtime.getRuntime().exec("attrib.exe +" + attr + " src/test/data/.hidden.txt", 
null, new File("."));
+   } 
+   catch (IOException e) {
+   System.out.println(e.getMessage());
+   e.printStackTrace();
+   }
+   } 
 }
 
 public void testValidate_Existing() {



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

[lang] enhanced version of Class.forName

2005-09-05 Thread Thomas Dudziak
Hi folks,

I had this problem that I needed to create class objects for things
like "int" and "boolean", eg. the type specification that you would
use for a variable declaration or method parameter.
Since the normal Class.forName does not handle this really well, and
commons-lang does not provide such a function (please correct me if
I'm wrong here), I implemented it myself.
Now I wonder, would this be useful enhancement to ClassUtils ? If so,
I could provide a patch in BugZilla.

regards,
Tom

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



svn commit: r278833 - /jakarta/commons/proper/cli/trunk/src/test/data/.hidden.txt

2005-09-05 Thread jkeyes
Author: jkeyes
Date: Mon Sep  5 13:50:03 2005
New Revision: 278833

URL: http://svn.apache.org/viewcvs?rev=278833&view=rev
Log:
- hidden file on *nix

Added:
jakarta/commons/proper/cli/trunk/src/test/data/.hidden.txt

Added: jakarta/commons/proper/cli/trunk/src/test/data/.hidden.txt
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/proper/cli/trunk/src/test/data/.hidden.txt?rev=278833&view=auto
==
--- jakarta/commons/proper/cli/trunk/src/test/data/.hidden.txt (added)
+++ jakarta/commons/proper/cli/trunk/src/test/data/.hidden.txt Mon Sep  5 
13:50:03 2005
@@ -0,0 +1 @@
+Hidden text file.




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



DO NOT REPLY [Bug 36473] - [Net] FTPClient.storeFile keeps returning false on XP only, stores nothing to FTP server

2005-09-05 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
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=36473





--- Additional Comments From [EMAIL PROTECTED]  2005-09-05 22:33 ---
(In reply to comment #6)
> So why ISN'T an exception thrown when the program is run in an applet?  Is 
> this
> a JVM problem?

It almost has to be a JVM problem if FileNotFoundException is not being thrown.
The code for the private native method FileInputStream.open (which is what is
ultimately called) is different for Windows and Linux.  I don't have the
native source code for JDK 1.4, but it's possible that an insufficent error
check is being performed or an incorrect flag for CreateFileW is being
used (e.g., OPEN_ALWAYS), preventing the code path that throws the
FileNotFoundException from executing.  As for connecting to the Web server,
that may be a security manager interaction resulting from the invalid file.  As
interesting as it may be to get to the real bottom of this, I have no time
to slog through Sun's JDK source code and just want to help establish
whether or not Commons Net is causing this.  I just can't find any way
the behavior could be triggered by FTPClient itself.  The host used for
passive mode is obtained from the response to the PASV command and the
local address bound to for active mode is obtained from Socket.getLocalAddress.

It may help is to print the FTP conversation with PrintCommandListener
from the examples and see what the server is telling FTPClient and whom
FTPClient thinks it is connecting to.  If FTPClient has the right host
for passive mode, yet when it creates a client socket the socket returned
is from a connection attempt to the Web server--having ignored the
supplied host--then we know it's definitely the applet execution environment
that is at fault even if we don't know the exact details of why the applet
container is doing that.


-- 
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]



svn commit: r278784 - in /jakarta/commons/sandbox/proxy/trunk/src: java/org/apache/commons/proxy/factory/javassist/ java/org/apache/commons/proxy/factory/util/ test/org/apache/commons/proxy/factory/

2005-09-05 Thread jcarman
Author: jcarman
Date: Mon Sep  5 09:00:08 2005
New Revision: 278784

URL: http://svn.apache.org/viewcvs?rev=278784&view=rev
Log:
Implementing subclass proxy support.

Modified:

jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/factory/javassist/JavassistProxyFactory.java

jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/factory/util/AbstractProxyFactory.java

jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/factory/util/AbstractSubclassingProxyFactory.java

jakarta/commons/sandbox/proxy/trunk/src/test/org/apache/commons/proxy/factory/AbstractSubclassingProxyFactoryTestCase.java

Modified: 
jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/factory/javassist/JavassistProxyFactory.java
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/factory/javassist/JavassistProxyFactory.java?rev=278784&r1=278783&r2=278784&view=diff
==
--- 
jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/factory/javassist/JavassistProxyFactory.java
 (original)
+++ 
jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/factory/javassist/JavassistProxyFactory.java
 Mon Sep  5 09:00:08 2005
@@ -21,12 +21,11 @@
 import javassist.CtConstructor;
 import javassist.CtMethod;
 import org.aopalliance.intercept.MethodInterceptor;
-import org.apache.commons.logging.LogFactory;
 import org.apache.commons.proxy.ObjectProvider;
 import org.apache.commons.proxy.exception.ProxyFactoryException;
 import org.apache.commons.proxy.factory.util.AbstractProxyClassGenerator;
-import org.apache.commons.proxy.factory.util.ProxyClassCache;
 import org.apache.commons.proxy.factory.util.AbstractSubclassingProxyFactory;
+import org.apache.commons.proxy.factory.util.ProxyClassCache;
 
 import java.lang.reflect.InvocationHandler;
 import java.lang.reflect.Method;
@@ -124,8 +123,6 @@
 proxyClass.addConstructor( proxyConstructor );
 for( int i = 0; i < methods.length; ++i )
 {
-LogFactory.getLog( getClass() )
-.debug( "Adding method " + methods[i] + " to 
delegating proxy class..." );
 final CtMethod method = new CtMethod( 
JavassistUtils.resolve( methods[i].getReturnType() ),
   methods[i].getName(),
   
JavassistUtils.resolve( methods[i].getParameterTypes() ),

Modified: 
jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/factory/util/AbstractProxyFactory.java
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/factory/util/AbstractProxyFactory.java?rev=278784&r1=278783&r2=278784&view=diff
==
--- 
jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/factory/util/AbstractProxyFactory.java
 (original)
+++ 
jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/factory/util/AbstractProxyFactory.java
 Mon Sep  5 09:00:08 2005
@@ -21,12 +21,8 @@
 import org.apache.commons.logging.LogFactory;
 import org.apache.commons.proxy.ObjectProvider;
 import org.apache.commons.proxy.ProxyFactory;
-import org.apache.commons.proxy.exception.ProxyFactoryException;
 
 import java.lang.reflect.InvocationHandler;
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.Collection;
 
 /**
  * A helpful superclass for [EMAIL PROTECTED] 
org.apache.commons.proxy.ProxyFactory} implementations.
@@ -60,6 +56,24 @@
 // ProxyFactory Implementation
 
//--
 
+/**
+ * Returns true if all proxyClasses are interfaces.
+ * @param proxyClasses the proxy classes
+ * @return true if all proxyClasses are interfaces
+ */
+public boolean canProxy( Class... proxyClasses )
+{
+for( int i = 0; i < proxyClasses.length; i++ )
+{
+Class proxyClass = proxyClasses[i];
+if( !proxyClass.isInterface() )
+{
+return false;
+}
+}
+return true;
+}
+
 public final Object createDelegatorProxy( ObjectProvider targetProvider, 
Class... proxyClasses )
 {
 return createDelegatorProxy( 
Thread.currentThread().getContextClassLoader(), targetProvider, proxyClasses );
@@ -76,18 +90,5 @@
 {
 return createInvocationHandlerProxy( 
Thread.currentThread().getContextClassLoader(), invocationHandler,
  proxyClasses );
-}
-
-public boolean canProxy( Class... proxyClasses )
-{
-for( int i = 0; i < proxyClasses.length; i++ )
-   

svn commit: r278781 - in /jakarta/commons/sandbox/proxy/trunk/src: java/org/apache/commons/proxy/ java/org/apache/commons/proxy/factory/cglib/ java/org/apache/commons/proxy/factory/javassist/ java/org

2005-09-05 Thread jcarman
Author: jcarman
Date: Mon Sep  5 08:39:02 2005
New Revision: 278781

URL: http://svn.apache.org/viewcvs?rev=278781&view=rev
Log:
Implementing subclass proxy support.

Added:

jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/factory/util/AbstractSubclassingProxyFactory.java
   (with props)

jakarta/commons/sandbox/proxy/trunk/src/test/org/apache/commons/proxy/factory/AbstractSubclassingProxyFactoryTestCase.java
   (with props)
Modified:

jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/ProxyFactory.java

jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/ProxyUtils.java

jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/factory/cglib/CglibProxyFactory.java

jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/factory/javassist/JavassistProxyFactory.java

jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/factory/javassist/JavassistUtils.java

jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/factory/reflect/AbstractInvocationHandler.java

jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/factory/reflect/ReflectionProxyFactory.java

jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/factory/util/AbstractProxyClassGenerator.java

jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/factory/util/AbstractProxyFactory.java

jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/factory/util/ProxyClassCache.java

jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/factory/util/ProxyClassGenerator.java

jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/interceptor/MethodInterceptorChain.java

jakarta/commons/sandbox/proxy/trunk/src/test/org/apache/commons/proxy/factory/AbstractProxyFactoryTestCase.java

jakarta/commons/sandbox/proxy/trunk/src/test/org/apache/commons/proxy/factory/cglib/TestCglibProxyFactory.java

jakarta/commons/sandbox/proxy/trunk/src/test/org/apache/commons/proxy/factory/javassist/TestJavassistProxyFactory.java

Modified: 
jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/ProxyFactory.java
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/ProxyFactory.java?rev=278781&r1=278780&r2=278781&view=diff
==
--- 
jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/ProxyFactory.java
 (original)
+++ 
jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/ProxyFactory.java
 Mon Sep  5 08:39:02 2005
@@ -39,66 +39,77 @@
  * generated using the current thread's "context class loader."
  *
  * @param delegateProvider the delegate provider
- * @param proxyInterfaces  the interfaces that the proxy should implement
+ * @param proxyClasses the interfaces that the proxy should implement
  * @return a proxy which delegates to the object provided by the target 
object provider
  */
-public Object createDelegatorProxy( ObjectProvider delegateProvider, 
Class... proxyInterfaces );
+public Object createDelegatorProxy( ObjectProvider delegateProvider, 
Class... proxyClasses );
 
 /**
  * Creates a proxy which delegates to the object provided by 
delegateProvider.
  *
  * @param classLoader  the class loader to use when generating the 
proxy
  * @param delegateProvider the delegate provider
- * @param proxyInterfaces  the interfaces that the proxy should implement
+ * @param proxyClasses the interfaces that the proxy should implement
  * @return a proxy which delegates to the object provided by the target 
delegateProvider>
  */
 public Object createDelegatorProxy( ClassLoader classLoader, 
ObjectProvider delegateProvider,
-Class... proxyInterfaces );
+Class... proxyClasses );
 
 /**
  * Creates a proxy which passes through a [EMAIL PROTECTED] 
MethodInterceptor method interceptor} before eventually reaching
  * the target object.  The proxy will be generated using the 
current thread's "context class loader."
  *
- * @param target  the target object
- * @param interceptor the method interceptor
- * @param proxyInterfaces the interfaces that the proxy should implement
+ * @param target   the target object
+ * @param interceptor  the method interceptor
+ * @param proxyClasses the interfaces that the proxy should implement
  * @return a proxy which passes through a [EMAIL PROTECTED] 
MethodInterceptor method interceptor} before eventually reaching
  * the target object.
  */
-public Object createInterceptorProxy( Object target, MethodInterceptor 
interceptor, Class... proxyInterfaces );
+

DO NOT REPLY [Bug 36488] - [configuration] PropertiesConfiguration doesn't throw exception when path is directory

2005-09-05 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
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=36488


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED




--- Additional Comments From [EMAIL PROTECTED]  2005-09-05 17:21 ---
Thank you for reporting this issue, it's now fixed in SVN. Feel free to download
the next nightly build and check if it works for you.

-- 
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]



svn commit: r278773 - in /jakarta/commons/proper/configuration/trunk: src/java/org/apache/commons/configuration/AbstractFileConfiguration.java src/test/org/apache/commons/configuration/TestFileConfigu

2005-09-05 Thread ebourg
Author: ebourg
Date: Mon Sep  5 08:18:58 2005
New Revision: 278773

URL: http://svn.apache.org/viewcvs?rev=278773&view=rev
Log:
Loading a configuration from a directory now throws an exception (Bug 36488)

Modified:

jakarta/commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/AbstractFileConfiguration.java

jakarta/commons/proper/configuration/trunk/src/test/org/apache/commons/configuration/TestFileConfiguration.java
jakarta/commons/proper/configuration/trunk/xdocs/changes.xml

Modified: 
jakarta/commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/AbstractFileConfiguration.java
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/AbstractFileConfiguration.java?rev=278773&r1=278772&r2=278773&view=diff
==
--- 
jakarta/commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/AbstractFileConfiguration.java
 (original)
+++ 
jakarta/commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/AbstractFileConfiguration.java
 Mon Sep  5 08:18:58 2005
@@ -245,13 +245,21 @@
 {
 if (sourceURL == null)
 {
-if(StringUtils.isEmpty(getBasePath()))
+if (StringUtils.isEmpty(getBasePath()))
 {
 // ensure that we have a valid base path
 setBasePath(url.toString());
 }
 sourceURL = url;
 }
+
+// throw an exception if the target URL is a directory
+File file = ConfigurationUtils.fileFromURL(url);
+if (file != null && file.isDirectory())
+{
+throw new ConfigurationException("Cannot load a configuration from 
a directory");
+}
+
 InputStream in = null;
 
 try

Modified: 
jakarta/commons/proper/configuration/trunk/src/test/org/apache/commons/configuration/TestFileConfiguration.java
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/proper/configuration/trunk/src/test/org/apache/commons/configuration/TestFileConfiguration.java?rev=278773&r1=278772&r2=278773&view=diff
==
--- 
jakarta/commons/proper/configuration/trunk/src/test/org/apache/commons/configuration/TestFileConfiguration.java
 (original)
+++ 
jakarta/commons/proper/configuration/trunk/src/test/org/apache/commons/configuration/TestFileConfiguration.java
 Mon Sep  5 08:18:58 2005
@@ -413,4 +413,52 @@
 //ok
 }
 }
+
+/**
+ * Checks that loading a directory instead of a file throws an exception.
+ */
+public void testLoadDirectory()
+{
+PropertiesConfiguration config = new PropertiesConfiguration();
+
+try
+{
+config.load("target");
+fail("Could load config from a directory!");
+}
+catch (ConfigurationException e)
+{
+// ok
+}
+
+try
+{
+config.load(new File("target"));
+fail("Could load config from a directory!");
+}
+catch (ConfigurationException e)
+{
+// ok
+}
+
+try
+{
+new PropertiesConfiguration("target");
+fail("Could load config from a directory!");
+}
+catch (ConfigurationException e)
+{
+// ok
+}
+
+try
+{
+new PropertiesConfiguration(new File("target"));
+fail("Could load config from a directory!");
+}
+catch (ConfigurationException e)
+{
+// ok
+}
+}
 }

Modified: jakarta/commons/proper/configuration/trunk/xdocs/changes.xml
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/proper/configuration/trunk/xdocs/changes.xml?rev=278773&r1=278772&r2=278773&view=diff
==
--- jakarta/commons/proper/configuration/trunk/xdocs/changes.xml (original)
+++ jakarta/commons/proper/configuration/trunk/xdocs/changes.xml Mon Sep  5 
08:18:58 2005
@@ -23,6 +23,10 @@
   
 
 
+  
+Attempting to load a configuration from a directory instead of a file
+will now throw a ConfigurationException.
+  
   
 If a multi-valued property was involved in an interpolation operation,
 AbstractConfiguration created a string representation of the list of 
all



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



svn commit: r278768 - /jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/interceptor/ExecutorMethodInterceptor.java

2005-09-05 Thread jcarman
Author: jcarman
Date: Mon Sep  5 08:13:09 2005
New Revision: 278768

URL: http://svn.apache.org/viewcvs?rev=278768&view=rev
Log:
Implementing ExecutorMethodInterceptor

Modified:

jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/interceptor/ExecutorMethodInterceptor.java

Modified: 
jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/interceptor/ExecutorMethodInterceptor.java
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/interceptor/ExecutorMethodInterceptor.java?rev=278768&r1=278767&r2=278768&view=diff
==
--- 
jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/interceptor/ExecutorMethodInterceptor.java
 (original)
+++ 
jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/interceptor/ExecutorMethodInterceptor.java
 Mon Sep  5 08:13:09 2005
@@ -25,7 +25,7 @@
  * 
  * Note: Only void methods can be intercepted using this 
class!  Any attempts to intercept
  * non-void methods will result in an [EMAIL PROTECTED] 
IllegalArgumentException}.  If the proxy interfaces include non-void
- * methods, try using a [EMAIL PROTECTED] FilteredMethodInterceptor} to wrap 
an instance of this class.
+ * methods, try using a [EMAIL PROTECTED] FilteredMethodInterceptor} along 
with a [EMAIL PROTECTED] 
org.apache.commons.proxy.interceptor.filter.ReturnTypeFilter} to wrap an 
instance of this class.
  * @author James Carman
  * @version 1.0
  */



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



DO NOT REPLY [Bug 36502] - [transaction] FileHelper is not thread safe

2005-09-05 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
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=36502





--- Additional Comments From [EMAIL PROTECTED]  2005-09-05 17:03 ---
It should create the buffer on the stack OR it should use some locking
(uneffective) OR it should use some byte buffer pool. Very easy to implement and
is very fast.

-- 
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 36473] - [Net] FTPClient.storeFile keeps returning false on XP only, stores nothing to FTP server

2005-09-05 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
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=36473





--- Additional Comments From [EMAIL PROTECTED]  2005-09-05 17:01 ---
Hi Steve, 
 
Deliberately specifing an invalid source filename under the Linux JVM as you 
requested for the experiment behaves correctly - a File or Directory not found 
exception is thrown in the Linux JVM on the call to the storeFile() method with 
a FileInputStream instance that references a non-existent (and thus 
zero-length?) file. 
 
This is what "seems", in the Windows JVM at least, to lead to the 
 
*J3: network: Connecting socket://www2a.your-server.co.za:50989 with  
proxy=DIRECT  
 
(i. e. a connection attempt to the applet webserver) occurrence, instead of an 
exception on an invalid / non-existant sourcefile passed in a FileInputStream 
instance that references a non-existent file to storeFile() on the Windows JVM. 
 
Hope this helps! 

-- 
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]



svn commit: r278760 - in /jakarta/commons/sandbox/proxy/trunk/src: java/org/apache/commons/proxy/interceptor/ java/org/apache/commons/proxy/interceptor/filter/ test/org/apache/commons/proxy/intercepto

2005-09-05 Thread jcarman
Author: jcarman
Date: Mon Sep  5 07:51:08 2005
New Revision: 278760

URL: http://svn.apache.org/viewcvs?rev=278760&view=rev
Log:
Implementing ExecutorMethodInterceptor

Added:

jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/interceptor/AbstractMethodInterceptor.java
   (with props)

jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/interceptor/ExecutorMethodInterceptor.java
   (with props)

jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/interceptor/filter/ReturnTypeFilter.java
   (with props)

jakarta/commons/sandbox/proxy/trunk/src/test/org/apache/commons/proxy/interceptor/TestExecutorMethodInterceptor.java
   (with props)

Added: 
jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/interceptor/AbstractMethodInterceptor.java
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/interceptor/AbstractMethodInterceptor.java?rev=278760&view=auto
==
--- 
jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/interceptor/AbstractMethodInterceptor.java
 (added)
+++ 
jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/interceptor/AbstractMethodInterceptor.java
 Mon Sep  5 07:51:08 2005
@@ -0,0 +1,40 @@
+/* $Id$
+ *
+ * Copyright 2005 The Apache Software Foundation.
+ *
+ * Licensed 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.proxy.interceptor;
+
+import org.aopalliance.intercept.MethodInterceptor;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+/**
+ * @author James Carman
+ * @version 1.0
+ */
+public abstract class AbstractMethodInterceptor implements MethodInterceptor
+{
+protected Log log = LogFactory.getLog( getClass() );
+
+public Log getLog()
+{
+return log;
+}
+
+public void setLog( Log log )
+{
+this.log = log;
+}
+}

Propchange: 
jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/interceptor/AbstractMethodInterceptor.java
--
svn:eol-style = native

Propchange: 
jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/interceptor/AbstractMethodInterceptor.java
--
svn:keywords = Id

Added: 
jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/interceptor/ExecutorMethodInterceptor.java
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/interceptor/ExecutorMethodInterceptor.java?rev=278760&view=auto
==
--- 
jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/interceptor/ExecutorMethodInterceptor.java
 (added)
+++ 
jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/interceptor/ExecutorMethodInterceptor.java
 Mon Sep  5 07:51:08 2005
@@ -0,0 +1,66 @@
+/* $Id$
+ *
+ * Copyright 2005 The Apache Software Foundation.
+ *
+ * Licensed 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.proxy.interceptor;
+
+import org.aopalliance.intercept.MethodInvocation;
+
+import java.util.concurrent.Executor;
+
+/**
+ * A method interceptor that uses an [EMAIL PROTECTED] Executor} to execute 
the method invocation.
+ * 
+ * Note: Only void methods can be intercepted using this 
class!  Any attempts to intercept
+ * non-void methods will result in an [EMAIL PROTECTED] 
IllegalArgumentException}.  If the proxy interfaces include non-void
+ * methods, try using a [EMAIL PROTECTED] FilteredMethodInterceptor} to wrap 
an instance of this class.
+ * @author James Carman
+ * @version 1.0
+ */
+public class ExecutorMethodInterceptor extends AbstractMethodInterceptor
+

svn commit: r278756 - in /jakarta/commons/sandbox/proxy/trunk/src: java/org/apache/commons/proxy/ProxyUtils.java java/org/apache/commons/proxy/handler/NullInvocationHandler.java test/org/apache/common

2005-09-05 Thread jcarman
Author: jcarman
Date: Mon Sep  5 07:43:32 2005
New Revision: 278756

URL: http://svn.apache.org/viewcvs?rev=278756&view=rev
Log:
Implementing Null Object pattern.

Added:

jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/ProxyUtils.java
   (with props)

jakarta/commons/sandbox/proxy/trunk/src/test/org/apache/commons/proxy/TestProxyUtils.java
   (with props)
Modified:

jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/handler/NullInvocationHandler.java

Added: 
jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/ProxyUtils.java
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/ProxyUtils.java?rev=278756&view=auto
==
--- 
jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/ProxyUtils.java
 (added)
+++ 
jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/ProxyUtils.java
 Mon Sep  5 07:43:32 2005
@@ -0,0 +1,49 @@
+/* $Id$
+ *
+ * Copyright 2005 The Apache Software Foundation.
+ *
+ * Licensed 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.proxy;
+
+import org.apache.commons.proxy.handler.NullInvocationHandler;
+
+/**
+ * @author James Carman
+ * @version 1.0
+ */
+public class ProxyUtils
+{
+/**
+ * Creates a "null object" which implements the 
proxyInterfaces.
+ * @param proxyFactory the proxy factory to be used to create the proxy 
object
+ * @param proxyInterfaces the proxy interfaces
+ * @return a "null object" which implements the 
proxyInterfaces.
+ */
+public static Object createNullObject( ProxyFactory proxyFactory, Class... 
proxyInterfaces )
+{
+return proxyFactory.createInvocationHandlerProxy( new 
NullInvocationHandler(), proxyInterfaces );
+}
+
+/**
+ * Creates a "null object" which implements the 
proxyInterfaces.
+ * @param proxyFactory the proxy factory to be used to create the proxy 
object
+ * @param classLoader the class loader to be used by the proxy factory to 
create the proxy object
+ * @param proxyInterfaces the proxy interfaces
+ * @return a "null object" which implements the 
proxyInterfaces.
+ */
+public static Object createNullObject( ProxyFactory proxyFactory, 
ClassLoader classLoader, Class... proxyInterfaces )
+{
+return proxyFactory.createInvocationHandlerProxy( classLoader, new 
NullInvocationHandler(), proxyInterfaces );
+}
+}

Propchange: 
jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/ProxyUtils.java
--
svn:eol-style = native

Propchange: 
jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/ProxyUtils.java
--
svn:keywords = Id

Modified: 
jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/handler/NullInvocationHandler.java
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/handler/NullInvocationHandler.java?rev=278756&r1=278755&r2=278756&view=diff
==
--- 
jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/handler/NullInvocationHandler.java
 (original)
+++ 
jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/handler/NullInvocationHandler.java
 Mon Sep  5 07:43:32 2005
@@ -34,7 +34,43 @@
 
 public Object invoke( Object proxy, Method method, Object[] args ) throws 
Throwable
 {
-return null;
+final Class returnType = method.getReturnType();
+if( returnType.isPrimitive() )
+{
+if( Integer.TYPE.equals( returnType ) )
+{
+return 0;
+}
+else if( Long.TYPE.equals( returnType ) )
+{
+return 0L;
+}
+else if( Double.TYPE.equals( returnType ) )
+{
+return 0.0;
+}
+else if( Float.TYPE.equals( returnType ) )
+{
+return 0.0f;
+}
+else if( Short.TYPE.equals( returnType ) )
+{
+return ( short )0;
+}
+else if( Character.TYPE.equals( returnType ) )
+   

DO NOT REPLY [Bug 36488] - [configuration] PropertiesConfiguration doesn't throw exception when path is directory

2005-09-05 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
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=36488


[EMAIL PROTECTED] changed:

   What|Removed |Added

Summary|PropertiesConfiguration |[configuration]
   |doesn't throw exception when|PropertiesConfiguration
   |path is directory   |doesn't throw exception when
   ||path is directory




-- 
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 36502] - [transaction] FileHelper is not thread safe

2005-09-05 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
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=36502


[EMAIL PROTECTED] changed:

   What|Removed |Added

Summary|/org/apache/commons/transact|[transaction] FileHelper is
   |ion/util/FileHelper is NOT  |not thread safe
   |thread safe!|




-- 
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 36473] - [Net] FTPClient.storeFile keeps returning false on XP only, stores nothing to FTP server

2005-09-05 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
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=36473





--- Additional Comments From [EMAIL PROTECTED]  2005-09-05 16:23 ---
(In reply to comment #5)
> FTPClient doesn't change on its own the server for data connections
> depending on whether or not a zero-length FileInputStream is used (this
> should be clear from the code).  A FileInputStream with zero bytes would
> cause a zero-length file to be transferred.  It is the applet execution
> environment that controls what Socket.getLocalAddress returns.  If Stefan
> were to turn his applet into a regular Java program, he'd see the reported
> behavior does not materialize.  In fact, a FileNotFoundException should be
> thrown from FileInputStream(File) when the invalid path is given.

Interesting, Daniel.  I think we can now ignore the zero-length red-herring. 
That was my misinterpretation of what Stefan was saying.  The problem is clearly
an INVALID file spec rather than an empty file.

So why ISN'T an exception thrown when the program is run in an applet?  Is this
a JVM problem?  I have recently had occasion to notice that JVM 1.5 works much
better than 1.4.x for applets.  As I recall, the Authentication stuff failed in
1.4 and succeeded in 1.5.

Stefan - another experiment:  what happens when you run under Linux and specify
an invalid filename?



-- 
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 36502] New: - /org/apache/commons/transaction/util/FileHelper is NOT thread safe!

2005-09-05 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
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=36502

   Summary: /org/apache/commons/transaction/util/FileHelper is NOT
thread safe!
   Product: Commons
   Version: unspecified
  Platform: Other
OS/Version: other
Status: NEW
  Severity: normal
  Priority: P2
 Component: Transaction
AssignedTo: commons-dev@jakarta.apache.org
ReportedBy: [EMAIL PROTECTED]


It uses STATIC member (buffer). Calling copy(...) method in parallel leads to
thread errors.

-- 
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 36473] - [Net] FTPClient.storeFile keeps returning false on XP only, stores nothing to FTP server

2005-09-05 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
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=36473





--- Additional Comments From [EMAIL PROTECTED]  2005-09-05 16:17 ---
FTPClient doesn't change on its own the server for data connections
depending on whether or not a zero-length FileInputStream is used (this
should be clear from the code).  A FileInputStream with zero bytes would
cause a zero-length file to be transferred.  It is the applet execution
environment that controls what Socket.getLocalAddress returns.  If Stefan
were to turn his applet into a regular Java program, he'd see the reported
behavior does not materialize.  In fact, a FileNotFoundException should be
thrown from FileInputStream(File) when the invalid path is given.

-- 
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]



svn commit: r278737 - in /jakarta/commons/sandbox/proxy/trunk: src/java/org/apache/commons/proxy/ src/java/org/apache/commons/proxy/factory/cglib/ src/java/org/apache/commons/proxy/factory/javassist/

2005-09-05 Thread jcarman
Author: jcarman
Date: Mon Sep  5 06:42:35 2005
New Revision: 278737

URL: http://svn.apache.org/viewcvs?rev=278737&view=rev
Log:
Changing proxy factory method names to be more consistent.

Modified:

jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/ProxyFactory.java

jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/factory/cglib/CglibProxyFactory.java

jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/factory/javassist/JavassistProxyFactory.java

jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/factory/reflect/ReflectionProxyFactory.java

jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/factory/util/AbstractProxyFactory.java

jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/interceptor/MethodInterceptorChain.java

jakarta/commons/sandbox/proxy/trunk/src/test/org/apache/commons/proxy/factory/AbstractProxyFactoryTestCase.java
jakarta/commons/sandbox/proxy/trunk/xdocs/index.xml

Modified: 
jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/ProxyFactory.java
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/ProxyFactory.java?rev=278737&r1=278736&r2=278737&view=diff
==
--- 
jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/ProxyFactory.java
 (original)
+++ 
jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/ProxyFactory.java
 Mon Sep  5 06:42:35 2005
@@ -42,7 +42,7 @@
  * @param proxyInterfaces  the interfaces that the proxy should implement
  * @return a proxy which delegates to the object provided by the target 
object provider
  */
-public Object createDelegatingProxy( ObjectProvider delegateProvider, 
Class... proxyInterfaces );
+public Object createDelegatorProxy( ObjectProvider delegateProvider, 
Class... proxyInterfaces );
 
 /**
  * Creates a proxy which delegates to the object provided by 
delegateProvider.
@@ -52,8 +52,8 @@
  * @param proxyInterfaces  the interfaces that the proxy should implement
  * @return a proxy which delegates to the object provided by the target 
delegateProvider>
  */
-public Object createDelegatingProxy( ClassLoader classLoader, 
ObjectProvider delegateProvider,
- Class... proxyInterfaces );
+public Object createDelegatorProxy( ClassLoader classLoader, 
ObjectProvider delegateProvider,
+Class... proxyInterfaces );
 
 /**
  * Creates a proxy which passes through a [EMAIL PROTECTED] 
MethodInterceptor method interceptor} before eventually reaching
@@ -65,7 +65,7 @@
  * @return a proxy which passes through a [EMAIL PROTECTED] 
MethodInterceptor method interceptor} before eventually reaching
  * the target object.
  */
-public Object createInterceptingProxy( Object target, MethodInterceptor 
interceptor, Class... proxyInterfaces );
+public Object createInterceptorProxy( Object target, MethodInterceptor 
interceptor, Class... proxyInterfaces );
 /**
  * Creates a proxy which passes through a [EMAIL PROTECTED] 
org.aopalliance.intercept.MethodInterceptor method interceptor}
  * before eventually reaching the target object.
@@ -77,8 +77,8 @@
  * @return a proxy which passes through a [EMAIL PROTECTED] 
org.aopalliance.intercept.MethodInterceptor method interceptor}
  * before eventually reaching the target object.
  */
-public Object createInterceptingProxy( ClassLoader classLoader, Object 
target, MethodInterceptor interceptor,
-   Class... proxyInterfaces );
+public Object createInterceptorProxy( ClassLoader classLoader, Object 
target, MethodInterceptor interceptor,
+  Class... proxyInterfaces );
 
 /**
  * Creates a proxy which uses the provided [EMAIL PROTECTED] 
InvocationHandler} to handle all method invocations.  The proxy

Modified: 
jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/factory/cglib/CglibProxyFactory.java
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/factory/cglib/CglibProxyFactory.java?rev=278737&r1=278736&r2=278737&view=diff
==
--- 
jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/factory/cglib/CglibProxyFactory.java
 (original)
+++ 
jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/factory/cglib/CglibProxyFactory.java
 Mon Sep  5 06:42:35 2005
@@ -41,8 +41,8 @@
 // ProxyFactory Implementation
 
//--
 
-public Object cre

DO NOT REPLY [Bug 36498] New: - [validator] Client-side javascript fails to parse e-mail addresses for .info domains

2005-09-05 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
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=36498

   Summary: [validator] Client-side javascript fails to parse e-mail
addresses for .info domains
   Product: Commons
   Version: unspecified
  Platform: Other
OS/Version: other
Status: NEW
  Severity: normal
  Priority: P2
 Component: Validator
AssignedTo: commons-dev@jakarta.apache.org
ReportedBy: [EMAIL PROTECTED]


When using domains where the extension is more than three characters long (eg.
.info) then the client-side javascript generated by commons-validator 1.1.4
complains about an invalid e-mail address.

-- 
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]



[EMAIL PROTECTED]: Project commons-javaflow (in module jakarta-commons-sandbox) failed

2005-09-05 Thread Stefan Bodewig
To whom it may engage...

This is an automated request, but not an unsolicited one. For 
more information please visit http://gump.apache.org/nagged.html, 
and/or contact the folk at [EMAIL PROTECTED]

Project commons-javaflow has an issue affecting its community integration.
This issue affects 2 projects.
The current state of this project is 'Failed', with reason 'Build Failed'.
For reference only, the following projects are affected by this:
- cocoon-block-javaflow :  Java XML Framework
- commons-javaflow :  Commons Javaflow


Full details are available at:

http://vmgump.apache.org/gump/public/jakarta-commons-sandbox/commons-javaflow/index.html

That said, some information snippets are provided here.

The following annotations (debug/informational/warning/error messages) were 
provided:
 -DEBUG- Sole output [commons-javaflow-05092005.jar] identifier set to project 
name
 -DEBUG- (Gump generated) Maven Properties in: 
/usr/local/gump/public/workspace/jakarta-commons-sandbox/javaflow/build.properties
 -INFO- Failed with reason build failed
 -DEBUG- Maven POM in: 
/usr/local/gump/public/workspace/jakarta-commons-sandbox/javaflow/project.xml
 -DEBUG- Maven project properties in: 
/usr/local/gump/public/workspace/jakarta-commons-sandbox/javaflow/project.properties
 -INFO- Project Reports in: 
/usr/local/gump/public/workspace/jakarta-commons-sandbox/javaflow/target/test-reports
 -WARNING- No directory 
[/usr/local/gump/public/workspace/jakarta-commons-sandbox/javaflow/target/test-reports]
 -INFO- Failed to extract fallback artifacts from Gump Repository



The following work was performed:
http://vmgump.apache.org/gump/public/jakarta-commons-sandbox/commons-javaflow/gump_work/build_jakarta-commons-sandbox_commons-javaflow.html
Work Name: build_jakarta-commons-sandbox_commons-javaflow (Type: Build)
Work ended in a state of : Failed
Elapsed: 3 secs
Command Line: maven --offline jar 
[Working Directory: 
/usr/local/gump/public/workspace/jakarta-commons-sandbox/javaflow]
CLASSPATH: 
/opt/jdk1.4/lib/tools.jar:/usr/local/gump/public/workspace/ant/dist/lib/ant-jmf.jar:/usr/local/gump/public/workspace/ant/dist/lib/ant-swing.jar:/usr/local/gump/public/workspace/ant/dist/lib/ant-apache-resolver.jar:/usr/local/gump/public/workspace/ant/dist/lib/ant-trax.jar:/usr/local/gump/public/workspace/ant/dist/lib/ant-junit.jar:/usr/local/gump/public/workspace/ant/dist/lib/ant-launcher.jar:/usr/local/gump/public/workspace/ant/dist/lib/ant-nodeps.jar:/usr/local/gump/public/workspace/ant/dist/lib/ant.jar:/usr/local/gump/public/workspace/jakarta-bcel/bin/bcel.jar:/usr/local/gump/public/workspace/jakarta-commons/io/dist/jakarta-commons-io-05092005.jar:/usr/local/gump/public/workspace/jakarta-commons-sandbox/jci/target/commons-jci-05092005.jar:/usr/local/gump/public/workspace/jakarta-commons/logging/dist/commons-logging-05092005.jar:/usr/local/gump/public/workspace/jakarta-commons/logging/dist/commons-logging-api-05092005.jar:/usr/local/gump/public/workspace/jakarta-jmeter/lib/xstream-1.1.2.jar:/usr/local/gump/public/workspace/dist/junit/junit.jar
-
 __  __
|  \/  |__ _Apache__ ___
| |\/| / _` \ V / -_) ' \  ~ intelligent projects ~
|_|  |_\__,_|\_/\___|_||_|  v. 1.0.2

The build cannot continue because of the following unsatisfied dependency:

/x1/gump/public/workspace/jakarta-commons-sandbox/javaflow/lib/commons-jci-r159148.jar;
 path override doesn't exist: 
/usr/local/gump/public/workspace/jakarta-commons-sandbox/jci/target/commons-jci-05092005.jar

Total time: 3 seconds
Finished at: Mon Sep 05 03:06:24 PDT 2005

-

To subscribe to this information via syndicated feeds:
- RSS: 
http://vmgump.apache.org/gump/public/jakarta-commons-sandbox/commons-javaflow/rss.xml
- Atom: 
http://vmgump.apache.org/gump/public/jakarta-commons-sandbox/commons-javaflow/atom.xml

== Gump Tracking Only ===
Produced by Gump version 2.2.
Gump Run 1905092005, vmgump.apache.org:vmgump-public:1905092005
Gump E-mail Identifier (unique within run) #12.

--
Apache Gump
http://gump.apache.org/ [Instance: vmgump]

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



[EMAIL PROTECTED]: Project commons-javaflow (in module jakarta-commons-sandbox) failed

2005-09-05 Thread Stefan Bodewig
To whom it may engage...

This is an automated request, but not an unsolicited one. For 
more information please visit http://gump.apache.org/nagged.html, 
and/or contact the folk at [EMAIL PROTECTED]

Project commons-javaflow has an issue affecting its community integration.
This issue affects 2 projects.
The current state of this project is 'Failed', with reason 'Build Failed'.
For reference only, the following projects are affected by this:
- cocoon-block-javaflow :  Java XML Framework
- commons-javaflow :  Commons Javaflow


Full details are available at:

http://vmgump.apache.org/gump/public/jakarta-commons-sandbox/commons-javaflow/index.html

That said, some information snippets are provided here.

The following annotations (debug/informational/warning/error messages) were 
provided:
 -DEBUG- Sole output [commons-javaflow-05092005.jar] identifier set to project 
name
 -DEBUG- (Gump generated) Maven Properties in: 
/usr/local/gump/public/workspace/jakarta-commons-sandbox/javaflow/build.properties
 -INFO- Failed with reason build failed
 -DEBUG- Maven POM in: 
/usr/local/gump/public/workspace/jakarta-commons-sandbox/javaflow/project.xml
 -DEBUG- Maven project properties in: 
/usr/local/gump/public/workspace/jakarta-commons-sandbox/javaflow/project.properties
 -INFO- Project Reports in: 
/usr/local/gump/public/workspace/jakarta-commons-sandbox/javaflow/target/test-reports
 -WARNING- No directory 
[/usr/local/gump/public/workspace/jakarta-commons-sandbox/javaflow/target/test-reports]
 -INFO- Failed to extract fallback artifacts from Gump Repository



The following work was performed:
http://vmgump.apache.org/gump/public/jakarta-commons-sandbox/commons-javaflow/gump_work/build_jakarta-commons-sandbox_commons-javaflow.html
Work Name: build_jakarta-commons-sandbox_commons-javaflow (Type: Build)
Work ended in a state of : Failed
Elapsed: 3 secs
Command Line: maven --offline jar 
[Working Directory: 
/usr/local/gump/public/workspace/jakarta-commons-sandbox/javaflow]
CLASSPATH: 
/opt/jdk1.4/lib/tools.jar:/usr/local/gump/public/workspace/ant/dist/lib/ant-jmf.jar:/usr/local/gump/public/workspace/ant/dist/lib/ant-swing.jar:/usr/local/gump/public/workspace/ant/dist/lib/ant-apache-resolver.jar:/usr/local/gump/public/workspace/ant/dist/lib/ant-trax.jar:/usr/local/gump/public/workspace/ant/dist/lib/ant-junit.jar:/usr/local/gump/public/workspace/ant/dist/lib/ant-launcher.jar:/usr/local/gump/public/workspace/ant/dist/lib/ant-nodeps.jar:/usr/local/gump/public/workspace/ant/dist/lib/ant.jar:/usr/local/gump/public/workspace/jakarta-bcel/bin/bcel.jar:/usr/local/gump/public/workspace/jakarta-commons/io/dist/jakarta-commons-io-05092005.jar:/usr/local/gump/public/workspace/jakarta-commons-sandbox/jci/target/commons-jci-05092005.jar:/usr/local/gump/public/workspace/jakarta-commons/logging/dist/commons-logging-05092005.jar:/usr/local/gump/public/workspace/jakarta-commons/logging/dist/commons-logging-api-05092005.jar:/usr/local/gump/public/workspace/jakarta-jmeter/lib/xstream-1.1.2.jar:/usr/local/gump/public/workspace/dist/junit/junit.jar
-
 __  __
|  \/  |__ _Apache__ ___
| |\/| / _` \ V / -_) ' \  ~ intelligent projects ~
|_|  |_\__,_|\_/\___|_||_|  v. 1.0.2

The build cannot continue because of the following unsatisfied dependency:

/x1/gump/public/workspace/jakarta-commons-sandbox/javaflow/lib/commons-jci-r159148.jar;
 path override doesn't exist: 
/usr/local/gump/public/workspace/jakarta-commons-sandbox/jci/target/commons-jci-05092005.jar

Total time: 3 seconds
Finished at: Mon Sep 05 03:06:24 PDT 2005

-

To subscribe to this information via syndicated feeds:
- RSS: 
http://vmgump.apache.org/gump/public/jakarta-commons-sandbox/commons-javaflow/rss.xml
- Atom: 
http://vmgump.apache.org/gump/public/jakarta-commons-sandbox/commons-javaflow/atom.xml

== Gump Tracking Only ===
Produced by Gump version 2.2.
Gump Run 1905092005, vmgump.apache.org:vmgump-public:1905092005
Gump E-mail Identifier (unique within run) #12.

--
Apache Gump
http://gump.apache.org/ [Instance: vmgump]

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



svn commit: r278706 - /jakarta/commons/proper/vfs/trunk/src/java/org/apache/commons/vfs/provider/DefaultFileContent.java

2005-09-05 Thread imario
Author: imario
Date: Mon Sep  5 02:55:41 2005
New Revision: 278706

URL: http://svn.apache.org/viewcvs?rev=278706&view=rev
Log:
fixed modifier

Modified:

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

Modified: 
jakarta/commons/proper/vfs/trunk/src/java/org/apache/commons/vfs/provider/DefaultFileContent.java
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/proper/vfs/trunk/src/java/org/apache/commons/vfs/provider/DefaultFileContent.java?rev=278706&r1=278705&r2=278706&view=diff
==
--- 
jakarta/commons/proper/vfs/trunk/src/java/org/apache/commons/vfs/provider/DefaultFileContent.java
 (original)
+++ 
jakarta/commons/proper/vfs/trunk/src/java/org/apache/commons/vfs/provider/DefaultFileContent.java
 Mon Sep  5 02:55:41 2005
@@ -506,7 +506,7 @@
 /**
  * An output stream for writing content.
  */
-final class FileContentOutputStream extends MonitorOutputStream
+private final class FileContentOutputStream extends MonitorOutputStream
 {
 // avoid gc
 private final FileObject file;



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



svn commit: r278705 - in /jakarta/commons/proper/vfs/trunk: RELEASE_NOTES.txt src/java/org/apache/commons/vfs/provider/DefaultFileContent.java

2005-09-05 Thread imario
Author: imario
Date: Mon Sep  5 02:54:38 2005
New Revision: 278705

URL: http://svn.apache.org/viewcvs?rev=278705&view=rev
Log:
fix: avoid gc when referencing only inputStream/outputStream of a fileObject

Modified:
jakarta/commons/proper/vfs/trunk/RELEASE_NOTES.txt

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

Modified: jakarta/commons/proper/vfs/trunk/RELEASE_NOTES.txt
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/proper/vfs/trunk/RELEASE_NOTES.txt?rev=278705&r1=278704&r2=278705&view=diff
==
--- jakarta/commons/proper/vfs/trunk/RELEASE_NOTES.txt (original)
+++ jakarta/commons/proper/vfs/trunk/RELEASE_NOTES.txt Mon Sep  5 02:54:38 2005
@@ -1,5 +1,8 @@
 2005-
 
+threading:
+avoid gc when referencing only inputStream/outputStream of a fileObject
+
 filenames:
 add a type (file/folder) to filename.
 This is needed to allow URI style filename resolving

Modified: 
jakarta/commons/proper/vfs/trunk/src/java/org/apache/commons/vfs/provider/DefaultFileContent.java
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/proper/vfs/trunk/src/java/org/apache/commons/vfs/provider/DefaultFileContent.java?rev=278705&r1=278704&r2=278705&view=diff
==
--- 
jakarta/commons/proper/vfs/trunk/src/java/org/apache/commons/vfs/provider/DefaultFileContent.java
 (original)
+++ 
jakarta/commons/proper/vfs/trunk/src/java/org/apache/commons/vfs/provider/DefaultFileContent.java
 Mon Sep  5 02:54:38 2005
@@ -279,7 +279,7 @@
 
 // Get the raw input stream
 final InputStream instr = file.getInputStream();
-final InputStream wrappedInstr = new FileContentInputStream(instr);
+final InputStream wrappedInstr = new FileContentInputStream(file, 
instr);
 this.getThreadData().addInstr(wrappedInstr);
 // setState(STATE_OPENED);
 return wrappedInstr;
@@ -300,7 +300,7 @@
 
 // Get the content
 final RandomAccessContent rastr = file.getRandomAccessContent(mode);
-this.getThreadData().setRastr(new FileRandomAccessContent(rastr));
+this.getThreadData().setRastr(new FileRandomAccessContent(file, 
rastr));
 // setState(STATE_OPENED);
 return this.getThreadData().getRastr();
 }
@@ -330,7 +330,7 @@
 final OutputStream outstr = file.getOutputStream(bAppend);
 
 // Create wrapper
-this.getThreadData().setOutstr(new FileContentOutputStream(outstr));
+this.getThreadData().setOutstr(new FileContentOutputStream(file, 
outstr));
 // setState(STATE_OPENED);
 return this.getThreadData().getOutstr();
 }
@@ -433,9 +433,13 @@
 private final class FileContentInputStream
 extends MonitorInputStream
 {
-FileContentInputStream(final InputStream instr)
+// avoid gc
+private final FileObject file;
+
+FileContentInputStream(final FileObject file, final InputStream instr)
 {
 super(instr);
+this.file = file;
 }
 
 /**
@@ -474,9 +478,13 @@
  */
 private final class FileRandomAccessContent extends 
MonitorRandomAccessContent
 {
-FileRandomAccessContent(final RandomAccessContent content)
+// avoid gc
+private final FileObject file;
+
+FileRandomAccessContent(final FileObject file, final 
RandomAccessContent content)
 {
 super(content);
+this.file = file;
 }
 
 /**
@@ -500,9 +508,13 @@
  */
 final class FileContentOutputStream extends MonitorOutputStream
 {
-FileContentOutputStream(final OutputStream outstr)
+// avoid gc
+private final FileObject file;
+
+FileContentOutputStream(final FileObject file, final OutputStream 
outstr)
 {
 super(outstr);
+this.file = file;
 }
 
 /**



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



DO NOT REPLY [Bug 35958] - [vfs] Multiple taskdefs causes ClassCastException

2005-09-05 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
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=35958


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED




--- Additional Comments From [EMAIL PROTECTED]  2005-09-05 11:52 ---
considered as fixed

-- 
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]



[EMAIL PROTECTED]: Project commons-email (in module jakarta-commons) failed

2005-09-05 Thread dIon Gillard
To whom it may engage...

This is an automated request, but not an unsolicited one. For 
more information please visit http://gump.apache.org/nagged.html, 
and/or contact the folk at [EMAIL PROTECTED]

Project commons-email has an issue affecting its community integration.
This issue affects 1 projects,
 and has been outstanding for 39 runs.
The current state of this project is 'Failed', with reason 'Configuration 
Failed'.
For reference only, the following projects are affected by this:
- commons-email :  Commons Email Package


Full details are available at:

http://vmgump.apache.org/gump/public/jakarta-commons/commons-email/index.html

That said, some information snippets are provided here.

The following annotations (debug/informational/warning/error messages) were 
provided:
 -DEBUG- Sole output [commons-email-05092005.jar] identifier set to project name
 -INFO- Failed with reason configuration failed
 -ERROR- Bad Dependency. Project: maven-findbugs-plugin unknown to *this* 
workspace
 -INFO- Failed to extract fallback artifacts from Gump Repository

To subscribe to this information via syndicated feeds:
- RSS: 
http://vmgump.apache.org/gump/public/jakarta-commons/commons-email/rss.xml
- Atom: 
http://vmgump.apache.org/gump/public/jakarta-commons/commons-email/atom.xml

== Gump Tracking Only ===
Produced by Gump version 2.2.
Gump Run 1905092005, vmgump.apache.org:vmgump-public:1905092005
Gump E-mail Identifier (unique within run) #7.

--
Apache Gump
http://gump.apache.org/ [Instance: vmgump]

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



[EMAIL PROTECTED]: Project commons-email (in module jakarta-commons) failed

2005-09-05 Thread dIon Gillard
To whom it may engage...

This is an automated request, but not an unsolicited one. For 
more information please visit http://gump.apache.org/nagged.html, 
and/or contact the folk at [EMAIL PROTECTED]

Project commons-email has an issue affecting its community integration.
This issue affects 1 projects,
 and has been outstanding for 39 runs.
The current state of this project is 'Failed', with reason 'Configuration 
Failed'.
For reference only, the following projects are affected by this:
- commons-email :  Commons Email Package


Full details are available at:

http://vmgump.apache.org/gump/public/jakarta-commons/commons-email/index.html

That said, some information snippets are provided here.

The following annotations (debug/informational/warning/error messages) were 
provided:
 -DEBUG- Sole output [commons-email-05092005.jar] identifier set to project name
 -INFO- Failed with reason configuration failed
 -ERROR- Bad Dependency. Project: maven-findbugs-plugin unknown to *this* 
workspace
 -INFO- Failed to extract fallback artifacts from Gump Repository

To subscribe to this information via syndicated feeds:
- RSS: 
http://vmgump.apache.org/gump/public/jakarta-commons/commons-email/rss.xml
- Atom: 
http://vmgump.apache.org/gump/public/jakarta-commons/commons-email/atom.xml

== Gump Tracking Only ===
Produced by Gump version 2.2.
Gump Run 1905092005, vmgump.apache.org:vmgump-public:1905092005
Gump E-mail Identifier (unique within run) #7.

--
Apache Gump
http://gump.apache.org/ [Instance: vmgump]

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