@@ -34,7 +34,7 @@ class StoreProperties {
3434 */
3535 static final String INDEXES_KEY = "triple-indexes" ;
3636
37- protected final Optional < File > propertiesFile ;
37+ protected final File propertiesFile ;
3838
3939 protected String version ;
4040
@@ -45,11 +45,11 @@ class StoreProperties {
4545 protected boolean dirty ;
4646
4747 StoreProperties () {
48- this .propertiesFile = Optional . empty () ;
48+ this .propertiesFile = null ;
4949 }
5050
5151 StoreProperties (File dir ) {
52- this .propertiesFile = Optional . of ( new File (dir , FILE_NAME ) );
52+ this .propertiesFile = new File (dir , FILE_NAME );
5353 }
5454
5555 /**
@@ -58,7 +58,7 @@ class StoreProperties {
5858 * @return <code>true</code> if loaded from file, else <code>false</code>
5959 */
6060 boolean load () {
61- propertiesFile .filter (File ::isFile ).ifPresent (file -> {
61+ Optional . ofNullable ( propertiesFile ) .filter (File ::isFile ).ifPresent (file -> {
6262 Properties properties = new Properties ();
6363 try (InputStream in = new FileInputStream (file )) {
6464 properties .load (in );
@@ -79,7 +79,7 @@ void save() {
7979 if (!dirty ) {
8080 return ;
8181 }
82- propertiesFile .ifPresent (file -> {
82+ Optional . ofNullable ( propertiesFile ) .ifPresent (file -> {
8383 Properties properties = new Properties ();
8484 if (version != null ) {
8585 properties .setProperty (VERSION_KEY , version );
0 commit comments