File tree Expand file tree Collapse file tree
generator2/org.getaviz.generator/src/test/java/org/getaviz/generator/mockups Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11package org .getaviz .generator .mockups ;
22
3+ import java .io .File ;
34import java .io .IOException ;
45import java .io .UnsupportedEncodingException ;
56import java .net .URLDecoder ;
@@ -46,13 +47,15 @@ protected void resetDatabase () {
4647
4748 protected void runCypherScript (String resource ) {
4849 ClassLoader classLoader = this .getClass ().getClassLoader ();
49- String path = classLoader .getResource (resource ).getPath ();
50+ String filePath = classLoader .getResource (resource ).getFile ();
51+ File file = new File (filePath );
52+ String path = file .getAbsolutePath ();
5053 try {
5154 path = URLDecoder .decode (path , "UTF-8" );
5255 } catch (UnsupportedEncodingException e ) {
5356 e .printStackTrace ();
5457 }
55- byte [] encoded = null ;
58+ byte [] encoded ;
5659 try {
5760 encoded = Files .readAllBytes (Paths .get (path ));
5861 connector .executeWrite (new String (encoded ));
You can’t perform that action at this time.
0 commit comments