@Test(expected = IllegalArgumentException.class) public void testToModelValueWithIncorrectlyEncodedValue() { converter.toModelValue(""); }
public QName toModelValue(final String componentValue) { try { final List<String> matches = getRegexGroups(componentValue); if (matches.size() == 4) { final String namespace = matches.get(1); final String localPart = matches.get(2); final String prefix = matches.get(3); return new QName(namespace, localPart, prefix); } } catch (IllegalStateException ise) { } throw new IllegalArgumentException("Encoded form '" + componentValue + "' did not match '" + QNAME_DECODING_PATTERN + "'. Unable to convert to Model value."); }
QNameConverter { public QName toModelValue(final String componentValue) { try { final List<String> matches = getRegexGroups(componentValue); if (matches.size() == 4) { final String namespace = matches.get(1); final String localPart = matches.get(2); final String prefix = matches.get(3); return new QName(namespace, localPart, prefix); } } catch (IllegalStateException ise) { } throw new IllegalArgumentException("Encoded form '" + componentValue + "' did not match '" + QNAME_DECODING_PATTERN + "'. Unable to convert to Model value."); } }
QNameConverter { public QName toModelValue(final String componentValue) { try { final List<String> matches = getRegexGroups(componentValue); if (matches.size() == 4) { final String namespace = matches.get(1); final String localPart = matches.get(2); final String prefix = matches.get(3); return new QName(namespace, localPart, prefix); } } catch (IllegalStateException ise) { } throw new IllegalArgumentException("Encoded form '" + componentValue + "' did not match '" + QNAME_DECODING_PATTERN + "'. Unable to convert to Model value."); } QNameConverter(); }
QNameConverter { public QName toModelValue(final String componentValue) { try { final List<String> matches = getRegexGroups(componentValue); if (matches.size() == 4) { final String namespace = matches.get(1); final String localPart = matches.get(2); final String prefix = matches.get(3); return new QName(namespace, localPart, prefix); } } catch (IllegalStateException ise) { } throw new IllegalArgumentException("Encoded form '" + componentValue + "' did not match '" + QNAME_DECODING_PATTERN + "'. Unable to convert to Model value."); } QNameConverter(); void setDMNModel(final DMNModelInstrumentedBase dmnModel); QName toModelValue(final String componentValue); String toWidgetValue(final QName modelValue); }
QNameConverter { public QName toModelValue(final String componentValue) { try { final List<String> matches = getRegexGroups(componentValue); if (matches.size() == 4) { final String namespace = matches.get(1); final String localPart = matches.get(2); final String prefix = matches.get(3); return new QName(namespace, localPart, prefix); } } catch (IllegalStateException ise) { } throw new IllegalArgumentException("Encoded form '" + componentValue + "' did not match '" + QNAME_DECODING_PATTERN + "'. Unable to convert to Model value."); } QNameConverter(); void setDMNModel(final DMNModelInstrumentedBase dmnModel); QName toModelValue(final String componentValue); String toWidgetValue(final QName modelValue);  }