Skip to content

Commit

Permalink
clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
miles-grant-ibigroup committed Dec 17, 2024
1 parent 91f5b18 commit 47bfc27
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -446,17 +446,12 @@ public byte[] generateBuildConfig() throws IOException {
}

public String generateBuildConfigAsString() {
if (customBuildConfig != null) return customBuildConfig;
return null;
}

/** Convenience method to write serializable object (primarily for router/build config objects) to byte array. */
private <O extends Serializable> byte[] writeToBytes(O object) {
try {
return otpConfigMapper.writer().writeValueAsBytes(object);
} catch (JsonProcessingException e) {
LOG.error("Value contains malformed JSON", e);
return null;
return new String(generateBuildConfig(), StandardCharsets.UTF_8);
// TODO: Correctly generate default build config
} catch (Exception e) {
LOG.error("Failed to generate build config: ", e);
return "";
}
}

Expand Down Expand Up @@ -486,7 +481,8 @@ public byte[] generateRouterConfig() throws IOException {
public String generateRouterConfigAsString() {
try {
return new String(generateRouterConfig(), StandardCharsets.UTF_8);
} catch (IOException e) {
// TODO: Correctly generate default router config
} catch (Exception e) {
LOG.error("Failed to generate router config: ", e);
return "";
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

/**
* Created by demory on 3/8/15.
*
* TODO: Figure out how to remove this class without causing problems in the DB migration
*/
@JsonIgnoreProperties(ignoreUnknown = true)
public class OtpBuildConfig implements Serializable {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

/**
* Created by demory on 3/8/15.
*
* TODO: Figure out how to remove this class without causing problems in the DB migration
*/
@JsonIgnoreProperties(ignoreUnknown = true)
public class OtpRouterConfig implements Serializable {
Expand Down

0 comments on commit 47bfc27

Please sign in to comment.