Skip to content

Commit e42f0e4

Browse files
committed
[Java]: Styling.
1 parent e319b9e commit e42f0e4

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

main/android/uk/co/real_logic/sbe/codec/java/BitUtil.java

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@ final class BitUtil
7373
{
7474
public Constructor<?> run() throws Exception
7575
{
76-
Class<?> clazz = Class.forName("java.nio.DirectByteBuffer");
77-
Constructor<?> constructor;
76+
final Class<?> clazz = Class.forName("java.nio.DirectByteBuffer");
77+
final Constructor<?> constructor;
7878
if (Modifier.isAbstract(clazz.getModifiers()))
7979
{
8080
//use this starting with api level < 18
@@ -115,11 +115,11 @@ static long getEffectiveDirectAddress(final ByteBuffer buffer)
115115
return USE_LONG_ADDRESS ? EFFECTIVE_DIRECT_ADDRESS_FIELD.getLong(buffer)
116116
: EFFECTIVE_DIRECT_ADDRESS_FIELD.getInt(buffer);
117117
}
118-
catch (final IllegalArgumentException e)
118+
catch (final IllegalArgumentException ignore)
119119
{
120120
return 0;
121121
}
122-
catch (final IllegalAccessException e)
122+
catch (final IllegalAccessException ignore)
123123
{
124124
return 0;
125125
}
@@ -138,11 +138,11 @@ static long getMemoryFileAddress(final MemoryFile memoryFile)
138138
return USE_LONG_MEMORYFILE_ADDRESS ? MEMORYFILE_ADDRESS_FIELD
139139
.getLong(memoryFile) : MEMORYFILE_ADDRESS_FIELD.getInt(memoryFile);
140140
}
141-
catch (final IllegalArgumentException e)
141+
catch (final IllegalArgumentException ignore)
142142
{
143143
return 0;
144144
}
145-
catch (final IllegalAccessException e)
145+
catch (final IllegalAccessException ignore)
146146
{
147147
return 0;
148148
}
@@ -172,7 +172,7 @@ private static Field getField(final Class<?> clazz, final String name) throws Pr
172172
{
173173
public Field run() throws Exception
174174
{
175-
Field field = clazz.getDeclaredField(name);
175+
final Field field = clazz.getDeclaredField(name);
176176
field.setAccessible(true);
177177
return field;
178178
}
@@ -190,7 +190,7 @@ public Field run() throws Exception
190190
* @param size of the buffer from the given address
191191
* @return the {@link ByteBuffer} associated with the address and size
192192
*/
193-
static ByteBuffer newDirectByteBuffer(long address, int size)
193+
static ByteBuffer newDirectByteBuffer(final long address, final int size)
194194
{
195195
try
196196
{
@@ -203,19 +203,19 @@ static ByteBuffer newDirectByteBuffer(long address, int size)
203203
return (ByteBuffer) DIRECT_BYTE_BUFFER_CONSTRUCTOR.newInstance((int) address, size);
204204
}
205205
}
206-
catch (final IllegalArgumentException e)
206+
catch (final IllegalArgumentException ignore)
207207
{
208208
return null;
209209
}
210-
catch (final IllegalAccessException e)
210+
catch (final IllegalAccessException ignore)
211211
{
212212
return null;
213213
}
214-
catch (InstantiationException e)
214+
catch (InstantiationException ignore)
215215
{
216216
return null;
217217
}
218-
catch (InvocationTargetException e)
218+
catch (InvocationTargetException ignore)
219219
{
220220
return null;
221221
}

0 commit comments

Comments
 (0)