Re: Format of try ... catch blocks


Bob Jacobsen
 

Look at Preferences -> Editor -> Formatting -> Java -> Alignment



Bob

On May 23, 2020, at 9:55 PM, Dave Heap <dgheap@...> wrote:

The "Format" command in NetBeans 11.3 has suddenly decided to change the format of try ... catch  blocks from:
        try {
            ...
        } catch (...) {
            ...
        }

to:
        try {
           ...
        }
        catch (...) {
           ...
        }

The latter is the style used by Oracle at:
<https://docs.oracle.com/javase/tutorial/essential/exceptions/try.html>

However, Checkstyle is now complaining about the change.

Have we changed a project setting? I seem to remember some discussion of this topic recently but can't find it.

Dave

--
Bob Jacobsen
rgj1927@...



Join jmri@jmri-developers.groups.io to automatically receive all group messages.