20
20
21
21
import java .io .BufferedInputStream ;
22
22
import java .io .InputStream ;
23
+ import java .net .URISyntaxException ;
23
24
import java .nio .file .Files ;
24
25
import java .nio .file .Path ;
25
26
import java .sql .Blob ;
@@ -40,9 +41,9 @@ protected Class<?>[] getAnnotatedClasses() {
40
41
41
42
@ Test
42
43
@ Priority (10 )
43
- public void testGenerateProxyNoStream () {
44
+ public void testGenerateProxyNoStream () throws URISyntaxException {
44
45
final Path path = Path .of ( Thread .currentThread ().getContextClassLoader ()
45
- .getResource ( "org/hibernate/orm/test/envers/integration/blob/blob.txt" ).getPath () );
46
+ .getResource ( "org/hibernate/orm/test/envers/integration/blob/blob.txt" ).toURI () );
46
47
doInJPA ( this ::entityManagerFactory , entityManager -> {
47
48
final Asset asset = new Asset ();
48
49
asset .setFileName ( "blob.txt" );
@@ -84,9 +85,9 @@ public void testGenerateProxyNoStream() {
84
85
comment = "The driver closes the stream, so it cannot be reused by envers" )
85
86
@ SkipForDialect (value = SybaseDialect .class ,
86
87
comment = "The driver closes the stream, so it cannot be reused by envers" )
87
- public void testGenerateProxyStream () {
88
+ public void testGenerateProxyStream () throws URISyntaxException {
88
89
final Path path = Path .of ( Thread .currentThread ().getContextClassLoader ()
89
- .getResource ( "org/hibernate/orm/test/envers/integration/blob/blob.txt" ).getPath () );
90
+ .getResource ( "org/hibernate/orm/test/envers/integration/blob/blob.txt" ).toURI () );
90
91
91
92
try (final InputStream stream = new BufferedInputStream ( Files .newInputStream ( path ) )) {
92
93
doInJPA ( this ::entityManagerFactory , entityManager -> {
0 commit comments