Re: PgJDBC: code reformat

Поиск
Список
Период
Сортировка
От Vladimir Sitnikov
Тема Re: PgJDBC: code reformat
Дата
Msg-id CAB=Je-GAKNkUhgnhNU+nCq0VfcvJy65=iE1soyeRzuSCmC55vg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: PgJDBC: code reformat  (Dave Cramer <pg@fastcrypt.com>)
Список pgsql-jdbc
>I tend to break up multiple lines.

"Mandatory brackets" plus "open curly on the new line" would result in
too much whitespace.
We do want "mandatory brackets", don't we?

Regarding whitespace, what if using explicit blank lines to separate
logic when required?
Like this:
https://github.com/pgjdbc/pgjdbc/blob/format_code/pgjdbc/src/main/java/org/postgresql/jdbc/PgSQLXML.java#L90-L94

>There doesn't seem to be a significant difference between sun style and google style.

Technically speaking, there is.

Sun style:

if (data == null)
{
  return null;
}

Google style (this one is used by pgjdbc-ng):

if (data == null) {
  return null;
}

Vladimir


В списке pgsql-jdbc по дате отправления:

Предыдущее
От: Dave Cramer
Дата:
Сообщение: Re: PgJDBC: code reformat
Следующее
От: Gavin Flower
Дата:
Сообщение: Re: PgJDBC: code reformat