1
0
Fork 0
mirror of https://github.com/pgpainless/pgpainless.git synced 2025-12-10 22:31:09 +01:00

Some more pgpainless-sop tests

This commit is contained in:
Paul Schaub 2021-10-04 16:28:56 +02:00
parent 637bd18ca6
commit 620959abc6
Signed by: vanitasvitae
GPG key ID: 62BEE9264BF17311
4 changed files with 177 additions and 1 deletions

View file

@ -16,6 +16,7 @@
package org.pgpainless.sop;
import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;
import sop.operation.Version;
@ -32,7 +33,11 @@ public class VersionImpl implements Version {
String version;
try {
Properties properties = new Properties();
properties.load(getClass().getResourceAsStream("/version.properties"));
InputStream propertiesFileIn = getClass().getResourceAsStream("/version.properties");
if (propertiesFileIn == null) {
throw new IOException("File version.properties not found.");
}
properties.load(propertiesFileIn);
version = properties.getProperty("version");
} catch (IOException e) {
version = "DEVELOPMENT";