[Rev 01] RFR: 6725: Formalize agent probe definition XML schema and enforce validations
Kangcheng Xu
kxu at openjdk.java.net
Thu Mar 26 19:10:39 UTC 2020
> This pr implements [JMC-6725: Formalize agent probe definition XML schema and enforce
> validations](https://bugs.openjdk.java.net/browse/JMC-6725). XMLs supplied by users are validated against
> [`jfrprobes_schema.xsd`](https://github.com/tabjy/jmc/blob/a4da862b744f407f3262f006e302515c142e9482/agent/src/main/resources/org/openjdk/jmc/agent/impl/jfrprobes_schema.xsd)
> on registry creation and modification. Notable changes in configuration probes format are:
> - `<parameter>` elements now should be enclosed by a `<parameters>` element, and
> - `<field>` elements now should be enclosed by a `<fields>` element
>
> Type checking is enforced on most elements. Additionally, the following types are restricted with regular expressions
> checking elements' text node contents:
> - `classType` for `<class>` and `<converter>` elements
> - `methodNameType` for `<name>` elements
> - `descriptorType` for `<descriptor>` elements
> - `pathType` for `<path>` elements, and
> - `expressionType` for `<expression>` elements
>
> Please test, especially on regex, as I'm not entirely confident they cover every cases and don't yield false negatives.
Kangcheng Xu has updated the pull request with a new target base due to a merge or a rebase. The pull request now
contains three commits:
- Update license header year numbers
- Fix test, remove <thread> and <kind> elements
- Define xsd schema, implement and enforce validations
-------------
Changes: https://git.openjdk.java.net/jmc/pull/66/files
Webrev: https://webrevs.openjdk.java.net/jmc/66/webrev.01
Stats: 618 lines in 6 files changed: 400 ins; 36 del; 182 mod
Patch: https://git.openjdk.java.net/jmc/pull/66.diff
Fetch: git fetch https://git.openjdk.java.net/jmc pull/66/head:pull/66
PR: https://git.openjdk.java.net/jmc/pull/66
More information about the jmc-dev
mailing list