Permalink
Browse files

Sonar cleanup.

  • Loading branch information...
1 parent 1a2901b commit 6396bb4769d9c044d38cebb126a81fc6cded8e01 @marchof marchof committed Feb 24, 2013
@@ -26,11 +26,15 @@
private static final String CONFIG_RESOURCE = "/jacoco-agent.properties";
static {
- final Properties config = ConfigLoader.load(
- CONFIG_RESOURCE, System.getProperties());
+ final Properties config = ConfigLoader.load(CONFIG_RESOURCE,
+ System.getProperties());
data = Agent.getInstance(new AgentOptions(config)).getData();
}
+ private Offline() {
+ // no instances
+ }
+
/**
* API for offline instrumented classes.
*
@@ -23,6 +23,10 @@
*/
public class PreMain {
+ private PreMain() {
+ // no instances
+ }
+
/**
* This method is called by the JVM to initialize Java agents.
*
@@ -50,8 +50,8 @@
*/
public static long checksum(final byte[] data) {
long sum = 0;
- for (int i = 0; i < data.length; i++) {
- final int lookupidx = ((int) sum ^ data[i]) & 0xff;
+ for (final byte b : data) {
+ final int lookupidx = ((int) sum ^ b) & 0xff;
sum = (sum >>> 8) ^ LOOKUPTABLE[lookupidx];
}
return sum;
@@ -164,13 +164,6 @@ public boolean equals(final Object args) {
return super.equals(args);
}
- @Override
- public int hashCode() {
- // As we overwrite the equals method we need to overwrite here too,
- // otherwise we get a bad warning by Sonar
- return super.hashCode();
- }
-
/**
* Generates code that creates the argument array for the
* {@link #getProbes(Object[])} method. The array instance is left on the

0 comments on commit 6396bb4

Please sign in to comment.