Best unofficial Apache Server developers community
Username
Forgot password?
Sign in with Twitter account
Sign in with Facebook account
List archives

Created: (COLLECTIONS-358) CollectionUtils.removeAll(Collection collection, Collection remove) calls ListUtils.retainAll(collection, remove)

Created: (SANDBOX-325) Contributed stages from Mark Southern
(3 lines)
Updated: (LANG-411) HashCodeBuilder: expose typed hashing methods
(8 lines)
Jun 29, 2010
Andreas Knees (JIRA)
Andreas Knees (JIRA)
CollectionUtils.removeAll(Collection collection, Collection remove) calls
ListUtils.retainAll(collection, remove)

Reply
Tags: removecollectioncalls
Messages in this thread
Created: (COLLECTIONS-358) CollectionUtils.removeAll(Collection collection, Collection remove) calls ListUtils.retainAll(collection, remove)
Similar Threads
Created: (COLLECTIONS-355) class cast exception in common collection-3.2 jar
class cast exception in common collection-3.2  jar

Collections: How to use? Waht's the collection converter?
Hi all!

I'm trying to understand the correct use of collections mapping of the
jackrabbit OCM.

	@Collection(proxy=true, 
			  elementClassName=SomeClass.class,
collectionConverter=NTCollectionConverterImpl.class)

I found something like this but I really don't understand what's going
on with this.

Is there any good explanation about how to use? The main page is almost
empty...

Thank you.








Created: (COLLECTIONS-357) CollectionUtils.removeAll invokes wrong Listutils method
CollectionUtils.removeAll invokes wrong Listutils method

Created: (HTTPCLIENT-969) BasicCookieStore.getCookies() returns non-threadsafe collection
BasicCookieStore.getCookies() returns non-threadsafe collection

Created: (JCR-2686) Data store garbage collection: interrupt mark
Data store garbage collection: interrupt mark

Tuning garbage collection
Hi,

I'm using Tomcat 6.0.26, Java 1.6 and wondering what tools/strategies you
use to tune your garbage collection parameters?

Further, does anyone know how to read entries in the garbage collection
log? 
Entries in my log look like

Desired survivor size 10944512 bytes, new threshold 1 (max 15)
 [PSYoungGen: 129311K->3232K(136512K)] 558882K->434085K(585920K),
0.0090900
secs]

Thanks, - Dave




How to deserialize an Aegis XML doc containing a collection?
Hi,

I have this class generated by wsdl2java (comments remove):
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "RunExtensionArgumentsType", propOrder = {
     "extensionArgument"
})
public class RunExtensionArgumentsType
     implements Serializable
{

     @XmlElement(name = "ExtensionArgument")
     protected List<RunExtensionType> extensionArgument;

     public List<RunExtensionType> getExtensionArgument() {
         if (extensionArgument == null) {
             extensionArgument = new ArrayList<RunExtensionType>();
         }
         return this.extensionArgument;
     }

}


I have been serialising it for ages using the following code:
     static {
         aegisContext.initialize();

         TypeMapping tm = aegisContext.getTypeMapping();
         Type aegisType = tm.getType( RunExtensionArgumentsType.class );
         if( aegisType == null )
         {
             // Make a new type and register it for the future.
             log.debug( "Registering type for RunExtensionArgumentsType"
);
             TypeCreator tc = tm.getTypeCreator();
             aegisType = tc.createType( RunExtensionArgumentsType.class );

             QName qName = new QName( "http://groupgti.com/s-service", 
"RunExtensionType");
             tm.register( RunExtensionArgumentsType.class, qName, 
aegisType );
         }
     }

     public static String extensionArgsToString( 
RunExtensionArgumentsType extensionArgs )
     {
         try
         {
             StringWriter stringWriter = new StringWriter();
             XMLStreamWriter xmlWriter = 
xmlOutputFactory.createXMLStreamWriter( stringWriter );

             AegisWriter<XMLStreamWriter> writer = 
aegisContext.createXMLStreamWriter();

             TypeMapping tm = aegisContext.getTypeMapping();
             Type aegisType = tm.getType( RunExtensionArgumentsType.class
);
             writer.write( extensionArgs, aegisType.getSchemaType(), 
true, xmlWriter, aegisType );

             xmlWriter.close();
             return stringWriter.toString();
         }
         catch( Exception ex )
         {
             log.error( ExceptionStringConverter.ExceptionWithCauses( ex 
) );
             return null;
         }
     }

Now I come to deserialize it using this:
     public static RunExtensionArgumentsType extensionArgsFromString( 
String extensionArgsString )
     {
         try
         {
             StringReader stringReader = new StringReader( 
extensionArgsString );
             XMLStreamReader xmlReader = 
xmlInputFactory.createXMLStreamReader( stringReader );

             AegisReader<XMLStreamReader> reader = 
aegisContext.createXMLStreamReader();

             TypeMapping tm = aegisContext.getTypeMapping();
             Type aegisType = tm.getType( RunExtensionArgumentsType.class
);
             Object result = reader.read( xmlReader, aegisType );

             xmlReader.close();
             return (RunExtensionArgumentsType)result;
         }
         catch( Exception ex )
         {
             StringBuilder msg = new StringBuilder();
             msg.append( "Exception whilst trying to convert \" 
").append( extensionArgsString ).append( "\" to 
RunExtensionArgumentsType:\n\t" );
             log.error( ExceptionStringConverter.ExceptionWithCauses( 
msg, ex ) );
             return null;
         }
     }

but it hits this exception:
         org.apache.cxf.aegis.DatabindingException:
  No write method for property 
{http://groupgti.com/s-service}extensionArgument in class 
com.groupgti.s_service.RunExtensionArgumentsType:
  No write method for property 
{http://groupgti.com/s-service}extensionArgument in class 
com.groupgti.s_service.RunExtensionArgumentsType:
  org.apache.cxf.aegis.type.basic.BeanType:writeProperty @
BeanType.java:272
  org.apache.cxf.aegis.type.basic.BeanType:readObject @ BeanType.java:163
  org.apache.cxf.aegis.AegisXMLStreamDataReader:read @ 
AegisXMLStreamDataReader.java:82
  org.apache.cxf.aegis.AegisXMLStreamDataReader:read @ 
AegisXMLStreamDataReader.java:31
 
com.groupgti.services.service.XmlConversionSupport:extensionArgsFromString
@ XmlConversionSupport.java:162
  com.groupgti.services.XmlConversionsTest:testStringToExtensionArgs @ 
XmlConversionsTest.java:65


Now clearly this class can be deserialized 'cos it's used in by the web 
service, so what do I have to do to make it use a get().add() instead of 
a set() for collections?

Thanks

Jim


MapReduce resulting collection
Hi All,

I been trying mapReduce and I'm currently stuck because the resulting
collection looks like:

{ _id: { MY_KEY_STUFF }, value: { MY_VALUE_STUFF } }

But it happens that I would like to have only the contents of
MY_VALUE_STUFF
in my permanent collection, because I want it easy to index by a couple of
fields in there and it makes it diffcult by having them embedded.

I tried the finalize function but it doesn't seem to have tha purpose as
my
resulting collection looks the same.

Thanks in advance
Kevin





Setting collection variables from Lua
Is there a way to set a collection variable from a Lua script? Perhaps
something like m.setvar. Alternatively, can I return the value I want to
set
in a collection value to modsec and use the rules language to set a
collection variable?

Thanks




Collection not finding a set variable
Every so often I see intances of ModSecurity set a session variable and
then
not be able to retrieve the variable later on. In other words, I have a
rule
that creates a SESSION.username variable, which gets set as follows:

[08/Jul/2010:09:30:24 +1000]
[xxx.xxx.xxx/sid#8fb6de7][rid#cfa8c10][/index.asp][9] Set variable
"SESSION.username" to "123456".

but sometimes (and only sometimes) when I try to use the SESSION.username
variable the variable does not resolve to a value. When this happens I
don't
see "Resolved macro %SESSION.username" in the logs, but I do see the "Set
variable "SESSION.username to ..." which tells me that the variable is
set,
but sometimes seems to disappear. Has anyone experienced this before?

Thanks,
Chris

Fwd: Re: Commented: (CLK-696) Use typesafe collection
On 24/06/2010 17:41, Finn Bock wrote:
 2010/6/24 Adrian A:
> What if we make OptionGroup extend Option?
> Wouldn't that simplify the problem?
 
 Indeed it would, but with a tiny risk of breaking existing user code
like:

I don't think we need to enforce inheritance onto Option and OptionGroup.
The issue at hand is minor
at best, no need to complicate the framework.

Bob