XenoAmess commented on pull request #27:
URL: https://github.com/apache/commons-beanutils/pull/27#issuecomment-636524987


   my bad.
   I found the reason why it can't pass, it is my mistake.
   Now we can use `org.apache.commons.logging.impl.WeakHashtable ` to replace 
`FastWeakHashMap`.
   We can also use the ConcurrentWeakHashMap in 
https://issues.apache.org/jira/browse/HARMONY-6434 , but that class is from a 
strange place.
   
   It said it be from `package org.amino.ds.tmpMap;`, but I download amino from 
sourceforge at 
`https://sourceforge.net/projects/amino-cbbs/files/cbbs/1.0/amino-java-src-1.0.tar.gz/download`,
 and 1.0 is the greatest version number there, and found no class like this 
contained.
   
   Also, that lib is at apache license v2, so if we want to use it we must 
follow that license.
   Thus WeakHashtable might be the best choice here.
   
   Though I still think a ConcurrentWeakHashMap should have better 
performance... but WeakHashtable is far better than WeakFastHashMap.
   
   Only one more thing: WeakFastHashMap allows null key and null value(same as 
WeakHashMap do),
   but WeakHashtable does not allow null key nor null value(same as Hashtable 
do).
   
   So what should we do next?
   
   Actually there be several ways.
   
   1. use WeakHashtable for now, and accept the BC that it cannot have null 
key/value;
   
   2. wrap another layer for WeakHashtable, and make it support null key and 
null value that way;
   
   3. fork WeakHashtable, and change its source codes to make it support null 
key and null value that way;
   
   3. find something like a ConcurrentWeakHashMap, whitch is clean to use (both 
usage and license).
   
   4. create our own ConcurrentWeakHashMap class (not suggested but if give me 
a whole week I think I can do...)
   
   Which way should we enter?
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to