File tree 3 files changed +8
-3
lines changed
backend/manager/modules/restapi/interface/definition/src/main/java/org/ovirt/engine/api/rsdl
3 files changed +8
-3
lines changed Original file line number Diff line number Diff line change 20
20
import org .ovirt .engine .api .model .ObjectFactory ;
21
21
import org .ovirt .engine .api .model .Rsdl ;
22
22
import org .ovirt .engine .api .utils .ApiRootLinksCreator ;
23
+ import org .yaml .snakeyaml .LoaderOptions ;
23
24
import org .yaml .snakeyaml .Yaml ;
24
25
import org .yaml .snakeyaml .constructor .Constructor ;
25
26
import org .yaml .snakeyaml .constructor .CustomClassLoaderConstructor ;
27
+ import org .yaml .snakeyaml .inspector .TagInspector ;
26
28
27
29
public class RsdlManager {
28
30
@@ -112,7 +114,10 @@ private static MetaData loadMetaData() throws IOException {
112
114
}
113
115
114
116
private static MetaData loadMetaData (InputStream in ) throws IOException {
115
- Constructor constructor = new CustomClassLoaderConstructor (Thread .currentThread ().getContextClassLoader ());
117
+ LoaderOptions loaderOptions = new LoaderOptions ();
118
+ TagInspector tagInspector = tag -> tag .getClassName ().equals (MetaData .class .getName ());
119
+ loaderOptions .setTagInspector (tagInspector );
120
+ Constructor constructor = new CustomClassLoaderConstructor (Thread .currentThread ().getContextClassLoader (), loaderOptions );
116
121
MetaData metaData = (MetaData ) new Yaml (constructor ).load (in );
117
122
if (metaData == null ) {
118
123
throw new IOException ("Can't load metadata from input stream" );
Original file line number Diff line number Diff line change 14
14
<maven .compiler.target>11</maven .compiler.target>
15
15
<maven-resources-plugin .version>2.5</maven-resources-plugin .version>
16
16
<slf4j .version>1.7.22</slf4j .version>
17
- <snakeyaml .version>1.33 </snakeyaml .version>
17
+ <snakeyaml .version>2.4 </snakeyaml .version>
18
18
19
19
<working-zanata-directory >target/zanata</working-zanata-directory >
20
20
</properties >
Original file line number Diff line number Diff line change 108
108
<reflections .version>0.9.9</reflections .version>
109
109
<resteasy .version>3.9.3.Final</resteasy .version>
110
110
<slf4j .version>1.7.22</slf4j .version>
111
- <snakeyaml .version>1.33 </snakeyaml .version>
111
+ <snakeyaml .version>2.4 </snakeyaml .version>
112
112
<spring .version>5.3.39</spring .version>
113
113
<sshd-core .version>2.14.0</sshd-core .version>
114
114
<validation-api .version>2.0.1.Final</validation-api .version>
You can’t perform that action at this time.
0 commit comments