Skip to content
Snippets Groups Projects
Commit e9956108 authored by hpi1's avatar hpi1
Browse files

Fix build with Java 1.6

parent a797b4a2
No related branches found
No related tags found
No related merge requests found
Pipeline #4957 passed with stage
in 2 minutes and 39 seconds
......@@ -21,7 +21,6 @@ package org.dvb.application;
import java.util.LinkedList;
import java.util.Enumeration;
import java.util.Collections;
import org.videolan.BDJAppsDatabase;
import org.videolan.BDJListeners;
import org.videolan.Logger;
......@@ -38,12 +37,12 @@ public class AppsDatabase {
public Enumeration getAppIDs(AppsDatabaseFilter filter) {
logger.unimplemented("getAppIDs");
return Collections.emptyEnumeration();
return emptyEnumeration;
}
public Enumeration getAppAttributes(AppsDatabaseFilter filter) {
logger.unimplemented("getAppAttributes");
return Collections.emptyEnumeration();
return emptyEnumeration;
}
public AppAttributes getAppAttributes(AppID key) {
......@@ -68,6 +67,11 @@ public class AppsDatabase {
listeners.putCallback(new AppsDatabaseEvent(id, appid, this));
}
private static final Enumeration emptyEnumeration = new Enumeration() {
public boolean hasMoreElements() { return false; }
public Object nextElement() { throw new java.util.NoSuchElementException(); }
};
private BDJListeners listeners = new BDJListeners();
private static final Logger logger = Logger.getLogger(AppsDatabase.class.getName());
}
......@@ -30,7 +30,7 @@ public class HScreenPoint {
}
public int hashCode() {
return Float.hashCode(x) + 31 * Float.hashCode(y);
return (new Float(x).hashCode()) + 31 * (new Float(y).hashCode());
}
public boolean equals(Object obj)
......
......@@ -36,10 +36,10 @@ public class HScreenRectangle {
}
public int hashCode() {
int result = Float.hashCode(x);
result = 31 * result + Float.hashCode(y);
result = 31 * result + Float.hashCode(width);
result = 31 * result + Float.hashCode(height);
int result = (new Float(x).hashCode());
result = 31 * result + (new Float(y).hashCode());
result = 31 * result + (new Float(width).hashCode());
result = 31 * result + (new Float(height).hashCode());
return result;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment