Skip to content

Commit

Permalink
Removed logger imports in SpawnWaveTask and used String builder in Le…
Browse files Browse the repository at this point in the history
…velWaves as instructed by SonarCloud.
  • Loading branch information
max9753 committed Oct 16, 2023
1 parent 45b7eec commit a1545af
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
import com.csse3200.game.ai.tasks.PriorityTask;
import com.csse3200.game.services.GameTime;
import com.csse3200.game.services.ServiceLocator;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class SpawnWaveTask extends DefaultTask implements PriorityTask {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,11 +124,11 @@ public List<WaveClass> getWaves() {

@Override
public String toString() {
String result = "";
for (WaveClass wave : waves) {
result += wave.toString() + "\n";
}
return result;
StringBuilder result = new StringBuilder();
for (WaveClass wave : waves) {
result.append(wave.toString()).append("\n");
}
return result.toString();
}

}
Expand Down

0 comments on commit a1545af

Please sign in to comment.