cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Oliver <res1c...@verizon.net>
Subject Re: cvs commit: cocoon-2.1/src/blocks/xmlform/java/org/apache/cocoon/transformation XMLFormTransformer.java
Date Thu, 25 Sep 2003 05:02:40 GMT
Carsten,

Please do _not_ arbitrarily change private fields and methods to 
protected. JXTemplateGenerator and JXFormsGenerator are _not_ intended 
to be extended. If you think you have a need to extend them please 
express the problem you are trying to solve before making such changes.

Thanks for your consideration,

Chris

cziegeler@apache.org wrote:

>cziegeler    2003/09/24 15:04:40
>
>  Modified:    src/java/org/apache/cocoon/generation
>                        JXTemplateGenerator.java
>               src/blocks/jxforms/java/org/apache/cocoon/generation
>                        JXFormsGenerator.java
>               src/blocks/linkrewriter/java/org/apache/cocoon/transformation
>                        VariableRewriterTransformer.java
>                        LinkRewriterTransformer.java
>               src/blocks/xmlform/java/org/apache/cocoon/transformation
>                        XMLFormTransformer.java
>  Log:
>  Removing unused imports and casts
>  
>  Revision  Changes    Path
>  1.9       +3 -3      cocoon-2.1/src/java/org/apache/cocoon/generation/JXTemplateGenerator.java
>  
>  Index: JXTemplateGenerator.java
>  ===================================================================
>  RCS file: /home/cvs/cocoon-2.1/src/java/org/apache/cocoon/generation/JXTemplateGenerator.java,v
>  retrieving revision 1.8
>  retrieving revision 1.9
>  diff -u -r1.8 -r1.9
>  --- JXTemplateGenerator.java	3 Sep 2003 15:00:56 -0000	1.8
>  +++ JXTemplateGenerator.java	24 Sep 2003 22:04:40 -0000	1.9
>  @@ -2235,10 +2235,10 @@
>                                       null, locator);
>                       Expression currencyCode = 
>                           compileExpr(attrs.getValue("currencyCode"),
>  -                                    null, locator);;
>  +                                    null, locator);
>                       Expression currencySymbol = 
>                           compileExpr(attrs.getValue("currencySymbol"),
>  -                                    null, locator);;          
>  +                                    null, locator);       
>                       Expression isGroupingUsed =  
>                           compileBoolean(attrs.getValue("isGroupingUsed"), 
>                                          null, locator);
>  @@ -2281,7 +2281,7 @@
>                                       null, locator);           
>                       Expression value = 
>                           compileExpr(attrs.getValue("value"),
>  -                                    null, locator);;
>  +                                    null, locator);
>                       Expression type = 
>                           compileExpr(attrs.getValue("type"),
>                                       null, locator);
>  
>  
>  
>  1.5       +8 -12     cocoon-2.1/src/blocks/jxforms/java/org/apache/cocoon/generation/JXFormsGenerator.java
>  
>  Index: JXFormsGenerator.java
>  ===================================================================
>  RCS file: /home/cvs/cocoon-2.1/src/blocks/jxforms/java/org/apache/cocoon/generation/JXFormsGenerator.java,v
>  retrieving revision 1.4
>  retrieving revision 1.5
>  diff -u -r1.4 -r1.5
>  --- JXFormsGenerator.java	5 Sep 2003 07:21:48 -0000	1.4
>  +++ JXFormsGenerator.java	24 Sep 2003 22:04:40 -0000	1.5
>  @@ -88,7 +88,7 @@
>   
>   public class JXFormsGenerator extends ServiceableGenerator {
>   
>  -    private static final JXPathContextFactory 
>  +    protected static final JXPathContextFactory 
>           jxpathContextFactory = JXPathContextFactory.newInstance();
>   
>       private static final Attributes EMPTY_ATTRS = new AttributesImpl();
>  @@ -104,7 +104,7 @@
>               }
>           };
>   
>  -    private static final Locator NULL_LOCATOR = new LocatorImpl();
>  +    protected static final Locator NULL_LOCATOR = new LocatorImpl();
>   
>       public final static String NS = 
>           "http://apache.org/cocoon/jxforms/1.0";
>  @@ -235,7 +235,7 @@
>        * Compile a single XPath expression
>        */
>   
>  -    static private XPathExpr
>  +    static protected XPathExpr
>           compileExpr(String expr, Locator location) 
>           throws SAXParseException {
>           if (expr == null) return null;
>  @@ -451,7 +451,7 @@
>           HINT, VALUE, HELP, LABEL
>       };
>   
>  -    private static boolean isInputControl(String name) {
>  +    protected static boolean isInputControl(String name) {
>           for (int i = 0; i < INPUT_CONTROLS.length; i++) {
>               if (INPUT_CONTROLS[i].equals(name)) {
>                   return true;
>  @@ -460,7 +460,7 @@
>           return false;
>       }
>   
>  -    private static boolean isReadonlyInputControl(String name) {
>  +    protected static boolean isReadonlyInputControl(String name) {
>           for (int i = 0; i < READONLY_INPUT_CONTROLS.length; i++) {
>               if (READONLY_INPUT_CONTROLS[i].equals(name)) {
>                   return true;
>  @@ -1175,10 +1175,9 @@
>       private XMLConsumer consumer;
>       private Source inputSource;
>       private WebContinuation kont;
>  -    private Object bean;
>       private Map objectModel;
>   
>  -    private XMLConsumer getConsumer() {
>  +    protected XMLConsumer getConsumer() {
>           return consumer;
>       }
>   
>  @@ -1186,7 +1185,6 @@
>           super.recycle();
>           consumer = null;
>           inputSource = null;
>  -        bean = null;
>           kont = null;
>           objectModel = null;
>       }
>  @@ -1212,7 +1210,6 @@
>                   }
>               }
>           }
>  -        bean = FlowHelper.getContextObject(objectModel);
>           kont = FlowHelper.getWebContinuation(objectModel);
>           this.objectModel = objectModel;
>       }
>  @@ -1248,7 +1245,7 @@
>                   null);
>       }
>   
>  -    private void execute(final XMLConsumer consumer,
>  +    protected void execute(final XMLConsumer consumer,
>                            Form form,
>                            String currentView,
>                            String contextPath,
>  @@ -1269,8 +1266,7 @@
>                   consumer.endDocument();
>               } else if (ev instanceof EndElement) {
>                   EndElement endElement = (EndElement)ev;
>  -                StartElement startElement = 
>  -                    (StartElement)endElement.startElement;
>  +                StartElement startElement = endElement.startElement;
>                   consumer.endElement(startElement.namespaceURI,
>                                       startElement.localName,
>                                       startElement.raw);
>  
>  
>  
>  1.4       +1 -6      cocoon-2.1/src/blocks/linkrewriter/java/org/apache/cocoon/transformation/VariableRewriterTransformer.java
>  
>  Index: VariableRewriterTransformer.java
>  ===================================================================
>  RCS file: /home/cvs/cocoon-2.1/src/blocks/linkrewriter/java/org/apache/cocoon/transformation/VariableRewriterTransformer.java,v
>  retrieving revision 1.3
>  retrieving revision 1.4
>  diff -u -r1.3 -r1.4
>  --- VariableRewriterTransformer.java	24 Mar 2003 14:33:56 -0000	1.3
>  +++ VariableRewriterTransformer.java	24 Sep 2003 22:04:40 -0000	1.4
>  @@ -184,9 +184,6 @@
>       private Set inSchemes;
>       private Set outSchemes;
>   
>  -    /** Links matching one of the acceptable schemes. */
>  -    private Set links;
>  -
>       /** Configuration passed to the component once through configure(). */
>       private Configuration origConf; 
>   
>  @@ -224,7 +221,6 @@
>           throws ProcessingException, SAXException, IOException
>       {
>           super.setup(resolver, objectModel, src, parameters);
>  -        this.links = new HashSet();
>           this.badLinkStr = parameters.getParameter("bad-link-str", null);
>           this.linkAttrs = split(parameters.getParameter("link-attrs", "href"), " ");
>           this.inSchemes = split(parameters.getParameter("schemes", ""), " ");
>  @@ -370,7 +366,6 @@
>       public void recycle() {
>           super.recycle();
>           this.resolver = null;
>  -        this.links = null;
>           this.linkAttrs = null;
>           this.inSchemes = null;
>           this.outSchemes = null;
>  
>  
>  
>  1.8       +1 -6      cocoon-2.1/src/blocks/linkrewriter/java/org/apache/cocoon/transformation/LinkRewriterTransformer.java
>  
>  Index: LinkRewriterTransformer.java
>  ===================================================================
>  RCS file: /home/cvs/cocoon-2.1/src/blocks/linkrewriter/java/org/apache/cocoon/transformation/LinkRewriterTransformer.java,v
>  retrieving revision 1.7
>  retrieving revision 1.8
>  diff -u -r1.7 -r1.8
>  --- LinkRewriterTransformer.java	19 Jun 2003 11:31:05 -0000	1.7
>  +++ LinkRewriterTransformer.java	24 Sep 2003 22:04:40 -0000	1.8
>  @@ -194,9 +194,6 @@
>       private Set inSchemes;
>       private Set outSchemes;
>   
>  -    /** Links matching one of the acceptable schemes. */
>  -    private Set links;
>  -
>       /** Configuration passed to the component once through configure(). */
>       private Configuration origConf; 
>   
>  @@ -235,7 +232,6 @@
>           throws ProcessingException, SAXException, IOException
>       {
>           super.setup(resolver, objectModel, src, parameters);
>  -        this.links = new HashSet();
>           this.badLinkStr = parameters.getParameter("bad-link-str",    // per-request
config
>                   origConf.getChild("bad-link-str"). // else fall back to per-instance
config
>                   getValue(null)                     // else use hardcoded default
>  @@ -277,7 +273,6 @@
>       public void recycle() {
>           super.recycle();
>           this.resolver = null;
>  -        this.links = null;
>           this.linkAttrs = null;
>           this.inSchemes = null;
>           this.outSchemes = null;
>  
>  
>  
>  1.8       +1 -2      cocoon-2.1/src/blocks/xmlform/java/org/apache/cocoon/transformation/XMLFormTransformer.java
>  
>  Index: XMLFormTransformer.java
>  ===================================================================
>  RCS file: /home/cvs/cocoon-2.1/src/blocks/xmlform/java/org/apache/cocoon/transformation/XMLFormTransformer.java,v
>  retrieving revision 1.7
>  retrieving revision 1.8
>  diff -u -r1.7 -r1.8
>  --- XMLFormTransformer.java	4 Aug 2003 03:16:34 -0000	1.7
>  +++ XMLFormTransformer.java	24 Sep 2003 22:04:40 -0000	1.8
>  @@ -580,7 +580,6 @@
>               getLogger().error(error);
>               throw new IllegalStateException(error);
>           }
>  -        ;
>   
>           formStack.push(currentForm);
>   
>  
>  
>  
>
>  
>



Mime
View raw message