On Tue, Jan 13, 2015 at 4:01 PM, Zheng, Kai <kai.zh...@intel.com> wrote:
> >> I don't like 4 spaces for XML files, it's quickly too wide, I use 2 > spaces. > Agree, let's follow this. > > >> Regarding teh Java code, I suggest we keep what you have (likely Java > code convention), we can vote later on keep it or moving globally to > another convention. > I do like the current one that can be most easily setup in IDEA or Eclipse > in my view and is also very concise/compact in lines, but sure I would > follow the best practice if we vote one. The major concern would be we have > to find/write a tool to convert the existing codes to use the new style if > we have to change. > > Current codes follow in the following style I copied from IDEA template. > === > public class Foo { > public int[] X = new int[]{1, 3, 5 7, 9, 11}; > > public void foo(boolean a, int x, int y, int z) { > label1: > do { > try { > if (x > 0) { > int someVariable = a ? x : y; > int anotherVariable = a ? x : y; > } else if (x < 0) { > int someVariable = (y + z); > someVariable = x = x + y; > } else { > label2: > for (int i = 0; i < 5; i++) doSomething(i); > the above block certainly hurts my eyes ;) I will be very glad if we all decide to use the format that is used in all sub-projects. > } > switch (a) { > case 0: > doCase0(); > break; > default: > doDefault(); > } > } catch (Exception e) { > processException(e.getMessage(), x + y, z, a); > } finally { > processFinally(); > } > } > while (true); > > if (2 < 3) return; > if (3 < 4) return; > do { > x++ > } > while (x < 10000); > while (x < 50000) x++; > for (int i = 0; i < 5; i++) System.out.println(i); > } > > private class InnerClass implements I1, I2 { > public void bar() throws E1, E2 { > } > } > } > === > > Regards, > Kai > > -----Original Message----- > From: Emmanuel Lécharny [mailto:elecha...@gmail.com] > Sent: Monday, January 12, 2015 11:44 PM > To: Apache Directory Developers List > Subject: Re: [kerby/haox] Dependencies updates needed > > Le 12/01/15 09:57, Zheng, Kai a écrit : > > Hi Emmanuel, > > > > I have checked the great changes in the new branch. Would you mind I > make some slight adjustment to make the style consistent with the existing > codes before I merge them in? Thanks. > > Sure. > > I don't like 4 spaces for XML files, it's quickly too wide, I use 2 spaces. > > Regarding teh Java code, I suggest we keep what you have (likely Java code > convention), we can vote later on keep it or moving globally to another > convention. > > -- Kiran Ayyagari http://keydap.com