Skip to content

Commit

Permalink
Fix checkstyle issues
Browse files Browse the repository at this point in the history
  • Loading branch information
warunalakshitha committed Aug 18, 2023
1 parent f56c99d commit 478fc3c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 30 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,9 @@ private void handleDependency(String groupId, String artifactId, String version,
}
}

private void populateBallerinaToml(String groupId, String artifactId, String version, File tomlFile,
Path projectRoot, String parent, JvmTarget parentJvmTarget) throws BindgenException {
private void populateBallerinaToml(String groupId, String artifactId, String version,
File tomlFile, Path projectRoot, String parent,
JvmTarget parentJvmTarget) throws BindgenException {
try (FileWriterWithEncoding fileWriter = new FileWriterWithEncoding(tomlFile, StandardCharsets.UTF_8, true)) {
TomlDocument tomlDocument = env.getTomlDocument();
if (tomlDocument == null) {
Expand All @@ -142,13 +143,16 @@ private void populateBallerinaToml(String groupId, String artifactId, String ver
}
}
}
writeDependencyToBallerinaToml(groupId, artifactId, version, projectRoot, parent, parentJvmTarget, fileWriter);
writeDependencyToBallerinaToml(groupId, artifactId, version, projectRoot, parent, parentJvmTarget,
fileWriter);
} catch (IOException e) {
throw new BindgenException("error: unable to update the Ballerina.toml file: " + e.getMessage(), e);
}
}

private void writeDependencyToBallerinaToml(String groupId, String artifactId, String version, Path projectRoot, String parent, JvmTarget parentJvmTarget, FileWriterWithEncoding fileWriter) throws IOException {
private void writeDependencyToBallerinaToml(String groupId, String artifactId, String version, Path projectRoot,
String parent, JvmTarget parentJvmTarget,
FileWriterWithEncoding fileWriter) throws IOException {
fileWriter.write("\n");
if (parent != null) {
fileWriter.write("# transitive dependency of " + parent + "\n");
Expand Down

This file was deleted.

0 comments on commit 478fc3c

Please sign in to comment.