summaryrefslogtreecommitdiffstats
path: root/src/java/jogamp/common/os/elf/SectionHeader.java
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2014-07-03 16:06:47 +0200
committerSven Gothel <[email protected]>2014-07-03 16:06:47 +0200
commitdf9ff7f340a5ab4e07efc613f5f264eeae63d4c7 (patch)
tree239ae276b82024b140428e6c0fe5d739fdd686a4 /src/java/jogamp/common/os/elf/SectionHeader.java
parenteb47aaba63e3b1bf55f274a0f338f1010a017ae4 (diff)
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
Diffstat (limited to 'src/java/jogamp/common/os/elf/SectionHeader.java')
-rw-r--r--src/java/jogamp/common/os/elf/SectionHeader.java12
1 files changed, 6 insertions, 6 deletions
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 &gt; {@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 &gt; {@link Integer#MAX_VALUE}
* @throws IllegalArgumentException if requested read length is &gt; 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);