/*     */ static
 /*     */ {
   /*     */ try
   /*     */ {
     /* 150 */ XmlSchema s = null;
     /* 151 */ s.location();
     /*     */ }
   /*     */ catch (NullPointerException e)
   /*     */ {
     /*     */ }
   /*     */ catch (NoSuchMethodError e)
   /*     */ {
     /*     */ Messages res;
     /*     */ Messages res;
     /* 157 */ if (XmlSchema.class.getClassLoader() == null)
       /* 158 */ res = Messages.INCOMPATIBLE_API_VERSION_MUSTANG;
     /*     */ else {
       /* 160 */ res = Messages.INCOMPATIBLE_API_VERSION;
       /*     */ }
     /* 162 */ throw new LinkageError(
         res.format(new Object[] {Which.which(XmlSchema.class), Which.which(ModelBuilder.class)}));
     /*     */ }
   /*     */
   /*     */ try
   /*     */ {
     /* 175 */ WhiteSpaceProcessor.isWhiteSpace("xyz");
     /*     */ }
   /*     */ catch (NoSuchMethodError e) {
     /* 178 */ throw new LinkageError(
         Messages.RUNNING_WITH_1_0_RUNTIME.format(
             new Object[] {
               Which.which(WhiteSpaceProcessor.class), Which.which(ModelBuilder.class)
             }));
     /*     */ }
   /*     */ }
Esempio n. 2
0
 public UUID parse(CharSequence text) throws SAXException {
   TODO.checkSpec("JSR222 Issue #42");
   try {
     return UUID.fromString(WhiteSpaceProcessor.trim(text).toString());
   } catch (IllegalArgumentException e) {
     UnmarshallingContext.getInstance().handleError(e);
     return null;
   }
 }
 /*     */ public void parse(final BeanT bean, CharSequence lexical)
     throws AccessorException, SAXException {
   /* 293 */ final String idref = WhiteSpaceProcessor.trim(lexical).toString();
   /* 294 */ final UnmarshallingContext context = UnmarshallingContext.getInstance();
   /*     */
   /* 296 */ final Callable callable = context.getObjectFromId(idref, this.acc.valueType);
   /* 297 */ if (callable == null)
   /*     */ {
     /* 299 */ context.errorUnresolvedIDREF(bean, idref, context.getLocator());
     /*     */ return;
     /*     */ }
   /*     */ Object t;
   /*     */ try {
     /* 305 */ t = callable.call();
     /*     */ } catch (SAXException e) {
     /* 307 */ throw e;
     /*     */ } catch (RuntimeException e) {
     /* 309 */ throw e;
     /*     */ } catch (Exception e) {
     /* 311 */ throw new SAXException2(e);
     /*     */ }
   /* 313 */ if (t != null) {
     /* 314 */ assign(bean, t, context);
     /*     */ }
   /*     */ else {
     /* 317 */ final LocatorEx loc = new LocatorEx.Snapshot(context.getLocator());
     /* 318 */ context.addPatcher(
         new Patcher() {
           /*     */ public void run() throws SAXException {
             /*     */ try {
               /* 321 */ Object t = callable.call();
               /* 322 */ if (t == null) /* 323 */ context.errorUnresolvedIDREF(bean, idref, loc);
               /*     */ else
                 /* 325 */ TransducedAccessor.IDREFTransducedAccessorImpl.this.assign(
                     bean, t, context);
               /*     */ }
             /*     */ catch (AccessorException e) {
               /* 328 */ context.handleError(e);
               /*     */ } catch (SAXException e) {
               /* 330 */ throw e;
               /*     */ } catch (RuntimeException e) {
               /* 332 */ throw e;
               /*     */ } catch (Exception e) {
               /* 334 */ throw new SAXException2(e);
               /*     */ }
             /*     */ }
           /*     */ });
     /*     */ }
   /*     */ }
Esempio n. 4
0
 private void processText(boolean ignorable) throws SAXException {
   if (predictor.expectText() && (!ignorable || !WhiteSpaceProcessor.isWhiteSpace(buffer)))
     next.text(buffer);
   buffer.setLength(0);
 }