mirror of
https://github.com/hibernate/hibernate-orm
synced 2025-02-16 16:15:06 +00:00
HHH-12068 - Fix generated @SuppressWarnings to work for all compilers
This commit is contained in:
parent
b8a3baa5c1
commit
c3f61c73dd
@ -210,7 +210,7 @@ private static String writeGeneratedAnnotation(MetaEntity entity, Context contex
|
||||
}
|
||||
|
||||
private static String writeSuppressWarnings() {
|
||||
return "@SuppressWarnings(\"all\")";
|
||||
return "@SuppressWarnings({ \"deprecation\", \"rawtypes\" })";
|
||||
}
|
||||
|
||||
private static String writeStaticMetaModelAnnotation(MetaEntity entity) {
|
||||
|
@ -32,7 +32,7 @@ public void testSuppressedWarningsAnnotationGenerated() {
|
||||
String metaModelSource = getMetaModelSourceAsString( TestEntity.class );
|
||||
assertTrue(
|
||||
"@SuppressWarnings should be added to the metamodel.",
|
||||
metaModelSource.contains( "@SuppressWarnings(\"all\")" )
|
||||
metaModelSource.contains( "@SuppressWarnings({ \"deprecation\", \"rawtypes\" })" )
|
||||
);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user