[libbluray-devel] [Git][videolan/libbluray][master] 2 commits: Add /usr/lib/jvm/jre to JVM search paths
Petri Hintukainen (@hpi)
gitlab at videolan.org
Thu Nov 3 17:00:29 UTC 2022
Petri Hintukainen pushed to branch master at VideoLAN / libbluray
Commits:
74631bd2 by Petri Hintukainen at 2022-11-03T18:55:31+02:00
Add /usr/lib/jvm/jre to JVM search paths
- - - - -
dcaed938 by Petri Hintukainen at 2022-11-03T18:58:18+02:00
Use Integer.valueOf(), Boolean.valueOf() and Float.valueOf()
- - - - -
16 changed files:
- contrib/asm/src/org/objectweb/asm/Opcodes.java
- src/libbluray/bdj/bdj.c
- src/libbluray/bdj/java/java/awt/BDGraphicsBase.java
- src/libbluray/bdj/java/java/awt/Font.java
- src/libbluray/bdj/java/java/io/BDFileSystem.java
- src/libbluray/bdj/java/org/havi/ui/HScene.java
- src/libbluray/bdj/java/org/havi/ui/HSceneTemplate.java
- src/libbluray/bdj/java/org/havi/ui/HScreenPoint.java
- src/libbluray/bdj/java/org/havi/ui/HScreenRectangle.java
- src/libbluray/bdj/java/org/havi/ui/HVisible.java
- src/libbluray/bdj/java/org/havi/ui/event/HEventGroup.java
- src/libbluray/bdj/java/org/havi/ui/event/HKeyCapabilities.java
- src/libbluray/bdj/java/org/havi/ui/event/HRcCapabilities.java
- src/libbluray/bdj/java/org/videolan/BDJAppProxy.java
- src/libbluray/bdj/java/org/videolan/MountManager.java
- src/libbluray/bdj/java/org/videolan/media/content/BDHandler.java
Changes:
=====================================
contrib/asm/src/org/objectweb/asm/Opcodes.java
=====================================
@@ -146,13 +146,13 @@ public interface Opcodes {
*/
int F_SAME1 = 4;
- Integer TOP = new Integer(0);
- Integer INTEGER = new Integer(1);
- Integer FLOAT = new Integer(2);
- Integer DOUBLE = new Integer(3);
- Integer LONG = new Integer(4);
- Integer NULL = new Integer(5);
- Integer UNINITIALIZED_THIS = new Integer(6);
+ Integer TOP = Integer.valueOf(0);
+ Integer INTEGER = Integer.valueOf(1);
+ Integer FLOAT = Integer.valueOf(2);
+ Integer DOUBLE = Integer.valueOf(3);
+ Integer LONG = Integer.valueOf(4);
+ Integer NULL = Integer.valueOf(5);
+ Integer UNINITIALIZED_THIS = Integer.valueOf(6);
// opcodes // visit method (- = idem)
=====================================
src/libbluray/bdj/bdj.c
=====================================
@@ -415,6 +415,7 @@ static void *_load_jvm(const char **p_java_home, const char *app_java_home)
"/etc/alternatives/java_sdk",
"/usr/lib/jvm/default-java",
"/usr/lib/jvm/default",
+ "/usr/lib/jvm/jre",
"/usr/lib/jvm/",
"/etc/java-config-2/current-system-vm",
"/usr/lib/jvm/java-8-openjdk",
=====================================
src/libbluray/bdj/java/java/awt/BDGraphicsBase.java
=====================================
@@ -721,7 +721,7 @@ abstract class BDGraphicsBase extends DVBGraphics implements ConstrainableGraphi
for (int j = 0; j < nPoints; j++) {
if (polyEdges[j].intersects(i)) {
int x = polyEdges[j].intersectionX(i);
- xList.add(new Integer(x));
+ xList.add(Integer.valueOf(x));
}
}
=====================================
src/libbluray/bdj/java/java/awt/Font.java
=====================================
@@ -100,7 +100,7 @@ public class Font implements java.io.Serializable {
public Map getAttributes() {
Hashtable map = new Hashtable();
map.put(TextAttribute.FAMILY, name);
- map.put(TextAttribute.SIZE, new Float(size));
+ map.put(TextAttribute.SIZE, Float.valueOf(size));
map.put(TextAttribute.WEIGHT, (style & BOLD) != 0 ? TextAttribute.WEIGHT_BOLD : TextAttribute.WEIGHT_REGULAR);
map.put(TextAttribute.POSTURE, (style & ITALIC) != 0 ? TextAttribute.POSTURE_OBLIQUE : TextAttribute.POSTURE_REGULAR);
return (Map)map;
=====================================
src/libbluray/bdj/java/java/io/BDFileSystem.java
=====================================
@@ -345,7 +345,7 @@ public abstract class BDFileSystem extends FileSystem {
args = new Object[] {(Object)path};
} catch (NoSuchMethodException e) {
m = fs.getClass().getDeclaredMethod("createFileExclusively", new Class[] { String.class, boolean.class });
- args = new Object[] {(Object)path, (Object)new Boolean(restrictive)};
+ args = new Object[] {(Object)path, (Object)Boolean.valueOf(restrictive)};
}
} catch (NoSuchMethodException e) {
error("no matching FileSystem.createFileExclusively found !");
=====================================
src/libbluray/bdj/java/org/havi/ui/HScene.java
=====================================
@@ -290,17 +290,17 @@ public class HScene extends Container implements HComponentOrdering {
if (!hasComp)
return false;
- shortcuts.put(new Integer(keyCode), act);
+ shortcuts.put(Integer.valueOf(keyCode), act);
return true;
}
public void removeShortcut(int keyCode) {
- shortcuts.remove(new Integer(keyCode));
+ shortcuts.remove(Integer.valueOf(keyCode));
}
public HActionable getShortcutComponent(int keyCode) {
- return (HActionable)shortcuts.get(new Integer(keyCode));
+ return (HActionable)shortcuts.get(Integer.valueOf(keyCode));
}
public void enableShortcuts(boolean enable) {
=====================================
src/libbluray/bdj/java/org/havi/ui/HSceneTemplate.java
=====================================
@@ -29,16 +29,16 @@ public class HSceneTemplate extends Object {
}
public void setPreference(int preference, Object object, int priority) {
- preferenceMap.put(new Integer(preference), object);
- priorityMap.put(new Integer(preference), new Integer(priority));
+ preferenceMap.put(Integer.valueOf(preference), object);
+ priorityMap.put(Integer.valueOf(preference), Integer.valueOf(priority));
}
public Object getPreferenceObject(int preference) {
- return preferenceMap.get(new Integer(preference));
+ return preferenceMap.get(Integer.valueOf(preference));
}
public int getPreferencePriority(int preference) {
- Object prio = priorityMap.get(new Integer(preference));
+ Object prio = priorityMap.get(Integer.valueOf(preference));
if (prio == null)
return UNNECESSARY;
=====================================
src/libbluray/bdj/java/org/havi/ui/HScreenPoint.java
=====================================
@@ -30,7 +30,7 @@ public class HScreenPoint {
}
public int hashCode() {
- return (new Float(x).hashCode()) + 31 * (new Float(y).hashCode());
+ return (Float.valueOf(x).hashCode()) + 31 * (Float.valueOf(y).hashCode());
}
public boolean equals(Object obj)
@@ -39,10 +39,10 @@ public class HScreenPoint {
return false;
HScreenPoint other = (HScreenPoint)obj;
- Float x1 = new Float(this.x);
- Float y1 = new Float(this.y);
- Float x2 = new Float(other.x);
- Float y2 = new Float(other.y);
+ Float x1 = Float.valueOf(this.x);
+ Float y1 = Float.valueOf(this.y);
+ Float x2 = Float.valueOf(other.x);
+ Float y2 = Float.valueOf(other.y);
return x1.equals(x2) && y1.equals(y2);
}
=====================================
src/libbluray/bdj/java/org/havi/ui/HScreenRectangle.java
=====================================
@@ -36,10 +36,10 @@ public class HScreenRectangle {
}
public int hashCode() {
- 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());
+ int result = (Float.valueOf(x).hashCode());
+ result = 31 * result + (Float.valueOf(y).hashCode());
+ result = 31 * result + (Float.valueOf(width).hashCode());
+ result = 31 * result + (Float.valueOf(height).hashCode());
return result;
}
@@ -49,14 +49,14 @@ public class HScreenRectangle {
return false;
HScreenRectangle other = (HScreenRectangle)obj;
- Float x1 = new Float(this.x);
- Float y1 = new Float(this.y);
- Float w1 = new Float(this.width);
- Float h1 = new Float(this.height);
- Float x2 = new Float(other.x);
- Float y2 = new Float(other.y);
- Float w2 = new Float(other.width);
- Float h2 = new Float(other.height);
+ Float x1 = Float.valueOf(this.x);
+ Float y1 = Float.valueOf(this.y);
+ Float w1 = Float.valueOf(this.width);
+ Float h1 = Float.valueOf(this.height);
+ Float x2 = Float.valueOf(other.x);
+ Float y2 = Float.valueOf(other.y);
+ Float w2 = Float.valueOf(other.width);
+ Float h2 = Float.valueOf(other.height);
return x1.equals(x2) && y1.equals(y2) && w1.equals(w2) && h1.equals(h2);
}
=====================================
src/libbluray/bdj/java/org/havi/ui/HVisible.java
=====================================
@@ -82,7 +82,7 @@ public class HVisible extends HComponent implements HState {
int states = LAST_STATE - FIRST_STATE + 1;
Object[] oldData = new Object[states + 1];
- oldData[0] = new Integer(state);
+ oldData[0] = Integer.valueOf(state);
for (int i = 0; i < states; i++) {
oldData[(i + 1)] = content[i];
}
@@ -183,7 +183,7 @@ public class HVisible extends HComponent implements HState {
if (InteractionState == state)
return;
- Integer oldState = new Integer(InteractionState);
+ Integer oldState = Integer.valueOf(InteractionState);
InteractionState = state;
visibleChanged(STATE_CHANGE, oldState);
}
@@ -258,7 +258,7 @@ public class HVisible extends HComponent implements HState {
}
this.halign = halign;
- visibleChanged(UNKNOWN_CHANGE, new Integer(UNKNOWN_CHANGE));
+ visibleChanged(UNKNOWN_CHANGE, Integer.valueOf(UNKNOWN_CHANGE));
}
public void setVerticalAlignment(int valign) {
@@ -269,7 +269,7 @@ public class HVisible extends HComponent implements HState {
}
this.valign = valign;
- visibleChanged(UNKNOWN_CHANGE, new Integer(UNKNOWN_CHANGE));
+ visibleChanged(UNKNOWN_CHANGE, Integer.valueOf(UNKNOWN_CHANGE));
}
public int getHorizontalAlignment() {
@@ -288,7 +288,7 @@ public class HVisible extends HComponent implements HState {
}
resizeMode = resize;
- visibleChanged(UNKNOWN_CHANGE, new Integer(UNKNOWN_CHANGE));
+ visibleChanged(UNKNOWN_CHANGE, Integer.valueOf(UNKNOWN_CHANGE));
}
public int getResizeMode() {
@@ -311,7 +311,7 @@ public class HVisible extends HComponent implements HState {
if ((hLook instanceof HAnimateLook) ||
(hLook instanceof HGraphicLook) ||
(hLook instanceof HTextLook)) {
- Boolean oldMode = new Boolean(BordersEnabled);
+ Boolean oldMode = Boolean.valueOf(BordersEnabled);
BordersEnabled = enable;
visibleChanged(BORDER_CHANGE, oldMode);
}
=====================================
src/libbluray/bdj/java/org/havi/ui/event/HEventGroup.java
=====================================
@@ -26,11 +26,11 @@ public class HEventGroup {
}
public void addKey(int keycode) {
- keys.add(new Integer(keycode));
+ keys.add(Integer.valueOf(keycode));
}
public void removeKey(int keycode) {
- keys.remove(new Integer(keycode));
+ keys.remove(Integer.valueOf(keycode));
}
public void addAllNumericKeys() {
=====================================
src/libbluray/bdj/java/org/havi/ui/event/HKeyCapabilities.java
=====================================
@@ -44,7 +44,7 @@ public class HKeyCapabilities {
String name = fields[i].getName();
if ((name.startsWith("VK_")) && !(name.equals("VK_UNDEFINED"))) {
try {
- Integer keyCode = new Integer(fields[i].getInt(null));
+ Integer keyCode = Integer.valueOf(fields[i].getInt(null));
list.add(keyCode);
} catch (Exception e) {
e.printStackTrace();
=====================================
src/libbluray/bdj/java/org/havi/ui/event/HRcCapabilities.java
=====================================
@@ -188,13 +188,13 @@ public class HRcCapabilities extends HKeyCapabilities {
static {
ArrayList list = new ArrayList();
- list.add(new Integer(HRcEvent.VK_ENTER));
- list.add(new Integer(HRcEvent.VK_LEFT));
- list.add(new Integer(HRcEvent.VK_UP));
- list.add(new Integer(HRcEvent.VK_RIGHT));
- list.add(new Integer(HRcEvent.VK_DOWN));
+ list.add(Integer.valueOf(HRcEvent.VK_ENTER));
+ list.add(Integer.valueOf(HRcEvent.VK_LEFT));
+ list.add(Integer.valueOf(HRcEvent.VK_UP));
+ list.add(Integer.valueOf(HRcEvent.VK_RIGHT));
+ list.add(Integer.valueOf(HRcEvent.VK_DOWN));
for (int i = 0; i < 9; i++)
- list.add(new Integer(HRcEvent.VK_0 + i));
+ list.add(Integer.valueOf(HRcEvent.VK_0 + i));
Field[] fields = org.bluray.ui.event.HRcEvent.class.getFields();
for (int i = 0; i < fields.length; i++) {
@@ -203,7 +203,7 @@ public class HRcCapabilities extends HKeyCapabilities {
try {
int keyCode = fields[i].getInt(null);
if ((keyCode > HRcEvent.RC_FIRST) && (keyCode <= HRcEvent.VK_PG_TEXTST_ENABLE_DISABLE))
- list.add(new Integer(keyCode));
+ list.add(Integer.valueOf(keyCode));
} catch (Exception e) {
e.printStackTrace();
}
=====================================
src/libbluray/bdj/java/org/videolan/BDJAppProxy.java
=====================================
@@ -92,7 +92,7 @@ class BDJAppProxy implements DVBJProxy, Runnable {
}
public void stop(boolean force, int timeout) {
- AppCommand cmd = new AppCommand(AppCommand.CMD_STOP, new Boolean(force));
+ AppCommand cmd = new AppCommand(AppCommand.CMD_STOP, Boolean.valueOf(force));
synchronized (cmds) {
cmds.addLast(cmd);
cmds.notifyAll();
@@ -141,7 +141,7 @@ class BDJAppProxy implements DVBJProxy, Runnable {
}
protected void release() {
- AppCommand cmd = new AppCommand(AppCommand.CMD_STOP, new Boolean(true));
+ AppCommand cmd = new AppCommand(AppCommand.CMD_STOP, Boolean.valueOf(true));
synchronized (cmds) {
cmds.addLast(cmd);
cmds.addLast(null);
=====================================
src/libbluray/bdj/java/org/videolan/MountManager.java
=====================================
@@ -61,7 +61,7 @@ public class MountManager {
synchronized (mountPoints) {
// already mounted ?
- MountPoint mountPoint = (MountPoint)mountPoints.get(new Integer(jarId));
+ MountPoint mountPoint = (MountPoint)mountPoints.get(Integer.valueOf(jarId));
if (mountPoint != null) {
logger.info("JAR " + jarId + " already mounted");
mountPoint.incRefCount();
@@ -169,7 +169,7 @@ public class MountManager {
} else {
logger.info("Mounting " + (classFiles ? "FULL" : "PARTIAL") + " JAR " + jarId + " complete.");
- mountPoints.put(new Integer(jarId), mountPoint);
+ mountPoints.put(Integer.valueOf(jarId), mountPoint);
}
return mountPoint.getMountPoint();
@@ -179,7 +179,7 @@ public class MountManager {
private static void unmount(int jarId) {
logger.info("Unmounting JAR: " + jarId);
- final Integer id = new Integer(jarId);
+ final Integer id = Integer.valueOf(jarId);
final MountPoint mountPoint;
synchronized (mountPoints) {
@@ -222,7 +222,7 @@ public class MountManager {
/* called from org/dvb/dsmcc/ServiceDomain */
public static String getMount(int jarId) {
- Integer id = new Integer(jarId);
+ Integer id = Integer.valueOf(jarId);
MountPoint mountPoint;
synchronized (mountPoints) {
=====================================
src/libbluray/bdj/java/org/videolan/media/content/BDHandler.java
=====================================
@@ -248,7 +248,7 @@ public abstract class BDHandler implements Player, ServiceContentHandler {
public float setRate(float factor) {
checkUnrealized();
- PlayerAction action = new PlayerAction(this, PlayerAction.ACTION_SET_RATE, new Float(factor));
+ PlayerAction action = new PlayerAction(this, PlayerAction.ACTION_SET_RATE, Float.valueOf(factor));
commandQueue.put(action);
action.waitEnd();
return rate;
@@ -340,7 +340,7 @@ public abstract class BDHandler implements Player, ServiceContentHandler {
protected boolean statusEvent(int event, int param) {
if (isClosed) return false;
- commandQueue.put(new PlayerAction(this, PlayerAction.ACTION_STATUS, new Integer(event), param));
+ commandQueue.put(new PlayerAction(this, PlayerAction.ACTION_STATUS, Integer.valueOf(event), param));
return true;
}
View it on GitLab: https://code.videolan.org/videolan/libbluray/-/compare/2f10fb73b869337f2a2fb6fc8c8b45ef88383b78...dcaed938d5f9c5ed1f2b9c0ce6fdfac23ec2c4d2
--
View it on GitLab: https://code.videolan.org/videolan/libbluray/-/compare/2f10fb73b869337f2a2fb6fc8c8b45ef88383b78...dcaed938d5f9c5ed1f2b9c0ce6fdfac23ec2c4d2
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
More information about the libbluray-devel
mailing list