You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by ra...@apache.org on 2003/12/12 00:23:09 UTC

cvs commit: xml-xalan/java/src/org/apache/xalan/xsltc/runtime Constants.java

rameshm     2003/12/11 15:23:09

  Modified:    java/src/org/apache/xalan/lib/sql SQLQueryParser.java
               java/src/org/apache/xalan/processor XSLProcessorVersion.java
               java/src/org/apache/xalan/xsltc/compiler/util Util.java
               java/src/org/apache/xalan/xsltc/dom NodeSortRecord.java
               java/src/org/apache/xalan/xsltc/runtime Constants.java
  Log:
  Adding explicit final keyword to the intended constants which are defined with public static keywords. This will avoid the problem of cross site java sandbox violation.
    In the case of xsltc/compiler/util/Util.java making the "filesep" variable to private to avoid the  chance of somebody else changing the value of this static variable
  
  Revision  Changes    Path
  1.3       +3 -3      xml-xalan/java/src/org/apache/xalan/lib/sql/SQLQueryParser.java
  
  Index: SQLQueryParser.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/lib/sql/SQLQueryParser.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- SQLQueryParser.java	15 Jul 2003 18:12:19 -0000	1.2
  +++ SQLQueryParser.java	11 Dec 2003 23:23:09 -0000	1.3
  @@ -112,9 +112,9 @@
      */
     private boolean           m_HasParameters;
   
  -  public static int         NO_OVERRIDE = 0;
  -  public static int         NO_INLINE_PARSER = 1;
  -  public static int         INLINE_PARSER  = 2;
  +  public static final int         NO_OVERRIDE = 0;
  +  public static final int         NO_INLINE_PARSER = 1;
  +  public static final int         INLINE_PARSER  = 2;
   
     /**
      * The SQLStatement Parser will be created as a psuedo SINGLETON per
  
  
  
  1.47      +6 -6      xml-xalan/java/src/org/apache/xalan/processor/XSLProcessorVersion.java
  
  Index: XSLProcessorVersion.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/processor/XSLProcessorVersion.java,v
  retrieving revision 1.46
  retrieving revision 1.47
  diff -u -r1.46 -r1.47
  --- XSLProcessorVersion.java	23 Oct 2003 21:18:33 -0000	1.46
  +++ XSLProcessorVersion.java	11 Dec 2003 23:23:09 -0000	1.47
  @@ -84,7 +84,7 @@
     /**
      * Implementation Language.
      */
  -  public static String LANGUAGE = "Java";
  +  public static final String LANGUAGE = "Java";
   
     /**
      * Major version number.
  @@ -97,7 +97,7 @@
      *          of new versions as external interfaces and behaviour
      *          may have changed.
      */
  -  public static int VERSION = 2;
  +  public static final int VERSION = 2;
   
     /**
      * Release Number.
  @@ -107,7 +107,7 @@
      *            -  API or behaviour change.
      *            -  its designated as a reference release.
      */
  -  public static int RELEASE = 5;
  +  public static final int RELEASE = 5;
   
     /**
      * Maintenance Drop Number.
  @@ -118,7 +118,7 @@
      *          When missing, it designates the final and complete
      *          development drop for a release.
      */
  -  public static int MAINTENANCE = 2;
  +  public static final int MAINTENANCE = 2;
   
     /**
      * Development Drop Number.
  @@ -137,14 +137,14 @@
      *          well as defect fixes. 'D' drops may not be as stable as
      *          the final releases.
      */
  -  public static int DEVELOPMENT = 0;
  +  public static final int DEVELOPMENT = 0;
     
     /**
      * Version String like <CODE>"<B>Xalan</B> <B>Language</B> 
      * v.r[.dd| <B>D</B>nn]"</CODE>.
      * <P>Semantics of the version string are identical to the Xerces project.</P>
      */
  -  public static String S_VERSION = PRODUCT+" "+LANGUAGE+" "
  +  public static final String S_VERSION = PRODUCT+" "+LANGUAGE+" "
                                      +VERSION+"."+RELEASE+"."
                                      +(DEVELOPMENT > 0 ? ("D"+DEVELOPMENT) 
                                        : (""+MAINTENANCE));
  
  
  
  1.13      +2 -2      xml-xalan/java/src/org/apache/xalan/xsltc/compiler/util/Util.java
  
  Index: Util.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/compiler/util/Util.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- Util.java	30 Jan 2003 18:46:09 -0000	1.12
  +++ Util.java	11 Dec 2003 23:23:09 -0000	1.13
  @@ -67,7 +67,7 @@
   import org.apache.xalan.xsltc.compiler.Constants;
   
   public final class Util {
  -    static public char filesep;
  +    private static char filesep;
   
       static {
   	String temp = System.getProperty("file.separator", "/");
  
  
  
  1.14      +5 -5      xml-xalan/java/src/org/apache/xalan/xsltc/dom/NodeSortRecord.java
  
  Index: NodeSortRecord.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/dom/NodeSortRecord.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- NodeSortRecord.java	14 Aug 2003 16:27:43 -0000	1.13
  +++ NodeSortRecord.java	11 Dec 2003 23:23:09 -0000	1.14
  @@ -79,11 +79,11 @@
    * Base class for sort records containing application specific sort keys 
    */
   public abstract class NodeSortRecord {
  -    public static int COMPARE_STRING     = 0;
  -    public static int COMPARE_NUMERIC    = 1;
  +    public static final int COMPARE_STRING     = 0;
  +    public static final int COMPARE_NUMERIC    = 1;
   
  -    public static int COMPARE_ASCENDING  = 0;
  -    public static int COMPARE_DESCENDING = 1;
  +    public static final int COMPARE_ASCENDING  = 0;
  +    public static final int COMPARE_DESCENDING = 1;
   
       /**
        * A reference to a locale. May be updated by subclass if the stylesheet
  
  
  
  1.7       +2 -2      xml-xalan/java/src/org/apache/xalan/xsltc/runtime/Constants.java
  
  Index: Constants.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/runtime/Constants.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- Constants.java	1 Apr 2003 21:28:38 -0000	1.6
  +++ Constants.java	11 Dec 2003 23:23:09 -0000	1.7
  @@ -79,7 +79,7 @@
       final static int COMMENT   = DTM.COMMENT_NODE;
       final static int PROCESSING_INSTRUCTION = DTM.PROCESSING_INSTRUCTION_NODE;
   
  -    public static String XSLT_URI = "http://www.w3.org/1999/XSL/Transform";
  +    public static final String XSLT_URI = "http://www.w3.org/1999/XSL/Transform";
       public static final String NAMESPACE_FEATURE =
   	"http://xml.org/sax/features/namespaces";
   
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-cvs-help@xml.apache.org