You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by mr...@apache.org on 2004/06/23 05:43:20 UTC

cvs commit: xml-xerces/java/samples/dom Writer.java

mrglavas    2004/06/22 20:43:20

  Modified:    java/samples/sax Writer.java
               java/samples/dom Writer.java
  Log:
  Eliminate some new compiler warnings emitted when compiling with
  J2SE 1.5.0 beta2. java.lang.Class.getMethod() and
  java.lang.reflect.Method.invoke() now take a varargs parameter.
  
  Casting null to Object[] to suppress these warnings
  as the compiler suggests in order to make it explicitly clear that these
  are non-varargs calls.
  
  Revision  Changes    Path
  1.12      +2 -2      xml-xerces/java/samples/sax/Writer.java
  
  Index: Writer.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/samples/sax/Writer.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- Writer.java	24 Feb 2004 23:41:06 -0000	1.11
  +++ Writer.java	23 Jun 2004 03:43:20 -0000	1.12
  @@ -504,7 +504,7 @@
               getXMLVersion = fLocator.getClass().getMethod("getXMLVersion", new Class[]{});
               // If Locator implements Locator2, this method will exist.
               if (getXMLVersion != null) {
  -                version = (String) getXMLVersion.invoke(fLocator, null);
  +                version = (String) getXMLVersion.invoke(fLocator, (Object[]) null);
               }
           } 
           catch (Exception e) { 
  
  
  
  1.12      +2 -2      xml-xerces/java/samples/dom/Writer.java
  
  Index: Writer.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/samples/dom/Writer.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- Writer.java	24 Feb 2004 23:41:05 -0000	1.11
  +++ Writer.java	23 Jun 2004 03:43:20 -0000	1.12
  @@ -417,7 +417,7 @@
               getXMLVersion = document.getClass().getMethod("getXmlVersion", new Class[]{});
               // If Document class implements DOM L3, this method will exist.
               if (getXMLVersion != null) {
  -                version = (String) getXMLVersion.invoke(document, null);
  +                version = (String) getXMLVersion.invoke(document, (Object[]) null);
               }
           } 
           catch (Exception e) { 
  
  
  

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