To be clear, I'd like to use this style (actual example): private int compareStringOrNull(final String thisString, final String otherString) { if (thisString == null) { if (otherString != null) { return -1; } } else { if (otherString == null) { return 1; }
final int result = thisString.compareTo(otherString); if (result != 0) { return result; } } return 0; } Instead of: private int compareStringOrNull(final String thisString, final String otherString) { if (thisString == null) { if (otherString != null) { return -1; } } else { if (otherString == null) { return 1; } final int result = thisString.compareTo(otherString); if (result != 0) { return result; } } return 0; } Gary On Thu, Jul 20, 2017 at 9:31 AM, Gary Gregory <garydgreg...@gmail.com> wrote: > Sure, that sounds good, EOL on lcurl. > > On Jul 20, 2017 01:08, "Bernd Eckenfels" <e...@zusammenkunft.net> wrote: > >> Hello Gary, >> >> Well I don't remember that we agreed on it, however as I said both is >> fine. Should we then make the change to checkstyle file and if yes, what >> change? Using eol for all lcurly entries? >> >> Gruss >> Bernd >> >> Gruss >> Bernd >> -- >> http://bernd.eckenfels.net >> ________________________________ >> From: Gary Gregory <garydgreg...@gmail.com> >> Sent: Thursday, July 20, 2017 2:52:55 AM >> To: Commons Developers List >> Subject: Re: [vfs] Lcurly=no (was: svn commit: r1802440 - >> /commons/proper/vfs/trunk/core/src/test/java/org/apache/comm >> ons/vfs2/provider/jar/test/JarAttributesTestCase.java >> >> We had talked a long time ago about changing the style to the {} style >> below but it was never done. Any IDE can automatically do that but I do >> not >> know how to tell Eclipse for example to ONLY do that. So if we can live we >> a tree-wide reformat, that's easy. >> >> Gary >> >> On Wed, Jul 19, 2017 at 5:15 PM, Bernd Eckenfels <e...@zusammenkunft.net> >> wrote: >> >> > Hello. >> > >> > I am not sure about changing that. It looks to me like most of the VFS >> > code uses opening braces on new lines. I actually agree with that style. >> > >> > I would also accept to change it, but then completely. >> > >> > In fact the checkstyle template specifies curly = nl >> > https://github.com/apache/commons-vfs/blob/trunk/checkstyle. >> properties#L17 >> > >> > Gruss >> > Bernd >> > -- >> > http://bernd.eckenfels.net >> > _____________________________ >> > From: ggreg...@apache.org<mailto:ggreg...@apache.org> >> > Sent: Donnerstag, Juli 20, 2017 1:56 AM >> > Subject: svn commit: r1802440 - /commons/proper/vfs/trunk/ >> > core/src/test/java/org/apache/commons/vfs2/provider/jar/ >> > test/JarAttributesTestCase.java >> > To: <comm...@commons.apache.org<mailto:comm...@commons.apache.org>> >> > >> > >> > Author: ggregory >> > Date: Wed Jul 19 23:56:13 2017 >> > New Revision: 1802440 >> > >> > URL: http://svn.apache.org/viewvc?rev=1802440&view=rev >> > Log: >> > Format for more standard brace usage. >> > >> > Modified: >> > commons/proper/vfs/trunk/core/src/test/java/org/apache/ >> > commons/vfs2/provider/jar/test/JarAttributesTestCase.java >> > >> > Modified: commons/proper/vfs/trunk/core/src/test/java/org/apache/ >> > commons/vfs2/provider/jar/test/JarAttributesTestCase.java >> > URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/ >> > src/test/java/org/apache/commons/vfs2/provider/jar/ >> > test/JarAttributesTestCase.java?rev=1802440&r1=1802439& >> > r2=1802440&view=diff >> > ============================================================ >> > ================== >> > --- commons/proper/vfs/trunk/core/src/test/java/org/apache/ >> > commons/vfs2/provider/jar/test/JarAttributesTestCase.java (original) >> > +++ commons/proper/vfs/trunk/core/src/test/java/org/apache/ >> > commons/vfs2/provider/jar/test/JarAttributesTestCase.java Wed Jul 19 >> > 23:56:13 2017 >> > @@ -30,19 +30,16 @@ import org.junit.Test; >> > * >> > * @version $Id$ >> > */ >> > -public class JarAttributesTestCase >> > -{ >> > - private void printAttributes(final Map<String, Object> attributes) >> > - { >> > - for (final Map.Entry<String, Object> e : attributes.entrySet()) >> > - { >> > +public class JarAttributesTestCase { >> > + >> > + private void printAttributes(final Map<String, Object> attributes) { >> > + for (final Map.Entry<String, Object> e : attributes.entrySet()) { >> > System.out.println("Key: " + e.getKey() + ", Value: " + e.getValue()); >> > } >> > } >> > >> > @Test >> > - public void testAttributes() throws Exception >> > - { >> > + public void testAttributes() throws Exception { >> > final FileObject file = JarProviderTestCase.getTestJar >> (VFS.getManager(), >> > "test.jar"); >> > >> > final Map<String, Object> attributes = file.getContent().getAttribute >> s(); >> > @@ -52,8 +49,7 @@ public class JarAttributesTestCase >> > } >> > >> > @Test >> > - public void testNestedAttributes() throws Exception >> > - { >> > + public void testNestedAttributes() throws Exception { >> > final FileObject nested = JarProviderTestCase.getTestJar >> (VFS.getManager(), >> > "nested.jar"); >> > final FileObject file = nested.resolveFile("test.jar"); >> > >> > >> > >> > >> > >> > >> >