@Override public Collection<QName> getExpectedAttributes() { if (JSONHelper.isNaturalNotationEnabled()) { try { return UnmarshallingContext.getInstance().getCurrentExpectedAttributes(); } catch (NullPointerException npe) { // thrown from com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext } catch (NoSuchMethodError nsme) { // thrown when JAXB version is less than 2.1.12 Logger.getLogger(getClass().getName()) .log(Level.SEVERE, com.sun.jersey.json.impl.ImplMessages.ERROR_JAXB_RI_2_1_12_MISSING(), nsme); } } // something went wrong - return empty list return Collections.emptyList(); }
@Override public Collection<QName> getExpectedAttributes() { if (JSONHelper.isNaturalNotationEnabled()) { try { return UnmarshallingContext.getInstance().getCurrentExpectedAttributes(); } catch (NullPointerException npe) { // thrown from com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext } catch (NoSuchMethodError nsme) { // thrown when JAXB version is less than 2.1.12 Logger.getLogger(getClass().getName()) .log(Level.SEVERE, com.sun.jersey.json.impl.ImplMessages.ERROR_JAXB_RI_2_1_12_MISSING(), nsme); } } // something went wrong - return empty list return Collections.emptyList(); }
@Override public Collection<QName> getExpectedAttributes() { if (JSONHelper.isNaturalNotationEnabled()) { try { return UnmarshallingContext.getInstance().getCurrentExpectedAttributes(); } catch (NullPointerException npe) { // thrown from com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext } catch (NoSuchMethodError nsme) { // thrown when JAXB version is less than 2.1.12 Logger.getLogger(getClass().getName()) .log(Level.SEVERE, com.sun.jersey.json.impl.ImplMessages.ERROR_JAXB_RI_2_1_12_MISSING(), nsme); } } // something went wrong - return empty list return Collections.emptyList(); }
Collection<QName> currExpAttrs = uctx.getCurrentExpectedAttributes(); for (QName n : currExpAttrs) { attrsExpected.add(n.getLocalPart());