File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed
src/main/java/com/spectralogic/ds3client/serializer Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ task genConfigProperties << {
46
46
def productionBuild = System . getenv(' productionBuild' )
47
47
if (productionBuild == null ) { productionBuild = ' false' }
48
48
49
- File configFile = new File (sourceSets. main. output. resourcesDir, " /config .properties" )
49
+ File configFile = new File (sourceSets. main. output. resourcesDir, " /ds3_sdk .properties" )
50
50
Path configPath = sourceSets. main. output. resourcesDir. toPath()
51
51
if (! Files . exists(configPath)) {
52
52
Files . createDirectories(configPath)
Original file line number Diff line number Diff line change @@ -37,6 +37,7 @@ public class XmlOutput {
37
37
private static final JacksonXmlModule module ;
38
38
private static final XmlMapper mapper ;
39
39
static private final Logger LOG = LoggerFactory .getLogger (XmlOutput .class );
40
+ public static final String PRODUCTION_BUILD = "productionBuild" ;
40
41
41
42
static {
42
43
module = new JacksonXmlModule ();
@@ -52,7 +53,7 @@ public class XmlOutput {
52
53
}
53
54
54
55
protected static boolean isProductionBuild () {
55
- String productionBuild = System .getenv ("productionBuild" );
56
+ String productionBuild = System .getenv (PRODUCTION_BUILD );
56
57
if (productionBuild != null ) {
57
58
if (productionBuild .equals ("true" )) {
58
59
return true ;
@@ -61,15 +62,15 @@ protected static boolean isProductionBuild() {
61
62
}
62
63
63
64
final Properties props = new Properties ();
64
- final InputStream input = XmlOutput .class .getClassLoader ().getResourceAsStream ("config .properties" );
65
+ final InputStream input = XmlOutput .class .getClassLoader ().getResourceAsStream ("ds3_sdk .properties" );
65
66
if (input == null ) {
66
67
LOG .error ("Could not find property file." );
67
68
}
68
69
else {
69
70
try {
70
71
props .load (input );
71
- productionBuild = (String ) props .get ("productionBuild" );
72
- if (productionBuild .equals ("true" )) {
72
+ productionBuild = (String ) props .get (PRODUCTION_BUILD );
73
+ if (productionBuild != null && productionBuild .equals ("true" )) {
73
74
return true ;
74
75
}
75
76
else {
You can’t perform that action at this time.
0 commit comments