You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by ne...@apache.org on 2002/07/17 20:36:04 UTC

cvs commit: xml-xerces/java/src/org/apache/xerces/impl Version.java

neilg       2002/07/17 11:36:04

  Modified:    java/src/org/apache/xerces/impl Version.java
  Log:
  addressing static mutability issues in the Version class.  Now use of the fVersion field is deprecated, since that field cannot be made statically immutable and retain its function.  Instead, a new method--getVersion():  String--is provided; static immutability of this method can be guaranteed, while similar function to fVersion is provided.
  
  Revision  Changes    Path
  1.7       +14 -2     xml-xerces/java/src/org/apache/xerces/impl/Version.java
  
  Index: Version.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/Version.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- Version.java	29 Jan 2002 01:15:09 -0000	1.6
  +++ Version.java	17 Jul 2002 18:36:04 -0000	1.7
  @@ -68,8 +68,20 @@
       // Data
       //
   
  -    /** Version string. */
  +    /** Version string. 
  +     * @deprecated  getVersion() should be used instead.  */
       public static String fVersion = "@@VERSION@@";
  +
  +    private static final String fImmutableVersion = "@@VERSION@@";
  +
  +    // public methods
  +
  +    /* Print out the version information.
  +     * @return the version of the parser.
  +     */
  +    public String getVersion() {
  +        return fImmutableVersion;
  +    } // getVersion():  String
   
       //
       // MAIN
  
  
  

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