Fix build with Java 1.6
This commit is contained in:
parent
a797b4a20e
commit
e995610883
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue