[lang] StringUtils.differenceAt()

2003-08-21 Thread Gary Gregory
Hello,

We have new 2.0 method called differenceAt() but I believe it is not named
correctly. Methods with At usually receive an index argument, like
String.charAt(). This method /returns/ an index.

I think indexOfDifference() would be better and in the same vein as
String.indexOf().

Gary 
(fyi, off to bed if there is any voting goin' on)


RE: [lang] Lang 2.0 release?

2003-08-21 Thread Gary Gregory
I think you've convinced me (almost) to just release a 2.0. But... it would
be nice to have other projects that depend on [lang] to migrate first but...
(going in circles) I guess as an outside project, I would only want to
bother doing a migration once, not once for a beta/rc and another time for
the real release. So I am back to where I started from I think: release.

Gary (dizzy)

 -Original Message-
 From: Henri Yandell [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, August 20, 2003 21:55
 To: Jakarta Commons Developers List
 Subject: RE: [lang] Lang 2.0 release?
 
 
 
 On Thu, 21 Aug 2003, Gary Gregory wrote:
 
  Inline...
 
   -Original Message-
   From: Henri Yandell [mailto:[EMAIL PROTECTED]
   Sent: Wednesday, August 20, 2003 20:44
   To: Jakarta Commons Developers List
   Subject: RE: [lang] Lang 2.0 release?
  
  
  
   On Wed, 20 Aug 2003, Gary Gregory wrote:
  
This is all good news. I have two Q's:
   
(1) What about an RC-4 that is publicized to the commons-user list
 such
   that
real users can raise issues such that we can:
   
(a) document them in a migration doc or
(b) fix them.
  
   Dunno. Do we want users to be using RCs? I think I'd prefer to have
 them
   use the x.0 and release an x.0.1 for any issues etc.
 
  Well, the changes that we have been going through, moving classes,
 removing
  code, etc, have been pretty radical from beta to beta and from RC to RC.
 I
  guess it is matter of expectations from the user base. I does sound,
 that
  now, right now, we have a stable build. I think it is a bit odd to
 release a
  2.0 release with the explicit understanding that the user base should
 wait
  until a 2.0.1 to become the real stable release. Furthermore, what if,
 in
  theory, the changes asked by users to 2.0 would really not be backwards
  compatible with 2.0, therefore needing to call the next release a 2.1?
 Kind
  of odd to have a super short lived 2.0. All of my ramblings to say that
 it
  does not quite feel right to me to push a release out without a
  beta/rc/feedback cycle from *some* users.
 
 It's a good point. The HttpClient guys have been in alpha/rc stage for
 ages now for 2.0, meaning that anyone who is using HttpClient is probably
 testing the rc and not using their v1.0. I imagine that HttpClient won't
 be fixing bugs in the alpha/rc releases but just telling people to upgrade
 to 2.0 when it is released.
 
 In the end I think that it equates to the same thing. If we release a 2.0,
 and there are reported bugs, we will release a 2.0.1. No question about it
 [unless no one is working on the project by that time]. We'll be working
 on a CVS branch and maintaining etc. I'm in favour of the latter as I
 think the user will be better supported by a full early release than
 by a beta phase. Just an opinion though/
 
 If we release an rc4 [okay, it should be called something else to signify
 a difference between internal rc and external rc] to users, even if we
 move on to 2.1 or 3.0 we will still have to support the users on the rc.
 Furthermore, should releasing an rc to users be voted upon and go via the
 PMC? Even if we're not giving it a version number, it's a release we're
 making to the userbase.
 
 With a product like Lang, [or Collections, or Codec etc], I would expect
 that the unit test coverage would be very high [we're getting there] and
 that the quality of the unit tests is a greater foundation for stability
 than the user base. With something like Jelly, HttpClient, Latka, I would
 expect that the user base is going to try things the developers have never
 considered and the unit tests really just show that an example situation
 works correctly.
 
 A lot of this is under the assumption that users only find bugs, they
 don't make feature request changes to our version. As the rc1 showed, that
 isn't true. We quickly had a user ask why lang.time wasn't being
 released and deciding to release. With hindsight we could have gone to 2.0
 and then 2.1 now.
 
 I'm a believer in the release-early release-often mantra, with the only
 proviso being that the quality improve each time, so this shades the way
 in which I view a lot of this.
 
 Hen
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


RE: [lang] Lang 2.0 release?

2003-08-21 Thread Gary Gregory
Another good argument for using 1.4.2 to build. Thanks for the details.

Gary

 -Original Message-
 From: Phil Steitz [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, August 20, 2003 22:19
 To: Jakarta Commons Developers List
 Subject: Re: [lang] Lang 2.0 release?
 
 Gary Gregory wrote:
  I would regenerate with 1.4.2 to get the best Javadoc possible.
 
  But here is the skinny: With Mozilla 1.5 Alpha, I get messed up
 rendering
  and with IE 6.0, I get a pretty rendering. So, either IE is really
 clever or
  this is a Mozilla bug. I just updated today from M 1.4 to 1.5 Alpha and
 I
  *do* recall seing the same problem with 1.4.
 
 IE is being loose and easy as usual, ignoring unmatched end tags.  Look
 at the HTML source -- it is not well-formed. There are extra /dd's
 after the first two names.  The problem is in the HTML generation, which
 works correctly using 1.4.2.
 
 Phil
 
 
 tags were transformed incorrectly.  Here is the HTML source for the
 author element from the .gz/docs for CharSetUtils (same happens for
 every class that has more than one author):
 
 dtbAuthor:/bdda href=[EMAIL PROTECTED]Henri
 Yandell/a/dd
 , Stephen Colebourne/dd
 , Phil Steitz/dd
 
 On Mozilla, at least, this causes extra line breaks.
 
 When I use the 1.4.2 doclet to generate, I get well-formed HTML:
 
 dtbAuthor:/b/dt
dda href=[EMAIL PROTECTED]Henri Yandell/a, Stephen
 Colebourne, Phil Steitz/dd
 
 What JDK did you use to generate the javadoc?  Is this a known
 bug/feature?
 
 
 Phil
 
 
 
 
 -
 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] Lang 2.0 release?

2003-08-21 Thread Phil Steitz
Henri Yandell wrote:
Yeah. This bug has me baffled. I've never had this problem with other
mavenised projects, and this has been happening in multiple versions of
maven [at least since b7].
Hen
Seems to go away (for me at least) when I cut out the empty id 
elements for the contributors (which I think are unexpected).  I will 
fix this when I commit the changes that I mentioned earlier tomorrow AM.

Phil

On Thu, 21 Aug 2003, Gary Gregory wrote:


I think there could be something's wrong with project.xml processing. The
page http://www.apache.org/~bayard/commons-lang-2.0/maven/team-list.html
lists 2 contributors project.xml but the 1st person (Ringo De Smet) is
listed twice and the 2nd (Steve Downey) is not listed at all.
Gary




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


Re: [lang] Lang 2.0 release?

2003-08-21 Thread Henri Yandell


On Wed, 20 Aug 2003, Phil Steitz wrote:

 the old .properties file format)  I was just writing a note asking if
 anyone had any objections to the following changes, which will fix this
 among other things:

 1. Mods to project.xml:

 * Restrict tests to Suites run by Ant build (so maven build does not
 have to run through perf and other tests each time)

Not sure what you mean.

Maven is supposed to run the tests each time we build, so removing some
from it would seem to be self-destructive?

What is perf? That long test that takes ages?

Maybe we should define a separate /src/perf for tests that are only to be
done at certain times?

 * Add a reports element to restrict reports

Which would we restrict?

 2. Add checkstyle.xml translating (to the best of my limited
 abilities) the current checkstyle.properties (so maven will not generate
 so many checkstyle errors)

+1

 3. Modify project.properties to refer to checkstyle.xml

+1

Hen


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



RE: [lang] Lang 2.0 release?

2003-08-21 Thread dion
Filed as MAVEN-701.

See http://jira.codehaus.org/secure/ViewIssue.jspa?key=MAVEN-701
--
dIon Gillard, Multitask Consulting
Blog:  http://blogs.codehaus.org/people/dion/


Henri Yandell [EMAIL PROTECTED] wrote on 21/08/2003 03:25:41 PM:

 
 Yeah. This bug has me baffled. I've never had this problem with other
 mavenised projects, and this has been happening in multiple versions of
 maven [at least since b7].
 
 Hen
 
 On Thu, 21 Aug 2003, Gary Gregory wrote:
 
  I think there could be something's wrong with project.xml processing. 
The
  page 
http://www.apache.org/~bayard/commons-lang-2.0/maven/team-list.html
  lists 2 contributors project.xml but the 1st person (Ringo De Smet) is
  listed twice and the 2nd (Steve Downey) is not listed at all.
 
  Gary
 
   -Original Message-
   From: Henri Yandell [mailto:[EMAIL PROTECTED]
   Sent: Wednesday, August 20, 2003 20:01
   To: Jakarta Commons Developers List
   Subject: [lang] Lang 2.0 release?
  
  
   Seems that since RC3, we've just:
  
   removed an unused private attribute
   updated javadoc in a few places
   removed a method
   moved 2 classes up a package from util
   removed a class from util
  
   While I could build an RC4, I'm going to be hopeful and build a 
release
   build. CVS tags can always be deleted/moved in case of major issues
   again.
  
   If no one can find a problem by tomorrow morning, I'll call a vote 
on
   Commons-dev, Ccing the PMC. Assuming things go well, we ought to get 
3
   non-Lang +1's by the weekend.
  
   I'll aim to do the release stuff over the weekend [mirrors will be 
new to
   me] and have the release on the site by the end of the weekend, 
which
   always seems to be good timing.
  
   Any thoughts?
  
   Release build in:
  
   http://www.apache.org/~bayard/commons-lang-2.0/
  
   Also, the following file from JDiff is very useful, I hadn't noticed 
it
   before:
  
   
http://www.apache.org/~bayard/commons-lang-2.0/Commons-Lang-1.0.1-to-
   2.0/missingSinces.txt
  
   [although hopefully it's something we can leave to fix until 2.1]
  
   Hen
  
  
  
  
   
-
   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] Lang 2.0 release?

2003-08-21 Thread Phil Steitz
Henri Yandell wrote:
On Wed, 20 Aug 2003, Phil Steitz wrote:


the old .properties file format)  I was just writing a note asking if
anyone had any objections to the following changes, which will fix this
among other things:
1. Mods to project.xml:

* Restrict tests to Suites run by Ant build (so maven build does not
have to run through perf and other tests each time)


Not sure what you mean.

Maven is supposed to run the tests each time we build, so removing some
from it would seem to be self-destructive?
What is perf? That long test that takes ages?
I meant the EntitiesPerformanceTest or some such.  When I first tried 
maven, this test was taking ages.  What I was intending to do was to use

unitTest
  includes
include**/*TestSuite.java/include
  /includes
  excludes
exclude**/AllLangTestSuite.java/exclude
  /excludes
/unitTest
That would make maven run the same tests that ant does now (I think).

Maybe we should define a separate /src/perf for tests that are only to be
done at certain times?
+1 -- or use suggestive names and include/exclude stuff as above.  I 
used to exclude**/*Performance*.java/exclude.



* Add a reports element to restrict reports


Which would we restrict?
Really, I was planning to add a list with many of them commented out for 
convenience, like so:

reports
 -- reportmaven-changelog-plugin/report --
 -- reportmaven-changes-plugin/report --
 reportmaven-checkstyle-plugin/report
 -- reportmaven-clover-plugin/report --  (till we have the 
license sorted)
 !-- reportmaven-developer-activity-plugin/report --
 !-- reportmaven-file-activity-plugin/report --
 reportmaven-javadoc-plugin/report
 !--   reportmaven-jellydoc-plugin/report --
 reportmaven-junit-report-plugin/report
 !--reportmaven-jxr-plugin/report --
 reportmaven-license-plugin/report
!-- reportmaven-linkcheck-plugin/report --
 !-- reportmaven-statcvs-plugin/report --
 reportmaven-tasklist-plugin/report
  /reports

The one that bogs is linkcheck. That one should only be run 
periodically, IMHO.

My main (only) complaint with using maven for build is speed -- plain 
ant with a nice build.xml like lang has is faster. Of course you don't 
get all of the goodies that way.  So I like to minimize what I ask maven 
to do by default. A slim maven build with clover, javadoc, checkstyle 
reports for turning the crank, then add more reports for site 
generation.  Just my HO.

Phil



2. Add checkstyle.xml translating (to the best of my limited
abilities) the current checkstyle.properties (so maven will not generate
so many checkstyle errors)


+1


3. Modify project.properties to refer to checkstyle.xml


+1

Hen

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


cvs commit: jakarta-commons/httpclient project.xml

2003-08-21 Thread oglueck
oglueck 2003/08/21 00:36:15

  Modified:httpclient project.xml
  Log:
  fixed broken eyebrowse link
  
  Revision  ChangesPath
  1.38  +3 -3  jakarta-commons/httpclient/project.xml
  
  Index: project.xml
  ===
  RCS file: /home/cvs/jakarta-commons/httpclient/project.xml,v
  retrieving revision 1.37
  retrieving revision 1.38
  diff -u -r1.37 -r1.38
  --- project.xml   31 Jul 2003 21:22:14 -  1.37
  +++ project.xml   21 Aug 2003 07:36:15 -  1.38
  @@ -71,19 +71,19 @@
 nameHttpClient Mailing List/name
 subscribe [EMAIL PROTECTED] /subscribe
 unsubscribe [EMAIL PROTECTED] /unsubscribe
  -  
archivehttp://archives.apache.org/eyebrowse/SummarizeList?listId=128/archive
  +  archivehttp://nagoya.apache.org/eyebrowse/SummarizeList?listId=128/archive
   /mailingList
   mailingList
 nameCommons Developer List/name
 subscribe[EMAIL PROTECTED]/subscribe
 unsubscribe[EMAIL PROTECTED]/unsubscribe
  -  
archivehttp://archives.apache.org/eyebrowse/SummarizeList?listId=15/archive
  +  archivehttp://nagoya.apache.org/eyebrowse/SummarizeList?listId=15/archive
   /mailingList
   mailingList
 nameCommons User List/name
 subscribe[EMAIL PROTECTED]/subscribe
 unsubscribe[EMAIL PROTECTED]/unsubscribe
  -  
archivehttp://archives.apache.org/eyebrowse/SummarizeList?listId=105/archive
  +  archivehttp://nagoya.apache.org/eyebrowse/SummarizeList?listId=105/archive
   /mailingList
 /mailingLists
   
  
  
  

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



cvs commit: jakarta-commons/httpclient project.xml

2003-08-21 Thread oglueck
oglueck 2003/08/21 00:34:31

  Modified:httpclient Tag: HTTPCLIENT_2_0_BRANCH project.xml
  Log:
  fixed broken eyebrowse link
  
  Revision  ChangesPath
  No   revision
  No   revision
  1.35.2.2  +3 -3  jakarta-commons/httpclient/project.xml
  
  Index: project.xml
  ===
  RCS file: /home/cvs/jakarta-commons/httpclient/project.xml,v
  retrieving revision 1.35.2.1
  retrieving revision 1.35.2.2
  diff -u -r1.35.2.1 -r1.35.2.2
  --- project.xml   26 Jul 2003 14:25:41 -  1.35.2.1
  +++ project.xml   21 Aug 2003 07:34:31 -  1.35.2.2
  @@ -71,19 +71,19 @@
 nameHttpClient Mailing List/name
 subscribe [EMAIL PROTECTED] /subscribe
 unsubscribe [EMAIL PROTECTED] /unsubscribe
  -  
archivehttp://archives.apache.org/eyebrowse/SummarizeList?listId=128/archive
  +  archivehttp://nagoya.apache.org/eyebrowse/SummarizeList?listId=128/archive
   /mailingList
   mailingList
 nameCommons Developer List/name
 subscribe[EMAIL PROTECTED]/subscribe
 unsubscribe[EMAIL PROTECTED]/unsubscribe
  -  
archivehttp://archives.apache.org/eyebrowse/SummarizeList?listId=15/archive
  +  archivehttp://nagoya.apache.org/eyebrowse/SummarizeList?listId=15/archive
   /mailingList
   mailingList
 nameCommons User List/name
 subscribe[EMAIL PROTECTED]/subscribe
 unsubscribe[EMAIL PROTECTED]/unsubscribe
  -  
archivehttp://archives.apache.org/eyebrowse/SummarizeList?listId=105/archive
  +  archivehttp://nagoya.apache.org/eyebrowse/SummarizeList?listId=105/archive
   /mailingList
 /mailingLists
   
  
  
  

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



Re: [lang] Lang 2.0 release?

2003-08-21 Thread scolebourne
We could do with sorting out the list of contributers before this maven site goes live.
Stephen

  from:Henri Yandell [EMAIL PROTECTED]
 One other build:
 
 Maven site for Lang is generated and up in
 http://www.apache.org/~bayard/commons-lang-2.0/maven/
 
 All the RC builds have been tar'gz'd to save space.
 
 Hen
 
 On Wed, 20 Aug 2003, Henri Yandell wrote:
 
 
  Seems that since RC3, we've just:
 
  removed an unused private attribute
  updated javadoc in a few places
  removed a method
  moved 2 classes up a package from util
  removed a class from util
 
  While I could build an RC4, I'm going to be hopeful and build a release
  build. CVS tags can always be deleted/moved in case of major issues
  again.
 
  If no one can find a problem by tomorrow morning, I'll call a vote on
  Commons-dev, Ccing the PMC. Assuming things go well, we ought to get 3
  non-Lang  1's by the weekend.
 
  I'll aim to do the release stuff over the weekend [mirrors will be new to
  me] and have the release on the site by the end of the weekend, which
  always seems to be good timing.
 
  Any thoughts?
 
  Release build in:
 
  http://www.apache.org/~bayard/commons-lang-2.0/
 
  Also, the following file from JDiff is very useful, I hadn't noticed it
  before:
 
  http://www.apache.org/~bayard/commons-lang-2.0/Commons-Lang-1.0.1-to-2.0/missingSinces.txt
 
  [although hopefully it's something we can leave to fix until 2.1]
 
  Hen
 
 
 
 
  -
  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: [collections]SingleElementCollection (was Questions....)

2003-08-21 Thread Hope, Matthew
inlined as attachment was stripped...

import java.util.*;

/**
 * Quick and simple implementation of a single element collection. The
collection
 * starts with one entry and always keeps it that way, therefore
modification
 * operations will result in UnsupportedOperationException. The class is
 * unsynchronized. The collection can hold null and will treat it in a
similar
 * fashion to List. Details of this are by each method.
 *
 * @author   Matt Hope
 */
public class SingleElementCollection implements Collection
{

private class SingleIterator implements Iterator
{
private boolean nextHasBeenCalled = false;

/**
 * contract of Iterator#hasNext() maintained
 *
 * @return
 */
public boolean hasNext()
{
if (nextHasBeenCalled) {
return false;
}
return true;
}

/**
 * contract of Iterator#next() maintained
 *
 * @return
 */
public Object next()
{
if (nextHasBeenCalled) {
throw new NoSuchElementException(only one entry defined);
} else {
nextHasBeenCalled = true;
return theElement;
}
}

/**
 * This will throw an UnsupportedOperationException since the
underlying
 * Colelction does not support removal
 */
public void remove()
{
throw new UnsupportedOperationException(SingleElementCollection
does not supprt the removal of elements);
}

}

private Object theElement;

/**
 * Constructor for the SingleElementCollection object
 *
 * @param o  the Object to use in the collection. null is allowed
 */
public SingleElementCollection(Object o)
{
theElement = o;
}

/**
 * This will always be 1
 *
 * @return
 */
public int size()
{
return 1;
}

/**
 * this will always be false
 *
 * @return   The empty
 */
public boolean isEmpty()
{
return false;
}

/**
 * True iff (o==null ? theElement==null : o.equals(e)) as for
 * List#contains()
 *
 * @return
 * @param o  the object for comparison
 */
public boolean contains(Object o)
{
return o == null ? theElement == null : o.equals(theElement);
}

/**
 * returns an Iterator which will return the element in the collection.
It
 * does not support removal
 *
 * @return
 */
public Iterator iterator()
{
return new SingleElementCollection.SingleIterator();
}

/**
 * converts the collection to an Object array of length 1
 *
 * @return
 */
public Object[] toArray()
{
return new Object[]{theElement};
}

/**
 * as for Collection#toArray(Object[])
 *
 * @return
 * @param a
 */
public Object[] toArray(Object[] a)
{
if (a.length  1) {
a = (Object[]) java.lang.reflect.Array.newInstance(
a.getClass().getComponentType(), 1);
}

System.arraycopy(toArray(), 0, a, 0, 1);

if (a.length  1) {
a[1] = null;
}

return a;
}

/**
 * modification not allowed - UnsupportedOperationException will be
thrown
 *
 * @return
 * @param o
 */
public boolean add(Object o)
{
throw new java.lang.UnsupportedOperationException(Method add() not
supported - collection content is immutable);
}

/**
 * modification not allowed - UnsupportedOperationException will be
thrown
 *
 * @return
 * @param o
 */
public boolean remove(Object o)
{
throw new java.lang.UnsupportedOperationException(Method remove()
not supported - collection content is immutable);
}

/**
 * as for Collection#containsAll(c)
 *
 * @return
 * @param c
 */
public boolean containsAll(Collection c)
{
if (c.size() != 1) {
return false;
} else {
return c.contains(theElement);
}
}

/**
 * modification not allowed - UnsupportedOperationException will be
thrown
 *
 * @return
 * @param c  The All to be added
 */
public boolean addAll(Collection c)
{
throw new java.lang.UnsupportedOperationException(Method addAll()
not supported - collection content is immutable);
}

/**
 * modification not allowed - UnsupportedOperationException will be
thrown
 *
 * @return
 * @param c
 */
public boolean removeAll(Collection c)
{
throw new java.lang.UnsupportedOperationException(Method addAll()
not supported - collection content is immutable);
}

/**
 * Makes no effort to check if the operation would do nothing (and hence
not
 * violate the immutable invariant. It just throws
 * 

UnixFTPEntryParser - small fix (?)

2003-08-21 Thread Matthieu Recouly
** this is a copy of the email I've already sent to
[EMAIL PROTECTED] **

Hi, 

  Your parser does not allow to retrieve files list on a ftp
server that uses weird Unix listing style as described on
http://www.javaworld.com/javaworld/jw-04-2003/jw-0404-ftp-p2.html
 
  This is when user has no group, your parser will put the
size value inside group's one, a null user value, and 0 in the
size field.

  To correct that I changed line 85 of
UnixFTPEntryParser.java,  from version 1.0.1-dev, changing the
section of regexp used to parse entries that concerns file's
group:

changed + (\\S+)\\s+ to + (\\S+)?\\s+ (added question mark)

  So this way if no group is present all fieds will have
correct values anyway.


 Regards,


Matthieu Recouly

Accédez au courrier électronique de La Poste : www.laposte.net ; 
3615 LAPOSTENET (0,34€/mn) ; tél : 08 92 68 13 50 (0,34€/mn)




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



RE: [collections]SingleElementCollection (was Questions....)

2003-08-21 Thread scolebourne
This is already available on the java.util.Collections class.

The purpose of SingletonIterator/SingletonListIterator is to enable you to create the 
iterator without needing to create an intermediate object such as SingletonCollection.

They are typically used for performance, see the Jaxen library for example.

Stephen

  from:Hope, Matthew [EMAIL PROTECTED]
 inlined as attachment was stripped...
 
 import java.util.*;
 
 /**
  * Quick and simple implementation of a single element collection. The
 collection
  * starts with one entry and always keeps it that way, therefore
 modification
  * operations will result in UnsupportedOperationException. The class is
  * unsynchronized. The collection can hold null and will treat it in a
 similar
  * fashion to List. Details of this are by each method.
  *
  * @author   Matt Hope
  */
 public class SingleElementCollection implements Collection
 {
 
 private class SingleIterator implements Iterator
 {
 private boolean nextHasBeenCalled = false;
 
 /**
  * contract of Iterator#hasNext() maintained
  *
  * @return
  */
 public boolean hasNext()
 {
 if (nextHasBeenCalled) {
 return false;
 }
 return true;
 }
 
 /**
  * contract of Iterator#next() maintained
  *
  * @return
  */
 public Object next()
 {
 if (nextHasBeenCalled) {
 throw new NoSuchElementException(only one entry defined);
 } else {
 nextHasBeenCalled = true;
 return theElement;
 }
 }
 
 /**
  * This will throw an UnsupportedOperationException since the
 underlying
  * Colelction does not support removal
  */
 public void remove()
 {
 throw new UnsupportedOperationException(SingleElementCollection
 does not supprt the removal of elements);
 }
 
 }
 
 private Object theElement;
 
 /**
  * Constructor for the SingleElementCollection object
  *
  * @param o  the Object to use in the collection. null is allowed
  */
 public SingleElementCollection(Object o)
 {
 theElement = o;
 }
 
 /**
  * This will always be 1
  *
  * @return
  */
 public int size()
 {
 return 1;
 }
 
 /**
  * this will always be false
  *
  * @return   The empty
  */
 public boolean isEmpty()
 {
 return false;
 }
 
 /**
  * True iff (o==null ? theElement==null : o.equals(e)) as for
  * List#contains()
  *
  * @return
  * @param o  the object for comparison
  */
 public boolean contains(Object o)
 {
 return o == null ? theElement == null : o.equals(theElement);
 }
 
 /**
  * returns an Iterator which will return the element in the collection.
 It
  * does not support removal
  *
  * @return
  */
 public Iterator iterator()
 {
 return new SingleElementCollection.SingleIterator();
 }
 
 /**
  * converts the collection to an Object array of length 1
  *
  * @return
  */
 public Object[] toArray()
 {
 return new Object[]{theElement};
 }
 
 /**
  * as for Collection#toArray(Object[])
  *
  * @return
  * @param a
  */
 public Object[] toArray(Object[] a)
 {
 if (a.length  1) {
 a = (Object[]) java.lang.reflect.Array.newInstance(
 a.getClass().getComponentType(), 1);
 }
 
 System.arraycopy(toArray(), 0, a, 0, 1);
 
 if (a.length  1) {
 a[1] = null;
 }
 
 return a;
 }
 
 /**
  * modification not allowed - UnsupportedOperationException will be
 thrown
  *
  * @return
  * @param o
  */
 public boolean add(Object o)
 {
 throw new java.lang.UnsupportedOperationException(Method add() not
 supported - collection content is immutable);
 }
 
 /**
  * modification not allowed - UnsupportedOperationException will be
 thrown
  *
  * @return
  * @param o
  */
 public boolean remove(Object o)
 {
 throw new java.lang.UnsupportedOperationException(Method remove()
 not supported - collection content is immutable);
 }
 
 /**
  * as for Collection#containsAll(c)
  *
  * @return
  * @param c
  */
 public boolean containsAll(Collection c)
 {
 if (c.size() != 1) {
 return false;
 } else {
 return c.contains(theElement);
 }
 }
 
 /**
  * modification not allowed - UnsupportedOperationException will be
 thrown
  *
  * @return
  * @param c  The All to be added
  */
 public boolean addAll(Collection c)
 {
 throw new 

RE: [collections]SingleElementCollection (was Questions....)

2003-08-21 Thread Hope, Matthew
doh! should have looked in there first, cheers

Matt

 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] 
 Sent: 21 August 2003 11:23
 To: [EMAIL PROTECTED]
 Subject: RE: [collections]SingleElementCollection (was Questions)
 
 
 This is already available on the java.util.Collections class.
 
 The purpose of SingletonIterator/SingletonListIterator is to 
 enable you to create the iterator without needing to create 
 an intermediate object such as SingletonCollection.
 
 They are typically used for performance, see the Jaxen 
 library for example.
 
 Stephen
 
   from:Hope, Matthew [EMAIL PROTECTED]
  inlined as attachment was stripped...
  
  import java.util.*;
  
  /**
   * Quick and simple implementation of a single element 
 collection. The
  collection
   * starts with one entry and always keeps it that way, therefore
  modification
   * operations will result in UnsupportedOperationException. 
 The class is
   * unsynchronized. The collection can hold null and will 
 treat it in a
  similar
   * fashion to List. Details of this are by each method.
   *
   * @author   Matt Hope
   */
  public class SingleElementCollection implements Collection
  {
  
  private class SingleIterator implements Iterator
  {
  private boolean nextHasBeenCalled = false;
  
  /**
   * contract of Iterator#hasNext() maintained
   *
   * @return
   */
  public boolean hasNext()
  {
  if (nextHasBeenCalled) {
  return false;
  }
  return true;
  }
  
  /**
   * contract of Iterator#next() maintained
   *
   * @return
   */
  public Object next()
  {
  if (nextHasBeenCalled) {
  throw new NoSuchElementException(only one 
 entry defined);
  } else {
  nextHasBeenCalled = true;
  return theElement;
  }
  }
  
  /**
   * This will throw an UnsupportedOperationException 
 since the
  underlying
   * Colelction does not support removal
   */
  public void remove()
  {
  throw new 
 UnsupportedOperationException(SingleElementCollection
  does not supprt the removal of elements);
  }
  
  }
  
  private Object theElement;
  
  /**
   * Constructor for the SingleElementCollection object
   *
   * @param o  the Object to use in the collection. null 
 is allowed
   */
  public SingleElementCollection(Object o)
  {
  theElement = o;
  }
  
  /**
   * This will always be 1
   *
   * @return
   */
  public int size()
  {
  return 1;
  }
  
  /**
   * this will always be false
   *
   * @return   The empty
   */
  public boolean isEmpty()
  {
  return false;
  }
  
  /**
   * True iff (o==null ? theElement==null : o.equals(e)) as for
   * List#contains()
   *
   * @return
   * @param o  the object for comparison
   */
  public boolean contains(Object o)
  {
  return o == null ? theElement == null : 
 o.equals(theElement);
  }
  
  /**
   * returns an Iterator which will return the element in 
 the collection.
  It
   * does not support removal
   *
   * @return
   */
  public Iterator iterator()
  {
  return new SingleElementCollection.SingleIterator();
  }
  
  /**
   * converts the collection to an Object array of length 1
   *
   * @return
   */
  public Object[] toArray()
  {
  return new Object[]{theElement};
  }
  
  /**
   * as for Collection#toArray(Object[])
   *
   * @return
   * @param a
   */
  public Object[] toArray(Object[] a)
  {
  if (a.length  1) {
  a = (Object[]) java.lang.reflect.Array.newInstance(
  a.getClass().getComponentType(), 1);
  }
  
  System.arraycopy(toArray(), 0, a, 0, 1);
  
  if (a.length  1) {
  a[1] = null;
  }
  
  return a;
  }
  
  /**
   * modification not allowed - 
 UnsupportedOperationException will be
  thrown
   *
   * @return
   * @param o
   */
  public boolean add(Object o)
  {
  throw new 
 java.lang.UnsupportedOperationException(Method add() not
  supported - collection content is immutable);
  }
  
  /**
   * modification not allowed - 
 UnsupportedOperationException will be
  thrown
   *
   * @return
   * @param o
   */
  public boolean remove(Object o)
  {
  throw new 
 java.lang.UnsupportedOperationException(Method remove()
  not supported - collection content is immutable);
  }
  
  /**
   * as for Collection#containsAll(c)
   *

Re: [lang] Lang 2.0 release?

2003-08-21 Thread Henri Yandell


On Wed, 20 Aug 2003, Phil Steitz wrote:

 Henri Yandell wrote:
 
  What is perf? That long test that takes ages?

 I meant the EntitiesPerformanceTest or some such.  When I first tried
 maven, this test was taking ages.  What I was intending to do was to use

 unitTest
includes
  include**/*TestSuite.java/include
/includes
excludes
  exclude**/AllLangTestSuite.java/exclude
/excludes
  /unitTest

 That would make maven run the same tests that ant does now (I think).

Ant runs EntitiesPerformance currently. It surprised me how long that
took.

  Maybe we should define a separate /src/perf for tests that are only to be
  done at certain times?

 +1 -- or use suggestive names and include/exclude stuff as above.  I
 used to exclude**/*Performance*.java/exclude.

+1.

 * Add a reports element to restrict reports
 
 
  Which would we restrict?

 Really, I was planning to add a list with many of them commented out for
 convenience, like so:

 reports
   -- reportmaven-changelog-plugin/report --
   -- reportmaven-changes-plugin/report --
   reportmaven-checkstyle-plugin/report
   -- reportmaven-clover-plugin/report --  (till we have the
 license sorted)
   !-- reportmaven-developer-activity-plugin/report --
   !-- reportmaven-file-activity-plugin/report --
   reportmaven-javadoc-plugin/report
   !--   reportmaven-jellydoc-plugin/report --
   reportmaven-junit-report-plugin/report
   !--reportmaven-jxr-plugin/report --
   reportmaven-license-plugin/report
  !-- reportmaven-linkcheck-plugin/report --
   !-- reportmaven-statcvs-plugin/report --
   reportmaven-tasklist-plugin/report
/reports

Cool. +1.

 The one that bogs is linkcheck. That one should only be run
 periodically, IMHO.

Bogs?

 My main (only) complaint with using maven for build is speed -- plain
 ant with a nice build.xml like lang has is faster. Of course you don't
 get all of the goodies that way.  So I like to minimize what I ask maven
 to do by default. A slim maven build with clover, javadoc, checkstyle
 reports for turning the crank, then add more reports for site
 generation.  Just my HO.

Got ya. The way I've solved this is with nightly site generation [not
live], but that's still not as good as your approach of integrating
clover/checkstyle into the build so the feedback loop is tiny.


Hen


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



Re: [lang] Lang 2.0 release?

2003-08-21 Thread Henri Yandell

Heh. There's a lot to do before the maven site can go live. I was only
generating it for the easy to look at javadoc/src-reference/metrics etc.

Definitely not planned for a release anytime soon.

Hen

On Thu, 21 Aug 2003 [EMAIL PROTECTED] wrote:

 We could do with sorting out the list of contributers before this maven site goes 
 live.
 Stephen

   from:Henri Yandell [EMAIL PROTECTED]
  One other build:
 
  Maven site for Lang is generated and up in
  http://www.apache.org/~bayard/commons-lang-2.0/maven/
 
  All the RC builds have been tar'gz'd to save space.
 
  Hen
 
  On Wed, 20 Aug 2003, Henri Yandell wrote:
 
  
   Seems that since RC3, we've just:
  
   removed an unused private attribute
   updated javadoc in a few places
   removed a method
   moved 2 classes up a package from util
   removed a class from util
  
   While I could build an RC4, I'm going to be hopeful and build a release
   build. CVS tags can always be deleted/moved in case of major issues
   again.
  
   If no one can find a problem by tomorrow morning, I'll call a vote on
   Commons-dev, Ccing the PMC. Assuming things go well, we ought to get 3
   non-Lang  1's by the weekend.
  
   I'll aim to do the release stuff over the weekend [mirrors will be new to
   me] and have the release on the site by the end of the weekend, which
   always seems to be good timing.
  
   Any thoughts?
  
   Release build in:
  
   http://www.apache.org/~bayard/commons-lang-2.0/
  
   Also, the following file from JDiff is very useful, I hadn't noticed it
   before:
  
   http://www.apache.org/~bayard/commons-lang-2.0/Commons-Lang-1.0.1-to-2.0/missingSinces.txt
  
   [although hopefully it's something we can leave to fix until 2.1]
  
   Hen
  
  
  
  
   -
   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]



Release Process for Sandbox Projects

2003-08-21 Thread Leo Sutic
I have moved Avalon Attributes into the Commons Sandbox now, and 
would like to get a release out the door. Just so I understand how 
this is done: If I understand what I've heard/read correctly,
Sandbox projects aren't released. They have to be accepted into
Commons proper first.

Question: How is this done, what's the process?

Second, I'd like to do the following pretty much immediately:

 1. Get the project website up.
I'm quite new to Maven, and as far as I understand, typing:

maven site:deploy

will do this for me. I'm just a bit too afraid to try this 
out without getting some confirmation of this first, though...

I have already done everything to properly generate the site
locally - if I look into target/docs then I have a site that
is exactly as I want it.

 2. Get an alpha release out. I have some people over at Avalon
who would like a first cut of code to look at. Can this be
done inofficially, without acceptance into Commons proper?

/LS


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



[GUMP] Build Failure - commons-attributes

2003-08-21 Thread Sam Ruby

This email is autogenerated from the output from:
http://cvs.apache.org/builds/gump/2003-08-21/commons-attributes.html


Buildfile: build.xml does not exist!
Build failed

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



RE: [GUMP] Build Failure - commons-attributes

2003-08-21 Thread Leo Sutic


 From: Sam Ruby [mailto:[EMAIL PROTECTED] 
 
 
 This email is autogenerated from the output from: 
 http://cvs.apache.org/builds/gump/2003-08-21/commons-attributes.html
 
 
 Buildfile: build.xml does not exist!
 Build failed

It's a Maven project. How do I solve this? I note that
some other sandbox projects have build.xmls that duplicate
the Maven functionality. Is this the only way or is there
a better one?

/LS


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



Re: Release Process for Sandbox Projects

2003-08-21 Thread Henri Yandell


On Thu, 21 Aug 2003, Leo Sutic wrote:

 I have moved Avalon Attributes into the Commons Sandbox now, and
 would like to get a release out the door. Just so I understand how
 this is done: If I understand what I've heard/read correctly,
 Sandbox projects aren't released. They have to be accepted into
 Commons proper first.

 Question: How is this done, what's the process?

 Second, I'd like to do the following pretty much immediately:

  1. Get the project website up.
 I'm quite new to Maven, and as far as I understand, typing:

 maven site:deploy

 will do this for me. I'm just a bit too afraid to try this
 out without getting some confirmation of this first, though...

 I have already done everything to properly generate the site
 locally - if I look into target/docs then I have a site that
 is exactly as I want it.

You can do this on Sandbox without a release.

  2. Get an alpha release out. I have some people over at Avalon
 who would like a first cut of code to look at. Can this be
 done inofficially, without acceptance into Commons proper?

Easiest way might be to push a snapshot up to the maven repository? :)

Or you could just put it at http://www.apache.org/~your-id

I can't find the docs on what to do to get into Commons proper. It's
mainly:

Have a PROPOSAL.html and call a vote on the Commons-Dev list.

Hen


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



Re: [GUMP] Build Failure - commons-attributes

2003-08-21 Thread Leo Simons
Leo Sutic wrote:
From: Sam Ruby [mailto:[EMAIL PROTECTED] 


This email is autogenerated from the output from: 
http://cvs.apache.org/builds/gump/2003-08-21/commons-attributes.html


Buildfile: build.xml does not exist!
Build failed
It's a Maven project. How do I solve this? I note that
some other sandbox projects have build.xmls that duplicate
the Maven functionality. Is this the only way or is there
a better one?
at the moment, its the only way. For the avalon cvs repo I wrote a 
script that works a little differently, but I wouldn't recommend using 
that @ commons. There exist plans (in my head) to allow maven/gump 
integration) but none exists atm.

Take a look at the documentation for the 'ant' and 'gump' plugins. You 
can generate the relevant files like so:

maven ant
maven gump
cheers,

- other Leo



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


[VFS|HttpClient] Re: [VFS] Crashes in getContent()

2003-08-21 Thread Adam R. B. Jack
A few more details/thoughts/questions:

1) The FSM appears to be using UrlFileObject although I have HttpClient in
my path. (This was when run from inside Eclipse and not command line, with
Eclipse project dependency upon HttpClient. With command line I get the
right one. Could this be some issue w/ a difference of class loading inside
Eclipse?)

Is there any way I can get inside and dump/display an FSM's providers?
(Unfortunately commons-logging seems to chose log4j in this environment not
jdk1.4 logging, and I don't have that configured, so I am loosing the
warnings.

2) I tested an exists call on a bad (non-existent) URL -- and it didn't
return false when used with the UrlFileObject. I've not figured out why,
but it seem like that problem has slipped back in. [If I can figure out
where to add it I'll submit a patch w/ a test for this.]

3) When I test on the command line, w/ latest HttpClient from CVS, I do get
a similar looking crash (see bottom) which looks like an HttpClient issue
(hence the shared subject.)

4) When I attempt to run all the unit tests for commons-vfs I get numerous
NullPtr crashes in the tests. Isthis somehow environmental, or are they
failing? The NullPtrs don't look like HttpClient only, so perhaps there are
two sets of problems.

5) Given all this, would it be possible for the two teams (VFS and
HttpClient) to add test projects to gump to augment the compile
projects? Meaning commons-httpclient-test and commons-vfs-test that depend
upon their parents, and run unit tests. That way projects like
krysalis-ruper could chose to depend upon a successful unit test run, and
not propagate crashes.

regards,

Adam


-

F:\Krysalis\Testingjava org.krysalis.ruper.util.VfsUtils
Aug 21, 2003 8:24:09 AM
org.apache.commons.vfs.impl.StandardFileSystemManager addProvider
WARNING: Skipping provider
org.apache.commons.vfs.provider.ftp.FtpFileProvider because required cl
ass org.apache.commons.net.ftp.FTPFile is not available.
Aug 21, 2003 8:24:09 AM
org.apache.commons.vfs.impl.StandardFileSystemManager addProvider
WARNING: Skipping provider
org.apache.commons.vfs.provider.smb.SmbFileProvider because required cl
ass jcifs.smb.SmbFile is not available.
Aug 21, 2003 8:24:09 AM
org.apache.commons.vfs.impl.StandardFileSystemManager addProvider
WARNING: Skipping provider
org.apache.commons.vfs.provider.webdav.WebdavFileProvider because requi
red class org.apache.webdav.lib.WebdavResource is not available.
Aug 21, 2003 8:24:09 AM
org.apache.commons.vfs.impl.StandardFileSystemManager addProvider
WARNING: Skipping provider
org.apache.commons.vfs.provider.sftp.SftpFileProvider because required
class com.jcraft.jsch.JSch is not available.
Exception in thread main java.lang.NullPointerException
at
org.apache.commons.httpclient.HttpMethodDirector.processRedirectResponse(Htt
pMethodDirect
or.java:454)
at
org.apache.commons.httpclient.HttpMethodDirector.isRetryNeeded(HttpMethodDir
ector.java:63
9)
at
org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDir
ector.java:14
5)
at
org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:378)
at
org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:268)
at
org.apache.commons.vfs.provider.http.HttpFileObject.doGetType(HttpFileObject
.java:114)
at
org.apache.commons.vfs.provider.AbstractFileObject.attach(AbstractFileObject
.java:919)
at
org.apache.commons.vfs.provider.AbstractFileObject.exists(AbstractFileObject
.java:372)
at org.krysalis.ruper.util.VfsUtils.main(VfsUtils.java:413)

regards

Adam


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



RE: [GUMP] Build Failure - commons-attributes

2003-08-21 Thread Henri Yandell

Maven have a goal which generates a build.xml that mimics what Maven does.

Hen

On Thu, 21 Aug 2003, Leo Sutic wrote:



  From: Sam Ruby [mailto:[EMAIL PROTECTED]
 
  
  This email is autogenerated from the output from:
  http://cvs.apache.org/builds/gump/2003-08-21/commons-attributes.html
  
 
  Buildfile: build.xml does not exist!
  Build failed

 It's a Maven project. How do I solve this? I note that
 some other sandbox projects have build.xmls that duplicate
 the Maven functionality. Is this the only way or is there
 a better one?

 /LS


 -
 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 Pool/DBCP minIdle Implementation

2003-08-21 Thread Dirk Verbeeck
I agree, maxActive should be respected.
Even with the WHEN_EXHAUSTED_GROW option, the evictor thread should 
limit itself.

Something like:
   int objectDeficit = getMinIdle() - getNumIdle();
   if (getMaxActive()  0) {
   int growLimit = Math.max(0, getMaxActive() - getNumActive() 
- getNumIdle());
   objectDeficit = Math.min(objectDeficit, growLimit);
   }
   for ( int j = 0; j  objectDeficit; j++ ) {
   addObject();
   }

I'll commit this in a couple of hours.
Dirk
Noel J. Bergman wrote:

Richard,

I only looked at your patches out of context, so perhaps I missed it, but
where is the code to ensure that:
+// Check to see if we are below our minimum number of objects
+// if so enough to bring us back to our minimum.
+int objectDeficit = getNumIdle() - _minIdle;
+if ( objectDeficit  0 ) {
+for ( int j = 0; j  Math.abs(objectDeficit); j++ ) {
+addObject();
+} // for
+} // if
doesn't cause the number of objects to exceed the maximum?  Unless
_whenExhaustedAction is WHEN_EXHAUSTED_GROW, there is no point in allowing
numActive + numIdle to exceed maxActive, because bollowObject() won't permit
any objects to be borrowed more than maxActive.  The default behavior is to
block until there are fewer than maxActive objects outstanding.
	--- Noel

-
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: Release Process for Sandbox Projects

2003-08-21 Thread Leo Sutic
OK, then I should be set to go...

Thanks!

/LS

 From: Henri Yandell [mailto:[EMAIL PROTECTED] 


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



RE: [GUMP] Build Failure - commons-attributes

2003-08-21 Thread Leo Sutic
Thanks!

/LS

 From: Henri Yandell [mailto:[EMAIL PROTECTED] 


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



RE: [GUMP] Build Failure - commons-attributes

2003-08-21 Thread Leo Sutic
Nice seeing a familiar face - thanks for the help.

/LS

 From: news [mailto:[EMAIL PROTECTED] On Behalf Of Leo Simons

 at the moment, its the only way. 


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



RE: [lang] Lang 2.0 release?

2003-08-21 Thread Gary Gregory
I have not looked at the perf test but the concept is not new and it is
valid. A perf unit test, for example, would make sure that a certain bit of
code performs within some time parameter, for example, faster than some JRE
implementation or faster/slower if configured in certain ways. 

Gary

 -Original Message-
 From: Henri Yandell [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, August 20, 2003 22:03
 To: Jakarta Commons Developers List
 Subject: Re: [lang] Lang 2.0 release?
 
 
 
 On Wed, 20 Aug 2003, Phil Steitz wrote:
 
  the old .properties file format)  I was just writing a note asking if
  anyone had any objections to the following changes, which will fix this
  among other things:
 
  1. Mods to project.xml:
 
  * Restrict tests to Suites run by Ant build (so maven build does not
  have to run through perf and other tests each time)
 
 Not sure what you mean.
 
 Maven is supposed to run the tests each time we build, so removing some
 from it would seem to be self-destructive?
 
 What is perf? That long test that takes ages?
 
 Maybe we should define a separate /src/perf for tests that are only to be
 done at certain times?
 
  * Add a reports element to restrict reports
 
 Which would we restrict?
 
  2. Add checkstyle.xml translating (to the best of my limited
  abilities) the current checkstyle.properties (so maven will not generate
  so many checkstyle errors)
 
 +1
 
  3. Modify project.properties to refer to checkstyle.xml
 
 +1
 
 Hen
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


RE: [VFS|HttpClient] Re: [VFS] Crashes in getContent()

2003-08-21 Thread Jeff Barrett
Do you have a test case I can try out?  I'll see if I can reproduce the error and help 
sniff out a solution.

+jeff

 -Original Message-
 From: Adam R. B. Jack [mailto:[EMAIL PROTECTED]
 Sent: Thursday, August 21, 2003 7:47 AM
 To: [EMAIL PROTECTED]
 Subject: [VFS|HttpClient] Re: [VFS] Crashes in getContent()
 
 
 A few more details/thoughts/questions:
 
 1) The FSM appears to be using UrlFileObject although I have 
 HttpClient in
 my path. (This was when run from inside Eclipse and not 
 command line, with
 Eclipse project dependency upon HttpClient. With command line 
 I get the
 right one. Could this be some issue w/ a difference of class 
 loading inside
 Eclipse?)
 
 Is there any way I can get inside and dump/display an FSM's 
 providers?
 (Unfortunately commons-logging seems to chose log4j in this 
 environment not
 jdk1.4 logging, and I don't have that configured, so I am loosing the
 warnings.
 
 2) I tested an exists call on a bad (non-existent) URL -- 
 and it didn't
 return false when used with the UrlFileObject. I've not 
 figured out why,
 but it seem like that problem has slipped back in. [If I can 
 figure out
 where to add it I'll submit a patch w/ a test for this.]
 
 3) When I test on the command line, w/ latest HttpClient from 
 CVS, I do get
 a similar looking crash (see bottom) which looks like an 
 HttpClient issue
 (hence the shared subject.)
 
 4) When I attempt to run all the unit tests for commons-vfs I 
 get numerous
 NullPtr crashes in the tests. Isthis somehow environmental, 
 or are they
 failing? The NullPtrs don't look like HttpClient only, so 
 perhaps there are
 two sets of problems.
 
 5) Given all this, would it be possible for the two teams (VFS and
 HttpClient) to add test projects to gump to augment the compile
 projects? Meaning commons-httpclient-test and 
 commons-vfs-test that depend
 upon their parents, and run unit tests. That way projects like
 krysalis-ruper could chose to depend upon a successful unit 
 test run, and
 not propagate crashes.
 
 regards,
 
 Adam
 
 --
 --
 -
 
 F:\Krysalis\Testingjava org.krysalis.ruper.util.VfsUtils
 Aug 21, 2003 8:24:09 AM
 org.apache.commons.vfs.impl.StandardFileSystemManager addProvider
 WARNING: Skipping provider
 org.apache.commons.vfs.provider.ftp.FtpFileProvider because 
 required cl
 ass org.apache.commons.net.ftp.FTPFile is not available.
 Aug 21, 2003 8:24:09 AM
 org.apache.commons.vfs.impl.StandardFileSystemManager addProvider
 WARNING: Skipping provider
 org.apache.commons.vfs.provider.smb.SmbFileProvider because 
 required cl
 ass jcifs.smb.SmbFile is not available.
 Aug 21, 2003 8:24:09 AM
 org.apache.commons.vfs.impl.StandardFileSystemManager addProvider
 WARNING: Skipping provider
 org.apache.commons.vfs.provider.webdav.WebdavFileProvider 
 because requi
 red class org.apache.webdav.lib.WebdavResource is not available.
 Aug 21, 2003 8:24:09 AM
 org.apache.commons.vfs.impl.StandardFileSystemManager addProvider
 WARNING: Skipping provider
 org.apache.commons.vfs.provider.sftp.SftpFileProvider 
 because required
 class com.jcraft.jsch.JSch is not available.
 Exception in thread main java.lang.NullPointerException
 at
 org.apache.commons.httpclient.HttpMethodDirector.processRedire
 ctResponse(Htt
 pMethodDirect
 or.java:454)
 at
 org.apache.commons.httpclient.HttpMethodDirector.isRetryNeeded
 (HttpMethodDir
 ector.java:63
 9)
 at
 org.apache.commons.httpclient.HttpMethodDirector.executeMethod
 (HttpMethodDir
 ector.java:14
 5)
 at
 org.apache.commons.httpclient.HttpClient.executeMethod(HttpCli
 ent.java:378)
 at
 org.apache.commons.httpclient.HttpClient.executeMethod(HttpCli
 ent.java:268)
 at
 org.apache.commons.vfs.provider.http.HttpFileObject.doGetType(
 HttpFileObject
 .java:114)
 at
 org.apache.commons.vfs.provider.AbstractFileObject.attach(Abst
 ractFileObject
 .java:919)
 at
 org.apache.commons.vfs.provider.AbstractFileObject.exists(Abst
 ractFileObject
 .java:372)
 at org.krysalis.ruper.util.VfsUtils.main(VfsUtils.java:413)
 
 regards
 
 Adam
 
 
 -
 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: [VFS|HttpClient] Re: [VFS] Crashes in getContent()

2003-08-21 Thread Adam R. B. Jack
Thanks for the offer.

For me, I downloaded the latest HttpClient and the latest VFS from CVS,
built them using Eclipse, and tried a folder exists on a non-existent URL or
a URL that does a redirect (to add a / for a 'directory').

Also, I found a lot of the unit test cases crash -- just run the set.

regards

Adam
- Original Message - 
From: Jeff Barrett [EMAIL PROTECTED]
To: Jakarta Commons Developers List [EMAIL PROTECTED]
Sent: Thursday, August 21, 2003 9:50 AM
Subject: RE: [VFS|HttpClient] Re: [VFS] Crashes in getContent()


 Do you have a test case I can try out?  I'll see if I can reproduce the
error and help sniff out a solution.

 +jeff

  -Original Message-
  From: Adam R. B. Jack [mailto:[EMAIL PROTECTED]
  Sent: Thursday, August 21, 2003 7:47 AM
  To: [EMAIL PROTECTED]
  Subject: [VFS|HttpClient] Re: [VFS] Crashes in getContent()
 
 
  A few more details/thoughts/questions:
 
  1) The FSM appears to be using UrlFileObject although I have
  HttpClient in
  my path. (This was when run from inside Eclipse and not
  command line, with
  Eclipse project dependency upon HttpClient. With command line
  I get the
  right one. Could this be some issue w/ a difference of class
  loading inside
  Eclipse?)
 
  Is there any way I can get inside and dump/display an FSM's
  providers?
  (Unfortunately commons-logging seems to chose log4j in this
  environment not
  jdk1.4 logging, and I don't have that configured, so I am loosing the
  warnings.
 
  2) I tested an exists call on a bad (non-existent) URL -- 
  and it didn't
  return false when used with the UrlFileObject. I've not
  figured out why,
  but it seem like that problem has slipped back in. [If I can
  figure out
  where to add it I'll submit a patch w/ a test for this.]
 
  3) When I test on the command line, w/ latest HttpClient from
  CVS, I do get
  a similar looking crash (see bottom) which looks like an
  HttpClient issue
  (hence the shared subject.)
 
  4) When I attempt to run all the unit tests for commons-vfs I
  get numerous
  NullPtr crashes in the tests. Isthis somehow environmental,
  or are they
  failing? The NullPtrs don't look like HttpClient only, so
  perhaps there are
  two sets of problems.
 
  5) Given all this, would it be possible for the two teams (VFS and
  HttpClient) to add test projects to gump to augment the compile
  projects? Meaning commons-httpclient-test and
  commons-vfs-test that depend
  upon their parents, and run unit tests. That way projects like
  krysalis-ruper could chose to depend upon a successful unit
  test run, and
  not propagate crashes.
 
  regards,
 
  Adam
 
  --
  --
  -
 
  F:\Krysalis\Testingjava org.krysalis.ruper.util.VfsUtils
  Aug 21, 2003 8:24:09 AM
  org.apache.commons.vfs.impl.StandardFileSystemManager addProvider
  WARNING: Skipping provider
  org.apache.commons.vfs.provider.ftp.FtpFileProvider because
  required cl
  ass org.apache.commons.net.ftp.FTPFile is not available.
  Aug 21, 2003 8:24:09 AM
  org.apache.commons.vfs.impl.StandardFileSystemManager addProvider
  WARNING: Skipping provider
  org.apache.commons.vfs.provider.smb.SmbFileProvider because
  required cl
  ass jcifs.smb.SmbFile is not available.
  Aug 21, 2003 8:24:09 AM
  org.apache.commons.vfs.impl.StandardFileSystemManager addProvider
  WARNING: Skipping provider
  org.apache.commons.vfs.provider.webdav.WebdavFileProvider
  because requi
  red class org.apache.webdav.lib.WebdavResource is not available.
  Aug 21, 2003 8:24:09 AM
  org.apache.commons.vfs.impl.StandardFileSystemManager addProvider
  WARNING: Skipping provider
  org.apache.commons.vfs.provider.sftp.SftpFileProvider
  because required
  class com.jcraft.jsch.JSch is not available.
  Exception in thread main java.lang.NullPointerException
  at
  org.apache.commons.httpclient.HttpMethodDirector.processRedire
  ctResponse(Htt
  pMethodDirect
  or.java:454)
  at
  org.apache.commons.httpclient.HttpMethodDirector.isRetryNeeded
  (HttpMethodDir
  ector.java:63
  9)
  at
  org.apache.commons.httpclient.HttpMethodDirector.executeMethod
  (HttpMethodDir
  ector.java:14
  5)
  at
  org.apache.commons.httpclient.HttpClient.executeMethod(HttpCli
  ent.java:378)
  at
  org.apache.commons.httpclient.HttpClient.executeMethod(HttpCli
  ent.java:268)
  at
  org.apache.commons.vfs.provider.http.HttpFileObject.doGetType(
  HttpFileObject
  .java:114)
  at
  org.apache.commons.vfs.provider.AbstractFileObject.attach(Abst
  ractFileObject
  .java:919)
  at
  org.apache.commons.vfs.provider.AbstractFileObject.exists(Abst
  ractFileObject
  .java:372)
  at org.krysalis.ruper.util.VfsUtils.main(VfsUtils.java:413)
 
  regards
 
  Adam
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]

cvs commit: jakarta-commons/httpclient/xdocs/methods get.xml

2003-08-21 Thread oglueck
oglueck 2003/08/21 09:08:54

  Modified:httpclient/xdocs userguide.xml downloads.xml sslguide.xml
news.xml navigation.xml authentication.xml
methods.xml threading.xml
   httpclient/xdocs/stylesheets project.xml
   httpclient/xdocs/methods get.xml
  Log:
  fixed broken CVS link
  
  Revision  ChangesPath
  1.2   +2 -2  jakarta-commons/httpclient/xdocs/userguide.xml
  
  Index: userguide.xml
  ===
  RCS file: /home/cvs/jakarta-commons/httpclient/xdocs/userguide.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- userguide.xml 10 Mar 2003 04:08:06 -  1.1
  +++ userguide.xml 21 Aug 2003 16:08:54 -  1.2
  @@ -50,7 +50,7 @@
 that are provided by HttpClient and how to use them./td
   /tr
   tr
  -  tda 
href=http://cvs.apache.org/viewcvs/jakarta-commons/httpclient/src/examples/;Sample 
Code/a/td
  +  tda 
href=http://cvs.apache.org/viewcvs.cgi/jakarta-commons/httpclient/src/examples/;Sample
 Code/a/td
 tdThis is a link to the sample code for using HttpClient that is
 stored in the CVS repository and is available in source releases
 of HttpClient./td
  
  
  
  1.22  +2 -2  jakarta-commons/httpclient/xdocs/downloads.xml
  
  Index: downloads.xml
  ===
  RCS file: /home/cvs/jakarta-commons/httpclient/xdocs/downloads.xml,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- downloads.xml 1 Aug 2003 23:20:09 -   1.21
  +++ downloads.xml 21 Aug 2003 16:08:54 -  1.22
  @@ -31,7 +31,7 @@
  /p
  p
The CVS repository for emHttpClient/em can be
  - a 
href=http://cvs.apache.org/viewcvs/jakarta-commons/httpclient/;browsed online/a.
  + a 
href=http://cvs.apache.org/viewcvs.cgi/jakarta-commons/httpclient/;browsed 
online/a.
  /p
  p
The best way to get emHttpClient/em, is to checkout the souce from our 
public 
  
  
  
  1.3   +2 -2  jakarta-commons/httpclient/xdocs/sslguide.xml
  
  Index: sslguide.xml
  ===
  RCS file: /home/cvs/jakarta-commons/httpclient/xdocs/sslguide.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- sslguide.xml  12 Jun 2003 22:24:21 -  1.2
  +++ sslguide.xml  21 Aug 2003 16:08:54 -  1.3
  @@ -174,7 +174,7 @@
   ul
   
   li
  - a 
href=http://cvs.apache.org/viewcvs/jakarta-commons/httpclient/src/contrib/org/apache/commons/httpclient/contrib/ssl/EasySSLProtocolSocketFactory.java?rev=HEAD;
  
  + a 
href=http://cvs.apache.org/viewcvs.cgi/jakarta-commons/httpclient/src/contrib/org/apache/commons/httpclient/contrib/ssl/EasySSLProtocolSocketFactory.java?rev=HEAD;
  
 EasySSLProtocolSocketFactory/a can be used to create SSL connections 
that allow the target 
 server to authenticate with a self-signed certificate.
   /li
  
  
  
  1.24  +2 -2  jakarta-commons/httpclient/xdocs/news.xml
  
  Index: news.xml
  ===
  RCS file: /home/cvs/jakarta-commons/httpclient/xdocs/news.xml,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- news.xml  1 Aug 2003 23:20:09 -   1.23
  +++ news.xml  21 Aug 2003 16:08:54 -  1.24
  @@ -132,7 +132,7 @@
   has been accepted by the
   a href=http://jakarta.apache.org/commons;Jakarta Commons/a
   team and the source has been moved into the
  -a href=http://cvs.apache.org/viewcvs/jakarta-commons/httpclient/;CVS 
repository/a.
  +a href=http://cvs.apache.org/viewcvs.cgi/jakarta-commons/httpclient/;CVS 
repository/a.
 /p
   /section
   
  
  
  
  1.9   +2 -2  jakarta-commons/httpclient/xdocs/navigation.xml
  
  Index: navigation.xml
  ===
  RCS file: /home/cvs/jakarta-commons/httpclient/xdocs/navigation.xml,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- navigation.xml12 Jun 2003 03:31:50 -  1.8
  +++ navigation.xml21 Aug 2003 16:08:54 -  1.9
  @@ -23,7 +23,7 @@
   item name=Cross Host Redirects href=/redirects.html/
   item name=Logging Guide href=/logging.html/
   item name=Methods href=/methods.html/
  -item name=Sample Code 
href=http://cvs.apache.org/viewcvs/jakarta-commons/httpclient/src/examples//
  +item name=Sample Code 
href=http://cvs.apache.org/viewcvs.cgi/jakarta-commons/httpclient/src/examples//
   item name=SSL Guide href=/sslguide.html/
   

cvs commit: jakarta-commons-sandbox/hivemind/src/META-INF hivemodule.xml

2003-08-21 Thread hlship
hlship  2003/08/21 07:52:09

  Modified:hivemind/src/test/hivemind/test/services DemoService.java
ComplexModule.xml
   hivemind/src/java/org/apache/commons/hivemind/service/impl
AbstractServiceInterceptorFactory.java
LoggingInterceptorFactory.java
   hivemind/src/META-INF hivemodule.xml
  Added:   hivemind/src/java/org/apache/commons/hivemind/service/impl
DefaultsSymbolSource.java
  Removed: hivemind/src/java/org/apache/commons/hivemind/service/impl
FactoryDefaultsSymbolSource.java
  Log:
  Add an ApplicationDefaults extension point to complement FactoryDefaults extension 
point.
  Have the LoggingInterceptor log all runtime exceptions (in addition to declared 
checked exceptions).
  Change AbstractServiceInterceptorFactory to not use the Initializable interface; 
change the MDD to configure it using BuilderFactory.
  
  Revision  ChangesPath
  1.2   +3 -3  
jakarta-commons-sandbox/hivemind/src/test/hivemind/test/services/DemoService.java
  
  Index: DemoService.java
  ===
  RCS file: 
/home/cvs/jakarta-commons-sandbox/hivemind/src/test/hivemind/test/services/DemoService.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- DemoService.java  30 Jun 2003 23:04:45 -  1.1
  +++ DemoService.java  21 Aug 2003 14:52:09 -  1.2
  @@ -74,7 +74,7 @@
   
   /**
* Used to test runtime failures.  This implementation
  - * always throws an exception.
  + * always throws a runtime exception.
*/
  -public void alwaysFail() throws RuntimeException;
  +public void alwaysFail();
   }
  
  
  
  1.4   +8 -2  
jakarta-commons-sandbox/hivemind/src/test/hivemind/test/services/ComplexModule.xml
  
  Index: ComplexModule.xml
  ===
  RCS file: 
/home/cvs/jakarta-commons-sandbox/hivemind/src/test/hivemind/test/services/ComplexModule.xml,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ComplexModule.xml 29 Jul 2003 22:20:41 -  1.3
  +++ ComplexModule.xml 21 Aug 2003 14:52:09 -  1.4
  @@ -9,6 +9,12 @@
/service

service id=CountFactory 
interface=org.apache.commons.hivemind.ServiceInterceptorFactory
  -   create-instance class=hivemind.test.services.impl.CountFactory/
  + invoke-factory service-id=hivemind.BuilderFactory
  + construct
  +class=hivemind.test.services.impl.CountFactory
  +point-id-property=extensionId
  + set-service property=factory 
service-id=hivemind.ClassFactory/
  + /construct
  + /invoke-factory
/service
   /module
  
  
  
  1.11  +21 -17
jakarta-commons-sandbox/hivemind/src/java/org/apache/commons/hivemind/service/impl/AbstractServiceInterceptorFactory.java
  
  Index: AbstractServiceInterceptorFactory.java
  ===
  RCS file: 
/home/cvs/jakarta-commons-sandbox/hivemind/src/java/org/apache/commons/hivemind/service/impl/AbstractServiceInterceptorFactory.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- AbstractServiceInterceptorFactory.java20 Aug 2003 20:40:46 -  1.10
  +++ AbstractServiceInterceptorFactory.java21 Aug 2003 14:52:09 -  1.11
  @@ -62,24 +62,29 @@
   
   import org.apache.commons.hivemind.ApplicationRuntimeException;
   import org.apache.commons.hivemind.HiveMind;
  -import org.apache.commons.hivemind.Initializable;
   import org.apache.commons.hivemind.InterceptorStack;
   import org.apache.commons.hivemind.Module;
  -import org.apache.commons.hivemind.ServiceExtensionPoint;
   import org.apache.commons.hivemind.ServiceInterceptorFactory;
  -import org.apache.commons.hivemind.service.*;
   import org.apache.commons.hivemind.service.ClassFab;
  +import org.apache.commons.hivemind.service.ClassFabUtils;
   import org.apache.commons.hivemind.service.ClassFactory;
   
   /**
* Base class for creating new service interceptors.  Most implementations
* merely have to implement [EMAIL PROTECTED] #createMethod(ClassFab, String, 
Class, Class[], Class[])}.
  + * 
  + * p
  + * Implementations of this service must be configured with:
  + * ul
  + * liThe extension point id assigned to the codeextensionId/code property
  + * liThe codehivemind.ClassFactory/code service assigned to the 
codefactory/code property
  + * /ul
*
* @author Howard Lewis Ship
* @version $Id$
*/
   public abstract class AbstractServiceInterceptorFactory
  -implements ServiceInterceptorFactory, Initializable
  +implements ServiceInterceptorFactory
   {
   private ClassFactory 

RE: [lang] Lang 2.0 release?

2003-08-21 Thread Gary Gregory
   (2) It's seems trivial to add the missing @since tags JDiff
 complains
   about.
   Or that just too anal?
   
   
S'not too hard to remove the tag and redo the build. Feel free to
 commit
them :)
   
Hen

Committed to CVS.

Gary


RE: [lang] StringUtils.differenceAt()

2003-08-21 Thread Gary Gregory
Any opinions on changing differenceAt() to indexOfDifference() ?

Gary

 -Original Message-
 From: Gary Gregory [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, August 20, 2003 23:01
 To: 'Jakarta Commons Developers List'
 Subject: [lang] StringUtils.differenceAt()
 
 Hello,
 
 We have new 2.0 method called differenceAt() but I believe it is not named
 correctly. Methods with At usually receive an index argument, like
 String.charAt(). This method /returns/ an index.
 
 I think indexOfDifference() would be better and in the same vein as
 String.indexOf().
 
 Gary
 (fyi, off to bed if there is any voting goin' on)


Can an xdocs/javadocs doclets do this?

2003-08-21 Thread Gary Gregory
Just a wet dream: wouldn't it be nice if instead of using pre tags in
Javadoc code comments you could use a javacode tag and have the code come
out all perty in HTML without mucking your actual .java files?

I see source xrefs that are syntax highlighted somewhat. Does anyone know of
such a doo-dad?

Gary


RE: [lang] Lang 2.0 release?

2003-08-21 Thread Gary Gregory
Did you generate the JDiff report from Maven?

If so, does Maven download the 1.0.1 sources automatically and compares to
your local copy? 

I am trying to get a fix on how easy it would be for me to generate the same
JDiff reports locally as I've fixes the @since 2.0 tags.

Thanks,
Gary

 -Original Message-
 From: Henri Yandell [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, August 20, 2003 20:01
 To: Jakarta Commons Developers List
 Subject: [lang] Lang 2.0 release?
 
 
 Seems that since RC3, we've just:
 
 removed an unused private attribute
 updated javadoc in a few places
 removed a method
 moved 2 classes up a package from util
 removed a class from util
 
 While I could build an RC4, I'm going to be hopeful and build a release
 build. CVS tags can always be deleted/moved in case of major issues
 again.
 
 If no one can find a problem by tomorrow morning, I'll call a vote on
 Commons-dev, Ccing the PMC. Assuming things go well, we ought to get 3
 non-Lang +1's by the weekend.
 
 I'll aim to do the release stuff over the weekend [mirrors will be new to
 me] and have the release on the site by the end of the weekend, which
 always seems to be good timing.
 
 Any thoughts?
 
 Release build in:
 
 http://www.apache.org/~bayard/commons-lang-2.0/
 
 Also, the following file from JDiff is very useful, I hadn't noticed it
 before:
 
 http://www.apache.org/~bayard/commons-lang-2.0/Commons-Lang-1.0.1-to-
 2.0/missingSinces.txt
 
 [although hopefully it's something we can leave to fix until 2.1]
 
 Hen
 
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


cvs commit: jakarta-commons-sandbox/hivemind/src/xsl hivemind.xsl

2003-08-21 Thread hlship
hlship  2003/08/21 07:59:18

  Modified:hivemind/src/xsl hivemind.xsl
  Log:
  Minor tweak to XSL output.
  
  Revision  ChangesPath
  1.15  +3 -3  jakarta-commons-sandbox/hivemind/src/xsl/hivemind.xsl
  
  Index: hivemind.xsl
  ===
  RCS file: /home/cvs/jakarta-commons-sandbox/hivemind/src/xsl/hivemind.xsl,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- hivemind.xsl  12 Aug 2003 17:31:54 -  1.14
  +++ hivemind.xsl  21 Aug 2003 14:59:18 -  1.15
  @@ -262,7 +262,7 @@
xsl:template match=element

tr
  - th class=section-id colspan=3Element lt;xsl:value-of 
select=@name/gt;/th  
  + th class=section-id colspan=3Element span 
class=taglt;xsl:value-of select=@name/gt;/span/th 

/tr

  @@ -322,7 +322,7 @@

tr
td/
  - tdAttribute xsl:value-of select=@name//td
  + tdAttribute span class=attributexsl:value-of 
select=@name//span/td
td
xsl:choose
xsl:when test=@required = 'true'
  
  
  

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



[resources] plans...?

2003-08-21 Thread robert burrell donkin
what's current status of the resources sandbox component?

the site's maven-generated but badly out of dates with minimal 
documentation. some of the javadocs looks like it might have been 
cut-and-pasted in. i'm not sure whether some of the code doesn't work or 
whether i just don't understand what it's supposed to do.

i'd be willing to dive in and take a look at documenting and fixing up 
some stuff if there are folks out there who'll keep me on the straight and 
narrow.

- robert

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


cvs commit: jakarta-commons/lang/src/java/org/apache/commons/lang/builder CompareToBuilder.java

2003-08-21 Thread ggregory
ggregory2003/08/21 08:13:09

  Modified:lang/src/java/org/apache/commons/lang/builder
CompareToBuilder.java
  Log:
  Add @since 2.0 tags based on 
http://www.apache.org/~bayard/commons-lang-2.0/Commons-Lang-1.0.1-to-2.0/missingSinces.txt
  
  Revision  ChangesPath
  1.22  +7 -3  
jakarta-commons/lang/src/java/org/apache/commons/lang/builder/CompareToBuilder.java
  
  Index: CompareToBuilder.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/lang/src/java/org/apache/commons/lang/builder/CompareToBuilder.java,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- CompareToBuilder.java 18 Aug 2003 02:22:24 -  1.21
  +++ CompareToBuilder.java 21 Aug 2003 15:13:09 -  1.22
  @@ -232,6 +232,7 @@
*  (but not both) is codenull/code
* @throws ClassCastException  if coderhs/code is not assignment-compatible
*  with codelhs/code
  + * @since 2.0
*/
   public static int reflectionCompare(Object lhs, Object rhs, boolean 
compareTransients, Class reflectUpToClass) {
   if (lhs == rhs) {
  @@ -295,6 +296,7 @@
*
* @param superCompareTo  result of calling codesuper.compareTo(Object)/code
* @return this - used to chain append calls
  + * @since 2.0
*/
   public CompareToBuilder appendSuper(int superCompareTo) {
   if (comparison != 0) {
  @@ -351,6 +353,7 @@
* @return this - used to chain append calls
* @throws ClassCastException  if coderhs/code is not assignment-compatible
*  with codelhs/code
  + * @since 2.0
*/
   public CompareToBuilder append(Object lhs, Object rhs, Comparator comparator) {
   if (comparison != 0) {
  @@ -594,8 +597,9 @@
*  codenull/code means to treat codelhs/code elements as 
codeComparable/code.
* @return this - used to chain append calls
* @throws ClassCastException  if coderhs/code is not assignment-compatible
  -   *  with codelhs/code
  -   */
  + *  with codelhs/code
  + * @since 2.0
  + */
   public CompareToBuilder append(Object[] lhs, Object[] rhs, Comparator 
comparator) {
   if (comparison != 0) {
   return this;
  
  
  

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



cvs commit: jakarta-commons/httpclient/xdocs navigation.xml

2003-08-21 Thread oglueck
oglueck 2003/08/21 09:04:32

  Modified:httpclient/xdocs Tag: HTTPCLIENT_2_0_BRANCH navigation.xml
  Log:
  fixed broken CVS link
  
  Revision  ChangesPath
  No   revision
  No   revision
  1.8.2.1   +2 -2  jakarta-commons/httpclient/xdocs/navigation.xml
  
  Index: navigation.xml
  ===
  RCS file: /home/cvs/jakarta-commons/httpclient/xdocs/navigation.xml,v
  retrieving revision 1.8
  retrieving revision 1.8.2.1
  diff -u -r1.8 -r1.8.2.1
  --- navigation.xml12 Jun 2003 03:31:50 -  1.8
  +++ navigation.xml21 Aug 2003 16:04:32 -  1.8.2.1
  @@ -23,7 +23,7 @@
   item name=Cross Host Redirects href=/redirects.html/
   item name=Logging Guide href=/logging.html/
   item name=Methods href=/methods.html/
  -item name=Sample Code 
href=http://cvs.apache.org/viewcvs/jakarta-commons/httpclient/src/examples//
  +item name=Sample Code 
href=http://cvs.apache.org/viewcvs.cgi/jakarta-commons/httpclient/src/examples//
   item name=SSL Guide href=/sslguide.html/
   item name=Threading href=/threading.html/
   item name=Trouble Shooting href=/troubleshooting.html/
  
  
  

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



cvs commit: jakarta-commons/betwixt/src/java/org/apache/commons/betwixt/strategy DefaultObjectStringConverter.java

2003-08-21 Thread rdonkin
rdonkin 2003/08/21 10:07:18

  Modified:betwixt/src/java/org/apache/commons/betwixt/strategy
DefaultObjectStringConverter.java
  Log:
  Corrected java docs
  
  Revision  ChangesPath
  1.2   +25 -16
jakarta-commons/betwixt/src/java/org/apache/commons/betwixt/strategy/DefaultObjectStringConverter.java
  
  Index: DefaultObjectStringConverter.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/betwixt/src/java/org/apache/commons/betwixt/strategy/DefaultObjectStringConverter.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- DefaultObjectStringConverter.java 31 Jul 2003 21:38:31 -  1.1
  +++ DefaultObjectStringConverter.java 21 Aug 2003 17:07:18 -  1.2
  @@ -71,31 +71,39 @@
   /** 
* pDefault string lt;-gt; object conversion strategy./p
* p
  - * This delegates to ConvertUtils except when the type is assignable from 
codejava.util.Date/code
  + * This delegates to ConvertUtils except when the type 
  + * is assignable from codejava.util.Date/code
* but not from codejava.sql.Date/code.
  - * In this case, the format used is (in SimpleDateFormat terms) codeEEE MMM dd 
HH:mm:ss zzz /code.
  + * In this case, the format used is (in SimpleDateFormat terms) 
  + * codeEEE MMM dd HH:mm:ss zzz /code.
* This is the same as the output of the toString method on java.util.Date.
* /p
* p
* This should preserve the existing symantic behaviour whilst allowing round 
tripping of dates
* (given the default settings).
* /p
  + * @author Robert Burrell Donkin
*/
   public class DefaultObjectStringConverter extends ConvertUtilsObjectStringConverter 
{
   
   /** Formats Dates to Strings and Strings to Dates */
  -private final static SimpleDateFormat formatter = new SimpleDateFormat(EEE MMM 
dd HH:mm:ss zzz );
  +private static final SimpleDateFormat formatter 
  += new SimpleDateFormat(EEE MMM dd HH:mm:ss zzz );
   
   /**
 * Converts an object to a string representation using ConvertUtils.
  -  * If the object is a java.util.Date and the type is java.util.Date but not 
java.sql.Date
  -  * then SimpleDateFormat formatting to codeEEE MMM dd HH:mm:ss zzz 
/code
  +  * If the object is a java.util.Date and the type is java.util.Date 
  +  * but not java.sql.Date
  +  * then SimpleDateFormat formatting to 
  +  * codeEEE MMM dd HH:mm:ss zzz /code
 * will be used. 
 * (This is the same as java.util.Date toString would return.)
 *
 * @param object the object to be converted, possibly null
 * @param type the property class of the object, not null
  -  * @param flavour a string allow symantic differences in formatting to be 
communicated (ignored)
  +  * @param flavour a string allow symantic differences in formatting 
  +  * to be communicated (ignored)
  +  * @param context convert against this context not null
 * @return a String representation, not null
 */
   public String objectToString(Object object, Class type, String flavour, Context 
context) {
  @@ -122,12 +130,11 @@
 */
   public Object stringToObject(String value, Class type, String flavour, Context 
context) {
   if ( isUtilDate( type ) ) {
  -try
  -{
  +try {
  +
   return formatter.parse( value );
  -}
  -catch ( ParseException ex )
  -{ 
  +
  +} catch ( ParseException ex ) { 
   handleException( ex );
   // this supports any subclasses that do not which to throw 
exceptions
   // probably will result in a problem when the method will be 
invoked
  @@ -152,7 +159,9 @@
   }
   
   /**
  -  * Is the given type a java.util.Date but not a java.sql.Date.
  +  * Is the given type a java.util.Date but not a java.sql.Date?
  +  * @param type test this class type
  +  * @return true is this is a until date but not a sql one
 */
   private boolean isUtilDate(Class type) {
   return ( java.util.Date.class.isAssignableFrom(type) 
  
  
  

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



cvs commit: jakarta-commons/httpclient/xdocs/stylesheets project.xml

2003-08-21 Thread oglueck
oglueck 2003/08/21 09:07:31

  Modified:httpclient/xdocs Tag: HTTPCLIENT_2_0_BRANCH news.xml
userguide.xml sslguide.xml methods.xml
downloads.xml threading.xml authentication.xml
   httpclient/xdocs/methods Tag: HTTPCLIENT_2_0_BRANCH get.xml
   httpclient/xdocs/stylesheets Tag: HTTPCLIENT_2_0_BRANCH
project.xml
  Log:
  fixed broken CVS link
  
  Revision  ChangesPath
  No   revision
  No   revision
  1.20.2.4  +2 -2  jakarta-commons/httpclient/xdocs/news.xml
  
  Index: news.xml
  ===
  RCS file: /home/cvs/jakarta-commons/httpclient/xdocs/news.xml,v
  retrieving revision 1.20.2.3
  retrieving revision 1.20.2.4
  diff -u -r1.20.2.3 -r1.20.2.4
  --- news.xml  1 Aug 2003 03:22:00 -   1.20.2.3
  +++ news.xml  21 Aug 2003 16:07:31 -  1.20.2.4
  @@ -132,7 +132,7 @@
   has been accepted by the
   a href=http://jakarta.apache.org/commons;Jakarta Commons/a
   team and the source has been moved into the
  -a href=http://cvs.apache.org/viewcvs/jakarta-commons/httpclient/;CVS 
repository/a.
  +a href=http://cvs.apache.org/viewcvs.cgi/jakarta-commons/httpclient/;CVS 
repository/a.
 /p
   /section
   
  
  
  
  1.1.2.1   +2 -2  jakarta-commons/httpclient/xdocs/userguide.xml
  
  Index: userguide.xml
  ===
  RCS file: /home/cvs/jakarta-commons/httpclient/xdocs/userguide.xml,v
  retrieving revision 1.1
  retrieving revision 1.1.2.1
  diff -u -r1.1 -r1.1.2.1
  --- userguide.xml 10 Mar 2003 04:08:06 -  1.1
  +++ userguide.xml 21 Aug 2003 16:07:31 -  1.1.2.1
  @@ -50,7 +50,7 @@
 that are provided by HttpClient and how to use them./td
   /tr
   tr
  -  tda 
href=http://cvs.apache.org/viewcvs/jakarta-commons/httpclient/src/examples/;Sample 
Code/a/td
  +  tda 
href=http://cvs.apache.org/viewcvs.cgi/jakarta-commons/httpclient/src/examples/;Sample
 Code/a/td
 tdThis is a link to the sample code for using HttpClient that is
 stored in the CVS repository and is available in source releases
 of HttpClient./td
  
  
  
  1.2.2.1   +3 -3  jakarta-commons/httpclient/xdocs/sslguide.xml
  
  Index: sslguide.xml
  ===
  RCS file: /home/cvs/jakarta-commons/httpclient/xdocs/sslguide.xml,v
  retrieving revision 1.2
  retrieving revision 1.2.2.1
  diff -u -r1.2 -r1.2.2.1
  --- sslguide.xml  12 Jun 2003 22:24:21 -  1.2
  +++ sslguide.xml  21 Aug 2003 16:07:31 -  1.2.2.1
  @@ -174,13 +174,13 @@
   ul
   
   li
  - a 
href=http://cvs.apache.org/viewcvs/jakarta-commons/httpclient/src/contrib/org/apache/commons/httpclient/contrib/ssl/EasySSLProtocolSocketFactory.java?rev=HEAD;
  
  + a 
href=http://cvs.apache.org/viewcvs.cgi/jakarta-commons/httpclient/src/contrib/org/apache/commons/httpclient/contrib/ssl/EasySSLProtocolSocketFactory.java?rev=HEAD;
  
 EasySSLProtocolSocketFactory/a can be used to create SSL connections 
that allow the target 
 server to authenticate with a self-signed certificate.
   /li
   
   li
  - a 
href=http://cvs.apache.org/viewcvs/jakarta-commons/httpclient/src/contrib/org/apache/commons/httpclient/contrib/ssl/StrictSSLProtocolSocketFactory.java?rev=HEAD;
  
  + a 
href=http://cvs.apache.org/viewcvs.cgi/jakarta-commons/httpclient/src/contrib/org/apache/commons/httpclient/contrib/ssl/StrictSSLProtocolSocketFactory.java?rev=HEAD;
  
 StrictSSLProtocolSocketFactory/a can be used to create SSL connections 
that can optionally perform host name verification in order to help preventing 
man-in-the-middle type of attacks. 
   /li
   
  
  
  
  1.3.2.1   +2 -2  jakarta-commons/httpclient/xdocs/methods.xml
  
  Index: methods.xml
  ===
  RCS file: /home/cvs/jakarta-commons/httpclient/xdocs/methods.xml,v
  retrieving revision 1.3
  retrieving revision 1.3.2.1
  diff -u -r1.3 -r1.3.2.1
  --- methods.xml   11 Mar 2003 08:03:12 -  1.3
  +++ methods.xml   21 Aug 2003 16:07:31 -  1.3.2.1
  @@ -20,7 +20,7 @@
 pThe examples on the following pages are not complete and are only used
 to highlight the important features that are unique to each method.  For
 complete examples, please refer to the a
  -  
href=http://cvs.apache.org/viewcvs/jakarta-commons/httpclient/src/examples/;sample
  +  
href=http://cvs.apache.org/viewcvs.cgi/jakarta-commons/httpclient/src/examples/;sample
 code/a./p
   /section
   
  
  
  
  1.19.2.3  +2 -2  

[vfs] porting sftp from JSch to Sshtools

2003-08-21 Thread Jeff Barrett
I've been working around/with sftp for a little while, and JSch is a bit hard to work 
with.  I've contacted the maintainer of Sshtools and he has agreed to make his java 
ssh library, J2SSH (http://www.sshtools.com/) available via an Apache friendly license 
(he's currently LGPL) if we ported VFS over to it.

I'd be happy to do this port, as long as I thought it would get commited.  Motivation 
for me is mainly that J2SSH is more actively maintained, and the code is far cleaner.  
Both libraries are young and have their small problems.  But finding and fixing bugs 
in J2SSH is far easier.

On a side note, the Sshtools maintainer said other jakarta projects that have sought a 
better implementation of SSH but the license stopped them.  This might help them out 
as well.

Any thoughts?

+jeff

The information in this email and subsequent attachments may contain confidential 
information that is intended solely for the attention and use of the named 
addressee(s). This message or any part thereof must not be disclosed, copied, 
distributed, or retained by any person without the authorization from the addressee.

 

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



RE: [lang] StringUtils.differenceAt()

2003-08-21 Thread Henri Yandell

I'm +1 to your suggested change. Makes sense.

Hen

On Thu, 21 Aug 2003, Gary Gregory wrote:

 Any opinions on changing differenceAt() to indexOfDifference() ?

 Gary

  -Original Message-
  From: Gary Gregory [mailto:[EMAIL PROTECTED]
  Sent: Wednesday, August 20, 2003 23:01
  To: 'Jakarta Commons Developers List'
  Subject: [lang] StringUtils.differenceAt()
 
  Hello,
 
  We have new 2.0 method called differenceAt() but I believe it is not named
  correctly. Methods with At usually receive an index argument, like
  String.charAt(). This method /returns/ an index.
 
  I think indexOfDifference() would be better and in the same vein as
  String.indexOf().
 
  Gary
  (fyi, off to bed if there is any voting goin' on)



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



cvs commit: jakarta-commons-sandbox/io/data/test test.txt

2003-08-21 Thread jeremias
jeremias2003/08/21 11:37:15

  Added:   io/data/test test.txt
  Log:
  test files moved to data/test
  Submitted by: Matthew Hawthorne mhawthorne at alumni.pitt.edu
  
  Revision  ChangesPath
  1.1  jakarta-commons-sandbox/io/data/test/test.txt
  
  Index: test.txt
  ===
  This is a test
  
  

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



cvs commit: jakarta-commons-sandbox/io/src/test/org/apache/commons/io test.txt

2003-08-21 Thread jeremias
jeremias2003/08/21 11:37:40

  Removed: io/src/test/org/apache/commons/io test.txt
  Log:
  test files moved to data/test
  Submitted by: Matthew Hawthorne mhawthorne at alumni.pitt.edu

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



cvs commit: jakarta-commons-sandbox/io/src/java/org/apache/commons/io CopyUtils.java FileUtils.java IOUtils.java

2003-08-21 Thread jeremias
jeremias2003/08/21 11:40:48

  Modified:io/src/java/org/apache/commons/io FileUtils.java
IOUtils.java
  Added:   io/src/java/org/apache/commons/io CopyUtils.java
  Log:
  Bugzilla 22075: Copy copy methods from IOUtils to CopyUtils, deprecate old copy 
methods.
  Bugzilla 22332: Deprecated FileUtils string methods, Code style-up
  Submitted by: Matthew Hawthorne mhawthorne at alumni.pitt.edu
  
  Revision  ChangesPath
  1.14  +489 -484  
jakarta-commons-sandbox/io/src/java/org/apache/commons/io/FileUtils.java
  
  Index: FileUtils.java
  ===
  RCS file: 
/home/cvs/jakarta-commons-sandbox/io/src/java/org/apache/commons/io/FileUtils.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- FileUtils.java29 Jul 2003 13:07:39 -  1.13
  +++ FileUtils.java21 Aug 2003 18:40:48 -  1.14
  @@ -55,10 +55,12 @@
   
   import java.io.File;
   import java.io.FileInputStream;
  +import java.io.FileNotFoundException;
   import java.io.FileOutputStream;
   import java.io.InputStream;
   import java.io.IOException;
   import java.net.URL;
  +import java.util.Date;
   import java.util.Vector;
   
   /**
  @@ -89,7 +91,7 @@
* /p
*
* Common [EMAIL PROTECTED] java.io.File} manipulation routines.
  - * 
  + *
* h3Origin of code/h3
* ul
*   licommons-utils repo/li
  @@ -103,6 +105,7 @@
* @author a href=mailto:[EMAIL PROTECTED]Christoph.Reck/a
* @author a href=mailto:[EMAIL PROTECTED]Peter Donald/a
* @author a href=mailto:[EMAIL PROTECTED]Jeff Turner/a
  + * @author Matthew Hawthorne
* @version $Id$
*/
   public class FileUtils {
  @@ -145,81 +148,7 @@
   return displaySize;
   }
   
  -/**
  - * Returns the directory path portion of a file specification string.
  - * Matches the equally named unix command.
  - * @param filename filename to inspect
  - * @return The directory portion excluding the ending file separator.
  - * @deprecated use getPath() instead.
  - * TODO DELETE before 1.0
  - */
  -public static String dirname(String filename) {
  -int i = filename.lastIndexOf(File.separator);
  -return (i = 0 ? filename.substring(0, i) : );
  -}
   
  -/**
  - * Returns the filename portion of a file specification string.
  - * @param filename filename to inspect
  - * @return The filename string with extension.
  - * @deprecated use removeExtension() instead.
  - * TODO DELETE before 1.0
  - */
  -public static String filename(String filename) {
  -int i = filename.lastIndexOf(File.separator);
  -return (i = 0 ? filename.substring(i + 1) : filename);
  -}
  -
  -/**
  - * Returns the filename portion of a file specification string.
  - * Matches the equally named unix command.
  - * @param filename filename to inspect
  - * @return The filename string without extension.
  - * TODO DELETE before 1.0
  - */
  -public static String basename(String filename) {
  -return basename(filename, extension(filename));
  -}
  -
  -/**
  - * Returns the filename portion of a file specification string.
  - * Matches the equally named unix command.
  - * @param filename filename to inspect
  - * @param suffix additional remaining portion of name that if matches will 
  - * be removed
  - * @return The filename string without the suffix.
  - */
  -public static String basename(String filename, String suffix) {
  -int i = filename.lastIndexOf(File.separator) + 1;
  -int lastDot = ((suffix != null)  (suffix.length()  0))
  -? filename.lastIndexOf(suffix) : -1;
  -
  -if (lastDot = 0) {
  -return filename.substring(i, lastDot);
  -} else if (i  0) {
  -return filename.substring(i);
  -} else {
  -return filename; // else returns all (no path and no extension)
  -}
  -}
  -
  -/**
  - * Returns the extension portion of a file specification string.
  - * This everything after the last dot '.' in the filename (NOT including
  - * the dot).
  - * @param filename filename to inspect
  - * @return the extension
  - * TODO probably duplicate method. See getExtension
  - */
  -public static String extension(String filename) {
  -int lastDot = filename.lastIndexOf('.');
  -
  -if (lastDot = 0) {
  -return filename.substring(lastDot + 1);
  -} else {
  -return ;
  -}
  -}
   
   /**
* Check if a file exits.
  @@ -238,8 +167,8 @@
* @param fileName The name of the file to read.
* @return The file contents or null if read failed.
* @throws IOException in case of an I/O error
  - * TODO This method should probably be removed 

[general] ibiblio update

2003-08-21 Thread Dirk Verbeeck
A new snapshot of commons-pool should be uploaded to ibiblio for the 
dbcp maven build.

Can somebody do the update / tell me how to do it ?

Cheers
Dirk


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


cvs commit: jakarta-commons-sandbox/io/data - New directory

2003-08-21 Thread jeremias
jeremias2003/08/21 11:37:12

  jakarta-commons-sandbox/io/data - New directory

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



cvs commit: jakarta-commons-sandbox/io/data/test - New directory

2003-08-21 Thread jeremias
jeremias2003/08/21 11:37:12

  jakarta-commons-sandbox/io/data/test - New directory

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



[jira] Updated: (JELLY-72) GbcTag insets and inheritance

2003-08-21 Thread jira
The following issue has been updated:

Updater: Scott Howlett (mailto:[EMAIL PROTECTED])
   Date: Thu, 21 Aug 2003 11:56 AM
Comment:
Patch to add the desired functionality
Changes:
 Attachment changed to gbctag_insets_inherit_patch.txt
-
For a full history of the issue, see:

  http://jira.codehaus.org/secure/ViewIssue.jspa?key=JELLY-72page=history

-
View the issue:

  http://jira.codehaus.org/secure/ViewIssue.jspa?key=JELLY-72


Here is an overview of the issue:
-
Key: JELLY-72
Summary: GbcTag insets and inheritance
   Type: Improvement

 Status: Unassigned
   Priority: Minor

 Time Spent: Unknown
  Remaining: Unknown

Project: jelly
 Components: 
 taglib.swing

   Assignee: 
   Reporter: Scott Howlett

Created: Thu, 21 Aug 2003 11:54 AM
Updated: Thu, 21 Aug 2003 11:56 AM

Description:
The gbc tag doesn't inherit properties from enclosing gbc tags, and it doesn't 
allow insets to be specified easily.


-
JIRA INFORMATION:
This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


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



[jira] Created: (JELLY-72) GbcTag insets and inheritance

2003-08-21 Thread jira
Message:

  A new issue has been created in JIRA.

-
View the issue:

  http://jira.codehaus.org/secure/ViewIssue.jspa?key=JELLY-72


Here is an overview of the issue:
-
Key: JELLY-72
Summary: GbcTag insets and inheritance
   Type: Improvement

 Status: Unassigned
   Priority: Minor

 Time Spent: Unknown
  Remaining: Unknown

Project: jelly
 Components: 
 taglib.swing

   Assignee: 
   Reporter: Scott Howlett

Created: Thu, 21 Aug 2003 11:54 AM
Updated: Thu, 21 Aug 2003 11:54 AM

Description:
The gbc tag doesn't inherit properties from enclosing gbc tags, and it doesn't 
allow insets to be specified easily.


-
JIRA INFORMATION:
This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


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



DO NOT REPLY [Bug 22597] - minIdle Functionality

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

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=22597

minIdle Functionality

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED



--- Additional Comments From [EMAIL PROTECTED]  2003-08-21 18:46 ---
patch committed with minor changes

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



DO NOT REPLY [Bug 19331] - [lang] General case: infinite loop: ToStringBuilder.reflectionToString

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

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=19331

[lang] General case: infinite loop: ToStringBuilder.reflectionToString





--- Additional Comments From [EMAIL PROTECTED]  2003-08-21 13:22 ---
Hello. I found similar bug.
I'm not good at English.
So, if you found syntax error, please ignore it. ;-)

---
private static class Alpha{
  private Alpha alpha;
  public Alpha(){
this.alpha = this;
  }

  public String toString(){
return ToStringBuilder.reflectionToString(this);
  }
}
---

This code ends with StackOverflowError. My environment is ...

System.out.println( + ToStringBuilder.class.getPackage
().getImplementationVersion()); returns 1.0.1.

Thanks.

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



cvs commit: jakarta-commons-sandbox/io/src/test/org/apache/commons/io/testtools - New directory

2003-08-21 Thread jeremias
jeremias2003/08/21 11:42:49

  jakarta-commons-sandbox/io/src/test/org/apache/commons/io/testtools - New directory

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



Re: [general] ibiblio update

2003-08-21 Thread Henri Yandell

You can mail the maven list, though Dion and others listen to this list so
will catch it.

Mainly you just have to let them know that:

commons-pool
2.0 [guessing]
url to get 2.0 from

needs uploading.

Hen

On Thu, 21 Aug 2003, Dirk Verbeeck wrote:

 A new snapshot of commons-pool should be uploaded to ibiblio for the
 dbcp maven build.

 Can somebody do the update / tell me how to do it ?

 Cheers
 Dirk




 -
 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: cvs commit: jakarta-commons-sandbox/io/src/java/org/apache/commons/io FileUtils.java

2003-08-21 Thread Jeremias Maerki
I forgot to credit Alban Peignier alban.peignier at free.fr for his
isFileNewer methods. I'm sorry. I shouldn't do more than a couple of
things at once.
http://nagoya.apache.org/eyebrowse/[EMAIL PROTECTED]by=threadfrom=348688

On 21.08.2003 20:40:48 jeremias wrote:
 jeremias2003/08/21 11:40:48
 
   Modified:io/src/java/org/apache/commons/io FileUtils.java

snip/

   Index: FileUtils.java
   ===
   RCS file: 
 /home/cvs/jakarta-commons-sandbox/io/src/java/org/apache/commons/io/FileUtils.java,v
   retrieving revision 1.13
   retrieving revision 1.14
   diff -u -r1.13 -r1.14

snip/

   + /**
   +  * Tests if the specified codeFile/code is newer than the reference 
   +  * codeFile/code.
   +  *
   +  * @param file the codeFile/code of which the modification date must be 
 compared
   +  * @param reference the codeFile/code of which the modification date is 
 used 
   +  * like reference
   +  * @return true if the codeFile/code exists and has been modified more 
 recently
   +  * than the reference codeFile/code.
   +  */
   + public static boolean isFileNewer(final File file, final File reference) {
   + if (reference == null) {
   + throw new IllegalArgumentException(No specified reference file);
   + }
   + if (!reference.exists()) {
   + throw new IllegalArgumentException(The reference file ' + file + 
 ' doesn't exist);
   + }
   + 
   + return isFileNewer(file, reference.lastModified());
   + }
   + 
   + /**
   +  * Tests if the specified codeFile/code is newer than the specified 
   +  * codeDate/code
   +  *
   +  * @param file the codeFile/code of which the modification date must be 
 compared
   +  * @param date the date reference
   +  * @return true if the codeFile/code exists and has been modified after
   +  * the given codeDate/code.
   +  */
   + public static boolean isFileNewer(final File file, final Date date) {
   + if (date == null) {
   + throw new IllegalArgumentException(No specified date);
   + }
   + return isFileNewer(file, date.getTime());
   + }
   + 
   + /**
   +  * Tests if the specified codeFile/code is newer than the specified 
   +  * time reference.
   +  *
   +  * @param file the codeFile/code of which the modification date must be 
 compared.
   +  * @param timeMillis the time reference measured in milliseconds since the 
 epoch 
   +  * (00:00:00 GMT, January 1, 1970)
   +  * @return true if the codeFile/code exists and has been modified after
   +  * the given time reference.
   +  */
   + public static boolean isFileNewer(final File file, final long timeMillis) {
   + if (file == null) {
   + throw new IllegalArgumentException(No specified file);
   + }
   + if (!file.exists()) {
   + return false;
   + }
   + 
   + return file.lastModified()  timeMillis;
   +}



Jeremias Maerki


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



RE: [lang] Lang 2.0 release?

2003-08-21 Thread Henri Yandell

I've just rebuilt and remavend etc all the bits for Lang 2.0 under JDK
1.4.2 under Linux.

I've not bothered with the id thing in the project.xml, we don't care
about getting that right for 2.0's release.

How does that look? Should we call a vote?

[Maven site will be up there in a bit]

Hen


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



cvs commit: jakarta-commons-sandbox/io/src/test/org/apache/commons/io FileUtilsFileNewerTestCase.java

2003-08-21 Thread jeremias
jeremias2003/08/21 11:53:51

  Added:   io/src/test/org/apache/commons/io
FileUtilsFileNewerTestCase.java
  Log:
  TestCases for isFileNewer methods in FileUtils
  Submitted by: Alban Peignier alban.peignier at free.fr
  
  Revision  ChangesPath
  1.1  
jakarta-commons-sandbox/io/src/test/org/apache/commons/io/FileUtilsFileNewerTestCase.java
  
  Index: FileUtilsFileNewerTestCase.java
  ===
  /*
   * $Header: 
/home/cvs/jakarta-commons-sandbox/io/src/test/org/apache/commons/io/FileUtilsFileNewerTestCase.java,v
 1.1 2003/08/21 18:53:51 jeremias Exp $
   * $Revision: 1.1 $
   * $Date: 2003/08/21 18:53:51 $
   *
   * 
   *
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 2003 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *notice, this list of conditions and the following disclaimer in
   *the documentation and/or other materials provided with the
   *distribution.
   *
   * 3. The end-user documentation included with the redistribution, if
   *any, must include the following acknowlegement:
   *   This product includes software developed by the
   *Apache Software Foundation (http://www.apache.org/).
   *Alternately, this acknowlegement may appear in the software itself,
   *if and wherever such third-party acknowlegements normally appear.
   *
   * 4. The names The Jakarta Project, Commons, and Apache Software
   *Foundation must not be used to endorse or promote products derived
   *from this software without prior written permission. For written
   *permission, please contact [EMAIL PROTECTED]
   *
   * 5. Products derived from this software may not be called Apache
   *nor may Apache appear in their names without prior written
   *permission of the Apache Group.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * 
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * http://www.apache.org/.
   */
  
  package org.apache.commons.io;
  
  import java.io.File;
  import java.util.Date;
  
  import org.apache.commons.io.testtools.*;
  
  /**
   * This is used to test FileUtils for correctness.
   *
   * @author a href=mailto:[EMAIL PROTECTED]Alban Peignier/a
   */
  public final class FileUtilsFileNewerTestCase extends FileBasedTestCase {
  
  // Test data
  private static final int FILE1_SIZE = 1;
  private static final int FILE2_SIZE = 1024 * 4 + 1;
  
  private final File m_testFile1;
  private final File m_testFile2;
  
  public FileUtilsFileNewerTestCase(final String name) {
  super(name);
  
  m_testFile1 = new File(getTestDirectory(), file1-test.txt);
  m_testFile2 = new File(getTestDirectory(), file2-test.txt);
  }
  
  /** @see junit.framework.TestCase#setUp() */
  protected void setUp() throws Exception {
  getTestDirectory().mkdirs();
  createFile(m_testFile1, FILE1_SIZE);
  createFile(m_testFile2, FILE2_SIZE);
  }
  
  /** @see junit.framework.TestCase#tearDown() */
  protected void tearDown() throws Exception {
  m_testFile1.delete();
  m_testFile2.delete();
  }
  
  /**
   * Tests the codeisFileNewer(File, *)/code methods which a normal file.
   *
   * @see FileUtils#isFileNewer(File, long)
   * @see FileUtils#isFileNewer(File, Date)
   * @see FileUtils#isFileNewer(File, File)
   */
  public void testIsFileNewer() {
  if 

RE: Commons Pool/DBCP minIdle Implementation

2003-08-21 Thread Richard Wareing
I knew there was something I forgot :).  Yup I totally agree with you
guys and.  I modified my working code and so far all seems well.  I'll
play around with the parameters a bit to see if I can break it.

Richard...



-Original Message-
From: Dirk Verbeeck [mailto:[EMAIL PROTECTED] 
Sent: Thursday, August 21, 2003 9:11 AM
To: Jakarta Commons Developers List
Subject: Re: Commons Pool/DBCP minIdle Implementation

I agree, maxActive should be respected.
Even with the WHEN_EXHAUSTED_GROW option, the evictor thread should 
limit itself.

Something like:
int objectDeficit = getMinIdle() - getNumIdle();
if (getMaxActive()  0) {
int growLimit = Math.max(0, getMaxActive() - getNumActive() 
- getNumIdle());
objectDeficit = Math.min(objectDeficit, growLimit);
}
for ( int j = 0; j  objectDeficit; j++ ) {
addObject();
}

I'll commit this in a couple of hours.
Dirk

Noel J. Bergman wrote:

Richard,

I only looked at your patches out of context, so perhaps I missed it,
but
where is the code to ensure that:

+// Check to see if we are below our minimum number of objects
+// if so enough to bring us back to our minimum.
+int objectDeficit = getNumIdle() - _minIdle;
+if ( objectDeficit  0 ) {
+for ( int j = 0; j  Math.abs(objectDeficit); j++ ) {
+addObject();
+} // for
+} // if

doesn't cause the number of objects to exceed the maximum?  Unless
_whenExhaustedAction is WHEN_EXHAUSTED_GROW, there is no point in
allowing
numActive + numIdle to exceed maxActive, because bollowObject() won't
permit
any objects to be borrowed more than maxActive.  The default behavior
is to
block until there are fewer than maxActive objects outstanding.

   --- Noel


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



cvs commit: jakarta-commons-sandbox/io/src/test/org/apache/commons/io CopyUtilsTest.java FileUtilsTestCase.java IOTestSuite.java IOUtilsTestCase.java

2003-08-21 Thread jeremias
jeremias2003/08/21 11:56:12

  Modified:io/src/test/org/apache/commons/io FileUtilsTestCase.java
IOTestSuite.java IOUtilsTestCase.java
  Added:   io/src/test/org/apache/commons/io CopyUtilsTest.java
  Log:
  Bugzilla 22075: Copy copy methods from IOUtils to CopyUtils, deprecate old copy 
methods.
  Bugzilla 22332: Deprecated FileUtils string methods, Code style-up
  Submitted by: Matthew Hawthorne mhawthorne at alumni.pitt.edu
  
  Testcases (and infrastructure) modified a bit by myself after applying Matthew's 
patches.
  CopyUtils testcases are done in memory now instead of using files.
  
  Revision  ChangesPath
  1.2   +251 -172  
jakarta-commons-sandbox/io/src/test/org/apache/commons/io/FileUtilsTestCase.java
  
  Index: FileUtilsTestCase.java
  ===
  RCS file: 
/home/cvs/jakarta-commons-sandbox/io/src/test/org/apache/commons/io/FileUtilsTestCase.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- FileUtilsTestCase.java25 Dec 2002 22:16:36 -  1.1
  +++ FileUtilsTestCase.java21 Aug 2003 18:56:12 -  1.2
  @@ -7,7 +7,7 @@
*
* The Apache Software License, Version 1.1
*
  - * Copyright (c) 1999-2002 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999-2003 The Apache Software Foundation.  All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
  @@ -56,217 +56,296 @@
* individuals on behalf of the Apache Software Foundation.  For more
* information on the Apache Software Foundation, please see
* http://www.apache.org/.
  - *
*/
  -
   package org.apache.commons.io;
   
  -import java.io.BufferedOutputStream;
   import java.io.File;
  -import java.io.FileOutputStream;
   import java.io.IOException;
  +import java.net.URL;
  +
  +import org.apache.commons.io.testtools.*;
  +
   import junit.framework.Test;
  -import junit.framework.TestCase;
   import junit.framework.TestSuite;
  +import junit.textui.TestRunner;
   
   /**
* This is used to test FileUtils for correctness.
*
* @author a href=mailto:[EMAIL PROTECTED]Peter Donald/a
*/
  -public final class FileUtilsTestCase
  -extends TestCase
  -{
  -private final int FILE1_SIZE = 1;
  -private final int FILE2_SIZE = 1024 * 4 + 1;
  +public final class FileUtilsTestCase extends FileBasedTestCase {
  +
  +// Test data
  +private static final int FILE1_SIZE = 1;
  +private static final int FILE2_SIZE = 1024 * 4 + 1;
   
  -private final File m_testDirectory;
   private final File m_testFile1;
   private final File m_testFile2;
   
  -public FileUtilsTestCase( final String name )
  -throws IOException
  -{
  -super( name );
  -
  -m_testDirectory = ( new File( test/io/ ) ).getAbsoluteFile();
  -if( !m_testDirectory.exists() )
  -{
  -m_testDirectory.mkdirs();
  -}
  +public static void main(String[] args) {
  +TestRunner.run(suite());
  +}
   
  -m_testFile1 = new File( m_testDirectory, file1-test.txt );
  -m_testFile2 = new File( m_testDirectory, file2-test.txt );
  +public static Test suite() {
  +return new TestSuite(FileUtilsTestCase.class);
  +}
   
  -createFile( m_testFile1, FILE1_SIZE );
  -createFile( m_testFile2, FILE2_SIZE );
  +public FileUtilsTestCase(final String name) throws IOException {
  +super(name);
  +
  +m_testFile1 = new File(getTestDirectory(), file1-test.txt);
  +m_testFile2 = new File(getTestDirectory(), file1a-test.txt);
   }
   
  -private void createFile( final File file, final long size )
  -throws IOException
  -{
  -final BufferedOutputStream output =
  -new BufferedOutputStream( new FileOutputStream( file ) );
  -
  -for( int i = 0; i  size; i++ )
  -{
  -output.write( (byte)'X' );
  -}
  +/** @see junit.framework.TestCase#setUp() */
  +protected void setUp() throws Exception {
  +getTestDirectory().mkdirs();
  +createFile(m_testFile1, FILE1_SIZE);
  +createFile(m_testFile2, FILE2_SIZE);
  +FileUtils.deleteDirectory(getTestDirectory());
  +getTestDirectory().mkdirs();
  +createFile(m_testFile1, FILE1_SIZE);
  +createFile(m_testFile2, FILE2_SIZE);
  +}
  +
  +/** @see junit.framework.TestCase#tearDown() */
  +protected void tearDown() throws Exception {
  +FileUtils.deleteDirectory(getTestDirectory());
  +}
  +
  +public void testCopyFile1() throws Exception {
  +final File destination = new File(getTestDirectory(), copy1.txt);
  +FileUtils.copyFile(m_testFile1, destination);
  +assertTrue(Check Exist, destination.exists());
  +assertTrue(Check Full copy, 

cvs commit: jakarta-commons-sandbox/io build.xml

2003-08-21 Thread jeremias
jeremias2003/08/21 11:59:26

  Modified:io   build.xml
  Log:
  Bugzilla 22332: Deprecated FileUtils string methods, Code style-up
  adds data/test directory to test classpath
  Submitted by: Matthew Hawthorne mhawthorne at alumni.pitt.edu
  
  Revision  ChangesPath
  1.12  +18 -8 jakarta-commons-sandbox/io/build.xml
  
  Index: build.xml
  ===
  RCS file: /home/cvs/jakarta-commons-sandbox/io/build.xml,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- build.xml 27 Jul 2003 17:08:29 -  1.11
  +++ build.xml 21 Aug 2003 18:59:26 -  1.12
  @@ -60,6 +60,9 @@
 !-- The base directory for unit test sources --
 property name=test.home   value=src/test/
   
  +  !-- Test data directory --
  +  property name=data.test   value=data/test/
  +
   !-- == Compiler Defaults = --
   
   
  @@ -152,6 +155,12 @@
   copytodir=${build.home}/tests filtering=off
 fileset dir=${test.home} excludes=**/*.java/
   /copy
  +
  +!-- Copies test data --
  +copy todir=${build.home}/tests filtering=off
  +  fileset dir=${data.test}/
  +/copy
  +
 /target
   
 target name=clean
  @@ -236,30 +245,31 @@
 classpath refid=test.classpath/
   /java
 /target
  ---  
  +--
 target name=test.io depends=compile.tests
  -   
  +
  taskdef name=junit 
classname=org.apache.tools.ant.taskdefs.optional.junit.JUnitTask/
  -   
  +
   junit printsummary=yes haltonfailure=${test.failonerror} fork=yes
   
  -  formatter type=brief usefile=false/ 
  +  formatter type=brief usefile=false/
 classpath refid=test.classpath/
   
batchtest todir=${build.home}/tests
   fileset dir=${build.home}/tests
 include name=**/test/*TestCase.class/
 include name=**/*Test.class /
  -  include name=**/*TestCase.class /  
  +  include name=**/*TestCase.class /
 include name=**/Test*.class /
 include name=**/output/Test*.class /
 exclude name=**/AllTest.class /
 exclude name=**/*$$*Test.class /
 exclude name=**/compress/zip/*.class /
 exclude name=**/compress/tar/*.class /
  +  exclude name=**/FileBasedTestCase.class /
   /fileset
 /batchtest
  -/junit  
  +/junit
 /target
  -  
  +
   /project
  
  
  

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



cvs commit: jakarta-commons/dbcp/src/java/org/apache/commons/dbcp BasicDataSourceFactory.java BasicDataSource.java

2003-08-21 Thread dirkv
dirkv   2003/08/21 12:00:26

  Modified:dbcp/src/java/org/apache/commons/dbcp
BasicDataSourceFactory.java BasicDataSource.java
  Log:
  Bugzilla Bug 22598
minIdle Functionality for DBCP via Patches Posted for commons-pool
  
  patch by Richard Wareing
  
  Revision  ChangesPath
  1.6   +10 -4 
jakarta-commons/dbcp/src/java/org/apache/commons/dbcp/BasicDataSourceFactory.java
  
  Index: BasicDataSourceFactory.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/dbcp/src/java/org/apache/commons/dbcp/BasicDataSourceFactory.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- BasicDataSourceFactory.java   6 Mar 2003 15:22:25 -   1.5
  +++ BasicDataSourceFactory.java   21 Aug 2003 19:00:26 -  1.6
  @@ -153,6 +153,12 @@
   (Integer.parseInt(ra.getContent().toString()));
   }
   
  +ra = ref.get(minIdle);
  +if (ra != null) {
  +dataSource.setMinIdle
  +(Integer.parseInt(ra.getContent().toString()));
  +}
  +
   ra = ref.get(maxWait);
   if (ra != null) {
   dataSource.setMaxWait
  
  
  
  1.18  +18 -4 
jakarta-commons/dbcp/src/java/org/apache/commons/dbcp/BasicDataSource.java
  
  Index: BasicDataSource.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/dbcp/src/java/org/apache/commons/dbcp/BasicDataSource.java,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- BasicDataSource.java  11 Aug 2003 16:11:34 -  1.17
  +++ BasicDataSource.java  21 Aug 2003 19:00:26 -  1.18
  @@ -161,6 +161,19 @@
   this.maxIdle = maxIdle;
   }
   
  +/**
  + * The minimum number of active connections that can remain idle in the
  + * pool, without extra ones being created, or 0 to create none.
  + */
  +protected int minIdle = GenericObjectPool.DEFAULT_MIN_IDLE;;
  +
  +public int getMinIdle() {
  +return (this.minIdle);
  +}
  +
  +public void setMinIdle(int minIdle) {
  +   this.minIdle = minIdle;
  +}
   
   /**
* The maximum number of milliseconds that the pool will wait (when there
  @@ -652,6 +665,7 @@
   connectionPool = new GenericObjectPool();
   connectionPool.setMaxActive(maxActive);
   connectionPool.setMaxIdle(maxIdle);
  +connectionPool.setMinIdle(minIdle);
   connectionPool.setMaxWait(maxWait);
   connectionPool.setTestOnBorrow(testOnBorrow);
   connectionPool.setTestOnReturn(testOnReturn);
  
  
  

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



cvs commit: jakarta-commons-sandbox/io project.xml

2003-08-21 Thread jeremias
jeremias2003/08/21 11:57:49

  Modified:io   project.xml
  Log:
  Bugzilla 22332: Deprecated FileUtils string methods, Code style-up
  Register new test data directory in project.xml
  Submitted by: Matthew Hawthorne mhawthorne at alumni.pitt.edu
  
  Revision  ChangesPath
  1.8   +13 -6 jakarta-commons-sandbox/io/project.xml
  
  Index: project.xml
  ===
  RCS file: /home/cvs/jakarta-commons-sandbox/io/project.xml,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- project.xml   25 Jul 2003 07:46:41 -  1.7
  +++ project.xml   21 Aug 2003 18:57:49 -  1.8
  @@ -1,6 +1,6 @@
   ?xml version=1.0?
   project
  -  
  +
 version3/version
 namecommons-io/name
 idcommons-io/id
  @@ -36,7 +36,7 @@
   connectionscm:cvs:pserver:[EMAIL 
PROTECTED]:/home/cvspublic:jakarta-commons-sandbox/io/connection
   urlhttp://cvs.apache.org/viewcvs/jakarta-commons-sandbox/io//url
 /repository
  -  
  +
 mailingLists
   mailingList
 nameCommons User List/name
  @@ -119,8 +119,8 @@
   /dependency
 /dependencies
   
  -  
  -  
  +
  +
 build
   
   nagEmailAddress[EMAIL PROTECTED]/nagEmailAddress
  @@ -138,9 +138,16 @@
   exclude**/compress/**/*Test*/exclude
   exclude**/IOUtilTestCase*/exclude
 /excludes
  +
  +  resources
  +resource
  +directorydata/test/directory
  +/resource
  +  /resources
  +
   /unitTest
   
  -   
  +
   
   !-- J A R  R E S O U R C E S --
   !-- Resources that are packaged up inside the JAR file --
  @@ -150,6 +157,6 @@
 /includes
   /resources
 /build
  -  
  +
   /project
   
  
  
  

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



cvs commit: jakarta-commons-sandbox/io STATUS.html

2003-08-21 Thread jeremias
jeremias2003/08/21 12:11:44

  Modified:io   STATUS.html
  Log:
  Update status
  
  Revision  ChangesPath
  1.11  +4 -3  jakarta-commons-sandbox/io/STATUS.html
  
  Index: STATUS.html
  ===
  RCS file: /home/cvs/jakarta-commons-sandbox/io/STATUS.html,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- STATUS.html   27 Jul 2003 17:08:54 -  1.10
  +++ STATUS.html   21 Aug 2003 19:11:44 -  1.11
  @@ -82,15 +82,16 @@
   ByteArrayOutputStream which should improve performance considerably./li
 liIOUtils: Remove the deprecated bufferedCopy method. IO is not released
   so we should be able to do that - DONE/li
  -  liFileUtils: Add isFileNewer() method from Alban Peignier:
  -http://nagoya.apache.org/eyebrowse/[EMAIL PROTECTED]by=threadfrom=348688/li
 liFileUtils: This class is a big mess ATM. We need to clean it up./li
  +  liSplit IOUtils into IOUtils and CopyUtils - DONE (Matthew Hawthorne)/li
 liMore TestCases!!!/li
 liMore Javadocs!!!/li
   /ul
   h55.1  NEW CODE/h5
   ul
 liProxyOutput/InputStream. These are predictable Filter-streams. Need to see if 
FilterWriter/Reader are predictable - DONE/li
  +  liFileUtils: Add isFileNewer() method from Alban Peignier:
  +http://nagoya.apache.org/eyebrowse/[EMAIL PROTECTED]by=threadfrom=348688 - 
DONE/li
 liA CsvReader/Writer set of classes in a csv sub-package/li
 liFilePoller for telling when a file changes. Look in Tomcat, or 
GenJava[bayard]/li
 liJoinReader/ConcatReader. One in GenJava, one submitted to Bayard/li
  
  
  

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



[beanutils][collections] Transformer, Predicate, and Closure Implementation

2003-08-21 Thread Norm Deane
I recently implemented a Closure, Transformer, and Predicate which make
use of PropertyUtils to provide some useful functionality when dealing
with Collections of beans.  I wanted to offer them up as a candidate for
the BeanUtils package and/or get some feedback from the list.  

-- BeanPropertyValueChangeClosure is an implementation of
Closure/code that updates a specified property on the object provided
with a specified value.  

-- BeanPropertyValueEqualsPredicate is an implementation of Predicate
that evaluates a property value on the object provided against a
specified value and returns true if equal; false otherwise.

-- BeanToPropertyValueTransformer is an implementation of Transformer
that transforms the object provided by returning the value of a
specified property of the object. 


Thanks,

Norm


-- 
Norm Deane
MIS Consultant
Vanderbilt University
(615) 322-7855
[EMAIL PROTECTED] 


utils.zip
Description: Zip compressed data
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Re: [io] patches, conventions, and test data setup

2003-08-21 Thread Jeremias Maerki
Ok, Matthew, field is free for you. I'll be offline until 2003-09-07
starting in about 16 hours (holidays).

With the last two patches you went in a good direction IMO. Please keep
up the good work. I'd be glad to apply more patches after I'm back. And
sorry again for the delays. Free time is rare lately.

On 18.08.2003 01:57:57 __matthewHawthorne wrote:
 Don't worry, I try to make my changes in small groups at a time.  I'll
 wait until I see that you've made some commits until I start the next
 round.


Jeremias Maerki


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



Re: [general] ibiblio update

2003-08-21 Thread Martin Poeschl
Dirk Verbeeck wrote:

A new snapshot of commons-pool should be uploaded to ibiblio for the 
dbcp maven build.

Can somebody do the update / tell me how to do it ? 


i'll upload new pool and dbcp snapshots ...

martin

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


DO NOT REPLY [Bug 22332] - [io] Deprecated FileUtils string methods

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

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=22332

[io] Deprecated FileUtils string methods

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED



--- Additional Comments From [EMAIL PROTECTED]  2003-08-21 19:25 ---
Applied. Thanks a lot, Matthew.

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



DO NOT REPLY [Bug 22075] - [io] moved copy methods from IOUtils to CopyUtils

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

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=22075

[io] moved copy methods from IOUtils to CopyUtils

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED



--- Additional Comments From [EMAIL PROTECTED]  2003-08-21 19:25 ---
Applied. Thanks.

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



Code generation was: Re: [collections] contribute?

2003-08-21 Thread J.Pietschmann
__matthewHawthorne wrote:
There are many times that I've wished I had found a nice way to
autogenerate things while creating a bunch of redundant primitive
methods.
There are half a zillion methods for generating code, starting
with Bash/Sed/Perl hacks, leading to dedicated macro languages
like the C preprocessor and m4, continuing with a variety of web
templating languages like PHP, there's XSLT and finally high
level stuff like lex/yacc, ANTLR and all the other grammar
generators.
The recurrent problems:
- Need dedicated Ant tasks (Make was a bit easier here)
- IDEs rarely handle them well
- Tracking compile and runtime errors caused by generated code
  to the ultimate source isn't well supported and often painful
I personally use ad-hoc generators mainly to bootstrap code, once
the bulk of the code is stable, I abandon them.
J.Pietschmann

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


[HiveMind] Proposal for adding Interceptors to a set of Services

2003-08-21 Thread Christian Essl


I'd like to propose a module level tag, with which it is possible to 
register Interceptors with all in the Registry Services or all Services 
which implement a (some) certain interface(s). I've implemented a proposal 
for this feature and tested it - the diff is attached.

These 'global-interceptors' have some advantages. Ie it would be possible 
to register (unregister) a Logger for all Services with just a little 
change to just one module. Also services implementing a certain interface 
could be given automatically parameters through such an Interceptor  
(Avalon like) without the need to specify the interceptor in each service. 
This therefore also reduces the amount of failure because of forgetting the 
interceptor. The same way a stop-service could be implemented, which 
informs all loaded Services that implement iE StopInterface when the 
program exits.

For the code of my proposal I have changed the module xml format to include 
under module the following tag:

global-interceptor service-id=id of ServiceInterceptorFactory 
order=interceptor-order
 class name=full.interface.name/
 class name=full.interface.name2/
/global-interceptor

The global-interceptor tag takes the same arguments as the interceptor 
tag. If no class tag is specified the interceptor will be registered with 
all Services in all modules. If there are one ore more class tags the 
Services which are intercepted must implement all the given interface(s) 
(AND). If there are more global-interceptors with the same 
ServiceInterceptorFactory-Id than the Interceptor is wrapped if at least 
one fits (OR)

The ServiceInterceptorFactories specified and the Services requested of the 
Factory at creation time are never wrapped by global Interceptors (because 
of circularity  actually the implementation loads all the 
ServiceInterceptorFactories in RegistryBuilder.constructRegistry() as non 
deferred).

My implementation works following: First the DescriptorParser builds up 
GlobalInterceptorDescriptors which are added to the ModuleDescriptor.

In the RegistryBuilder one instance of 
orghivemind.impl.GlobalInterceptorRegistry is build up from the 
Descriptors. There is only one instance - held in an field - per 
RegistryBuilder (and so per Registry). This instance is used to hold all 
the mappings of interfaces to ServiceInterceptorContributions. The instance 
is given to each ServiceExtensionPointImpl when it is constructed. The 
point will use the instance in addInterceptors() to request the global- 
mapped Interceptors for itself and add it to it's own interceptors list.

When the Modules are processed in the RegistryBuilder the 
GlobalInterceptorRegistry is populated but not yet ready to use. As the 
last step in the RegistryBuilder.constructRegistry() the 
GlobalInterceptorRegistry is build up. Here some optimizations are done (or 
better could be done) and all the needed ServiceInterceptorFactories are 
loaded  non deffered. Till this time the ServiceExtensionPointImpls will 
not use the GlobalInterceptorRegistry. This way Services (the 
ServiceInterceptorFactories and there requested Services) loaded by the 
GlobalInterceptorRegistry itself are not intercepted (except if defined in 
a Service-Extension), which is important for circularity. After this the 
GlobalInterceptorRegister is ready to be used by the 
ServiceExtesionPointImpls and all Service loaded are wrapped if they match.

Finally there are also two Tests which you can see from the diff.

--
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/Index: src/java/org/apache/commons/hivemind/impl/GlobalInterceptorRegistry.java
===
RCS file: src/java/org/apache/commons/hivemind/impl/GlobalInterceptorRegistry.java
diff -N src/java/org/apache/commons/hivemind/impl/GlobalInterceptorRegistry.java
--- /dev/null   1 Jan 1970 00:00:00 -
+++ src/java/org/apache/commons/hivemind/impl/GlobalInterceptorRegistry.java21 Aug 
2003 17:53:37 -
@@ -0,0 +1,334 @@
+package org.apache.commons.hivemind.impl;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.commons.hivemind.ApplicationRuntimeException;
+import org.apache.commons.hivemind.ClassResolver;
+import org.apache.commons.hivemind.HiveMind;
+import org.apache.commons.hivemind.Location;
+import org.apache.commons.hivemind.Module;
+import org.apache.commons.hivemind.Registry;
+import org.apache.commons.hivemind.ServiceExtensionPoint;
+import org.apache.commons.hivemind.ServiceInterceptorContribution;
+import org.apache.commons.hivemind.ServiceInterceptorFactory;
+import org.apache.commons.hivemind.parse.GlobalInterceptorDescriptor;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+
+
+/**
+ * This will hold mappings from Interfaces implemented by CoreServices to 

Re: [general] ibiblio update

2003-08-21 Thread Dirk Verbeeck
Thanks

Dirk

Martin Poeschl wrote:

Dirk Verbeeck wrote:

A new snapshot of commons-pool should be uploaded to ibiblio for the 
dbcp maven build.

Can somebody do the update / tell me how to do it ? 


i'll upload new pool and dbcp snapshots ...

martin

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


cvs commit: jakarta-commons/betwixt/src/java/org/apache/commons/betwixt/io/read BeanCreationChain.java

2003-08-21 Thread rdonkin
rdonkin 2003/08/21 15:38:01

  Added:   betwixt/src/java/org/apache/commons/betwixt/io/read
BeanCreationChain.java
  Log:
  Reafactored read bean creation into chain of independet creators. It can now be 
extended by users.
  
  Revision  ChangesPath
  1.1  
jakarta-commons/betwixt/src/java/org/apache/commons/betwixt/io/read/BeanCreationChain.java
  
  Index: BeanCreationChain.java
  ===
  /*
   * $Header: 
/home/cvs/jakarta-commons/betwixt/src/java/org/apache/commons/betwixt/io/read/BeanCreationChain.java,v
 1.1 2003/08/21 22:38:01 rdonkin Exp $
   * $Revision: 1.1 $
   * $Date: 2003/08/21 22:38:01 $
   *
   * 
   *
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 1999-2002 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *notice, this list of conditions and the following disclaimer in
   *the documentation and/or other materials provided with the
   *distribution.
   *
   * 3. The end-user documentation included with the redistribution, if
   *any, must include the following acknowlegement:
   *   This product includes software developed by the
   *Apache Software Foundation (http://www.apache.org/).
   *Alternately, this acknowlegement may appear in the software itself,
   *if and wherever such third-party acknowlegements normally appear.
   *
   * 4. The names The Jakarta Project, Commons, and Apache Software
   *Foundation must not be used to endorse or promote products derived
   *from this software without prior written permission. For written
   *permission, please contact [EMAIL PROTECTED]
   *
   * 5. Products derived from this software may not be called Apache
   *nor may Apache appear in their names without prior written
   *permission of the Apache Group.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * 
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * http://www.apache.org/.
   * 
   * $Id: BeanCreationChain.java,v 1.1 2003/08/21 22:38:01 rdonkin Exp $
   */
  package org.apache.commons.betwixt.io.read;
  
  /**  
* A Chain of bean creators.
*
* @author Robert Burrell Donkin
* @version $Revision: 1.1 $
*/
  public abstract class BeanCreationChain {
  
  
  // Class Methods
  
  /** 
   * Creates the default codeBeanCreationChain/code used when reading beans.
   * @return a codeBeanCreationList/code with the default creators loader in 
order, not null
   */
  public static final BeanCreationChain createDefaultChain() {
  // this delegates to the list but this is the canonical version
  // the implementation may change later
  return BeanCreationList.createStandardChain();
  }
  
  // Instance Methods
  
  /** 
* Create a bean for the given mapping in the given context.
*
* @param elementMapping specifies the mapping between the type and element.
* strongNote/strong it is recommended that classes do not store a permenant
* reference to this object since these objects may later be reused.
* Not null
* @param context the context in which this creation happens, not null
* @return the bean, possibly null
*/
  public abstract Object create(ElementMapping elementMapping, ReadContext 
context);
  
  }
  
  
  


cvs commit: jakarta-commons/lang/src/java/org/apache/commons/lang/exception ExceptionUtils.java

2003-08-21 Thread ggregory
ggregory2003/08/21 08:52:55

  Modified:lang/src/java/org/apache/commons/lang RandomStringUtils.java
ObjectUtils.java SystemUtils.java
   lang/src/java/org/apache/commons/lang/builder
ToStringStyle.java StandardToStringStyle.java
HashCodeBuilder.java EqualsBuilder.java
ToStringBuilder.java
   lang/src/java/org/apache/commons/lang/enum Enum.java
   lang/src/java/org/apache/commons/lang/exception
ExceptionUtils.java
  Log:
  Add @since 2.0 tags based on 
http://www.apache.org/~bayard/commons-lang-2.0/Commons-Lang-1.0.1-to-2.0/missingSinces.txt
  
  Revision  ChangesPath
  1.23  +2 -1  
jakarta-commons/lang/src/java/org/apache/commons/lang/RandomStringUtils.java
  
  Index: RandomStringUtils.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/lang/src/java/org/apache/commons/lang/RandomStringUtils.java,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- RandomStringUtils.java18 Aug 2003 02:22:23 -  1.22
  +++ RandomStringUtils.java21 Aug 2003 15:52:54 -  1.23
  @@ -250,6 +250,7 @@
* @throws ArrayIndexOutOfBoundsException if there are not
*  code(end - start) + 1/code characters in the set array.
* @throws IllegalArgumentException if codecount/code lt; 0.
  + * @since 2.0
*/
   public static String random(int count, int start, int end, boolean letters, 
boolean numbers, char[] chars, Random random) {
   if (count == 0) {
  
  
  
  1.20  +4 -1  
jakarta-commons/lang/src/java/org/apache/commons/lang/ObjectUtils.java
  
  Index: ObjectUtils.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/lang/src/java/org/apache/commons/lang/ObjectUtils.java,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- ObjectUtils.java  18 Aug 2003 02:22:23 -  1.19
  +++ ObjectUtils.java  21 Aug 2003 15:52:54 -  1.20
  @@ -193,6 +193,7 @@
* @param object  the object to create a toString for, may be codenull/code
* @return the default toString text, or codenull/code if
*  codenull/code passed in
  + * @since 2.0
*/
   public static StringBuffer appendIdentityToString(StringBuffer buffer, Object 
object) {
   if (object == null) {
  @@ -224,6 +225,7 @@
* @see String#valueOf(Object)
* @param obj  the Object to codetoString/code, may be null
* @return the passed in Object's toString, or nullStr if codenull/code 
input
  + * @since 2.0
*/
   public static String toString(Object obj) {
   return (obj == null ?  : obj.toString());
  @@ -246,6 +248,7 @@
* @param obj  the Object to codetoString/code, may be null
* @param nullStr  the String to return if codenull/code input, may be null
* @return the passed in Object's toString, or nullStr if codenull/code 
input
  + * @since 2.0
*/
   public static String toString(Object obj, String nullStr) {
   return (obj == null ? nullStr : obj.toString());
  
  
  
  1.21  +45 -6 
jakarta-commons/lang/src/java/org/apache/commons/lang/SystemUtils.java
  
  Index: SystemUtils.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/lang/src/java/org/apache/commons/lang/SystemUtils.java,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- SystemUtils.java  18 Aug 2003 02:22:23 -  1.20
  +++ SystemUtils.java  21 Aug 2003 15:52:54 -  1.21
  @@ -83,7 +83,8 @@
* pDefaults to codenull/code if the runtime does not have
* security access to read this property or the property does not exist./p
* 
  - * @since Java version 1.2.
  + * @since 2.0
  + * @since Java 1.2.
*/
   public static final String FILE_ENCODING = getSystemProperty(file.encoding);
   
  @@ -94,7 +95,7 @@
* pDefaults to codenull/code if the runtime does not have
* security access to read this property or the property does not exist./p
* 
  - * @since Java version 1.1.
  + * @since Java 1.1.
*/
   public static final String FILE_SEPARATOR = getSystemProperty(file.separator);
   
  @@ -104,7 +105,7 @@
* pDefaults to codenull/code if the runtime does not have
* security access to read this property or the property does not exist./p
* 
  - * @since Java version 1.1.
  + * @since Java 1.1.
*/
   public static final String JAVA_CLASS_PATH = 
getSystemProperty(java.class.path);
   
  @@ -115,7 +116,7 @@
* pDefaults to codenull/code if the runtime does not have
* security access to read this property 

cvs commit: jakarta-commons/betwixt/src/java/org/apache/commons/betwixt/io/read BeanCreationList.java

2003-08-21 Thread rdonkin
rdonkin 2003/08/21 15:38:17

  Added:   betwixt/src/java/org/apache/commons/betwixt/io/read
BeanCreationList.java
  Log:
  Reafactored read bean creation into chain of independet creators. It can now be 
extended by users.
  
  Revision  ChangesPath
  1.1  
jakarta-commons/betwixt/src/java/org/apache/commons/betwixt/io/read/BeanCreationList.java
  
  Index: BeanCreationList.java
  ===
  /*
   * $Header: 
/home/cvs/jakarta-commons/betwixt/src/java/org/apache/commons/betwixt/io/read/BeanCreationList.java,v
 1.1 2003/08/21 22:38:17 rdonkin Exp $
   * $Revision: 1.1 $
   * $Date: 2003/08/21 22:38:17 $
   *
   * 
   *
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 1999-2002 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *notice, this list of conditions and the following disclaimer in
   *the documentation and/or other materials provided with the
   *distribution.
   *
   * 3. The end-user documentation included with the redistribution, if
   *any, must include the following acknowlegement:
   *   This product includes software developed by the
   *Apache Software Foundation (http://www.apache.org/).
   *Alternately, this acknowlegement may appear in the software itself,
   *if and wherever such third-party acknowlegements normally appear.
   *
   * 4. The names The Jakarta Project, Commons, and Apache Software
   *Foundation must not be used to endorse or promote products derived
   *from this software without prior written permission. For written
   *permission, please contact [EMAIL PROTECTED]
   *
   * 5. Products derived from this software may not be called Apache
   *nor may Apache appear in their names without prior written
   *permission of the Apache Group.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * 
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * http://www.apache.org/.
   * 
   * $Id: BeanCreationList.java,v 1.1 2003/08/21 22:38:17 rdonkin Exp $
   */
  package org.apache.commons.betwixt.io.read;
  
  import java.util.ArrayList;
  import java.util.Iterator;
  
  /**  
* pChain implementation that's backed by a list.
* This is the default implementation used by Betwixt.
* /pp
* strongNote/strong this implementation is emnot/em
* intended to allow multiple threads of execution to perform
* modification operations concurrently with traversal of the chain.
* Users who require this behaviour are advised to create their own implementation.
* /p
*
* @author Robert Burrell Donkin
* @version $Revision: 1.1 $
*/
  public class BeanCreationList extends BeanCreationChain {
  
  // Class Methods
  
  /** 
   * Creates the default codeBeanCreationChain/code used when reading beans.
   * @return a codeBeanCreationList/code with the default creators loader in 
order, not null
   */
  public static final BeanCreationList createStandardChain() {
  BeanCreationList chain = new BeanCreationList();
  chain.addBeanCreator( ChainedBeanCreatorFactory.createIDREFBeanCreator() );
  chain.addBeanCreator( ChainedBeanCreatorFactory.createDerivedBeanCreator() );
  chain.addBeanCreator( 
ChainedBeanCreatorFactory.createElementTypeBeanCreator() );
  return chain;
  }
  
  
  
  

cvs commit: jakarta-commons/betwixt/src/java/org/apache/commons/betwixt/io/read ReadConfiguration.java

2003-08-21 Thread rdonkin
rdonkin 2003/08/21 15:39:44

  Added:   betwixt/src/java/org/apache/commons/betwixt/io/read
ReadConfiguration.java
  Log:
  Reafactored read bean creation into chain of independet creators. It can now be 
extended by users.
  
  Revision  ChangesPath
  1.1  
jakarta-commons/betwixt/src/java/org/apache/commons/betwixt/io/read/ReadConfiguration.java
  
  Index: ReadConfiguration.java
  ===
  /*
   * $Header: 
/home/cvs/jakarta-commons/betwixt/src/java/org/apache/commons/betwixt/io/read/ReadConfiguration.java,v
 1.1 2003/08/21 22:39:44 rdonkin Exp $
   * $Revision: 1.1 $
   * $Date: 2003/08/21 22:39:44 $
   *
   * 
   *
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 1999-2002 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *notice, this list of conditions and the following disclaimer in
   *the documentation and/or other materials provided with the
   *distribution.
   *
   * 3. The end-user documentation included with the redistribution, if
   *any, must include the following acknowlegement:
   *   This product includes software developed by the
   *Apache Software Foundation (http://www.apache.org/).
   *Alternately, this acknowlegement may appear in the software itself,
   *if and wherever such third-party acknowlegements normally appear.
   *
   * 4. The names The Jakarta Project, Commons, and Apache Software
   *Foundation must not be used to endorse or promote products derived
   *from this software without prior written permission. For written
   *permission, please contact [EMAIL PROTECTED]
   *
   * 5. Products derived from this software may not be called Apache
   *nor may Apache appear in their names without prior written
   *permission of the Apache Group.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * 
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * http://www.apache.org/.
   * 
   * $Id: ReadConfiguration.java,v 1.1 2003/08/21 22:39:44 rdonkin Exp $
   */
  package org.apache.commons.betwixt.io.read;
  
  /**  
* Stores mapping phase configuration settings that apply only for bean reading.
*
* @author Robert Burrell Donkin
* @version $Revision: 1.1 $
*/
  public class ReadConfiguration {
  
  /** Chain used to create beans defaults to 
BeanCreationChain.createDefaultChain() */
  private BeanCreationChain beanCreationChain = 
BeanCreationChain.createDefaultChain();
  
  /**
* Gets the BeanCreationChain that should be used to construct beans.
* @return the BeanCreationChain to use, not null
*/
  public BeanCreationChain getBeanCreationChain() {
  return beanCreationChain;
  }
  
  /**
* Sets the BeanCreationChain that should be used to construct beans.
* @param beanCreationChain the BeanCreationChain to use, not null
*/
  public void setBeanCreationChain( BeanCreationChain beanCreationChain ) {
  this.beanCreationChain = beanCreationChain;
  }
  
  }
  
  
  

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



cvs commit: jakarta-commons/betwixt/src/java/org/apache/commons/betwixt/io/read ChainedBeanCreator.java

2003-08-21 Thread rdonkin
rdonkin 2003/08/21 15:38:41

  Added:   betwixt/src/java/org/apache/commons/betwixt/io/read
ChainedBeanCreator.java
  Log:
  Reafactored read bean creation into chain of independet creators. It can now be 
extended by users.
  
  Revision  ChangesPath
  1.1  
jakarta-commons/betwixt/src/java/org/apache/commons/betwixt/io/read/ChainedBeanCreator.java
  
  Index: ChainedBeanCreator.java
  ===
  /*
   * $Header: 
/home/cvs/jakarta-commons/betwixt/src/java/org/apache/commons/betwixt/io/read/ChainedBeanCreator.java,v
 1.1 2003/08/21 22:38:41 rdonkin Exp $
   * $Revision: 1.1 $
   * $Date: 2003/08/21 22:38:41 $
   *
   * 
   *
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 1999-2002 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *notice, this list of conditions and the following disclaimer in
   *the documentation and/or other materials provided with the
   *distribution.
   *
   * 3. The end-user documentation included with the redistribution, if
   *any, must include the following acknowlegement:
   *   This product includes software developed by the
   *Apache Software Foundation (http://www.apache.org/).
   *Alternately, this acknowlegement may appear in the software itself,
   *if and wherever such third-party acknowlegements normally appear.
   *
   * 4. The names The Jakarta Project, Commons, and Apache Software
   *Foundation must not be used to endorse or promote products derived
   *from this software without prior written permission. For written
   *permission, please contact [EMAIL PROTECTED]
   *
   * 5. Products derived from this software may not be called Apache
   *nor may Apache appear in their names without prior written
   *permission of the Apache Group.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * 
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * http://www.apache.org/.
   * 
   * $Id: ChainedBeanCreator.java,v 1.1 2003/08/21 22:38:41 rdonkin Exp $
   */
  package org.apache.commons.betwixt.io.read;
  
  /**  
* Creator of beans that may delegate responsibility to members down the chain.
*
* @author Robert Burrell Donkin
* @version $Revision: 1.1 $
*/
  public interface ChainedBeanCreator {
  
  /**
* Creates a bean either directly or by delegating the responsibility to the 
other
* members of the chain.
*
* @param elementMapping  specifies the mapping between the type and element.
* strongNote/strong it is recommended that classes do not store a permenant
* reference to this object since these objects may later be reused.
* Not null
* @param context the context in which this converision happens, not null
* @param chain not null
* @return the Object created, possibly null
*/
  public Object create(ElementMapping elementMapping, ReadContext context, 
BeanCreationChain chain);
  
  }
  
  
  

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



cvs commit: jakarta-commons/betwixt/src/java/org/apache/commons/betwixt/io/read ElementMapping.java

2003-08-21 Thread rdonkin
rdonkin 2003/08/21 15:39:22

  Added:   betwixt/src/java/org/apache/commons/betwixt/io/read
ElementMapping.java
  Log:
  Reafactored read bean creation into chain of independet creators. It can now be 
extended by users.
  
  Revision  ChangesPath
  1.1  
jakarta-commons/betwixt/src/java/org/apache/commons/betwixt/io/read/ElementMapping.java
  
  Index: ElementMapping.java
  ===
  /*
   * $Header: 
/home/cvs/jakarta-commons/betwixt/src/java/org/apache/commons/betwixt/io/read/ElementMapping.java,v
 1.1 2003/08/21 22:39:22 rdonkin Exp $
   * $Revision: 1.1 $
   * $Date: 2003/08/21 22:39:22 $
   *
   * 
   *
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 1999-2002 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *notice, this list of conditions and the following disclaimer in
   *the documentation and/or other materials provided with the
   *distribution.
   *
   * 3. The end-user documentation included with the redistribution, if
   *any, must include the following acknowlegement:
   *   This product includes software developed by the
   *Apache Software Foundation (http://www.apache.org/).
   *Alternately, this acknowlegement may appear in the software itself,
   *if and wherever such third-party acknowlegements normally appear.
   *
   * 4. The names The Jakarta Project, Commons, and Apache Software
   *Foundation must not be used to endorse or promote products derived
   *from this software without prior written permission. For written
   *permission, please contact [EMAIL PROTECTED]
   *
   * 5. Products derived from this software may not be called Apache
   *nor may Apache appear in their names without prior written
   *permission of the Apache Group.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * 
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * http://www.apache.org/.
   * 
   * $Id: ElementMapping.java,v 1.1 2003/08/21 22:39:22 rdonkin Exp $
   */
  package org.apache.commons.betwixt.io.read;
  
  import org.xml.sax.Attributes;
  
  /**  
* Describes a mapping between an xml element and a betwixt element.
*
* @author Robert Burrell Donkin
* @version $Revision: 1.1 $
*/
  public class ElementMapping {
  
  /** Namespace of the xml element */
  private String namespace;
  /** Name of the element */
  private String name;
  /** Attributes associated with this element */
  private Attributes attributes;
  /** The base type of the mapped bean */
  private Class type;
 
  /** Base constructor */ 
  public ElementMapping() {}
  
  /**
* Gets the namespace URI or an empty string if the parser is not namespace 
aware 
* or the element has no namespace.
* @return namespace possibly null
*/
  public String getNamespace() {
  return namespace;
  }
  
  /** 
* Sets the namespace URI for this element
* @param namespace the namespace uri, possibly null
*/
  public void setNamespace(String namespace) {
  this.namespace = namespace;
  }
  
  /** 
* Gets the local name if the parser is namespace aware, otherwise the name.
* @return the element name, possibly null
*/
  public String getName() {
  return name;
  }
  
  /**
* Sets the local name for this element.
  

cvs commit: jakarta-commons/betwixt/src/java/org/apache/commons/betwixt/io/read ReadContext.java

2003-08-21 Thread rdonkin
rdonkin 2003/08/21 15:40:03

  Added:   betwixt/src/java/org/apache/commons/betwixt/io/read
ReadContext.java
  Log:
  Reafactored read bean creation into chain of independet creators. It can now be 
extended by users.
  
  Revision  ChangesPath
  1.1  
jakarta-commons/betwixt/src/java/org/apache/commons/betwixt/io/read/ReadContext.java
  
  Index: ReadContext.java
  ===
  /*
   * $Header: 
/home/cvs/jakarta-commons/betwixt/src/java/org/apache/commons/betwixt/io/read/ReadContext.java,v
 1.1 2003/08/21 22:40:03 rdonkin Exp $
   * $Revision: 1.1 $
   * $Date: 2003/08/21 22:40:03 $
   *
   * 
   *
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 1999-2002 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *notice, this list of conditions and the following disclaimer in
   *the documentation and/or other materials provided with the
   *distribution.
   *
   * 3. The end-user documentation included with the redistribution, if
   *any, must include the following acknowlegement:
   *   This product includes software developed by the
   *Apache Software Foundation (http://www.apache.org/).
   *Alternately, this acknowlegement may appear in the software itself,
   *if and wherever such third-party acknowlegements normally appear.
   *
   * 4. The names The Jakarta Project, Commons, and Apache Software
   *Foundation must not be used to endorse or promote products derived
   *from this software without prior written permission. For written
   *permission, please contact [EMAIL PROTECTED]
   *
   * 5. Products derived from this software may not be called Apache
   *nor may Apache appear in their names without prior written
   *permission of the Apache Group.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * 
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * http://www.apache.org/.
   * 
   * $Id: ReadContext.java,v 1.1 2003/08/21 22:40:03 rdonkin Exp $
   */
  package org.apache.commons.betwixt.io.read;
  
  import java.util.HashMap;
  
  import org.apache.commons.logging.Log;
  import org.apache.commons.logging.LogFactory;
  
  import org.apache.commons.betwixt.BindingConfiguration;
  import org.apache.commons.betwixt.expression.Context;
  
  /**  
* Extends codeContext/code to provide read specific functionality. 
*
* @author Robert Burrell Donkin
* @version $Revision: 1.1 $
*/
  public class ReadContext extends Context {
  
  /** Beans indexed by ID strings */
  private HashMap beansById = new HashMap();
  /** Classloader to be used to load beans during reading */
  private ClassLoader classLoader;
  /** The read specific configuration */
  private ReadConfiguration readConfiguration;
  
  /** 
* Constructs a codeReadContext/code with the same settings 
* as an existing codeContext/code.
* @param context not null
* @param readConfiguration not null
*/
  public ReadContext( Context context, ReadConfiguration readConfiguration ) {
  super( context );
  this.readConfiguration = readConfiguration;
  }
  
  /**
* Constructs a codeReadContext/code with standard log.
* @param bindingConfiguration the dynamic configuration, not null
* @param readConfiguration the extra read configuration not null
*/
  public ReadContext( 
  

cvs commit: jakarta-commons/betwixt/src/java/org/apache/commons/betwixt/io/read package.html

2003-08-21 Thread rdonkin
rdonkin 2003/08/21 15:40:21

  Added:   betwixt/src/java/org/apache/commons/betwixt/io/read
package.html
  Log:
  Reafactored read bean creation into chain of independet creators. It can now be 
extended by users.
  
  Revision  ChangesPath
  1.1  
jakarta-commons/betwixt/src/java/org/apache/commons/betwixt/io/read/package.html
  
  Index: package.html
  ===
  html
  head
  /head
  body
  
pPackage contains strategy and configuration classes used by reading only./p

  /body
  /html
  
  
  

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



cvs commit: jakarta-commons/betwixt/src/java/org/apache/commons/betwixt/io BeanReader.java BeanRuleSet.java

2003-08-21 Thread rdonkin
rdonkin 2003/08/21 15:42:47

  Modified:betwixt/src/java/org/apache/commons/betwixt
BindingConfiguration.java
   betwixt/src/java/org/apache/commons/betwixt/expression
Context.java
   betwixt/src/java/org/apache/commons/betwixt/io
BeanReader.java BeanRuleSet.java
  Log:
  Refactored read bean creation into chain of independet creators. It can now be 
extended by users.
  
  Revision  ChangesPath
  1.2   +33 -6 
jakarta-commons/betwixt/src/java/org/apache/commons/betwixt/BindingConfiguration.java
  
  Index: BindingConfiguration.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/betwixt/src/java/org/apache/commons/betwixt/BindingConfiguration.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- BindingConfiguration.java 31 Jul 2003 21:35:42 -  1.1
  +++ BindingConfiguration.java 21 Aug 2003 22:42:47 -  1.2
  @@ -90,6 +90,8 @@
   /** Converts objects lt-gt; strings */
   private ObjectStringConverter objectStringConverter;
   
  +private String classNameAttribute = className;
  +
   /**
* Constructs a BindingConfiguration with default properties.
*/
  @@ -118,7 +120,7 @@
   
   /**
 * Sets the Object lt;-gt; String converter.
  -  * @param the ObjectStringConverter to be used, not null
  +  * @param objectStringConverter the ObjectStringConverter to be used, not null
 */
   public void setObjectStringConverter(ObjectStringConverter 
objectStringConverter) {
   this.objectStringConverter = objectStringConverter;
  @@ -144,4 +146,29 @@
   public void setMapIDs(boolean mapIDs) {
   this.mapIDs = mapIDs;
   }
  +
  +/**
  + * The name of the attribute which can be specified in the XML to override the
  + * type of a bean used at a certain point in the schema.
  + *
  + * pThe default value is 'className'./p
  + * 
  + * @return The name of the attribute used to overload the class name of a bean
  + */
  +public String getClassNameAttribute() {
  +return classNameAttribute;
  +}
  +
  +/**
  + * Sets the name of the attribute which can be specified in 
  + * the XML to override the type of a bean used at a certain 
  + * point in the schema.
  + *
  + * pThe default value is 'className'./p
  + * 
  + * @param classNameAttribute The name of the attribute used to overload the 
class name of a bean
  + */
  +public void setClassNameAttribute(String classNameAttribute) {
  +this.classNameAttribute = classNameAttribute;
  +}
   }
  
  
  
  1.6   +45 -8 
jakarta-commons/betwixt/src/java/org/apache/commons/betwixt/expression/Context.java
  
  Index: Context.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/betwixt/src/java/org/apache/commons/betwixt/expression/Context.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- Context.java  31 Jul 2003 21:40:58 -  1.5
  +++ Context.java  21 Aug 2003 22:42:47 -  1.6
  @@ -127,12 +127,22 @@
 *
 * @param bean evaluate expressions against this bean
 * @param log log to this logger
  -  * @param converter not null
  +  * @param bindingConfiguration not null
 */
   public Context(Object bean, Log log, BindingConfiguration bindingConfiguration) 
{
   this( bean, new HashMap(), log,  bindingConfiguration );
   }
   
  +/**
  +  * Construct a cloned context.
  +  * The constructed context should share bean, variables, log and binding 
configuration.
  +  * @param context duplicate the attributes of this bean
  +  */
  +public Context( Context context ) {
  +this(context.bean, context.variables, context.log, 
context.bindingConfiguration);
  +}
  +
  +
   /** Convenience constructor sets evaluted bean, context variables and log.
 *
 * @param bean evaluate expressions against this bean 
  @@ -149,7 +159,7 @@
 * @param bean evaluate expressions against this bean 
 * @param variables context variables
 * @param log log to this logger
  -  * @param converter not null
  +  * @param bindingConfiguration not null
 */
   public Context(Object bean, Map variables, Log log, BindingConfiguration 
bindingConfiguration) {
   this.bean = bean;
  @@ -164,7 +174,9 @@
* @return new Context with new bean but shared variables 
*/
   public Context newContext(Object newBean) {
  -return new Context(newBean, variables, log, bindingConfiguration);
  +Context context = new Context(this);
  +context.setBean( newBean );
  +

cvs commit: jakarta-commons/betwixt/xdocs/guide reading.xml

2003-08-21 Thread rdonkin
rdonkin 2003/08/21 15:43:24

  Modified:betwixt/xdocs tasks.xml
   betwixt/xdocs/guide reading.xml
  Log:
  Documentation for bean creation chains.
  
  Revision  ChangesPath
  1.21  +18 -0 jakarta-commons/betwixt/xdocs/tasks.xml
  
  Index: tasks.xml
  ===
  RCS file: /home/cvs/jakarta-commons/betwixt/xdocs/tasks.xml,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- tasks.xml 16 Aug 2003 06:30:24 -  1.20
  +++ tasks.xml 21 Aug 2003 22:43:24 -  1.21
  @@ -245,6 +245,12 @@
   but contains a special case that allows the default setting to round 
trip java.util.Date's 
   without breaking compatibility.
   /li
  +li
  +strongRefactored creation of Bean For Elements In Reading/strong
  +Factored out the code that creates beans for elements (when reading) into separates 
classes uses the 
  +emChain Of Responsibility/em pattern. This allows users to hook into the 
creation process and 
  +add their own custom creation steps or replace the defaults with new functionality.
  +/li
   /ul
   /subsection
   /section
  @@ -368,6 +374,18 @@
   a href='guide/binding.html#Converting Dates (And Other 
Objects)'the guide/a.
   /li
   /ul
  +/subsection
  +subsection name='Dependencies'
  +p
  +ul
  +li
  +Upgraded codecommons-beanutils/code to code1.6.1/code.
  +/li
  +li
  +Upgraded codecommons-digester/code to code1.5/code.
  +/li
  +/ul
  +/p
   /subsection
   /section
   /body
  
  
  
  1.2   +117 -0jakarta-commons/betwixt/xdocs/guide/reading.xml
  
  Index: reading.xml
  ===
  RCS file: /home/cvs/jakarta-commons/betwixt/xdocs/guide/reading.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- reading.xml   14 Aug 2003 21:26:03 -  1.1
  +++ reading.xml   21 Aug 2003 22:43:24 -  1.2
  @@ -72,5 +72,122 @@
   /subsection
   /section
   
  +section name='Reading Beans - In Depth'
  +
  +subsection name='Understanding The Class Creation Chain'
  +p
  +Betwixt uses the emChain Of Responsibility/em pattern to decide the object 
which should be created 
  +for a particular element. The standard chain contains 
codeChainedBeanCreator/codes which implement
  +functionality such as standard bean creation based on the expected type and the 
returning of beans by ID.
  +This allows users to easily insert their own codeChainedBeanCreator/codes into 
the chain - or to 
  +replace the standard Betwixt chain completely.
  +/p
  +/subsection
  +
  +subsection name='Customizing Bean Creation'
  +p
  +The chain used by the BeanReader is part of the codeReadConfiguration/code and 
is accessed via the 
  +BeanCreationChain property. For example the following sets a custom chain.
  +codepre
  +BeanCreationChain chain = MyBeanCreationChain();
  +BeanReader reader = new BeanReader();
  +...
  +reader.registerBeanClass(bean, Bean.class);
  +reader.getReadConfiguration().setBeanCreationChain(chain);
  +...
  +Bean bean = (Bean) reader.parse(in);
  +...
  +/pre/code
  +/p
  +p
  +Betwixt provides a standard (list-backed) chain called BeanCreationList. This 
provides an easy methods to 
  +register your own codeChainedBeanCreator/code. It also provides a factory 
method which creates an instance
  +with the standard betwixt chain already set. For example, the following inserts a 
custom in second place:
  +codepre
  +BeanCreationList chain = BeanCreationList.createStandardChain();
  +BeanCreator creator = MyBeanCreator();
  +chain.insertBeanCreator(1, creator);
  +/pre/code
  +/p
  +p
  +Another useful class is codeChainedBeanCreationFactory/code. This contains 
factory methods for the 
  +codeBeanCreator/codes used by Betwixt. This allows a user to easily mix custom 
and standard creators.
  +/p
  +/subsection
  +
  +subsection name='Example: Enums'
  +p
  +Herein is contained a practical example demonstrating how custom bean creation may 
be used.
  +/p
  +p
  +A common java pattern is the use of strongly typed Enum classes. Let's say that you 
have the following class:
  +codepre
  +public class CompassPoint {
  +
  +public static final CompassPoint NORTH = new CompassPoint(North);
  +public static final CompassPoint SOUTH = new CompassPoint(South);
  +public static final CompassPoint EAST = new CompassPoint(East);
  +public static final CompassPoint WEST = new 

cvs commit: jakarta-commons/betwixt/src/test/org/apache/commons/betwixt/io/read - New directory

2003-08-21 Thread rdonkin
rdonkin 2003/08/21 15:43:33

  jakarta-commons/betwixt/src/test/org/apache/commons/betwixt/io/read - New directory

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



cvs commit: jakarta-commons/betwixt/src/test/org/apache/commons/betwixt/io/read CompassPoint.java

2003-08-21 Thread rdonkin
rdonkin 2003/08/21 15:44:32

  Added:   betwixt/src/test/org/apache/commons/betwixt/io/read
CompassPoint.java
  Log:
  Tests for Chain bean creation
  
  Revision  ChangesPath
  1.1  
jakarta-commons/betwixt/src/test/org/apache/commons/betwixt/io/read/CompassPoint.java
  
  Index: CompassPoint.java
  ===
  /*
   * $Header: 
/home/cvs/jakarta-commons/betwixt/src/test/org/apache/commons/betwixt/io/read/CompassPoint.java,v
 1.1 2003/08/21 22:44:32 rdonkin Exp $
   * $Revision: 1.1 $
   * $Date: 2003/08/21 22:44:32 $
   *
   * 
   *
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 1999-2003 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *notice, this list of conditions and the following disclaimer in
   *the documentation and/or other materials provided with the
   *distribution.
   *
   * 3. The end-user documentation included with the redistribution, if
   *any, must include the following acknowlegement:
   *   This product includes software developed by the
   *Apache Software Foundation (http://www.apache.org/).
   *Alternately, this acknowlegement may appear in the software itself,
   *if and wherever such third-party acknowlegements normally appear.
   *
   * 4. The names The Jakarta Project, Commons, and Apache Software
   *Foundation must not be used to endorse or promote products derived
   *from this software without prior written permission. For written
   *permission, please contact [EMAIL PROTECTED]
   *
   * 5. Products derived from this software may not be called Apache
   *nor may Apache appear in their names without prior written
   *permission of the Apache Group.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * 
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * http://www.apache.org/.
   * 
   * $Id: CompassPoint.java,v 1.1 2003/08/21 22:44:32 rdonkin Exp $
   */
  package org.apache.commons.betwixt.io.read;
  
  /** 
   * Example enum
   * 
   * @author Robert Burrell Donkin
   * @version $Id: CompassPoint.java,v 1.1 2003/08/21 22:44:32 rdonkin Exp $
   */
  public class CompassPoint {
  
  public static final CompassPoint NORTH = new CompassPoint(North);
  public static final CompassPoint SOUTH = new CompassPoint(South);
  public static final CompassPoint EAST = new CompassPoint(East);
  public static final CompassPoint WEST = new CompassPoint(West);
  
  private String name;
  
  private CompassPoint(String name) {
  this.name = name;
  }
  
  public String getName() {
  return name;
  }
  }
  
  
  

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



cvs commit: jakarta-commons/betwixt/src/test/org/apache/commons/betwixt/io/read HouseBeans.java

2003-08-21 Thread rdonkin
rdonkin 2003/08/21 15:45:13

  Added:   betwixt/src/test/org/apache/commons/betwixt/io/read
HouseBeans.java
  Log:
  Tests for Chain bean creation
  
  Revision  ChangesPath
  1.1  
jakarta-commons/betwixt/src/test/org/apache/commons/betwixt/io/read/HouseBeans.java
  
  Index: HouseBeans.java
  ===
  /*
   * $Header: 
/home/cvs/jakarta-commons/betwixt/src/test/org/apache/commons/betwixt/io/read/HouseBeans.java,v
 1.1 2003/08/21 22:45:13 rdonkin Exp $
   * $Revision: 1.1 $
   * $Date: 2003/08/21 22:45:13 $
   *
   * 
   *
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 1999-2003 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *notice, this list of conditions and the following disclaimer in
   *the documentation and/or other materials provided with the
   *distribution.
   *
   * 3. The end-user documentation included with the redistribution, if
   *any, must include the following acknowlegement:
   *   This product includes software developed by the
   *Apache Software Foundation (http://www.apache.org/).
   *Alternately, this acknowlegement may appear in the software itself,
   *if and wherever such third-party acknowlegements normally appear.
   *
   * 4. The names The Jakarta Project, Commons, and Apache Software
   *Foundation must not be used to endorse or promote products derived
   *from this software without prior written permission. For written
   *permission, please contact [EMAIL PROTECTED]
   *
   * 5. Products derived from this software may not be called Apache
   *nor may Apache appear in their names without prior written
   *permission of the Apache Group.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * 
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * http://www.apache.org/.
   * 
   * $Id: HouseBeans.java,v 1.1 2003/08/21 22:45:13 rdonkin Exp $
   */
  package org.apache.commons.betwixt.io.read;
  
  import java.util.ArrayList;
  import java.util.Iterator;
  
  /** 
   * Collective class for HouseBean
   * 
   * @author Robert Burrell Donkin
   * @version $Id: HouseBeans.java,v 1.1 2003/08/21 22:45:13 rdonkin Exp $
   */
  public class HouseBeans {
  
  protected ArrayList houses = new ArrayList();
  
  public HouseBeans() {}
  
  public Iterator getHouses() {
  return houses.iterator();
  }
  
  public void addHouse(HouseBean house) {
  if (house != null) {
  houses.add(house);
  }
  }
  }
  
  
  

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



cvs commit: jakarta-commons/betwixt/src/test/org/apache/commons/betwixt/io/read HouseBean.java

2003-08-21 Thread rdonkin
rdonkin 2003/08/21 15:44:54

  Added:   betwixt/src/test/org/apache/commons/betwixt/io/read
HouseBean.java
  Log:
  Tests for Chain bean creation
  
  Revision  ChangesPath
  1.1  
jakarta-commons/betwixt/src/test/org/apache/commons/betwixt/io/read/HouseBean.java
  
  Index: HouseBean.java
  ===
  /*
   * $Header: 
/home/cvs/jakarta-commons/betwixt/src/test/org/apache/commons/betwixt/io/read/HouseBean.java,v
 1.1 2003/08/21 22:44:54 rdonkin Exp $
   * $Revision: 1.1 $
   * $Date: 2003/08/21 22:44:54 $
   *
   * 
   *
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 1999-2003 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *notice, this list of conditions and the following disclaimer in
   *the documentation and/or other materials provided with the
   *distribution.
   *
   * 3. The end-user documentation included with the redistribution, if
   *any, must include the following acknowlegement:
   *   This product includes software developed by the
   *Apache Software Foundation (http://www.apache.org/).
   *Alternately, this acknowlegement may appear in the software itself,
   *if and wherever such third-party acknowlegements normally appear.
   *
   * 4. The names The Jakarta Project, Commons, and Apache Software
   *Foundation must not be used to endorse or promote products derived
   *from this software without prior written permission. For written
   *permission, please contact [EMAIL PROTECTED]
   *
   * 5. Products derived from this software may not be called Apache
   *nor may Apache appear in their names without prior written
   *permission of the Apache Group.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * 
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * http://www.apache.org/.
   * 
   * $Id: HouseBean.java,v 1.1 2003/08/21 22:44:54 rdonkin Exp $
   */
  package org.apache.commons.betwixt.io.read;
  
  /** 
   * Example enum
   * 
   * @author Robert Burrell Donkin
   * @version $Id: HouseBean.java,v 1.1 2003/08/21 22:44:54 rdonkin Exp $
   */
  public class HouseBean {
  
  private CompassPoint facing;
  private AddressBean address;
  private PersonBean householder;
  private boolean isTenant;
  
  public HouseBean() {}
  
  public AddressBean getAddress() {
  return address;
  }
  
  public void setAddress(AddressBean address) {
  this.address = address;
  }
  
  public PersonBean getHouseholder() {
  return householder;
  }
  
  public void setHouseholder(PersonBean householder) {
  this.householder = householder;
  }
  
  public boolean isTenant() {
  return isTenant;
  }
  
  public void setTenant(boolean isTenant) {
  this.isTenant = isTenant;
  }
  
  public CompassPoint getFacing() {
  return facing;
  }
  
  public void setFacing(CompassPoint facing) {
  this.facing = facing;
  }
  
  public String toString() {  
  return [ + this.getClass().getName() + : address= + address +  
householder= + householder 
  +  facing= + facing +  tenant= + isTenant + ];
  }
  
  public boolean equals( Object obj ) {
  if ( obj == null ) return false;
  return this.hashCode() == obj.hashCode();
  }
  
  public int hashCode() {
  return 

cvs commit: jakarta-commons/betwixt/src/test/org/apache/commons/betwixt/derived TestDerived.java

2003-08-21 Thread rdonkin
rdonkin 2003/08/21 15:46:27

  Modified:betwixt/src/test/org/apache/commons/betwixt/derived
TestDerived.java
  Log:
  Tests for Chain bean creation
  
  Revision  ChangesPath
  1.2   +8 -6  
jakarta-commons/betwixt/src/test/org/apache/commons/betwixt/derived/TestDerived.java
  
  Index: TestDerived.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/betwixt/src/test/org/apache/commons/betwixt/derived/TestDerived.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- TestDerived.java  20 Mar 2003 19:29:00 -  1.1
  +++ TestDerived.java  21 Aug 2003 22:46:27 -  1.2
  @@ -82,6 +82,8 @@
   import org.apache.commons.betwixt.io.BeanReader;
   import org.apache.commons.betwixt.io.BeanWriter;
   
  +import org.apache.commons.logging.impl.SimpleLog;
  +
   import org.apache.commons.digester.Rule;
   import org.apache.commons.digester.ExtendedBaseRules;
   
  @@ -112,7 +114,7 @@
   BeanReader reader = new BeanReader();
   //reader.getXMLIntrospector().setLog(log);
 
  -//log = new SimpleLog([TestPersonList:BeanReader]);
  +//SimpleLog log = new SimpleLog([TestPersonList:BeanReader]);
   //log.setLevel(SimpleLog.LOG_LEVEL_TRACE);
   
   //reader.setLog(log);
  
  
  

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



cvs commit: jakarta-commons/betwixt/src/java/org/apache/commons/betwixt/io AbstractBeanWriter.java

2003-08-21 Thread rdonkin
rdonkin 2003/08/21 15:47:40

  Modified:betwixt/src/java/org/apache/commons/betwixt/io
AbstractBeanWriter.java
  Log:
  Improved java docs.
  
  Revision  ChangesPath
  1.19  +22 -11
jakarta-commons/betwixt/src/java/org/apache/commons/betwixt/io/AbstractBeanWriter.java
  
  Index: AbstractBeanWriter.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/betwixt/src/java/org/apache/commons/betwixt/io/AbstractBeanWriter.java,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- AbstractBeanWriter.java   31 Jul 2003 21:40:58 -  1.18
  +++ AbstractBeanWriter.java   21 Aug 2003 22:47:40 -  1.19
  @@ -66,7 +66,6 @@
   import java.util.HashMap;
   import java.util.Iterator;
   
  -import org.apache.commons.beanutils.ConvertUtils;
   import org.apache.commons.betwixt.AttributeDescriptor;
   import org.apache.commons.betwixt.ElementDescriptor;
   import org.apache.commons.betwixt.Descriptor;
  @@ -77,8 +76,6 @@
   import org.apache.commons.betwixt.expression.Expression;
   import org.apache.commons.betwixt.io.id.SequentialIDGenerator;
   import org.apache.commons.betwixt.digester.XMLIntrospectorHelper;
  -import org.apache.commons.betwixt.strategy.ObjectStringConverter;
  -import org.apache.commons.betwixt.strategy.DefaultObjectStringConverter;
   import org.apache.commons.collections.ArrayStack;
   import org.apache.commons.logging.Log;
   import org.apache.commons.logging.LogFactory;
  @@ -209,6 +206,7 @@
* @param localName the local name
* @param qualifiedName the string naming root element
* @param bean the codeObject/code to write out as xml
  + * @param context not null
* 
* @throws IOException if an IO problem occurs during writing
* @throws SAXException if an SAX problem occurs during writing 
  @@ -367,7 +365,7 @@
   
   /**
* Sets the dynamic configuration setting to be used for bean reading.
  - * @param the BindingConfiguration settings, not null
  + * @param bindingConfiguration the BindingConfiguration settings, not null
*/
   public void setBindingConfiguration(BindingConfiguration bindingConfiguration) {
   this.bindingConfiguration = bindingConfiguration;
  @@ -735,10 +733,20 @@
   if (object == null) {
   continue;
   }
  -writeBean( namespaceUri, localName, 
qualifiedName, object, context );
  +writeBean( 
  +namespaceUri, 
  +localName, 
  +qualifiedName, 
  +object, 
  +context );
   }
   } else {
  -writeBean( namespaceUri, localName, qualifiedName, 
childBean, context );
  +writeBean( 
  +namespaceUri, 
  +localName, 
  +qualifiedName, 
  +childBean, 
  +context );
   }
   }
   } else {
  @@ -1484,6 +1492,8 @@
 * Converts an object to a string.
 *
 * @param value the Object to represent as a String, possibly null
  +  * @param descriptor writing out this descriptor not null
  +  * @param context not null
 * @return String representation, not null
 */
   private String convertToString( Object value , Descriptor descriptor, Context 
context ) {
  @@ -1494,6 +1504,7 @@
   /**
 * Factory method for new contexts.
 * Ensure that they are correctly configured.
  +  * @param bean make a new Context for this bean
 */
   private Context makeContext(Object bean) {
   return new Context( bean, log, bindingConfiguration );
  
  
  

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



cvs commit: jakarta-commons/beanutils/src/java/org/apache/commons/beanutils DynaProperty.java

2003-08-21 Thread rdonkin
rdonkin 2003/08/21 14:31:56

  Modified:beanutils/src/java/org/apache/commons/beanutils
DynaProperty.java
  Log:
  Enhanced toString(). Added content and key types to those serialized safely under 
java 1.3. Patch submitted by Alfonso da Silva.
  
  Revision  ChangesPath
  1.8   +80 -58
jakarta-commons/beanutils/src/java/org/apache/commons/beanutils/DynaProperty.java
  
  Index: DynaProperty.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/beanutils/src/java/org/apache/commons/beanutils/DynaProperty.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- DynaProperty.java 28 Jul 2003 20:14:23 -  1.7
  +++ DynaProperty.java 21 Aug 2003 21:31:56 -  1.8
  @@ -153,16 +153,16 @@
*
* @param name Name of the property being described
* @param type Java class representing the property data type
  - * @param contentType Class that all mapped elements are instances of
* @param keyType Class that all keys are instances of
  + * @param contentType Class that all mapped elements are instances of
*/
  -public DynaProperty(String name, Class type, Class contentType, Class keyType) {
  +public DynaProperty(String name, Class type, Class keyType, Class contentType) {
   
   super();
   this.name = name;
   this.type = type;
  -this.contentType = contentType;
   this.keyType = keyType;
  +this.contentType = contentType;
   
   }
   
  @@ -195,11 +195,15 @@
   
   
   /** The em(optional)/em type of content elements for indexed 
codeDynaProperty/code */
  -protected Class contentType;
  +protected transient Class contentType;
   /**
* Gets the em(optional)/em type of the indexed content for 
codeDynaProperty/code's
* that support this feature.
*
  + * pThere are issues with serializing primitive class types on certain JVM 
versions
  + * (including java 1.3).
  + * Therefore, this field strongmust not be serialized using the standard 
methods/strong./p
  + *
* @return the Class for the content type if this is an indexed 
codeDynaProperty/code 
* and this feature is supported. Otherwise null.
*/
  @@ -209,11 +213,15 @@
   
   
   /** The em(optional)/em type of keys for mapped codeDynaProperty/code's 
*/
  -protected Class keyType;
  +protected transient Class keyType;
   /**
* Gets the em(optional)/em type of the key for mapped 
codeDynaProperty/code's
* that support this feature.
*
  + * pThere are issues with serializing primitive class types on certain JVM 
versions
  + * (including java 1.3).
  + * Therefore, this field strongmust not be serialized using the standard 
methods/strong./p
  + *
* @return the Class for the key type if this is an mapped 
codeDynaProperty/code 
* and this feature is supported. Otherwise null.
*/
  @@ -265,6 +273,11 @@
   sb.append(this.name);
   sb.append(,type=);
   sb.append(this.type);
  +if (isIndexed()) {
  +sb.append( ).append(this.contentType).append();
  +} else if (isMapped()) {
  +sb.append( 
).append(this.keyType).append(,).append(this.contentType).append();
  +}
   sb.append(]);
   return (sb.toString());
   
  @@ -279,38 +292,54 @@
* This method provides a workaround.
*/
   private void writeObject(ObjectOutputStream out) throws IOException {
  -// safely write out type class
  +
  +writeAnyClass(this.type,out);
  +
  +if (isIndexed()) {
  +writeAnyClass(this.contentType,out);
  +}
  +else if (isMapped()) {
  +writeAnyClass(this.keyType,out);
  +writeAnyClass(this.contentType,out);
  +}
  +
  +// write out other values
  +out.defaultWriteObject();
  +}
  +
  +/**
  + * Write a class using safe encoding to workaround java 1.3 serialization bug.
  + */
  +private void writeAnyClass(Class clazz, ObjectOutputStream out) throws 
IOException {
  +// safely write out any class
   int primitiveType = 0;
  -if (Boolean.TYPE.equals(type)) {
  +if (Boolean.TYPE.equals(clazz)) {
   primitiveType = BOOLEAN_TYPE;
  -} else if (Byte.TYPE.equals(type)) {
  +} else if (Byte.TYPE.equals(clazz)) {
   primitiveType = BYTE_TYPE;
  -} else if (Character.TYPE.equals(type)) {
  +} else if (Character.TYPE.equals(clazz)) {
   primitiveType = CHAR_TYPE;
  -} else if (Double.TYPE.equals(type)) {
  +} else if (Double.TYPE.equals(clazz)) {
   primitiveType = DOUBLE_TYPE;
  -} else if 

Re: [collections] Code generation was: Re: [collections] contribute?

2003-08-21 Thread Stephen Colebourne
At work I use Velocity to generate the java classes which then get checked
into the CVS. The main trick in my case was to allow the generated java
files to be read in again by the generator next time around, so manually
added methods weren't lost.

Code generation will work well for generating primitive Maps as there are so
many possible combinations. However, before anyone starts, it would be good
to search the web as I'm sure someone has probably already done this. They
may be persuedable to donate the code/generator to Apache.

Stephen

- Original Message -
From: J.Pietschmann [EMAIL PROTECTED]
 __matthewHawthorne wrote:
  There are many times that I've wished I had found a nice way to
  autogenerate things while creating a bunch of redundant primitive
  methods.

 There are half a zillion methods for generating code, starting
 with Bash/Sed/Perl hacks, leading to dedicated macro languages
 like the C preprocessor and m4, continuing with a variety of web
 templating languages like PHP, there's XSLT and finally high
 level stuff like lex/yacc, ANTLR and all the other grammar
 generators.

 The recurrent problems:
 - Need dedicated Ant tasks (Make was a bit easier here)
 - IDEs rarely handle them well
 - Tracking compile and runtime errors caused by generated code
to the ultimate source isn't well supported and often painful

 I personally use ad-hoc generators mainly to bootstrap code, once
 the bulk of the code is stable, I abandon them.

 J.Pietschmann


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



cvs commit: jakarta-commons/dbcp/src/test/org/apache/commons/dbcp TestAbandonedBasicDataSource.java TestAll.java

2003-08-21 Thread dirkv
dirkv   2003/08/21 15:24:28

  Modified:dbcp/src/test/org/apache/commons/dbcp TestAll.java
  Added:   dbcp/src/test/org/apache/commons/dbcp
TestAbandonedBasicDataSource.java
  Log:
  - Test BasicDataSource with RemoveAbandoned enabled
  - special testcase for issue 15123 (check stderr manually)
  
  Revision  ChangesPath
  1.8   +5 -4  
jakarta-commons/dbcp/src/test/org/apache/commons/dbcp/TestAll.java
  
  Index: TestAll.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/dbcp/src/test/org/apache/commons/dbcp/TestAll.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- TestAll.java  12 Aug 2003 06:09:20 -  1.7
  +++ TestAll.java  21 Aug 2003 22:24:28 -  1.8
  @@ -79,6 +79,7 @@
   suite.addTest(TestManual.suite());
   suite.addTest(TestJOCLed.suite());
   suite.addTest(TestBasicDataSource.suite());
  +suite.addTest(TestAbandonedBasicDataSource.suite());
   suite.addTest(TestDelegatingConnection.suite());
   suite.addTest(TestDelegatingStatement.suite());
   suite.addTest(TestDelegatingPreparedStatement.suite());
  
  
  
  1.1  
jakarta-commons/dbcp/src/test/org/apache/commons/dbcp/TestAbandonedBasicDataSource.java
  
  Index: TestAbandonedBasicDataSource.java
  ===
  /*
   * $Id: TestAbandonedBasicDataSource.java,v 1.1 2003/08/21 22:24:28 dirkv Exp $
   * $Revision: 1.1 $
   * $Date: 2003/08/21 22:24:28 $
   * 
   *
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 2001-2002 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *notice, this list of conditions and the following disclaimer in
   *the documentation and/or other materials provided with the
   *distribution.
   *
   * 3. The end-user documentation included with the redistribution, if
   *any, must include the following acknowlegement:
   *   This product includes software developed by the
   *Apache Software Foundation (http://www.apache.org/).
   *Alternately, this acknowlegement may appear in the software itself,
   *if and wherever such third-party acknowlegements normally appear.
   *
   * 4. The names The Jakarta Project, Commons, and Apache Software
   *Foundation must not be used to endorse or promote products derived
   *from this software without prior written permission. For written
   *permission, please contact [EMAIL PROTECTED]
   *
   * 5. Products derived from this software may not be called Apache
   *nor may Apache appear in their names without prior written
   *permission of the Apache Group.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * 
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * http://www.apache.org/.
   *
   */
  
  package org.apache.commons.dbcp;
  
  import java.sql.Connection;
  
  import junit.framework.Test;
  import junit.framework.TestSuite;
  
  /**
   * @version $Revision: 1.1 $ $Date: 2003/08/21 22:24:28 $
   */
  public class TestAbandonedBasicDataSource extends TestConnectionPool {
  public TestAbandonedBasicDataSource(String testName) {
  super(testName);
  }
  
  public static Test suite() {
  return new TestSuite(TestAbandonedBasicDataSource.class);
  }
  
  protected Connection getConnection() throws Exception {
  return ds.getConnection();
  }
  
  

cvs commit: jakarta-commons-sandbox/attributes/site/xdocs index.xml

2003-08-21 Thread leosutic
leosutic2003/08/21 16:28:01

  Modified:attributes maven.xml project.xml
   attributes/site project.properties
   attributes/site/xdocs index.xml
  Log:
  Made the website design in-line with other Commons projects.
  
  Revision  ChangesPath
  1.5   +9 -0  jakarta-commons-sandbox/attributes/maven.xml
  
  Index: maven.xml
  ===
  RCS file: /home/cvs/jakarta-commons-sandbox/attributes/maven.xml,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- maven.xml 20 Aug 2003 23:16:15 -  1.4
  +++ maven.xml 21 Aug 2003 23:28:01 -  1.5
  @@ -53,6 +53,15 @@
   ignoreFailures=false /
   /goal
   
  +goal name=do-deploy-site
  +maven:reactor
  +basedir=${basedir}
  +includes=site/project.xml
  +goals=site:deploy
  +banner=Building Site:
  +ignoreFailures=false /
  +/goal
  +
   goal name=xjavadoc
   mkdir dir=${basedir}/target/docs/api /
   property name=copyright
  
  
  
  1.6   +5 -4  jakarta-commons-sandbox/attributes/project.xml
  
  Index: project.xml
  ===
  RCS file: /home/cvs/jakarta-commons-sandbox/attributes/project.xml,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- project.xml   20 Aug 2003 23:16:15 -  1.5
  +++ project.xml   21 Aug 2003 23:28:01 -  1.6
  @@ -5,11 +5,12 @@
   pomVersion3/pomVersion
   groupIdjakarta-commons-attributes/groupId
   nameJakarta Commons Attributes/name
  +logo./docs/attributes-logo.gif/logo
   
   organization
   nameApache Software Foundation/name
   urlhttp://jakarta.apache.org//url
  -logohttp://jakarta.apache.org/images/jakarta-logo.gif/logo
  +logohttp://jakarta.apache.org/images/jakarta-logo-blue.gif/logo
   /organization
   
   inceptionYear2003/inceptionYear
  @@ -19,10 +20,10 @@
   
   urlhttp://jakarta.apache.org/commons/sandbox/attributes/index.html/url
   issueTrackingUrlhttp://nagoya.apache.org//issueTrackingUrl
  -
  +
   siteAddressjakarta.apache.org/siteAddress
  -siteDirectory${root.site.directory}/commons/sandbox/attributes/siteDirectory
  -distributionDirectory/distributionDirectory
  +
siteDirectory/www/jakarta.apache.org/commons/sandbox/attributes/siteDirectory
  +
distributionDirectory/www/jakarta.apache.org/builds/jakarta-commons-sandbox/attributes//distributionDirectory
   
   repository
   connectionscm:cvs:pserver:[EMAIL 
PROTECTED]:/home/cvspublic:jakarta-commons-sandbox/attributes/connection
  
  
  
  1.2   +2 -2  jakarta-commons-sandbox/attributes/site/project.properties
  
  Index: project.properties
  ===
  RCS file: /home/cvs/jakarta-commons-sandbox/attributes/site/project.properties,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- project.properties20 Aug 2003 23:16:15 -  1.1
  +++ project.properties21 Aug 2003 23:28:01 -  1.2
  @@ -3,8 +3,8 @@
   # Banner background and foreground colors.
   #
   
  -maven.ui.banner.background = #fff
  -maven.ui.banner.foreground = #000
  +#maven.ui.banner.background = #fff
  +#maven.ui.banner.foreground = #000
   maven.xdoc.jsl = file:/${basedir}/etc/site.jsl
   maven.javadoc.stylesheet =${basedir}/etc/stylesheet.css
   
  
  
  
  1.2   +113 -2jakarta-commons-sandbox/attributes/site/xdocs/index.xml
  
  Index: index.xml
  ===
  RCS file: /home/cvs/jakarta-commons-sandbox/attributes/site/xdocs/index.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- index.xml 20 Aug 2003 23:16:15 -  1.1
  +++ index.xml 21 Aug 2003 23:28:01 -  1.2
  @@ -13,14 +13,125 @@
   p
   Commons Attributes enables Java programmers to use C#/.Net-style
   attributes in their code.
  +
  +Please see the Javadoc overview for a thorough explanation of the 
features
  +and how the project integrates into the development process.
   /p
  +/section
  +
  +section name=A Quick Sample
   
   p
  -Please see the Javadoc overview for more information. (I figure
  -it makes more sense to have it there.)
  +Commons Attributes enables you to add attributes to your code:
  +/p
  +
  +source![CDATA[
  +/**
  + * Make this attribute inheritable...
  + * 
  + * @@Inheritable
  + */
  +public class MyAttribute {
  +private final float value;
  +
 

cvs commit: jakarta-commons-sandbox/attributes/site/xdocs attributes-logo.gif

2003-08-21 Thread leosutic
leosutic2003/08/21 16:29:17

  Added:   attributes/site/xdocs attributes-logo.gif
  Log:
  Initial checkin. The font is Lucida Sans Unicode bold+italic, 30pt for
  the initial letters and 24pt for the small caps.
  
  Revision  ChangesPath
  1.1  
jakarta-commons-sandbox/attributes/site/xdocs/attributes-logo.gif
  
Binary file
  
  

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



cvs commit: jakarta-commons/validator project.xml

2003-08-21 Thread rleland
rleland 2003/08/21 14:44:59

  Modified:validator project.xml
  Log:
  Add back html2xdoc now that it works
  
  Revision  ChangesPath
  1.18  +1 -1  jakarta-commons/validator/project.xml
  
  Index: project.xml
  ===
  RCS file: /home/cvs/jakarta-commons/validator/project.xml,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- project.xml   20 Aug 2003 05:07:40 -  1.17
  +++ project.xml   21 Aug 2003 21:44:59 -  1.18
  @@ -190,7 +190,7 @@
   reportmaven-pmd-plugin/report
   reportmaven-simian-plugin/report
   reportmaven-faq-plugin/report
  -  !--  reportmaven-html2xdoc-plugin/report --
  +reportmaven-html2xdoc-plugin/report
 /reports
   
   /project
  
  
  

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



cvs commit: jakarta-commons/pool/src/java/org/apache/commons/pool/impl GenericKeyedObjectPool.java

2003-08-21 Thread dlr
dlr 2003/08/21 16:35:28

  Modified:pool/src/java/org/apache/commons/pool/impl
GenericKeyedObjectPool.java
  Log:
  * src/java/org/apache/commons/pool/impl/GenericKeyedObjectPool.java
returnObject(): Removed extraneous set of parens.
  
  Revision  ChangesPath
  1.18  +5 -5  
jakarta-commons/pool/src/java/org/apache/commons/pool/impl/GenericKeyedObjectPool.java
  
  Index: GenericKeyedObjectPool.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/pool/src/java/org/apache/commons/pool/impl/GenericKeyedObjectPool.java,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -u -r1.17 -r1.18
  --- GenericKeyedObjectPool.java   24 Apr 2003 18:07:09 -  1.17
  +++ GenericKeyedObjectPool.java   21 Aug 2003 23:35:28 -  1.18
  @@ -859,7 +859,7 @@
   
   // if we need to validate this object, do so
   boolean success = true; // whether or not this object passed validation
  -if((_testOnReturn  !_factory.validateObject(key, obj))) {
  +if(_testOnReturn  !_factory.validateObject(key, obj)) {
   success = false;
   try {
   _factory.destroyObject(key, obj);
  
  
  

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



cvs commit: jakarta-commons/validator project.properties

2003-08-21 Thread rleland
rleland 2003/08/21 14:46:21

  Modified:validator project.properties
  Log:
  Add a checkstyle.xml, this still needs to
  be voted on and trimmed down because it is very noisy.
  PMD is a better tool for most of these items.
  
  Revision  ChangesPath
  1.2   +2 -2  jakarta-commons/validator/project.properties
  
  Index: project.properties
  ===
  RCS file: /home/cvs/jakarta-commons/validator/project.properties,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- project.properties20 Aug 2003 04:19:53 -  1.1
  +++ project.properties21 Aug 2003 21:46:21 -  1.2
  @@ -16,7 +16,7 @@
   #
   
#maven.repo.remote=http://www.ibiblio.org/maven/,http://jakarta.apache.org/commons/validator/repo
   
  -#maven.checkstyle.format = validator
  +maven.checkstyle.properties = conf/share/ValidatorCheckStyle.xml
   
   # Include legacy javadoc in build
   maven.html2xdoc.dir = legacy
  
  
  

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



cvs commit: jakarta-commons/betwixt/src/java/org/apache/commons/betwixt/io/read - New directory

2003-08-21 Thread rdonkin
rdonkin 2003/08/21 15:36:46

  jakarta-commons/betwixt/src/java/org/apache/commons/betwixt/io/read - New directory

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



Re: [resources] plans...?

2003-08-21 Thread Stephen Colebourne
I have my own code at work that does resource management. From the quick
look I took at [resources] it was more flexible, so in my dream world of
infinite time to work on commons, I was going to add stuff to [resources].

Ideas include:
- Main interface supports direct access to multiple types of resource:
  - String
  - List of Strings
  - Map (ordered) of String to Strings
  - XML structure
  - perhaps others, such as Integer, Boolean, and any other bean

- Resource chaining
  - To allow multiple files to be merged into one (an 'extends' keyword for
resources)
  - for a large product where the product has a fixed base configuration,
and users should override the base configuration rather than change it

Anyone know where I can buy an infinite time machine;-)

Stephen

- Original Message -
From: Robert Leland [EMAIL PROTECTED]
 robert burrell donkin wrote:

  what's current status of the resources sandbox component?

 http://marc.theaimsgroup.com/?l=jakarta-commons-devm=106006188608959w=4

 I am not an official committer for resources but you have my +1.

 You have my vote for the Commons Good Citizen Award !!!'

 -Rob

 
 
  the site's maven-generated but badly out of dates with minimal
  documentation. some of the javadocs looks like it might have been
  cut-and-pasted in. i'm not sure whether some of the code doesn't work
  or whether i just don't understand what it's supposed to do.
 
  i'd be willing to dive in and take a look at documenting and fixing up
  some stuff if there are folks out there who'll keep me on the straight
  and narrow.
 
  - robert
 
 
  -
  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]



cvs commit: jakarta-commons/dbcp/src/java/org/apache/commons/dbcp AbandonedTrace.java

2003-08-21 Thread dirkv
dirkv   2003/08/21 15:18:03

  Modified:dbcp/src/java/org/apache/commons/dbcp AbandonedTrace.java
  Log:
  print date on stderr together with stacktrace
  
  Revision  ChangesPath
  1.6   +5 -5  
jakarta-commons/dbcp/src/java/org/apache/commons/dbcp/AbandonedTrace.java
  
  Index: AbandonedTrace.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/dbcp/src/java/org/apache/commons/dbcp/AbandonedTrace.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- AbandonedTrace.java   9 Apr 2003 00:19:37 -   1.5
  +++ AbandonedTrace.java   21 Aug 2003 22:18:03 -  1.6
  @@ -242,7 +242,7 @@
*/
   public synchronized void printStackTrace() {
   if (createdBy != null) {
  -System.out.println(format.format(createdDate));
  +System.err.println(format.format(createdDate));
   createdBy.printStackTrace();
   }
   Iterator it = trace.iterator();
  
  
  

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



  1   2   >