cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steven Dolg <steven.d...@indoqa.com>
Subject Re: [jira] Created: (COCOON3-14) Use generics for pipeline assembly
Date Mon, 26 Jan 2009 22:25:02 GMT
Carsten Ziegeler (JIRA) schrieb:
> Use generics for pipeline assembly
> ----------------------------------
>
>                  Key: COCOON3-14
>                  URL: https://issues.apache.org/jira/browse/COCOON3-14
>              Project: Cocoon 3
>           Issue Type: Improvement
>           Components: cocoon-pipeline
>             Reporter: Carsten Ziegeler
>             Assignee: Cocoon Developers Team
>          Attachments: generics.patch
>
> This is a simple patch to add generics to the pipeline interface and impl. With additionally
introducing marker interfaces for the component types (SAX, Stax, dom)
> this would allow compile time checks if all components have the correct type when assembling
the pipeline.
>
>
>   
Is it just me or is the patch you applied not really complete?

Because doing
        Pipeline<SAXPipelineComponent> pipeline = new 
NonCachingPipeline<SAXPipelineComponent>();
        pipeline.addComponent(new StringGenerator(xmlInput));
        pipeline.addComponent(new 
SchemaProcessorTransformer(this.getClass().getResource("/test.xsd")));
        pipeline.addComponent(new XMLSerializer());

yields a compile error for the last line, because XMLSerializer is not a 
o.a.c.p.c.s.SAXPipelineComponent.

On the other hand, the class hierarchy of the whole SAX module is rather 
messy IMO...



Mime
View raw message