Commit 8ba21db
authored
Migrate JAXB XJC binding files declaring version 2.0/2.1/2.2 (#1098)
* Add reproducer: JAXB XJC binding migration ignores version 2.0/2.1/2.2
The JavaxXmlToJakartaXmlXJCBinding recipe only matches version="1.0" on
the <jxb:bindings> root, leaving 2.x bindings with a now-mismatched
namespace and a stale version attribute.
See moderneinc/customer-requests#2359.
* Migrate JAXB binding files declaring version 2.0, 2.1, or 2.2
The JavaxXmlToJakartaXmlXJCBinding recipe matched version="1.0" only,
silently leaving real-world .xjb files that declare 2.0/2.1/2.2 with a
stale version attribute after the namespace was rewritten. JAXB 3 then
rejects them at build time.
Broaden the version rule to a regex that matches exactly the
spec-defined pre-3.0 binding versions (1.0, 2.0, 2.1, 2.2).
Fixes moderneinc/customer-requests#23591 parent d845f4d commit 8ba21db
2 files changed
Lines changed: 31 additions & 3 deletions
File tree
- src
- main/resources/META-INF/rewrite
- test/java/org/openrewrite/java/migrate/jakarta
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1041 | 1041 | | |
1042 | 1042 | | |
1043 | 1043 | | |
1044 | | - | |
| 1044 | + | |
1045 | 1045 | | |
1046 | 1046 | | |
1047 | 1047 | | |
1048 | 1048 | | |
1049 | | - | |
1050 | | - | |
| 1049 | + | |
| 1050 | + | |
| 1051 | + | |
1051 | 1052 | | |
1052 | 1053 | | |
1053 | 1054 | | |
| |||
Lines changed: 27 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
| 21 | + | |
20 | 22 | | |
21 | 23 | | |
22 | 24 | | |
| |||
113 | 115 | | |
114 | 116 | | |
115 | 117 | | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
116 | 143 | | |
117 | 144 | | |
118 | 145 | | |
| |||
0 commit comments