Unify brackets for opening blocks with comments

This commit is contained in:
moving-bits 2023-04-29 19:04:52 +02:00
parent 340227016a
commit 79b1eda1ed
28 changed files with 83 additions and 164 deletions

View file

@ -16,8 +16,7 @@ import btools.router.SearchBoundary;
public class BRouter {
public static void main(String[] args) throws Exception {
if (args.length == 2) // cgi-input-mode
{
if (args.length == 2) { // cgi-input-mode
try {
String queryString = args[1];
int sepIdx = queryString.indexOf('=');

View file

@ -224,8 +224,7 @@ public class RouteServer extends Thread implements Comparable<RouteServer> {
String headers = encodings == null || encodings.indexOf("gzip") < 0 ? null : "Content-Encoding: gzip\n";
writeHttpHeader(bw, handler.getMimeType(), handler.getFileName(), headers, HTTP_STATUS_OK);
if (track != null) {
if (headers != null) // compressed
{
if (headers != null) { // compressed
ByteArrayOutputStream baos = new ByteArrayOutputStream();
Writer w = new OutputStreamWriter(new GZIPOutputStream(baos), "UTF-8");
w.write(handler.formatTrack(track));

View file

@ -240,8 +240,7 @@ public class SuspectManager extends Thread {
bw.write("<html><body>\n");
bw.write("BRouter suspect manager. <a href=\"http://brouter.de/brouter/suspect_manager_help.html\">Help</a><br><br>\n");
if (filter == null) // generate country list
{
if (filter == null) { // generate country list
bw.write("<table>\n");
File countryParent = new File("worldpolys" + country);
File[] files = countryParent.listFiles();