From df9ff7f340a5ab4e07efc613f5f264eeae63d4c7 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Thu, 3 Jul 2014 16:06:47 +0200 Subject: Code Clean-Up based on our Recommended Settings (jogamp-scripting c47bc86ae2ee268a1f38c5580d11f93d7f8d6e74) Code Clean-Up based on our Recommended Settings (jogamp-scripting c47bc86ae2ee268a1f38c5580d11f93d7f8d6e74) - Change non static accesses to static members using declaring type - Change indirect accesses to static members to direct accesses (accesses through subtypes) - Add final modifier to private fields - Add final modifier to method parameters - Add final modifier to local variables - Remove unnecessary casts - Remove unnecessary '$NON-NLS$' tags - Remove trailing white spaces on all lines --- src/java/jogamp/common/os/elf/SectionHeader.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/java/jogamp/common/os/elf/SectionHeader.java') diff --git a/src/java/jogamp/common/os/elf/SectionHeader.java b/src/java/jogamp/common/os/elf/SectionHeader.java index 8a83b61..20a40a5 100644 --- a/src/java/jogamp/common/os/elf/SectionHeader.java +++ b/src/java/jogamp/common/os/elf/SectionHeader.java @@ -174,13 +174,13 @@ public class SectionHeader { /** Public access to the raw elf section header */ public final Shdr d; - private int idx; + private final int idx; private String name; - SectionHeader(byte[] buf, int offset, int length, int sectionIdx) { + SectionHeader(final byte[] buf, final int offset, final int length, final int sectionIdx) { this( ByteBuffer.wrap(buf, 0, buf.length), sectionIdx ); } - SectionHeader(java.nio.ByteBuffer buf, int idx) { + SectionHeader(final java.nio.ByteBuffer buf, final int idx) { d = Shdr.create(buf); this.idx = idx; name = null; @@ -231,7 +231,7 @@ public class SectionHeader { * @throws IOException if read error occurs * @throws IllegalArgumentException if section offset or size mismatch including size > {@link Integer#MAX_VALUE} */ - public Section readSection(RandomAccessFile in) throws IOException, IllegalArgumentException { + public Section readSection(final RandomAccessFile in) throws IOException, IllegalArgumentException { final int s_size = long2Int(d.getSh_size()); if( 0 == s_size || 0 > s_size ) { throw new IllegalArgumentException("Shdr["+idx+"] has invalid int size: "+d.getSh_size()+" -> "+s_size); @@ -251,7 +251,7 @@ public class SectionHeader { * @throws IllegalArgumentException if section offset or size mismatch including size > {@link Integer#MAX_VALUE} * @throws IllegalArgumentException if requested read length is > section size */ - public Section readSection(RandomAccessFile in, byte[] b, int b_off, int r_len) throws IOException, IllegalArgumentException { + public Section readSection(final RandomAccessFile in, final byte[] b, final int b_off, final int r_len) throws IOException, IllegalArgumentException { final int s_size = long2Int(d.getSh_size()); if( 0 == s_size || 0 > s_size ) { throw new IllegalArgumentException("Shdr["+idx+"] has invalid int size: "+d.getSh_size()+" -> "+s_size); @@ -262,7 +262,7 @@ public class SectionHeader { return readSectionImpl(in, b, b_off, r_len); } - Section readSectionImpl(RandomAccessFile in, byte[] b, int b_off, int r_len) throws IOException, IllegalArgumentException { + Section readSectionImpl(final RandomAccessFile in, final byte[] b, final int b_off, final int r_len) throws IOException, IllegalArgumentException { final long s_off = d.getSh_offset(); seek(in, s_off); readBytes(in, b, b_off, r_len); -- cgit v1.2.3