|
From: <ls...@us...> - 2008-09-27 07:30:55
|
Revision: 4583
http://jnode.svn.sourceforge.net/jnode/?rev=4583&view=rev
Author: lsantha
Date: 2008-09-27 07:30:38 +0000 (Sat, 27 Sep 2008)
Log Message:
-----------
Removed redundant type casts.
Modified Paths:
--------------
trunk/core/src/classpath/vm/java/nio/VMDirectByteBuffer.java
trunk/core/src/core/org/jnode/system/x86/DMA.java
trunk/core/src/core/org/jnode/vm/VmSystem.java
trunk/core/src/core/org/jnode/vm/x86/PIC8259A.java
trunk/core/src/driver/org/jnode/driver/DeviceUtils.java
trunk/core/src/driver/org/jnode/driver/bus/firewire/FireWireDriver.java
trunk/core/src/driver/org/jnode/driver/bus/pci/PCIDriver.java
trunk/core/src/driver/org/jnode/driver/bus/pcmcia/CardBusDriver.java
trunk/core/src/driver/org/jnode/driver/bus/usb/AbstractHostControllerDriver.java
trunk/core/src/driver/org/jnode/driver/bus/usb/uhci/UHCICore.java
trunk/core/src/driver/org/jnode/driver/chipset/i440BX/i82371AB_ACPI_SMBusControler.java
trunk/core/src/driver/org/jnode/driver/serial/SerialPortDriver.java
trunk/core/src/driver/org/jnode/driver/system/acpi/AcpiDriver.java
trunk/core/src/driver/org/jnode/driver/system/cmos/def/CMOS.java
trunk/core/src/driver/org/jnode/driver/system/firmware/bios/BiosDriver.java
trunk/core/src/driver/org/jnode/driver/textscreen/x86/PcTextScreen.java
trunk/core/src/mmtk-vm/org/jnode/vm/memmgr/mmtk/BaseMmtkHeapManager.java
trunk/gui/src/awt/org/jnode/awt/util/BitmapGraphics.java
trunk/gui/src/driver/org/jnode/driver/ps2/PS2Bus.java
trunk/gui/src/driver/org/jnode/driver/sound/speaker/SpeakerUtils.java
trunk/gui/src/driver/org/jnode/driver/sound/speaker/pc/PCSpeakerDriver.java
trunk/gui/src/driver/org/jnode/driver/video/AbstractFrameBufferDriver.java
trunk/gui/src/driver/org/jnode/driver/video/ati/radeon/RadeonCore.java
trunk/gui/src/driver/org/jnode/driver/video/nvidia/NVidiaCore.java
trunk/gui/src/driver/org/jnode/driver/video/vesa/VESACore.java
trunk/gui/src/driver/org/jnode/driver/video/vga/StandardVGAIO.java
trunk/gui/src/driver/org/jnode/driver/video/vmware/VMWareCore.java
trunk/net/src/driver/org/jnode/driver/net/_3c90x/_3c90xCore.java
trunk/net/src/driver/org/jnode/driver/net/bcm570x/BCM570xCore.java
trunk/net/src/driver/org/jnode/driver/net/eepro100/EEPRO100Core.java
trunk/net/src/driver/org/jnode/driver/net/lance/LanceCore.java
trunk/net/src/driver/org/jnode/driver/net/ne2000/Ne2000Core.java
trunk/net/src/driver/org/jnode/driver/net/prism2/Prism2Core.java
trunk/net/src/driver/org/jnode/driver/net/rtl8139/RTL8139Core.java
trunk/net/src/net/org/jnode/net/command/DhcpCommand.java
trunk/net/src/net/org/jnode/net/command/RouteCommand.java
trunk/net/src/net/org/jnode/net/ipv4/config/impl/Route.java
trunk/net/src/test/org/jnode/test/net/ARPTest.java
trunk/net/src/test/org/jnode/test/net/NetTest.java
trunk/shell/src/shell/org/jnode/shell/CommandShell.java
trunk/shell/src/shell/org/jnode/shell/bjorne/BjorneShellPlugin.java
trunk/shell/src/shell/org/jnode/shell/command/plugin/PluginCommand.java
trunk/shell/src/shell/org/jnode/shell/help/argument/DeviceArgument.java
trunk/shell/src/shell/org/jnode/shell/help/argument/PluginArgument.java
trunk/shell/src/shell/org/jnode/shell/syntax/PluginArgument.java
Modified: trunk/core/src/classpath/vm/java/nio/VMDirectByteBuffer.java
===================================================================
--- trunk/core/src/classpath/vm/java/nio/VMDirectByteBuffer.java 2008-09-26 17:18:55 UTC (rev 4582)
+++ trunk/core/src/classpath/vm/java/nio/VMDirectByteBuffer.java 2008-09-27 07:30:38 UTC (rev 4583)
@@ -103,8 +103,7 @@
public MemoryRawData(int size) {
try {
- final ResourceManager rm = (ResourceManager) InitialNaming
- .lookup(ResourceManager.NAME);
+ final ResourceManager rm = InitialNaming.lookup(ResourceManager.NAME);
final ResourceOwner owner = new SimpleResourceOwner("java.nio");
this.resource = rm.claimMemoryResource(owner, null, size,
ResourceManager.MEMMODE_NORMAL);
Modified: trunk/core/src/core/org/jnode/system/x86/DMA.java
===================================================================
--- trunk/core/src/core/org/jnode/system/x86/DMA.java 2008-09-26 17:18:55 UTC (rev 4582)
+++ trunk/core/src/core/org/jnode/system/x86/DMA.java 2008-09-27 07:30:38 UTC (rev 4583)
@@ -110,7 +110,7 @@
public DMA() throws DMAException {
final ResourceManager rm;
try {
- rm = (ResourceManager) InitialNaming.lookup(ResourceManager.NAME);
+ rm = InitialNaming.lookup(ResourceManager.NAME);
} catch (NameNotFoundException ex) {
throw new DMAException("Cannot find ResourceManager", ex);
}
Modified: trunk/core/src/core/org/jnode/vm/VmSystem.java
===================================================================
--- trunk/core/src/core/org/jnode/vm/VmSystem.java 2008-09-26 17:18:55 UTC (rev 4582)
+++ trunk/core/src/core/org/jnode/vm/VmSystem.java 2008-09-27 07:30:38 UTC (rev 4583)
@@ -1013,8 +1013,7 @@
exitCode = (reset ? 1 : 0);
inShutdown = true;
try {
- final PluginManager pm = (PluginManager) InitialNaming
- .lookup(PluginManager.NAME);
+ final PluginManager pm = InitialNaming.lookup(PluginManager.NAME);
pm.stopPlugins();
} catch (NameNotFoundException ex) {
System.err.println("Cannot find ServiceManager");
Modified: trunk/core/src/core/org/jnode/vm/x86/PIC8259A.java
===================================================================
--- trunk/core/src/core/org/jnode/vm/x86/PIC8259A.java 2008-09-26 17:18:55 UTC (rev 4582)
+++ trunk/core/src/core/org/jnode/vm/x86/PIC8259A.java 2008-09-27 07:30:38 UTC (rev 4583)
@@ -40,7 +40,7 @@
final SimpleResourceOwner owner = new SimpleResourceOwner("PIC8259A");
try {
- final ResourceManager rm = (ResourceManager) InitialNaming.lookup(ResourceManager.NAME);
+ final ResourceManager rm = InitialNaming.lookup(ResourceManager.NAME);
io8259_A = rm.claimIOResource(owner, 0x20, 1); // 0xA0
io8259_B = rm.claimIOResource(owner, 0xA0, 1);
} catch (NameNotFoundException ex) {
Modified: trunk/core/src/driver/org/jnode/driver/DeviceUtils.java
===================================================================
--- trunk/core/src/driver/org/jnode/driver/DeviceUtils.java 2008-09-26 17:18:55 UTC (rev 4582)
+++ trunk/core/src/driver/org/jnode/driver/DeviceUtils.java 2008-09-27 07:30:38 UTC (rev 4583)
@@ -47,7 +47,7 @@
public static DeviceManager getDeviceManager()
throws NameNotFoundException {
if (dm == null) {
- dm = (DeviceManager) InitialNaming.lookup(DeviceManager.NAME);
+ dm = InitialNaming.lookup(DeviceManager.NAME);
}
return dm;
}
Modified: trunk/core/src/driver/org/jnode/driver/bus/firewire/FireWireDriver.java
===================================================================
--- trunk/core/src/driver/org/jnode/driver/bus/firewire/FireWireDriver.java 2008-09-26 17:18:55 UTC (rev 4582)
+++ trunk/core/src/driver/org/jnode/driver/bus/firewire/FireWireDriver.java 2008-09-27 07:30:38 UTC (rev 4583)
@@ -50,7 +50,7 @@
final Device device = getDevice();
final DeviceManager dm;
try {
- dm = (DeviceManager) InitialNaming.lookup(DeviceManager.NAME);
+ dm = InitialNaming.lookup(DeviceManager.NAME);
dm.rename(device, getDevicePrefix(), true);
} catch (DeviceAlreadyRegisteredException ex) {
log.error("Cannot rename device", ex);
Modified: trunk/core/src/driver/org/jnode/driver/bus/pci/PCIDriver.java
===================================================================
--- trunk/core/src/driver/org/jnode/driver/bus/pci/PCIDriver.java 2008-09-26 17:18:55 UTC (rev 4582)
+++ trunk/core/src/driver/org/jnode/driver/bus/pci/PCIDriver.java 2008-09-27 07:30:38 UTC (rev 4583)
@@ -89,8 +89,7 @@
public void startDevice() throws DriverException {
try {
final Device pciBusDevice = getDevice();
- final ResourceManager rm = (ResourceManager) InitialNaming
- .lookup(ResourceManager.NAME);
+ final ResourceManager rm = InitialNaming.lookup(ResourceManager.NAME);
// Claim the resources
pciConfigIO = claimPorts(rm, pciBusDevice);
// Register the API's
@@ -122,7 +121,7 @@
// Stop & unregister all PCI devices
DeviceManager devMan;
try {
- devMan = (DeviceManager) InitialNaming.lookup(DeviceManager.NAME);
+ devMan = InitialNaming.lookup(DeviceManager.NAME);
} catch (NameNotFoundException ex) {
throw new DriverException("Cannot find device manager", ex);
}
Modified: trunk/core/src/driver/org/jnode/driver/bus/pcmcia/CardBusDriver.java
===================================================================
--- trunk/core/src/driver/org/jnode/driver/bus/pcmcia/CardBusDriver.java 2008-09-26 17:18:55 UTC (rev 4582)
+++ trunk/core/src/driver/org/jnode/driver/bus/pcmcia/CardBusDriver.java 2008-09-27 07:30:38 UTC (rev 4583)
@@ -52,7 +52,7 @@
final Device device = getDevice();
final DeviceManager dm;
try {
- dm = (DeviceManager) InitialNaming.lookup(DeviceManager.NAME);
+ dm = InitialNaming.lookup(DeviceManager.NAME);
dm.rename(device, getDevicePrefix(), true);
} catch (DeviceAlreadyRegisteredException ex) {
log.error("Cannot rename device", ex);
Modified: trunk/core/src/driver/org/jnode/driver/bus/usb/AbstractHostControllerDriver.java
===================================================================
--- trunk/core/src/driver/org/jnode/driver/bus/usb/AbstractHostControllerDriver.java 2008-09-26 17:18:55 UTC (rev 4582)
+++ trunk/core/src/driver/org/jnode/driver/bus/usb/AbstractHostControllerDriver.java 2008-09-27 07:30:38 UTC (rev 4583)
@@ -53,7 +53,7 @@
final Device device = getDevice();
final DeviceManager dm;
try {
- dm = (DeviceManager) InitialNaming.lookup(DeviceManager.NAME);
+ dm = InitialNaming.lookup(DeviceManager.NAME);
dm.rename(device, getDevicePrefix(), true);
} catch (DeviceAlreadyRegisteredException ex) {
log.error("Cannot rename device", ex);
Modified: trunk/core/src/driver/org/jnode/driver/bus/usb/uhci/UHCICore.java
===================================================================
--- trunk/core/src/driver/org/jnode/driver/bus/usb/uhci/UHCICore.java 2008-09-26 17:18:55 UTC (rev 4582)
+++ trunk/core/src/driver/org/jnode/driver/bus/usb/uhci/UHCICore.java 2008-09-27 07:30:38 UTC (rev 4583)
@@ -93,7 +93,7 @@
final PCIDeviceConfig cfg = device.getConfig();
final PCIBaseAddress baseAddr = getBaseAddress(cfg);
try {
- this.rm = (ResourceManager) InitialNaming.lookup(ResourceManager.NAME);
+ this.rm = InitialNaming.lookup(ResourceManager.NAME);
final int ioBase = baseAddr.getIOBase();
final int ioSize = baseAddr.getSize();
log.info("Found UHCI at 0x" + NumberUtils.hex(ioBase));
Modified: trunk/core/src/driver/org/jnode/driver/chipset/i440BX/i82371AB_ACPI_SMBusControler.java
===================================================================
--- trunk/core/src/driver/org/jnode/driver/chipset/i440BX/i82371AB_ACPI_SMBusControler.java 2008-09-26 17:18:55 UTC (rev 4582)
+++ trunk/core/src/driver/org/jnode/driver/chipset/i440BX/i82371AB_ACPI_SMBusControler.java 2008-09-27 07:30:38 UTC (rev 4583)
@@ -116,7 +116,7 @@
device.readConfigByte(0xd2);
try {
- final ResourceManager rm = (ResourceManager) InitialNaming.lookup(ResourceManager.NAME);
+ final ResourceManager rm = InitialNaming.lookup(ResourceManager.NAME);
try {
ioRes = claimPorts(rm, device, hostStatusIORegister, 14);
} catch (ResourceNotFreeException ex1) {
Modified: trunk/core/src/driver/org/jnode/driver/serial/SerialPortDriver.java
===================================================================
--- trunk/core/src/driver/org/jnode/driver/serial/SerialPortDriver.java 2008-09-26 17:18:55 UTC (rev 4582)
+++ trunk/core/src/driver/org/jnode/driver/serial/SerialPortDriver.java 2008-09-27 07:30:38 UTC (rev 4583)
@@ -59,8 +59,7 @@
protected void startDevice() throws DriverException {
try {
- final ResourceManager rm = (ResourceManager) InitialNaming
- .lookup(ResourceManager.NAME);
+ final ResourceManager rm = InitialNaming.lookup(ResourceManager.NAME);
port = claimPorts(rm, getDevice(), basePort, 8);
configure(BAUD9600);
getDevice().registerAPI(SerialPortAPI.class, this);
Modified: trunk/core/src/driver/org/jnode/driver/system/acpi/AcpiDriver.java
===================================================================
--- trunk/core/src/driver/org/jnode/driver/system/acpi/AcpiDriver.java 2008-09-26 17:18:55 UTC (rev 4582)
+++ trunk/core/src/driver/org/jnode/driver/system/acpi/AcpiDriver.java 2008-09-27 07:30:38 UTC (rev 4583)
@@ -92,9 +92,9 @@
final AcpiDevice dev = (AcpiDevice) getDevice();
try {
final ResourceManager rm;
- rm = (ResourceManager) InitialNaming.lookup(ResourceManager.NAME);
+ rm = InitialNaming.lookup(ResourceManager.NAME);
mmapAcpiRegion();
- AcpiRSDPInfo acpiInfo = ((AcpiDevice) dev).getRsdpInfo();
+ AcpiRSDPInfo acpiInfo = dev.getRsdpInfo();
loadRootTable(rm, acpiInfo);
} catch (NameNotFoundException ex) {
throw new DriverException("Could not find ResourceManager", ex);
Modified: trunk/core/src/driver/org/jnode/driver/system/cmos/def/CMOS.java
===================================================================
--- trunk/core/src/driver/org/jnode/driver/system/cmos/def/CMOS.java 2008-09-26 17:18:55 UTC (rev 4582)
+++ trunk/core/src/driver/org/jnode/driver/system/cmos/def/CMOS.java 2008-09-27 07:30:38 UTC (rev 4583)
@@ -48,7 +48,7 @@
public CMOS(ResourceOwner owner)
throws ResourceNotFreeException {
try {
- final ResourceManager rm = (ResourceManager) InitialNaming.lookup(ResourceManager.NAME);
+ final ResourceManager rm = InitialNaming.lookup(ResourceManager.NAME);
this.cmosIO = rm.claimIOResource(owner, CMOS_FIRST_PORT, CMOS_LAST_PORT - CMOS_FIRST_PORT + 1);
} catch (NameNotFoundException ex) {
throw new ResourceNotFreeException("Cannot find ResourceManager", ex);
Modified: trunk/core/src/driver/org/jnode/driver/system/firmware/bios/BiosDriver.java
===================================================================
--- trunk/core/src/driver/org/jnode/driver/system/firmware/bios/BiosDriver.java 2008-09-26 17:18:55 UTC (rev 4582)
+++ trunk/core/src/driver/org/jnode/driver/system/firmware/bios/BiosDriver.java 2008-09-27 07:30:38 UTC (rev 4583)
@@ -69,7 +69,7 @@
// Find the ACPI info
try {
final ResourceManager rm;
- rm = (ResourceManager) InitialNaming.lookup(ResourceManager.NAME);
+ rm = InitialNaming.lookup(ResourceManager.NAME);
info = findAcpiRSDTPTR(rm);
} catch (NameNotFoundException ex) {
throw new DriverException("Cannot find the resource manager");
Modified: trunk/core/src/driver/org/jnode/driver/textscreen/x86/PcTextScreen.java
===================================================================
--- trunk/core/src/driver/org/jnode/driver/textscreen/x86/PcTextScreen.java 2008-09-26 17:18:55 UTC (rev 4582)
+++ trunk/core/src/driver/org/jnode/driver/textscreen/x86/PcTextScreen.java 2008-09-27 07:30:38 UTC (rev 4583)
@@ -57,8 +57,7 @@
super(80, 25);
Address ptr = Address.fromIntZeroExtend(0xb8000);
try {
- final ResourceManager rm = (ResourceManager) InitialNaming
- .lookup(ResourceManager.NAME);
+ final ResourceManager rm = InitialNaming.lookup(ResourceManager.NAME);
final ResourceOwner owner = new SimpleResourceOwner("Screen");
memory = rm.claimMemoryResource(owner, ptr, getWidth()
* getHeight() * 2, ResourceManager.MEMMODE_NORMAL);
Modified: trunk/core/src/mmtk-vm/org/jnode/vm/memmgr/mmtk/BaseMmtkHeapManager.java
===================================================================
--- trunk/core/src/mmtk-vm/org/jnode/vm/memmgr/mmtk/BaseMmtkHeapManager.java 2008-09-26 17:18:55 UTC (rev 4582)
+++ trunk/core/src/mmtk-vm/org/jnode/vm/memmgr/mmtk/BaseMmtkHeapManager.java 2008-09-27 07:30:38 UTC (rev 4583)
@@ -264,11 +264,9 @@
// Claim the available heap region as resource.
try {
- final ResourceManager rm = InitialNaming
- .lookup(ResourceManager.NAME);
+ final ResourceManager rm = InitialNaming.lookup(ResourceManager.NAME);
final Address start = Memory.AVAILABLE_START();
- final Extent size = Memory.AVAILABLE_END().toWord().sub(
- start.toWord()).toExtent();
+ final Extent size = Memory.AVAILABLE_END().toWord().sub(start.toWord()).toExtent();
heapResource = rm.claimMemoryResource(ResourceOwner.SYSTEM, start,
size, ResourceManager.MEMMODE_NORMAL);
} catch (NameNotFoundException ex) {
Modified: trunk/gui/src/awt/org/jnode/awt/util/BitmapGraphics.java
===================================================================
--- trunk/gui/src/awt/org/jnode/awt/util/BitmapGraphics.java 2008-09-26 17:18:55 UTC (rev 4582)
+++ trunk/gui/src/awt/org/jnode/awt/util/BitmapGraphics.java 2008-09-27 07:30:38 UTC (rev 4583)
@@ -238,7 +238,7 @@
int width, int height, int bytesPerLine, int transparency) {
final ResourceManager rm;
try {
- rm = (ResourceManager) InitialNaming.lookup(ResourceManager.NAME);
+ rm = InitialNaming.lookup(ResourceManager.NAME);
} catch (NamingException ex) {
throw new RuntimeException("Cannot find ResourceManager", ex);
}
Modified: trunk/gui/src/driver/org/jnode/driver/ps2/PS2Bus.java
===================================================================
--- trunk/gui/src/driver/org/jnode/driver/ps2/PS2Bus.java 2008-09-26 17:18:55 UTC (rev 4582)
+++ trunk/gui/src/driver/org/jnode/driver/ps2/PS2Bus.java 2008-09-27 07:30:38 UTC (rev 4583)
@@ -72,7 +72,7 @@
try {
final ResourceManager rm;
try {
- rm = (ResourceManager) InitialNaming.lookup(ResourceManager.NAME);
+ rm = InitialNaming.lookup(ResourceManager.NAME);
} catch (NameNotFoundException ex) {
throw new DriverException("Cannot find ResourceManager: ", ex);
}
Modified: trunk/gui/src/driver/org/jnode/driver/sound/speaker/SpeakerUtils.java
===================================================================
--- trunk/gui/src/driver/org/jnode/driver/sound/speaker/SpeakerUtils.java 2008-09-26 17:18:55 UTC (rev 4582)
+++ trunk/gui/src/driver/org/jnode/driver/sound/speaker/SpeakerUtils.java 2008-09-27 07:30:38 UTC (rev 4583)
@@ -61,9 +61,9 @@
public static void beep() {
if (stdBeep == null) {
try {
- DeviceManager dm = (DeviceManager) InitialNaming.lookup(DeviceManager.NAME);
+ DeviceManager dm = InitialNaming.lookup(DeviceManager.NAME);
Device dev = dm.getDevice("speaker0");
- SpeakerAPI s = (SpeakerAPI) dev.getAPI(SpeakerAPI.class);
+ SpeakerAPI s = dev.getAPI(SpeakerAPI.class);
s.beep();
} catch (ApiNotFoundException anfex) {
log.error("Unable to beep: ", anfex);
@@ -79,9 +79,9 @@
/** Plays a series of notes through the default speaker * */
public static void play(Note[] n) {
try {
- DeviceManager dm = (DeviceManager) InitialNaming.lookup(DeviceManager.NAME);
+ DeviceManager dm = InitialNaming.lookup(DeviceManager.NAME);
Device dev = dm.getDevice("speaker0");
- SpeakerAPI s = (SpeakerAPI) dev.getAPI(SpeakerAPI.class);
+ SpeakerAPI s = dev.getAPI(SpeakerAPI.class);
s.playNote(n);
} catch (ApiNotFoundException anfex) {
log.error("Unable to beep: ", anfex);
Modified: trunk/gui/src/driver/org/jnode/driver/sound/speaker/pc/PCSpeakerDriver.java
===================================================================
--- trunk/gui/src/driver/org/jnode/driver/sound/speaker/pc/PCSpeakerDriver.java 2008-09-26 17:18:55 UTC (rev 4582)
+++ trunk/gui/src/driver/org/jnode/driver/sound/speaker/pc/PCSpeakerDriver.java 2008-09-27 07:30:38 UTC (rev 4583)
@@ -72,7 +72,7 @@
public void startDevice() throws DriverException {
try {
final Device dev = getDevice();
- final ResourceManager rm = (ResourceManager) InitialNaming.lookup(ResourceManager.NAME);
+ final ResourceManager rm = InitialNaming.lookup(ResourceManager.NAME);
speakIO = claimPorts(rm, dev, SPEAKER_PORT, 1);
pitIO = claimPorts(rm, dev, CHANNEL2_PORT, 2);
getDevice().registerAPI(SpeakerAPI.class, this);
Modified: trunk/gui/src/driver/org/jnode/driver/video/AbstractFrameBufferDriver.java
===================================================================
--- trunk/gui/src/driver/org/jnode/driver/video/AbstractFrameBufferDriver.java 2008-09-26 17:18:55 UTC (rev 4582)
+++ trunk/gui/src/driver/org/jnode/driver/video/AbstractFrameBufferDriver.java 2008-09-27 07:30:38 UTC (rev 4583)
@@ -52,7 +52,7 @@
protected void startDevice() throws DriverException {
final Device device = getDevice();
try {
- final DeviceManager dm = (DeviceManager) InitialNaming.lookup(DeviceManager.NAME);
+ final DeviceManager dm = InitialNaming.lookup(DeviceManager.NAME);
dm.rename(device, getDevicePrefix() + "-" + device.getId(), false);
} catch (DeviceAlreadyRegisteredException ex) {
log.error("Cannot rename device", ex);
Modified: trunk/gui/src/driver/org/jnode/driver/video/ati/radeon/RadeonCore.java
===================================================================
--- trunk/gui/src/driver/org/jnode/driver/video/ati/radeon/RadeonCore.java 2008-09-26 17:18:55 UTC (rev 4582)
+++ trunk/gui/src/driver/org/jnode/driver/video/ati/radeon/RadeonCore.java 2008-09-27 07:30:38 UTC (rev 4583)
@@ -100,7 +100,7 @@
final PCIRomAddress romAddr = pciCfg.getRomAddress();
log.info("Found ATI " + model + ", chipset 0x" + NumberUtils.hex(pciCfg.getRevision()));
try {
- final ResourceManager rm = (ResourceManager) InitialNaming.lookup(ResourceManager.NAME);
+ final ResourceManager rm = InitialNaming.lookup(ResourceManager.NAME);
final int ioBase = (int) ioAddr.getMemoryBase();
final int ioSize = ioAddr.getSize();
final int fbBase = (int) fbAddr.getMemoryBase() /* & 0xFF800000 */;
Modified: trunk/gui/src/driver/org/jnode/driver/video/nvidia/NVidiaCore.java
===================================================================
--- trunk/gui/src/driver/org/jnode/driver/video/nvidia/NVidiaCore.java 2008-09-26 17:18:55 UTC (rev 4582)
+++ trunk/gui/src/driver/org/jnode/driver/video/nvidia/NVidiaCore.java 2008-09-27 07:30:38 UTC (rev 4583)
@@ -91,7 +91,7 @@
final PCIBaseAddress fbAddr = pciCfg.getBaseAddresses()[1];
log.info("Found NVidia " + model + ", chipset 0x" + NumberUtils.hex(pciCfg.getRevision()));
try {
- final ResourceManager rm = (ResourceManager) InitialNaming.lookup(ResourceManager.NAME);
+ final ResourceManager rm = InitialNaming.lookup(ResourceManager.NAME);
final int ioBase = (int) ioAddr.getMemoryBase() & 0xFF800000;
final int ioSize = ioAddr.getSize();
final int fbBase = (int) fbAddr.getMemoryBase() & 0xFF800000;
Modified: trunk/gui/src/driver/org/jnode/driver/video/vesa/VESACore.java
===================================================================
--- trunk/gui/src/driver/org/jnode/driver/video/vesa/VESACore.java 2008-09-26 17:18:55 UTC (rev 4582)
+++ trunk/gui/src/driver/org/jnode/driver/video/vesa/VESACore.java 2008-09-27 07:30:38 UTC (rev 4583)
@@ -93,7 +93,7 @@
Address address = Address.fromIntZeroExtend(modeInfoBlock.getRamBase());
try {
- final ResourceManager rm = (ResourceManager) InitialNaming.lookup(ResourceManager.NAME);
+ final ResourceManager rm = InitialNaming.lookup(ResourceManager.NAME);
this.capabilities = vbeInfoBlock.getCapabilities();
this.maxWidth = modeInfoBlock.getXResolution();
this.maxHeight = modeInfoBlock.getYResolution();
Modified: trunk/gui/src/driver/org/jnode/driver/video/vga/StandardVGAIO.java
===================================================================
--- trunk/gui/src/driver/org/jnode/driver/video/vga/StandardVGAIO.java 2008-09-26 17:18:55 UTC (rev 4582)
+++ trunk/gui/src/driver/org/jnode/driver/video/vga/StandardVGAIO.java 2008-09-27 07:30:38 UTC (rev 4583)
@@ -54,7 +54,7 @@
public StandardVGAIO(ResourceOwner owner, MemoryResource mem) throws ResourceNotFreeException,
DriverException {
try {
- ResourceManager rm = (ResourceManager) InitialNaming.lookup(ResourceManager.NAME);
+ ResourceManager rm = InitialNaming.lookup(ResourceManager.NAME);
vgaIO = claimPorts(rm, owner, VGA_FIRST_PORT, VGA_LAST_PORT - VGA_FIRST_PORT + 1);
this.mem = mem;
current_mode = getColorMode();
Modified: trunk/gui/src/driver/org/jnode/driver/video/vmware/VMWareCore.java
===================================================================
--- trunk/gui/src/driver/org/jnode/driver/video/vmware/VMWareCore.java 2008-09-26 17:18:55 UTC (rev 4582)
+++ trunk/gui/src/driver/org/jnode/driver/video/vmware/VMWareCore.java 2008-09-27 07:30:38 UTC (rev 4583)
@@ -118,7 +118,7 @@
" and 0x" + NumberUtils.hex(valuePort));
try {
- final ResourceManager rm = (ResourceManager) InitialNaming.lookup(ResourceManager.NAME);
+ final ResourceManager rm = InitialNaming.lookup(ResourceManager.NAME);
ports = claimPorts(rm, device, basePort, SVGA_NUM_PORTS * 4);
final int id = getVMWareID();
if (id == SVGA_ID_0 || id == SVGA_ID_INVALID) {
Modified: trunk/net/src/driver/org/jnode/driver/net/_3c90x/_3c90xCore.java
===================================================================
--- trunk/net/src/driver/org/jnode/driver/net/_3c90x/_3c90xCore.java 2008-09-26 17:18:55 UTC (rev 4582)
+++ trunk/net/src/driver/org/jnode/driver/net/_3c90x/_3c90xCore.java 2008-09-27 07:30:38 UTC (rev 4583)
@@ -114,7 +114,7 @@
final int iolength = getIOLength(device, flags);
final ResourceManager rm;
try {
- rm = (ResourceManager) InitialNaming.lookup(ResourceManager.NAME);
+ rm = InitialNaming.lookup(ResourceManager.NAME);
} catch (NameNotFoundException ex) {
throw new DriverException("Cannot find ResourceManager");
}
Modified: trunk/net/src/driver/org/jnode/driver/net/bcm570x/BCM570xCore.java
===================================================================
--- trunk/net/src/driver/org/jnode/driver/net/bcm570x/BCM570xCore.java 2008-09-26 17:18:55 UTC (rev 4582)
+++ trunk/net/src/driver/org/jnode/driver/net/bcm570x/BCM570xCore.java 2008-09-27 07:30:38 UTC (rev 4583)
@@ -116,7 +116,7 @@
final ResourceManager rm;
try {
- rm = (ResourceManager) InitialNaming.lookup(ResourceManager.NAME);
+ rm = InitialNaming.lookup(ResourceManager.NAME);
} catch (NameNotFoundException ex) {
throw new DriverException("Cannot find ResourceManager");
}
Modified: trunk/net/src/driver/org/jnode/driver/net/eepro100/EEPRO100Core.java
===================================================================
--- trunk/net/src/driver/org/jnode/driver/net/eepro100/EEPRO100Core.java 2008-09-26 17:18:55 UTC (rev 4582)
+++ trunk/net/src/driver/org/jnode/driver/net/eepro100/EEPRO100Core.java 2008-09-27 07:30:38 UTC (rev 4583)
@@ -134,7 +134,7 @@
log.debug("Found EEPRO100 IOBase: 0x" + NumberUtils.hex(iobase) + ", length: " + iolength);
try {
- rm = (ResourceManager) InitialNaming.lookup(ResourceManager.NAME);
+ rm = InitialNaming.lookup(ResourceManager.NAME);
} catch (NameNotFoundException ex) {
throw new DriverException("Cannot find ResourceManager");
}
Modified: trunk/net/src/driver/org/jnode/driver/net/lance/LanceCore.java
===================================================================
--- trunk/net/src/driver/org/jnode/driver/net/lance/LanceCore.java 2008-09-26 17:18:55 UTC (rev 4582)
+++ trunk/net/src/driver/org/jnode/driver/net/lance/LanceCore.java 2008-09-27 07:30:38 UTC (rev 4583)
@@ -135,7 +135,7 @@
log.debug("Found Lance IOBase: 0x" + NumberUtils.hex(iobase) + ", length: " + iolength);
ResourceManager rm;
try {
- rm = (ResourceManager) InitialNaming.lookup(ResourceManager.NAME);
+ rm = InitialNaming.lookup(ResourceManager.NAME);
} catch (NameNotFoundException ex) {
throw new DriverException("Cannot find ResourceManager");
}
Modified: trunk/net/src/driver/org/jnode/driver/net/ne2000/Ne2000Core.java
===================================================================
--- trunk/net/src/driver/org/jnode/driver/net/ne2000/Ne2000Core.java 2008-09-26 17:18:55 UTC (rev 4582)
+++ trunk/net/src/driver/org/jnode/driver/net/ne2000/Ne2000Core.java 2008-09-27 07:30:38 UTC (rev 4583)
@@ -127,7 +127,7 @@
final int iolength = getIOLength(device, flags);
final ResourceManager rm;
try {
- rm = (ResourceManager) InitialNaming.lookup(ResourceManager.NAME);
+ rm = InitialNaming.lookup(ResourceManager.NAME);
} catch (NameNotFoundException ex) {
throw new DriverException("Cannot find ResourceManager");
}
Modified: trunk/net/src/driver/org/jnode/driver/net/prism2/Prism2Core.java
===================================================================
--- trunk/net/src/driver/org/jnode/driver/net/prism2/Prism2Core.java 2008-09-26 17:18:55 UTC (rev 4582)
+++ trunk/net/src/driver/org/jnode/driver/net/prism2/Prism2Core.java 2008-09-27 07:30:38 UTC (rev 4583)
@@ -150,7 +150,7 @@
final ResourceManager rm;
try {
- rm = (ResourceManager) InitialNaming.lookup(ResourceManager.NAME);
+ rm = InitialNaming.lookup(ResourceManager.NAME);
} catch (NameNotFoundException ex) {
throw new DriverException("Cannot find ResourceManager");
}
Modified: trunk/net/src/driver/org/jnode/driver/net/rtl8139/RTL8139Core.java
===================================================================
--- trunk/net/src/driver/org/jnode/driver/net/rtl8139/RTL8139Core.java 2008-09-26 17:18:55 UTC (rev 4582)
+++ trunk/net/src/driver/org/jnode/driver/net/rtl8139/RTL8139Core.java 2008-09-27 07:30:38 UTC (rev 4583)
@@ -121,7 +121,7 @@
final ResourceManager rm;
try {
- rm = (ResourceManager) InitialNaming.lookup(ResourceManager.NAME);
+ rm = InitialNaming.lookup(ResourceManager.NAME);
} catch (NameNotFoundException ex) {
throw new DriverException("Cannot find ResourceManager");
}
Modified: trunk/net/src/net/org/jnode/net/command/DhcpCommand.java
===================================================================
--- trunk/net/src/net/org/jnode/net/command/DhcpCommand.java 2008-09-26 17:18:55 UTC (rev 4582)
+++ trunk/net/src/net/org/jnode/net/command/DhcpCommand.java 2008-09-27 07:30:38 UTC (rev 4583)
@@ -71,8 +71,8 @@
// network layer is left in a state that will require a reboot to unjam it (AFAIK).
//
// So, check that loopback is correctly bound ...
- Device loopback = ((DeviceManager) InitialNaming.lookup(DeviceManager.NAME)).getDevice("loopback");
- NetDeviceAPI api = (NetDeviceAPI) loopback.getAPI(NetDeviceAPI.class);
+ Device loopback = (InitialNaming.lookup(DeviceManager.NAME)).getDevice("loopback");
+ NetDeviceAPI api = loopback.getAPI(NetDeviceAPI.class);
ProtocolAddressInfo info = api.getProtocolAddressInfo(EthernetConstants.ETH_P_IP);
if (info == null || !info.contains(InetAddress.getByAddress(new byte[]{127, 0, 0, 1}))) {
err.println("The loopback network device is not bound to IP address 127.0.0.1");
@@ -82,8 +82,7 @@
// Now it should be safe to do the DHCP configuration.
out.println("Configuring network device " + dev.getId() + "...");
- final IPv4ConfigurationService cfg =
- (IPv4ConfigurationService) InitialNaming.lookup(IPv4ConfigurationService.NAME);
+ final IPv4ConfigurationService cfg = InitialNaming.lookup(IPv4ConfigurationService.NAME);
cfg.configureDeviceDhcp(dev, true);
}
}
Modified: trunk/net/src/net/org/jnode/net/command/RouteCommand.java
===================================================================
--- trunk/net/src/net/org/jnode/net/command/RouteCommand.java 2008-09-26 17:18:55 UTC (rev 4582)
+++ trunk/net/src/net/org/jnode/net/command/RouteCommand.java 2008-09-27 07:30:38 UTC (rev 4583)
@@ -79,8 +79,7 @@
final IPv4Address target = ARG_TARGET.getValue();
final IPv4Address gateway = ARG_GATEWAY.getValue();
final Device device = ARG_DEVICE.getValue();
- final IPv4ConfigurationService cfg =
- (IPv4ConfigurationService) InitialNaming.lookup(IPv4ConfigurationService.NAME);
+ final IPv4ConfigurationService cfg = InitialNaming.lookup(IPv4ConfigurationService.NAME);
if (FLAG_ADD.isSet()) {
cfg.addRoute(target, gateway, device, true);
Modified: trunk/net/src/net/org/jnode/net/ipv4/config/impl/Route.java
===================================================================
--- trunk/net/src/net/org/jnode/net/ipv4/config/impl/Route.java 2008-09-26 17:18:55 UTC (rev 4582)
+++ trunk/net/src/net/org/jnode/net/ipv4/config/impl/Route.java 2008-09-27 07:30:38 UTC (rev 4583)
@@ -58,7 +58,7 @@
// Find the device ourselves
final DeviceManager dm;
try {
- dm = (DeviceManager) InitialNaming.lookup(DeviceManager.NAME);
+ dm = InitialNaming.lookup(DeviceManager.NAME);
} catch (NameNotFoundException ex) {
throw new NetworkException("Cannot find DeviceManager", ex);
}
Modified: trunk/net/src/test/org/jnode/test/net/ARPTest.java
===================================================================
--- trunk/net/src/test/org/jnode/test/net/ARPTest.java 2008-09-26 17:18:55 UTC (rev 4582)
+++ trunk/net/src/test/org/jnode/test/net/ARPTest.java 2008-09-27 07:30:38 UTC (rev 4583)
@@ -44,7 +44,7 @@
public static void main(String[] args) throws Exception {
final ARPNetworkLayer arp =
(ARPNetworkLayer) NetUtils.getNLM().getNetworkLayer(EthernetConstants.ETH_P_ARP);
- final DeviceManager dm = (DeviceManager) InitialNaming.lookup(DeviceManager.NAME);
+ final DeviceManager dm = InitialNaming.lookup(DeviceManager.NAME);
final IPv4Address addr = new IPv4Address(args[0]);
final IPv4Address myAddr = new IPv4Address(args[1]);
final Device dev = dm.getDevice(args[2]);
Modified: trunk/net/src/test/org/jnode/test/net/NetTest.java
===================================================================
--- trunk/net/src/test/org/jnode/test/net/NetTest.java 2008-09-26 17:18:55 UTC (rev 4582)
+++ trunk/net/src/test/org/jnode/test/net/NetTest.java 2008-09-27 07:30:38 UTC (rev 4583)
@@ -38,9 +38,9 @@
String devId = (args.length > 0) ? args[0] : "eth0";
try {
- final DeviceManager dm = (DeviceManager) InitialNaming.lookup(DeviceManager.NAME);
+ final DeviceManager dm = InitialNaming.lookup(DeviceManager.NAME);
final Device dev = dm.getDevice(devId);
- final NetDeviceAPI api = (NetDeviceAPI) dev.getAPI(NetDeviceAPI.class);
+ final NetDeviceAPI api = dev.getAPI(NetDeviceAPI.class);
final EthernetAddress mac = (EthernetAddress) api.getAddress();
SocketBuffer skbuf = new SocketBuffer();
Modified: trunk/shell/src/shell/org/jnode/shell/CommandShell.java
===================================================================
--- trunk/shell/src/shell/org/jnode/shell/CommandShell.java 2008-09-26 17:18:55 UTC (rev 4582)
+++ trunk/shell/src/shell/org/jnode/shell/CommandShell.java 2008-09-27 07:30:38 UTC (rev 4583)
@@ -197,8 +197,7 @@
* @see java.lang.Object
*/
public CommandShell() throws NameNotFoundException, ShellException {
- this((TextConsole) ((ConsoleManager) InitialNaming
- .lookup(ConsoleManager.NAME)).getFocus());
+ this((TextConsole) (InitialNaming.lookup(ConsoleManager.NAME)).getFocus());
}
public CommandShell(TextConsole cons) throws ShellException {
Modified: trunk/shell/src/shell/org/jnode/shell/bjorne/BjorneShellPlugin.java
===================================================================
--- trunk/shell/src/shell/org/jnode/shell/bjorne/BjorneShellPlugin.java 2008-09-26 17:18:55 UTC (rev 4582)
+++ trunk/shell/src/shell/org/jnode/shell/bjorne/BjorneShellPlugin.java 2008-09-27 07:30:38 UTC (rev 4583)
@@ -61,8 +61,7 @@
*/
protected void startPlugin() throws PluginException {
try {
- ShellManager mgr = (ShellManager) InitialNaming
- .lookup(ShellManager.NAME);
+ ShellManager mgr = InitialNaming.lookup(ShellManager.NAME);
mgr.registerInterpreterFactory(FACTORY);
} catch (NamingException ex) {
throw new PluginException("Cannot find the shell manager", ex);
@@ -74,8 +73,7 @@
*/
protected void stopPlugin() throws PluginException {
try {
- ShellManager mgr = (ShellManager) InitialNaming
- .lookup(ShellManager.NAME);
+ ShellManager mgr = InitialNaming.lookup(ShellManager.NAME);
mgr.unregisterInterpreterFactory(FACTORY);
} catch (NamingException ex) {
throw new PluginException("Cannot find the shell manager", ex);
Modified: trunk/shell/src/shell/org/jnode/shell/command/plugin/PluginCommand.java
===================================================================
--- trunk/shell/src/shell/org/jnode/shell/command/plugin/PluginCommand.java 2008-09-26 17:18:55 UTC (rev 4582)
+++ trunk/shell/src/shell/org/jnode/shell/command/plugin/PluginCommand.java 2008-09-27 07:30:38 UTC (rev 4583)
@@ -108,7 +108,7 @@
private void doRun()
throws NameNotFoundException, SyntaxMultiplicityException, PluginException, MalformedURLException {
- mgr = (PluginManager) InitialNaming.lookup(PluginManager.NAME);
+ mgr = InitialNaming.lookup(PluginManager.NAME);
final String version = ARG_VERSION.isSet() ? ARG_VERSION.getValue() : Vm.getVm().getVersion();
final String pluginId = ARG_PLUGIN_ID.getValue();
if (ARG_LOADER_URL.isSet()) {
Modified: trunk/shell/src/shell/org/jnode/shell/help/argument/DeviceArgument.java
===================================================================
--- trunk/shell/src/shell/org/jnode/shell/help/argument/DeviceArgument.java 2008-09-26 17:18:55 UTC (rev 4582)
+++ trunk/shell/src/shell/org/jnode/shell/help/argument/DeviceArgument.java 2008-09-27 07:30:38 UTC (rev 4583)
@@ -62,7 +62,7 @@
public Device getDevice(ParsedArguments args) throws SyntaxErrorException {
String value = getValue(args);
try {
- return ((DeviceManager) InitialNaming.lookup(DeviceManager.NAME)).getDevice(value);
+ return (InitialNaming.lookup(DeviceManager.NAME)).getDevice(value);
} catch (NameNotFoundException ex) {
throw new SyntaxErrorException("DeviceManager not found. Check your system setup");
} catch (DeviceNotFoundException ex) {
Modified: trunk/shell/src/shell/org/jnode/shell/help/argument/PluginArgument.java
===================================================================
--- trunk/shell/src/shell/org/jnode/shell/help/argument/PluginArgument.java 2008-09-26 17:18:55 UTC (rev 4582)
+++ trunk/shell/src/shell/org/jnode/shell/help/argument/PluginArgument.java 2008-09-27 07:30:38 UTC (rev 4583)
@@ -55,7 +55,7 @@
public void complete(CompletionInfo completion, String partial) {
try {
// get the plugin manager
- final PluginManager piMgr = (PluginManager) InitialNaming.lookup(PluginManager.NAME);
+ final PluginManager piMgr = InitialNaming.lookup(PluginManager.NAME);
// collect matching plugin id's
for (PluginDescriptor descr : piMgr.getRegistry()) {
Modified: trunk/shell/src/shell/org/jnode/shell/syntax/PluginArgument.java
===================================================================
--- trunk/shell/src/shell/org/jnode/shell/syntax/PluginArgument.java 2008-09-26 17:18:55 UTC (rev 4582)
+++ trunk/shell/src/shell/org/jnode/shell/syntax/PluginArgument.java 2008-09-27 07:30:38 UTC (rev 4583)
@@ -44,8 +44,7 @@
public void complete(CompletionInfo completion, String partial) {
try {
// get the plugin manager
- final PluginManager piMgr = (PluginManager) InitialNaming
- .lookup(PluginManager.NAME);
+ final PluginManager piMgr = InitialNaming.lookup(PluginManager.NAME);
// collect matching plugin id's
for (PluginDescriptor descr : piMgr.getRegistry()) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|