File tree Expand file tree Collapse file tree 3 files changed +11
-11
lines changed
src/main/java/com/conveyal/datatools/manager/models Expand file tree Collapse file tree 3 files changed +11
-11
lines changed Original file line number Diff line number Diff line change @@ -446,17 +446,12 @@ public byte[] generateBuildConfig() throws IOException {
446
446
}
447
447
448
448
public String generateBuildConfigAsString () {
449
- if (customBuildConfig != null ) return customBuildConfig ;
450
- return null ;
451
- }
452
-
453
- /** Convenience method to write serializable object (primarily for router/build config objects) to byte array. */
454
- private <O extends Serializable > byte [] writeToBytes (O object ) {
455
449
try {
456
- return otpConfigMapper .writer ().writeValueAsBytes (object );
457
- } catch (JsonProcessingException e ) {
458
- LOG .error ("Value contains malformed JSON" , e );
459
- return null ;
450
+ return new String (generateBuildConfig (), StandardCharsets .UTF_8 );
451
+ // TODO: Correctly generate default build config
452
+ } catch (Exception e ) {
453
+ LOG .error ("Failed to generate build config: " , e );
454
+ return "" ;
460
455
}
461
456
}
462
457
@@ -486,7 +481,8 @@ public byte[] generateRouterConfig() throws IOException {
486
481
public String generateRouterConfigAsString () {
487
482
try {
488
483
return new String (generateRouterConfig (), StandardCharsets .UTF_8 );
489
- } catch (IOException e ) {
484
+ // TODO: Correctly generate default router config
485
+ } catch (Exception e ) {
490
486
LOG .error ("Failed to generate router config: " , e );
491
487
return "" ;
492
488
}
Original file line number Diff line number Diff line change 6
6
7
7
/**
8
8
* Created by demory on 3/8/15.
9
+ *
10
+ * TODO: Figure out how to remove this class without causing problems in the DB migration
9
11
*/
10
12
@ JsonIgnoreProperties (ignoreUnknown = true )
11
13
public class OtpBuildConfig implements Serializable {
Original file line number Diff line number Diff line change 7
7
8
8
/**
9
9
* Created by demory on 3/8/15.
10
+ *
11
+ * TODO: Figure out how to remove this class without causing problems in the DB migration
10
12
*/
11
13
@ JsonIgnoreProperties (ignoreUnknown = true )
12
14
public class OtpRouterConfig implements Serializable {
You can’t perform that action at this time.
0 commit comments