Subversion Repository Public Repository

litesoft

Diff Revisions 150 vs 151 for /trunk/Java/core/Anywhere/src/org/litesoft/core/formatters/FractionalPartFormatHelper.java

Diff revisions: vs.
  @@ -30,8 +30,7 @@
30 30 {
31 31 if ( zParsedFractionalPart.length() > 1 )
32 32 {
33 - throw new IllegalArgumentException( "Fractional part " + zParsedFractionalPart +
34 - " is too large to be formatted" );
33 + throw new IllegalArgumentException( "Fractional part " + zParsedFractionalPart + " is too large to be formatted" );
35 34 }
36 35 else if ( zParsedFractionalPart.length() == 0 )
37 36 {
  @@ -115,18 +114,18 @@
115 114 int second = Integer.parseInt( "" + zDecimalChars[1] );
116 115 int third = Integer.parseInt( "" + zDecimalChars[2] );
117 116
118 - if( pToRound.length() == 3)
117 + if ( pToRound.length() == 3 )
119 118 {
120 - if( (second % 2) != 0 ) // is odd
119 + if ( (second % 2) != 0 ) // is odd
121 120 {
122 - if(third >= 5 )
121 + if ( third >= 5 )
123 122 {
124 123 second++;
125 124 }
126 125 }
127 126 else
128 127 {
129 - if(third > 5 )
128 + if ( third > 5 )
130 129 {
131 130 second++;
132 131 }
  @@ -137,20 +136,20 @@
137 136 {
138 137 int rest = Integer.parseInt( pToRound.substring( 2 ) );
139 138
140 - if( (third == 5) && (rest > 0) )
139 + if ( (third == 5) && (rest > 0) )
141 140 {
142 141 second++;
143 142 }
144 143
145 - if (third > 5)
144 + if ( third > 5 )
146 145 {
147 146 second++;
148 147 }
149 148 }
150 149
151 - StringBuilder sb = new StringBuilder( );
152 - sb.append(zDecimalChars[0]);
153 - sb.append(second);
150 + StringBuilder sb = new StringBuilder();
151 + sb.append( zDecimalChars[0] );
152 + sb.append( second );
154 153
155 154 return sb.toString();
156 155 }