You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jaxme-dev@ws.apache.org by jo...@apache.org on 2005/04/07 22:22:59 UTC

cvs commit: ws-jaxme/src/jaxme/org/apache/ws/jaxme/generator/types IntegerSG.java

jochen      2005/04/07 13:22:59

  Modified:    src/jaxme/org/apache/ws/jaxme/generator/types IntegerSG.java
  Log:
  Invalid code was generated, because DirectAccessible.toString() was used.
  
  Revision  Changes    Path
  1.3       +4 -3      ws-jaxme/src/jaxme/org/apache/ws/jaxme/generator/types/IntegerSG.java
  
  Index: IntegerSG.java
  ===================================================================
  RCS file: /home/cvs/ws-jaxme/src/jaxme/org/apache/ws/jaxme/generator/types/IntegerSG.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- IntegerSG.java	16 Feb 2004 23:39:51 -0000	1.2
  +++ IntegerSG.java	7 Apr 2005 20:22:59 -0000	1.3
  @@ -69,19 +69,20 @@
       pSGlet.generate(pMethod, pValue);
     }
   
  -  public void addValidation(SimpleTypeSG pController, JavaMethod pMethod, DirectAccessible pValue) {
  +  public void addValidation(SimpleTypeSG pController, JavaMethod pMethod,
  +		  					final DirectAccessible pValue) {
       AtomicTypeSG atomicType = pController.getAtomicType();
       Long totalDigits = atomicType.getTotalDigits();
       if (totalDigits != null) {
         pMethod.addIf(pValue, ".signum()", " == -1");
         pMethod.addIf(pValue, ".toString().length() - 1", " > ", totalDigits);
         pMethod.addThrowNew(IllegalArgumentException.class,
  -                          JavaSource.getQuoted("Length of " + totalDigits + " digits exceeded: "), " + " + pValue);
  +                          JavaSource.getQuoted("Length of " + totalDigits + " digits exceeded: "), " + ", pValue);
         pMethod.addEndIf();
         pMethod.addElse();
         pMethod.addIf(pValue, ".toString().length()", " > ", totalDigits);
         pMethod.addThrowNew(IllegalArgumentException.class,
  -                          JavaSource.getQuoted("Length of " + totalDigits + " digits exceeded: "), " + " + pValue);
  +                          JavaSource.getQuoted("Length of " + totalDigits + " digits exceeded: "), " + ", pValue);
         pMethod.addEndIf();
         pMethod.addEndIf();
       }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: jaxme-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: jaxme-dev-help@ws.apache.org