|
From: <fd...@us...> - 2010-05-12 10:31:57
|
Revision: 5749
http://jnode.svn.sourceforge.net/jnode/?rev=5749&view=rev
Author: fduminy
Date: 2010-05-12 10:31:48 +0000 (Wed, 12 May 2010)
Log Message:
-----------
removed dependency cycle between org.jnode.vm <-> org.jnode.util by :
- moving Statistic, Statistics, BootableHashMap, BootableArrayList, SynchronizedCounter, CounterGroup, Counter classes from org.jnode.util to org.jnode.vm.objects
- moving method loop(ms) from org.jnode.util.TimeUtils to org.jnode.vm.VmSystem
Signed-off-by: Fabien DUMINY <fab...@we...>
Modified Paths:
--------------
trunk/builder/src/builder/org/jnode/build/AbstractBootImageBuilder.java
trunk/cli/src/commands/org/jnode/command/net/NetstatCommand.java
trunk/core/descriptors/org.jnode.vm.core.xml
trunk/core/src/core/org/jnode/assembler/x86/X86Register.java
trunk/core/src/core/org/jnode/plugin/model/PluginDescriptorModel.java
trunk/core/src/core/org/jnode/plugin/model/PluginJar.java
trunk/core/src/core/org/jnode/plugin/model/PluginRegistryModel.java
trunk/core/src/core/org/jnode/util/TimeUtils.java
trunk/core/src/core/org/jnode/vm/InternString.java
trunk/core/src/core/org/jnode/vm/Vm.java
trunk/core/src/core/org/jnode/vm/VmSystem.java
trunk/core/src/core/org/jnode/vm/VmSystemClassLoader.java
trunk/core/src/core/org/jnode/vm/bytecode/BasicBlock.java
trunk/core/src/core/org/jnode/vm/classmgr/SelectorMap.java
trunk/core/src/core/org/jnode/vm/compiler/BaseMagicHelper.java
trunk/core/src/core/org/jnode/vm/compiler/OptimizingBytecodeVisitor.java
trunk/core/src/core/org/jnode/vm/compiler/ir/IRBasicBlock.java
trunk/core/src/core/org/jnode/vm/compiler/ir/IRControlFlowGraph.java
trunk/core/src/core/org/jnode/vm/compiler/ir/IRTest.java
trunk/core/src/core/org/jnode/vm/compiler/ir/LinearScanAllocator.java
trunk/core/src/core/org/jnode/vm/compiler/ir/PhiOperand.java
trunk/core/src/core/org/jnode/vm/compiler/ir/SSAStack.java
trunk/core/src/core/org/jnode/vm/isolate/VmIsolate.java
trunk/core/src/core/org/jnode/vm/x86/LocalAPIC.java
trunk/core/src/core/org/jnode/vm/x86/VmX86Processor.java
trunk/core/src/core/org/jnode/vm/x86/compiler/l1a/X86BytecodeVisitor.java
trunk/core/src/core/org/jnode/vm/x86/compiler/l1b/X86BytecodeVisitor.java
trunk/core/src/core/org/jnode/vm/x86/compiler/l2/X86RegisterPool.java
trunk/core/src/openjdk/vm/java/lang/NativeString.java
trunk/core/src/test/org/jnode/test/IRTest.java
trunk/net/src/driver/org/jnode/driver/net/eepro100/EEPRO100Core.java
trunk/net/src/net/org/jnode/net/NetworkLayer.java
trunk/net/src/net/org/jnode/net/TransportLayer.java
trunk/net/src/net/org/jnode/net/arp/ARPNetworkLayer.java
trunk/net/src/net/org/jnode/net/arp/ARPStatistics.java
trunk/net/src/net/org/jnode/net/ipv4/icmp/ICMPProtocol.java
trunk/net/src/net/org/jnode/net/ipv4/icmp/ICMPStatistics.java
trunk/net/src/net/org/jnode/net/ipv4/layer/IPv4NetworkLayer.java
trunk/net/src/net/org/jnode/net/ipv4/layer/IPv4Statistics.java
trunk/net/src/net/org/jnode/net/ipv4/raw/RAWProtocol.java
trunk/net/src/net/org/jnode/net/ipv4/raw/RAWStatistics.java
trunk/net/src/net/org/jnode/net/ipv4/tcp/TCPProtocol.java
trunk/net/src/net/org/jnode/net/ipv4/tcp/TCPStatistics.java
trunk/net/src/net/org/jnode/net/ipv4/udp/UDPProtocol.java
trunk/net/src/net/org/jnode/net/ipv4/udp/UDPStatistics.java
Added Paths:
-----------
trunk/core/src/core/org/jnode/vm/objects/
trunk/core/src/core/org/jnode/vm/objects/BootableArrayList.java
trunk/core/src/core/org/jnode/vm/objects/BootableHashMap.java
trunk/core/src/core/org/jnode/vm/objects/Counter.java
trunk/core/src/core/org/jnode/vm/objects/CounterGroup.java
trunk/core/src/core/org/jnode/vm/objects/Statistic.java
trunk/core/src/core/org/jnode/vm/objects/Statistics.java
trunk/core/src/core/org/jnode/vm/objects/SynchronizedCounter.java
Removed Paths:
-------------
trunk/core/src/core/org/jnode/util/BootableArrayList.java
trunk/core/src/core/org/jnode/util/BootableHashMap.java
trunk/core/src/core/org/jnode/util/Counter.java
trunk/core/src/core/org/jnode/util/CounterGroup.java
trunk/core/src/core/org/jnode/util/Statistic.java
trunk/core/src/core/org/jnode/util/Statistics.java
trunk/core/src/core/org/jnode/util/SynchronizedCounter.java
Modified: trunk/builder/src/builder/org/jnode/build/AbstractBootImageBuilder.java
===================================================================
--- trunk/builder/src/builder/org/jnode/build/AbstractBootImageBuilder.java 2010-05-12 10:29:02 UTC (rev 5748)
+++ trunk/builder/src/builder/org/jnode/build/AbstractBootImageBuilder.java 2010-05-12 10:31:48 UTC (rev 5749)
@@ -54,7 +54,6 @@
import org.jnode.plugin.model.PluginDescriptorModel;
import org.jnode.plugin.model.PluginJar;
import org.jnode.plugin.model.PluginRegistryModel;
-import org.jnode.util.BootableHashMap;
import org.jnode.util.NumberUtils;
import org.jnode.vm.JvmType;
import org.jnode.vm.Unsafe;
@@ -81,6 +80,7 @@
import org.jnode.vm.compiler.NativeCodeCompiler;
import org.jnode.vm.memmgr.HeapHelper;
import org.jnode.vm.memmgr.VmHeapManager;
+import org.jnode.vm.objects.BootableHashMap;
import org.jnode.vm.scheduler.VmProcessor;
import org.vmmagic.unboxed.UnboxedObject;
@@ -1381,6 +1381,7 @@
addCompileHighOptLevel("org.jnode.vm.classmgr");
addCompileHighOptLevel("org.jnode.vm.compiler");
addCompileHighOptLevel("org.jnode.vm.isolate");
+ addCompileHighOptLevel("org.jnode.vm.objects");
addCompileHighOptLevel("org.jnode.vm.scheduler");
for (NativeCodeCompiler compiler : getArchitecture().getCompilers()) {
for (String packageName : compiler.getCompilerPackages()) {
Modified: trunk/cli/src/commands/org/jnode/command/net/NetstatCommand.java
===================================================================
--- trunk/cli/src/commands/org/jnode/command/net/NetstatCommand.java 2010-05-12 10:29:02 UTC (rev 5748)
+++ trunk/cli/src/commands/org/jnode/command/net/NetstatCommand.java 2010-05-12 10:31:48 UTC (rev 5749)
@@ -28,8 +28,8 @@
import org.jnode.net.TransportLayer;
import org.jnode.net.util.NetUtils;
import org.jnode.shell.AbstractCommand;
-import org.jnode.util.Statistic;
-import org.jnode.util.Statistics;
+import org.jnode.vm.objects.Statistic;
+import org.jnode.vm.objects.Statistics;
/**
* @author epr
Modified: trunk/core/descriptors/org.jnode.vm.core.xml
===================================================================
--- trunk/core/descriptors/org.jnode.vm.core.xml 2010-05-12 10:29:02 UTC (rev 5748)
+++ trunk/core/descriptors/org.jnode.vm.core.xml 2010-05-12 10:31:48 UTC (rev 5749)
@@ -25,6 +25,7 @@
<export name="org.jnode.vm.compiler.*"/>
<export name="org.jnode.vm.isolate.*"/>
<export name="org.jnode.vm.memmgr.*"/>
+ <export name="org.jnode.vm.objects.*"/>
<export name="org.jnode.vm.performance.*"/>
<export name="org.jnode.vm.scheduler.*"/>
</library>
Modified: trunk/core/src/core/org/jnode/assembler/x86/X86Register.java
===================================================================
--- trunk/core/src/core/org/jnode/assembler/x86/X86Register.java 2010-05-12 10:29:02 UTC (rev 5748)
+++ trunk/core/src/core/org/jnode/assembler/x86/X86Register.java 2010-05-12 10:31:48 UTC (rev 5749)
@@ -20,8 +20,8 @@
package org.jnode.assembler.x86;
-import org.jnode.util.BootableHashMap;
import org.jnode.vm.VmSystemObject;
+import org.jnode.vm.objects.BootableHashMap;
/**
* Registers of the x86 architecture.
Modified: trunk/core/src/core/org/jnode/plugin/model/PluginDescriptorModel.java
===================================================================
--- trunk/core/src/core/org/jnode/plugin/model/PluginDescriptorModel.java 2010-05-12 10:29:02 UTC (rev 5748)
+++ trunk/core/src/core/org/jnode/plugin/model/PluginDescriptorModel.java 2010-05-12 10:31:48 UTC (rev 5749)
@@ -41,10 +41,10 @@
import org.jnode.plugin.PluginReference;
import org.jnode.plugin.Runtime;
import org.jnode.system.BootLog;
-import org.jnode.util.BootableArrayList;
import org.jnode.vm.VmSystem;
import org.jnode.vm.classmgr.VmClassLoader;
import org.jnode.vm.isolate.VmIsolateLocal;
+import org.jnode.vm.objects.BootableArrayList;
/**
* Implementation of {@link org.jnode.plugin.PluginDescriptor}.
Modified: trunk/core/src/core/org/jnode/plugin/model/PluginJar.java
===================================================================
--- trunk/core/src/core/org/jnode/plugin/model/PluginJar.java 2010-05-12 10:29:02 UTC (rev 5748)
+++ trunk/core/src/core/org/jnode/plugin/model/PluginJar.java 2010-05-12 10:31:48 UTC (rev 5749)
@@ -33,13 +33,13 @@
import org.jnode.nanoxml.XMLElement;
import org.jnode.plugin.PluginDescriptor;
import org.jnode.plugin.PluginException;
-import org.jnode.util.BootableHashMap;
import org.jnode.util.ByteBufferInputStream;
import org.jnode.util.FileUtils;
import org.jnode.util.JarBuffer;
import org.jnode.vm.BootableObject;
import org.jnode.vm.ResourceLoader;
import org.jnode.vm.Vm;
+import org.jnode.vm.objects.BootableHashMap;
/**
* @author Ewout Prangsma (ep...@us...)
Modified: trunk/core/src/core/org/jnode/plugin/model/PluginRegistryModel.java
===================================================================
--- trunk/core/src/core/org/jnode/plugin/model/PluginRegistryModel.java 2010-05-12 10:29:02 UTC (rev 5748)
+++ trunk/core/src/core/org/jnode/plugin/model/PluginRegistryModel.java 2010-05-12 10:31:48 UTC (rev 5749)
@@ -43,9 +43,9 @@
import org.jnode.plugin.PluginReference;
import org.jnode.plugin.PluginRegistry;
import org.jnode.plugin.PluginSecurityConstants;
-import org.jnode.util.BootableHashMap;
import org.jnode.vm.VmSystemObject;
import org.jnode.vm.isolate.VmIsolateLocal;
+import org.jnode.vm.objects.BootableHashMap;
import org.xml.sax.EntityResolver;
import org.xml.sax.InputSource;
import org.xml.sax.SAXException;
Deleted: trunk/core/src/core/org/jnode/util/BootableArrayList.java
===================================================================
--- trunk/core/src/core/org/jnode/util/BootableArrayList.java 2010-05-12 10:29:02 UTC (rev 5748)
+++ trunk/core/src/core/org/jnode/util/BootableArrayList.java 2010-05-12 10:31:48 UTC (rev 5749)
@@ -1,358 +0,0 @@
-/*
- * $Id$
- *
- * Copyright (C) 2003-2010 JNode.org
- *
- * This library is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation; either version 2.1 of the License, or
- * (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
- * License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this library; If not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-package org.jnode.util;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.List;
-import java.util.ListIterator;
-import java.util.RandomAccess;
-
-import org.jnode.vm.VmSystemObject;
-
-/**
- * A BootableList is a List implementation that can be used in the
- * build process of JNode.
- * Using this class, instead of e.g. ArrayList, will avoid class incompatibilities
- * between the JNode java.util implementation and Sun's implementation.
- *
- * @author epr
- */
-public class BootableArrayList<T> extends VmSystemObject implements List<T>, RandomAccess {
-
- private ArrayList<T> listCache;
- private T[] array;
- private int hashCode;
- private transient boolean locked;
-
- /**
- * Constructs an empty list with an initial capacity of ten.
- */
- public BootableArrayList() {
- hashCode = super.hashCode();
- }
-
- /**
- * Constructs a list containing the elements of the specified collection,
- * in the order they are returned by the collection's iterator.
- *
- * @param c
- */
- public BootableArrayList(Collection<? extends T> c) {
- addAll(c);
- }
-
- /**
- * Constructs an empty list with an initial capacity of ten.
- *
- * @param initialCapacity
- */
- public BootableArrayList(int initialCapacity) {
- listCache = new ArrayList<T>(initialCapacity);
- hashCode = listCache.hashCode();
- }
-
- /**
- * Gets (an if needed reload) the arraylist.
- *
- * @return
- */
- private final ArrayList<T> getListCache() {
- if (locked) {
- throw new RuntimeException("Cannot change a locked BootableArrayList");
- }
- if (listCache == null) {
- listCache = new ArrayList<T>();
- if (array != null) {
- listCache.addAll(Arrays.asList(array));
- }
- array = null;
- }
- return listCache;
- }
-
- /**
- * @param index
- * @param o
- * @see java.util.AbstractList#add(int, java.lang.Object)
- */
- public void add(int index, T o) {
- getListCache().add(index, o);
- }
-
- /**
- * @param o
- * @return boolean
- * @see java.util.AbstractList#add(java.lang.Object)
- */
- public boolean add(T o) {
- return getListCache().add(o);
- }
-
- /**
- * @param c
- * @return boolean
- * @see java.util.AbstractCollection#addAll(java.util.Collection)
- */
- public boolean addAll(Collection<? extends T> c) {
- return getListCache().addAll(c);
- }
-
- /**
- * @param index
- * @param c
- * @return boolean
- * @see java.util.AbstractList#addAll(int, java.util.Collection)
- */
- public boolean addAll(int index, Collection<? extends T> c) {
- return getListCache().addAll(index, c);
- }
-
- /**
- * @see java.util.AbstractList#clear()
- */
- public void clear() {
- getListCache().clear();
- }
-
- /**
- * @param o
- * @return boolean
- * @see java.util.AbstractCollection#contains(java.lang.Object)
- */
- public boolean contains(Object o) {
- return getListCache().contains(o);
- }
-
- /**
- * @param c
- * @return boolean
- * @see java.util.AbstractCollection#containsAll(java.util.Collection)
- */
- public boolean containsAll(Collection c) {
- return getListCache().containsAll(c);
- }
-
- /**
- * @param minCapacity
- */
- public void ensureCapacity(int minCapacity) {
- getListCache().ensureCapacity(minCapacity);
- }
-
- /**
- * @param obj
- * @return boolean
- * @see java.util.AbstractList#equals(java.lang.Object)
- */
- public boolean equals(Object obj) {
- return getListCache().equals(obj);
- }
-
- /**
- * @return int
- * @see java.util.AbstractList#hashCode()
- */
- public int hashCode() {
- if (listCache != null) {
- return getListCache().hashCode();
- } else {
- return hashCode;
- }
- }
-
- /**
- * @param o
- * @return int
- * @see java.util.AbstractList#indexOf(java.lang.Object)
- */
- public int indexOf(Object o) {
- return getListCache().indexOf(o);
- }
-
- /**
- * @return boolean
- * @see java.util.AbstractCollection#isEmpty()
- */
- public boolean isEmpty() {
- return getListCache().isEmpty();
- }
-
- /**
- * @return the iterator
- * @see java.util.AbstractList#iterator()
- */
- public Iterator<T> iterator() {
- return getListCache().iterator();
- }
-
- /**
- * @param o
- * @return int
- * @see java.util.AbstractList#lastIndexOf(java.lang.Object)
- */
- public int lastIndexOf(Object o) {
- return getListCache().lastIndexOf(o);
- }
-
- /**
- * @return the iterator
- * @see java.util.AbstractList#listIterator()
- */
- public ListIterator<T> listIterator() {
- return getListCache().listIterator();
- }
-
- /**
- * @param index
- * @return the iterator
- * @see java.util.AbstractList#listIterator(int)
- */
- public ListIterator<T> listIterator(int index) {
- return getListCache().listIterator(index);
- }
-
- /**
- * @param index
- * @return object
- * @see java.util.AbstractList#remove(int)
- */
- public T remove(int index) {
- return getListCache().remove(index);
- }
-
- /**
- * @param o
- * @return boolean
- * @see java.util.AbstractCollection#remove(java.lang.Object)
- */
- public boolean remove(Object o) {
- return getListCache().remove(o);
- }
-
- /**
- * @param c
- * @return boolean
- * @see java.util.AbstractCollection#removeAll(java.util.Collection)
- */
- public boolean removeAll(Collection<?> c) {
- return getListCache().removeAll(c);
- }
-
- /**
- * @param c
- * @return boolean
- * @see java.util.AbstractCollection#retainAll(java.util.Collection)
- */
- public boolean retainAll(Collection c) {
- return getListCache().retainAll(c);
- }
-
- /**
- * @param index
- * @param o
- * @return object
- * @see java.util.AbstractList#set(int, java.lang.Object)
- */
- public T set(int index, T o) {
- return getListCache().set(index, o);
- }
-
- /**
- * @param fromIndex
- * @param toIndex
- * @return the sub list
- * @see java.util.AbstractList#subList(int, int)
- */
- public List<T> subList(int fromIndex, int toIndex) {
- return getListCache().subList(fromIndex, toIndex);
- }
-
- /**
- * @return the array
- * @see java.util.AbstractCollection#toArray()
- */
- public Object[] toArray() {
- return getListCache().toArray();
- }
-
- /**
- * @param a
- * @return the array
- * @see java.util.AbstractCollection#toArray(java.lang.Object[])
- */
- public <E> E[] toArray(E[] a) {
- return getListCache().toArray(a);
- }
-
- /**
- * @return String
- * @see java.util.AbstractCollection#toString()
- */
- public String toString() {
- if (listCache != null) {
- return getListCache().toString();
- } else {
- return super.toString();
- }
- }
-
- /**
- *
- */
- public void trimToSize() {
- getListCache().trimToSize();
- }
-
- /**
- * @param index
- * @return The element at the given index
- */
- public T get(int index) {
- return getListCache().get(index);
- }
-
- /**
- * @return The number of elements in this list
- */
- public int size() {
- return getListCache().size();
- }
-
- /**
- * @see org.jnode.vm.VmSystemObject#verifyBeforeEmit()
- */
- @SuppressWarnings("unchecked")
- public void verifyBeforeEmit() {
- super.verifyBeforeEmit();
- if (listCache != null) {
- array = (T[]) listCache.toArray();
- hashCode = listCache.hashCode();
- } else {
- array = null;
- }
- listCache = null;
- locked = true;
- }
-
-}
Deleted: trunk/core/src/core/org/jnode/util/BootableHashMap.java
===================================================================
--- trunk/core/src/core/org/jnode/util/BootableHashMap.java 2010-05-12 10:29:02 UTC (rev 5748)
+++ trunk/core/src/core/org/jnode/util/BootableHashMap.java 2010-05-12 10:31:48 UTC (rev 5749)
@@ -1,260 +0,0 @@
-/*
- * $Id$
- *
- * Copyright (C) 2003-2010 JNode.org
- *
- * This library is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation; either version 2.1 of the License, or
- * (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
- * License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this library; If not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-package org.jnode.util;
-
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Set;
-
-import org.jnode.vm.VmSystemObject;
-
-/**
- * @author epr
- */
-public class BootableHashMap<K, V> extends VmSystemObject implements Map<K, V> {
-
- private HashMap<K, V> mapCache;
- private Entry<K, V>[] entryArray;
- private int hashCode;
- private transient boolean locked;
-
- /**
- * Constructs an empty HashMap.
- * @see java.util.HashMap#HashMap()
- */
- public BootableHashMap() {
- this.hashCode = super.hashCode();
- }
-
- /**
- * Constructs an empty HashMap.
- * @see java.util.HashMap#HashMap(int)
- *
- * @param initialCapacity
- */
- public BootableHashMap(int initialCapacity) {
- mapCache = new HashMap<K, V>(initialCapacity);
- this.hashCode = mapCache.hashCode();
- }
-
- /**
- * @return int
- * @see java.lang.Object#hashCode()
- */
- public int hashCode() {
- if (mapCache != null) {
- return getMapCache().hashCode();
- } else {
- return hashCode;
- }
- }
-
- /**
- * @return String
- * @see java.lang.Object#toString()
- */
- public String toString() {
- if (mapCache != null) {
- return getMapCache().toString();
- } else {
- return super.toString();
- }
- }
-
- /**
- * @return The collection of values
- */
- public Collection<V> values() {
- return getMapCache().values();
- }
-
- /**
- * @return The set of keys
- */
- public Set<K> keySet() {
- return getMapCache().keySet();
- }
-
- /**
- * @param key
- * @return The object for the given key, or null if the given key is not found.
- */
- public V get(Object key) {
- return getMapCache().get(key);
- }
-
- /**
- *
- */
- public void clear() {
- getMapCache().clear();
- }
-
- /**
- * @return The number of elements
- */
- public int size() {
- return getMapCache().size();
- }
-
- /**
- * @param key
- * @param value
- * @return Object
- */
- public V put(K key, V value) {
- return getMapCache().put(key, value);
- }
-
- /**
- * @param m
- */
- public void putAll(Map<? extends K, ? extends V> m) {
- getMapCache().putAll(m);
- }
-
- /**
- * @return The set of entries
- */
- public Set<Map.Entry<K, V>> entrySet() {
- return getMapCache().entrySet();
- }
-
- /**
- * @param key
- * @return True if the key is contained, false otherwise
- */
- public boolean containsKey(Object key) {
- return getMapCache().containsKey(key);
- }
-
- /**
- * @return True if this map is empty, false otherwise
- */
- public boolean isEmpty() {
- return getMapCache().isEmpty();
- }
-
- /**
- * @param obj
- * @return boolean
- * @see java.lang.Object#equals(java.lang.Object)
- */
- public boolean equals(Object obj) {
- return getMapCache().equals(obj);
- }
-
- /**
- * @param o
- * @return Object
- */
- public V remove(Object o) {
- return getMapCache().remove(o);
- }
-
- /**
- * @param value
- * @return True if the given value is contained, false otherwise
- */
- public boolean containsValue(Object value) {
- return getMapCache().containsValue(value);
- }
-
-
- static final class Entry<eK, eV> extends VmSystemObject {
- private final eK key;
- private final eV value;
-
- public Entry(Map.Entry<eK, eV> entry) {
- this.key = entry.getKey();
- this.value = entry.getValue();
- }
-
- /**
- * Gets the key
- *
- * @return Object
- */
- public eK getKey() {
- return key;
- }
-
- /**
- * Gets the value
- *
- * @return Object
- */
- public eV getValue() {
- return value;
- }
- }
-
- /**
- * Gets the hashmap
- *
- * @return
- */
- private final HashMap<K, V> getMapCache() {
- if (locked) {
- throw new RuntimeException("Cannot change a locked BootableHashMap");
- }
- if (mapCache == null) {
- if (entryArray != null) {
- final int max = entryArray.length;
-
- mapCache = new HashMap<K, V>(max);
- for (int i = 0; i < max; i++) {
- final Entry<K, V> e = entryArray[i];
- mapCache.put(e.getKey(), e.getValue());
- }
-
- entryArray = null;
- } else {
- mapCache = new HashMap<K, V>();
- }
- }
- return mapCache;
- }
-
- /**
- * {@inheritDoc}
- */
- @SuppressWarnings("unchecked")
- public void verifyBeforeEmit() {
- super.verifyBeforeEmit();
-
- if (mapCache != null) {
- entryArray = new Entry[mapCache.size()];
- int index = 0;
- for (Map.Entry<K, V> entry : mapCache.entrySet()) {
- entryArray[index++] = new Entry<K, V>(entry);
- }
- hashCode = mapCache.hashCode();
- mapCache = null;
- }
- locked = true;
- }
-
- public boolean isLocked() {
- return locked;
- }
-}
Deleted: trunk/core/src/core/org/jnode/util/Counter.java
===================================================================
--- trunk/core/src/core/org/jnode/util/Counter.java 2010-05-12 10:29:02 UTC (rev 5748)
+++ trunk/core/src/core/org/jnode/util/Counter.java 2010-05-12 10:31:48 UTC (rev 5749)
@@ -1,108 +0,0 @@
-/*
- * $Id$
- *
- * Copyright (C) 2003-2010 JNode.org
- *
- * This library is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation; either version 2.1 of the License, or
- * (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
- * License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this library; If not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-package org.jnode.util;
-
-/**
- * @author Ewout Prangsma (ep...@us...)
- */
-public final class Counter extends Statistic implements Comparable<Counter> {
-
- private static final String is = "=";
-
- private int counter = 0;
-
- public Counter(String name) {
- this(name, null, 0);
- }
-
- public Counter(String name, String description) {
- this(name, description, 0);
- }
-
- public Counter(String name, int value) {
- this(name, null, value);
- }
-
- public Counter(String name, String description, int value) {
- super(name, description);
- this.counter = value;
- }
-
- /**
- * Gets the counter of this statistic
- *
- * @return the counter
- */
- public int get() {
- return counter;
- }
-
- public Object getValue() {
- return counter;
- }
-
- /**
- * Increment the counter of this statistic by 1.
- */
- public void inc() {
- counter++;
- }
-
- /**
- * Reset the counter to 0.
- */
- public void reset() {
- counter = 0;
- }
-
- /**
- * Add <i>increment</i> to the counter of this statistic.
- */
- public void add(int increment) {
- counter += increment;
- }
-
- /**
- * @see java.lang.Comparable#compareTo(java.lang.Object)
- */
- public int compareTo(Counter o) {
- if (o.counter < this.counter) {
- return 1;
- } else if (o.counter > this.counter) {
- return -1;
- }
- return 0;
- }
-
- /**
- * Convert to a String representation
- *
- * @return String
- * @see java.lang.Object#toString()
- */
- public String toString() {
- StringBuilder sb = new StringBuilder(getName());
- sb.append(is);
- sb.append(counter);
-
- return sb.toString();
- }
-}
Deleted: trunk/core/src/core/org/jnode/util/CounterGroup.java
===================================================================
--- trunk/core/src/core/org/jnode/util/CounterGroup.java 2010-05-12 10:29:02 UTC (rev 5748)
+++ trunk/core/src/core/org/jnode/util/CounterGroup.java 2010-05-12 10:31:48 UTC (rev 5749)
@@ -1,129 +0,0 @@
-/*
- * $Id$
- *
- * Copyright (C) 2003-2010 JNode.org
- *
- * This library is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation; either version 2.1 of the License, or
- * (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
- * License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this library; If not, write to the Free Software Foundatio...
[truncated message content] |
|
From: <fd...@us...> - 2010-05-16 16:49:09
|
Revision: 5750
http://jnode.svn.sourceforge.net/jnode/?rev=5750&view=rev
Author: fduminy
Date: 2010-05-16 16:48:59 +0000 (Sun, 16 May 2010)
Log Message:
-----------
removed package/plugin dependency cycle org.jnode.vm <-> org.jnode.system by refactoring BootLog :
- become an interface in its own plugin and doesn't depend on the (org.jnode.vm.)Unsafe class
Signed-off-by: Fabien DUMINY <fab...@we...>
Modified Paths:
--------------
trunk/all/conf/system-plugin-list.xml
trunk/builder/src/builder/org/jnode/build/AbstractBootImageBuilder.java
trunk/builder/src/builder/org/jnode/build/ObjectEmitter.java
trunk/core/src/core/org/jnode/boot/InitJarProcessor.java
trunk/core/src/core/org/jnode/boot/Main.java
trunk/core/src/core/org/jnode/log4j/config/Log4jConfigurePlugin.java
trunk/core/src/core/org/jnode/plugin/Plugin.java
trunk/core/src/core/org/jnode/plugin/PluginManager.java
trunk/core/src/core/org/jnode/plugin/PluginUtils.java
trunk/core/src/core/org/jnode/plugin/manager/DefaultPluginManager.java
trunk/core/src/core/org/jnode/plugin/model/FragmentDescriptorModel.java
trunk/core/src/core/org/jnode/plugin/model/PluginClassLoaderImpl.java
trunk/core/src/core/org/jnode/plugin/model/PluginDescriptorModel.java
trunk/core/src/core/org/jnode/protocol/ProtocolHandlerFactoryPlugin.java
trunk/core/src/core/org/jnode/security/JNodePolicy.java
trunk/core/src/core/org/jnode/util/ByteQueueProcessorThread.java
trunk/core/src/core/org/jnode/util/QueueProcessorThread.java
trunk/core/src/core/org/jnode/vm/MemoryBlockManager.java
trunk/core/src/core/org/jnode/vm/VmSystem.java
trunk/core/src/core/org/jnode/vm/VmSystemClassLoader.java
trunk/core/src/core/org/jnode/vm/bytecode/BasicBlockFinder.java
trunk/core/src/core/org/jnode/vm/bytecode/DeadBlockFinder.java
trunk/core/src/core/org/jnode/vm/classmgr/ClassDecoder.java
trunk/core/src/core/org/jnode/vm/classmgr/VmType.java
trunk/core/src/core/org/jnode/vm/memmgr/def/FinalizerThread.java
trunk/core/src/core/org/jnode/vm/x86/MPConfigTable.java
trunk/core/src/core/org/jnode/vm/x86/MPFloatingPointerStructure.java
trunk/core/src/core/org/jnode/vm/x86/VmX86Architecture.java
trunk/core/src/core/org/jnode/vm/x86/VmX86Processor.java
trunk/core/src/core/org/jnode/vm/x86/compiler/l1a/FPCompilerFPU.java
trunk/core/src/core/org/jnode/vm/x86/compiler/l1a/X86BytecodeVisitor.java
trunk/core/src/core/org/jnode/vm/x86/compiler/l1b/FPCompilerFPU.java
trunk/core/src/core/org/jnode/vm/x86/compiler/l1b/X86BytecodeVisitor.java
trunk/core/src/core/org/jnode/work/WorkUtils.java
trunk/core/src/driver/org/jnode/driver/AbstractDeviceManager.java
trunk/core/src/driver/org/jnode/driver/DefaultDeviceManager.java
trunk/core/src/driver/org/jnode/driver/Device.java
trunk/core/src/driver/org/jnode/driver/Driver.java
trunk/core/src/driver/org/jnode/driver/console/spi/AbstractConsoleManager.java
trunk/core/src/driver/org/jnode/driver/console/textscreen/DefaultKeyboardHandler.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/core/src/mmtk-vm/org/mmtk/vm/Assert.java
trunk/core/src/mmtk-vm/org/mmtk/vm/Options.java
trunk/core/src/test/org/jnode/test/framework/TestRunnerPlugin.java
trunk/fs/src/driver/org/jnode/driver/block/ide/disk/IDEDiskDriver.java
trunk/fs/src/fs/org/jnode/fs/iso9660/ISO9660Volume.java
trunk/fs/src/fs/org/jnode/fs/iso9660/SupplementaryVolumeDescriptor.java
trunk/fs/src/test/org/jnode/test/support/MockObjectFactory.java
trunk/net/src/net/org/jnode/net/util/AbstractDatagramSocketImpl.java
Added Paths:
-----------
trunk/core/descriptors/org.jnode.runtime.core.bootlog.xml
trunk/core/src/core/org/jnode/bootlog/
trunk/core/src/core/org/jnode/bootlog/BootLog.java
trunk/core/src/core/org/jnode/bootlog/BootLogInstance.java
trunk/core/src/core/org/jnode/bootlog/package.html
trunk/core/src/core/org/jnode/vm/BootLogImpl.java
Removed Paths:
-------------
trunk/core/src/core/org/jnode/system/BootLog.java
Property Changed:
----------------
trunk/core/src/test/org/jnode/test/framework/TestRunnerPlugin.java
Modified: trunk/all/conf/system-plugin-list.xml
===================================================================
--- trunk/all/conf/system-plugin-list.xml 2010-05-12 10:31:48 UTC (rev 5749)
+++ trunk/all/conf/system-plugin-list.xml 2010-05-16 16:48:59 UTC (rev 5750)
@@ -13,6 +13,7 @@
<plugin id="org.jnode.runtime"/>
<plugin id="org.jnode.runtime.core"/>
+ <plugin id="org.jnode.runtime.core.bootlog"/>
<plugin id="org.jnode.security"/>
<plugin id="org.jnode.util"/>
<plugin id="org.jnode.vm"/>
Modified: trunk/builder/src/builder/org/jnode/build/AbstractBootImageBuilder.java
===================================================================
--- trunk/builder/src/builder/org/jnode/build/AbstractBootImageBuilder.java 2010-05-12 10:31:48 UTC (rev 5749)
+++ trunk/builder/src/builder/org/jnode/build/AbstractBootImageBuilder.java 2010-05-16 16:48:59 UTC (rev 5750)
@@ -25,6 +25,7 @@
import java.io.FileWriter;
import java.io.IOException;
import java.io.OutputStreamWriter;
+import java.io.PrintStream;
import java.io.PrintWriter;
import java.lang.reflect.Field;
import java.net.URL;
@@ -47,6 +48,8 @@
import org.jnode.assembler.UnresolvedObjectRefException;
import org.jnode.assembler.NativeStream.ObjectRef;
import org.jnode.assembler.x86.X86BinaryAssembler;
+import org.jnode.bootlog.BootLog;
+import org.jnode.bootlog.BootLogInstance;
import org.jnode.plugin.PluginDescriptor;
import org.jnode.plugin.PluginException;
import org.jnode.plugin.PluginRegistry;
@@ -791,14 +794,84 @@
throws ClassNotFoundException;
public final void execute() throws BuildException {
- // Create the image
- doExecute();
- // Remove all garbage objects
- cleanup();
- System.gc();
- // Make sure that all finalizers are called, in order to remove tmp
- // files.
- Runtime.getRuntime().runFinalization();
+ try {
+ BootLogInstance.set(new BootLog() {
+ @Override
+ public void warn(String msg) {
+ System.out.println(msg);
+ }
+
+ @Override
+ public void warn(String msg, Throwable ex) {
+ System.out.println(msg);
+ ex.printStackTrace(System.out);
+ }
+
+ @Override
+ public void setDebugOut(PrintStream out) {
+ // ignore
+ }
+
+ @Override
+ public void info(String msg, Throwable ex) {
+ System.out.println(msg);
+ ex.printStackTrace(System.out);
+ }
+
+ @Override
+ public void info(String msg) {
+ System.out.println(msg);
+ }
+
+ @Override
+ public void fatal(String msg, Throwable ex) {
+ System.out.println(msg);
+ ex.printStackTrace(System.out);
+ }
+
+ @Override
+ public void fatal(String msg) {
+ System.out.println(msg);
+ }
+
+ @Override
+ public void error(String msg, Throwable ex) {
+ System.out.println(msg);
+ ex.printStackTrace(System.out);
+ }
+
+ @Override
+ public void error(String msg) {
+ System.out.println(msg);
+ }
+
+ @Override
+ public void debug(String msg, Throwable ex) {
+ System.out.println(msg);
+ ex.printStackTrace(System.out);
+ }
+
+ @Override
+ public void debug(String msg) {
+ System.out.println(msg);
+ }
+ });
+
+ // Create the image
+ doExecute();
+ // Remove all garbage objects
+ cleanup();
+ System.gc();
+ // Make sure that all finalizers are called, in order to remove tmp
+ // files.
+ Runtime.getRuntime().runFinalization();
+ } catch (BuildException be) {
+ be.printStackTrace();
+ throw be;
+ } catch (Throwable t) {
+ t.printStackTrace();
+ throw new BuildException(t);
+ }
}
/**
@@ -1368,6 +1441,7 @@
addCompileHighOptLevel("org.jnode.assembler");
addCompileHighOptLevel("org.jnode.boot");
+ addCompileHighOptLevel("org.jnode.bootlog");
addCompileHighOptLevel("org.jnode.naming");
addCompileHighOptLevel("org.jnode.plugin");
addCompileHighOptLevel("org.jnode.plugin.manager");
Modified: trunk/builder/src/builder/org/jnode/build/ObjectEmitter.java
===================================================================
--- trunk/builder/src/builder/org/jnode/build/ObjectEmitter.java 2010-05-12 10:31:48 UTC (rev 5749)
+++ trunk/builder/src/builder/org/jnode/build/ObjectEmitter.java 2010-05-16 16:48:59 UTC (rev 5750)
@@ -26,11 +26,12 @@
import java.lang.reflect.Modifier;
import java.util.HashMap;
import java.util.Set;
+
import org.jnode.assembler.BootImageNativeStream;
import org.jnode.assembler.Label;
import org.jnode.assembler.NativeStream;
import org.jnode.assembler.x86.X86BinaryAssembler;
-import org.jnode.system.BootLog;
+import org.jnode.bootlog.BootLogInstance;
import org.jnode.vm.BootableObject;
import org.jnode.vm.VmSystemObject;
import org.jnode.vm.classmgr.VmArrayClass;
@@ -191,7 +192,7 @@
throw new BuildException(ex);
}
if (!fieldInfo.isExact()) {
- BootLog.warn("Use of in-exact matching class (" + clsName
+ BootLogInstance.get().warn("Use of in-exact matching class (" + clsName
+ ") in bootimage at " + location);
}
legalInstanceClasses.add(clsName);
@@ -460,7 +461,7 @@
+ jdkField.getName() + " of class "
+ cls.getName(), ex);
} catch (JNodeClassNotFoundException ex) {
- BootLog
+ BootLogInstance.get()
.warn("JNode class not found "
+ ex.getMessage());
value = null;
Added: trunk/core/descriptors/org.jnode.runtime.core.bootlog.xml
===================================================================
--- trunk/core/descriptors/org.jnode.runtime.core.bootlog.xml (rev 0)
+++ trunk/core/descriptors/org.jnode.runtime.core.bootlog.xml 2010-05-16 16:48:59 UTC (rev 5750)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plugin SYSTEM "jnode.dtd">
+
+<plugin id="org.jnode.runtime.core.bootlog"
+ name="JNode boot log interface"
+ version="@VERSION@"
+ system="true"
+ license-name="lgpl"
+ provider-name="JNode.org">
+
+ <runtime>
+ <library name="jnode-core.jar">
+ <export name="org.jnode.bootlog.*"/>
+ </library>
+ </runtime>
+
+</plugin>
\ No newline at end of file
Modified: trunk/core/src/core/org/jnode/boot/InitJarProcessor.java
===================================================================
--- trunk/core/src/core/org/jnode/boot/InitJarProcessor.java 2010-05-12 10:31:48 UTC (rev 5749)
+++ trunk/core/src/core/org/jnode/boot/InitJarProcessor.java 2010-05-16 16:48:59 UTC (rev 5750)
@@ -30,11 +30,12 @@
import java.util.jar.Attributes;
import java.util.jar.Manifest;
+import org.jnode.bootlog.BootLog;
+import org.jnode.bootlog.BootLogInstance;
import org.jnode.plugin.PluginDescriptor;
import org.jnode.plugin.PluginException;
import org.jnode.plugin.PluginLoader;
import org.jnode.plugin.PluginRegistry;
-import org.jnode.system.BootLog;
import org.jnode.system.MemoryResource;
import org.jnode.util.JarBuffer;
@@ -60,7 +61,7 @@
jbuf = new JarBuffer(initJarRes.asByteBuffer());
mf = jbuf.getManifest();
} catch (IOException ex) {
- BootLog.error("Cannot instantiate initjar", ex);
+ BootLogInstance.get().error("Cannot instantiate initjar", ex);
}
}
this.jbuf = jbuf;
@@ -89,7 +90,7 @@
loader, "", "", false); //resolve=false
descriptors.add(descr);
} catch (PluginException ex) {
- BootLog.error("Cannot load " + name, ex);
+ BootLogInstance.get().error("Cannot load " + name, ex);
}
}
}
Modified: trunk/core/src/core/org/jnode/boot/Main.java
===================================================================
--- trunk/core/src/core/org/jnode/boot/Main.java 2010-05-12 10:31:48 UTC (rev 5749)
+++ trunk/core/src/core/org/jnode/boot/Main.java 2010-05-16 16:48:59 UTC (rev 5750)
@@ -26,11 +26,11 @@
import org.jnode.annotation.LoadStatics;
import org.jnode.annotation.SharedStatics;
import org.jnode.annotation.Uninterruptible;
+import org.jnode.bootlog.BootLogInstance;
import org.jnode.plugin.PluginDescriptor;
import org.jnode.plugin.PluginManager;
import org.jnode.plugin.PluginRegistry;
import org.jnode.plugin.manager.DefaultPluginManager;
-import org.jnode.system.BootLog;
import org.jnode.vm.Unsafe;
import org.jnode.vm.VmSystem;
@@ -66,13 +66,13 @@
Unsafe.debug("VmSystem.initialize\n");
VmSystem.initialize();
-
+
// Load the plugins from the initjar
- BootLog.info("Loading initjar plugins");
+ BootLogInstance.get().info("Loading initjar plugins");
final InitJarProcessor proc = new InitJarProcessor(VmSystem.getInitJar());
List<PluginDescriptor> descriptors = proc.loadPlugins(pluginRegistry);
- BootLog.info("Starting PluginManager");
+ BootLogInstance.get().info("Starting PluginManager");
final PluginManager piMgr = new DefaultPluginManager(pluginRegistry);
piMgr.startSystemPlugins(descriptors);
@@ -82,7 +82,7 @@
if (mainClassName != null) {
mainClass = loader.loadClass(mainClassName);
} else {
- BootLog.warn("No Main-Class found");
+ BootLogInstance.get().warn("No Main-Class found");
mainClass = null;
}
final long end = VmSystem.currentKernelMillis();
@@ -98,12 +98,12 @@
if (insatnce instanceof Runnable) {
((Runnable) insatnce).run();
} else {
- BootLog.warn("No valid Main-Class found");
+ BootLogInstance.get().warn("No valid Main-Class found");
}
}
}
} catch (Throwable ex) {
- BootLog.error("Error in bootstrap", ex);
+ BootLogInstance.get().error("Error in bootstrap", ex);
Unsafe.debugStackTrace(ex);
sleepForever();
return -2;
Added: trunk/core/src/core/org/jnode/bootlog/BootLog.java
===================================================================
--- trunk/core/src/core/org/jnode/bootlog/BootLog.java (rev 0)
+++ trunk/core/src/core/org/jnode/bootlog/BootLog.java 2010-05-16 16:48:59 UTC (rev 5750)
@@ -0,0 +1,119 @@
+/*
+ * $Id$
+ *
+ * Copyright (C) 2003-2010 JNode.org
+ *
+ * This library is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as published
+ * by the Free Software Foundation; either version 2.1 of the License, or
+ * (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; If not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+package org.jnode.bootlog;
+
+import java.io.PrintStream;
+
+/**
+ * Logging class used during bootstrap.
+ *
+ * @author Ewout Prangsma (ep...@us...)
+ *
+ */
+public interface BootLog {
+ public static final int DEBUG = 1;
+ public static final int INFO = 2;
+ public static final int WARN = 3;
+ public static final int ERROR = 4;
+ public static final int FATAL = 5;
+
+ /**
+ * Log a debug message
+ *
+ * @param msg
+ */
+ void debug(String msg);
+
+ /**
+ * Log a debug message
+ *
+ * @param msg
+ * @param ex
+ */
+ void debug(String msg, Throwable ex);
+
+ /**
+ * Log an error message
+ *
+ * @param msg
+ */
+ void error(String msg);
+
+ /**
+ * Log an error message
+ *
+ * @param msg
+ * @param ex
+ */
+ void error(String msg, Throwable ex);
+
+ /**
+ * Log an fatal message
+ *
+ * @param msg
+ */
+ void fatal(String msg);
+
+ /**
+ * Log an fatal message
+ *
+ * @param msg
+ * @param ex
+ */
+ void fatal(String msg, Throwable ex);
+
+ /**
+ * Log an info message
+ *
+ * @param msg
+ */
+ void info(String msg);
+
+ /**
+ * Log an info message
+ *
+ * @param msg
+ * @param ex
+ */
+ void info(String msg, Throwable ex);
+
+ /**
+ * Log an warning message
+ *
+ * @param msg
+ * @param ex
+ */
+ void warn(String msg, Throwable ex);
+
+ /**
+ * Log an warning message
+ *
+ * @param msg
+ */
+ void warn(String msg);
+
+ /**
+ * Set the stream to use for debug logs.
+ *
+ * @param out
+ */
+ void setDebugOut(PrintStream out);
+}
Added: trunk/core/src/core/org/jnode/bootlog/BootLogInstance.java
===================================================================
--- trunk/core/src/core/org/jnode/bootlog/BootLogInstance.java (rev 0)
+++ trunk/core/src/core/org/jnode/bootlog/BootLogInstance.java 2010-05-16 16:48:59 UTC (rev 5750)
@@ -0,0 +1,35 @@
+package org.jnode.bootlog;
+
+
+/**
+ * Class holding the {@link BootLog} instance used by the system.
+ * <br/><h1>Implementation note :</h1> The reference to the actual instance of
+ * the BootLog can't be stored in the InitialNaming that use VmType, which is
+ * not fully initialized at build time (but BootLog is used). So, we are always
+ * holding the reference in that class.
+ *
+ * @author Fabien DUMINY
+ *
+ */
+public final class BootLogInstance {
+ private static BootLog BOOT_LOG_INSTANCE;
+
+ private BootLogInstance () {
+ }
+
+ /**
+ * Get the system's {@link BootLog}.
+ * @return the system's {@link BootLog}.
+ */
+ public static BootLog get() {
+ return BOOT_LOG_INSTANCE;
+ }
+
+ /**
+ * Set the system's {@link BootLog}.
+ * @param bootLog the system's {@link BootLog}.
+ */
+ public static void set(BootLog bootLog) {
+ BOOT_LOG_INSTANCE = bootLog;
+ }
+}
Added: trunk/core/src/core/org/jnode/bootlog/package.html
===================================================================
--- trunk/core/src/core/org/jnode/bootlog/package.html (rev 0)
+++ trunk/core/src/core/org/jnode/bootlog/package.html 2010-05-16 16:48:59 UTC (rev 5750)
@@ -0,0 +1,11 @@
+<html>
+<head>
+ <title>org.jnode.plugin</title>
+</head>
+<body>
+
+This package contains the interface with boot time log.
+It also contains the singleton instance implementing that interface.
+
+</body>
+</html>
\ No newline at end of file
Modified: trunk/core/src/core/org/jnode/log4j/config/Log4jConfigurePlugin.java
===================================================================
--- trunk/core/src/core/org/jnode/log4j/config/Log4jConfigurePlugin.java 2010-05-12 10:31:48 UTC (rev 5749)
+++ trunk/core/src/core/org/jnode/log4j/config/Log4jConfigurePlugin.java 2010-05-16 16:48:59 UTC (rev 5750)
@@ -30,6 +30,7 @@
import org.apache.log4j.Level;
import org.apache.log4j.Logger;
import org.apache.log4j.PatternLayout;
+import org.jnode.bootlog.BootLogInstance;
import org.jnode.driver.console.ActiveTextConsole;
import org.jnode.driver.console.ConsoleManager;
import org.jnode.driver.console.TextConsole;
@@ -37,7 +38,6 @@
import org.jnode.plugin.Plugin;
import org.jnode.plugin.PluginDescriptor;
import org.jnode.plugin.PluginException;
-import org.jnode.system.BootLog;
import org.jnode.util.WriterOutputStream;
/**
@@ -79,7 +79,7 @@
final VirtualConsoleAppender debugApp =
new VirtualConsoleAppender(new PatternLayout(LAYOUT), console, false);
debugApp.setThreshold(Level.DEBUG);
- BootLog.setDebugOut(new PrintStream(new WriterOutputStream(console.getOut(), false), true));
+ BootLogInstance.get().setDebugOut(new PrintStream(new WriterOutputStream(console.getOut(), false), true));
TextConsole atc = new ActiveTextConsole(conMgr);
final VirtualConsoleAppender infoApp = new VirtualConsoleAppender(
Modified: trunk/core/src/core/org/jnode/plugin/Plugin.java
===================================================================
--- trunk/core/src/core/org/jnode/plugin/Plugin.java 2010-05-12 10:31:48 UTC (rev 5749)
+++ trunk/core/src/core/org/jnode/plugin/Plugin.java 2010-05-16 16:48:59 UTC (rev 5750)
@@ -24,7 +24,8 @@
import java.security.PrivilegedAction;
import java.util.prefs.Preferences;
-import org.jnode.system.BootLog;
+import org.jnode.bootlog.BootLog;
+import org.jnode.bootlog.BootLogInstance;
/**
@@ -101,7 +102,7 @@
}
if (!started) {
if (descriptor.hasCustomPluginClass()) {
- BootLog.debug("Starting plugin: " + descriptor.getId());
+ BootLogInstance.get().debug("Starting plugin: " + descriptor.getId());
}
started = true;
try {
Modified: trunk/core/src/core/org/jnode/plugin/PluginManager.java
===================================================================
--- trunk/core/src/core/org/jnode/plugin/PluginManager.java 2010-05-12 10:31:48 UTC (rev 5749)
+++ trunk/core/src/core/org/jnode/plugin/PluginManager.java 2010-05-16 16:48:59 UTC (rev 5750)
@@ -22,7 +22,8 @@
import java.util.List;
-import org.jnode.system.BootLog;
+import org.jnode.bootlog.BootLog;
+import org.jnode.bootlog.BootLogInstance;
/**
* Interface of manager of all plugins in the system.
@@ -75,10 +76,10 @@
try {
plugin.start();
} catch (PluginException ex) {
- BootLog.error("Error starting " + plugin.getDescriptor().getId());
+ BootLogInstance.get().error("Error starting " + plugin.getDescriptor().getId());
throw ex;
} catch (Throwable ex) {
- BootLog.error("Error starting " + plugin.getDescriptor().getId());
+ BootLogInstance.get().error("Error starting " + plugin.getDescriptor().getId());
throw new PluginException(ex);
}
}
@@ -93,14 +94,14 @@
protected final void stopSinglePlugin(Plugin plugin) throws PluginException {
try {
if (plugin.isActive()) {
- BootLog.info("Stopping " + plugin.getDescriptor().getId());
+ BootLogInstance.get().info("Stopping " + plugin.getDescriptor().getId());
plugin.stop();
}
} catch (PluginException ex) {
- BootLog.error("Error stopping " + plugin.getDescriptor().getId());
+ BootLogInstance.get().error("Error stopping " + plugin.getDescriptor().getId());
throw ex;
} catch (Throwable ex) {
- BootLog.error("Error stopping " + plugin.getDescriptor().getId());
+ BootLogInstance.get().error("Error stopping " + plugin.getDescriptor().getId());
throw new PluginException(ex);
}
}
Modified: trunk/core/src/core/org/jnode/plugin/PluginUtils.java
===================================================================
--- trunk/core/src/core/org/jnode/plugin/PluginUtils.java 2010-05-12 10:31:48 UTC (rev 5749)
+++ trunk/core/src/core/org/jnode/plugin/PluginUtils.java 2010-05-16 16:48:59 UTC (rev 5750)
@@ -24,7 +24,8 @@
import java.util.MissingResourceException;
import java.util.ResourceBundle;
-import org.jnode.system.BootLog;
+import org.jnode.bootlog.BootLog;
+import org.jnode.bootlog.BootLogInstance;
/**
* Plugin utility methods.
@@ -72,22 +73,22 @@
String message = null;
try {
- BootLog.debug("messageKey=" + messageKey + ", trying with " + Locale.getDefault());
+ BootLogInstance.get().debug("messageKey=" + messageKey + ", trying with " + Locale.getDefault());
bundle = ResourceBundle.getBundle(fullName, Locale.getDefault(), loader);
} catch (MissingResourceException e) {
try {
- BootLog.debug("trying with " + Locale.ENGLISH);
+ BootLogInstance.get().debug("trying with " + Locale.ENGLISH);
bundle = ResourceBundle.getBundle(fullName, Locale.ENGLISH, loader);
} catch (MissingResourceException mre) {
if (!cleanFallback)
- BootLog.error("can't get message", mre);
+ BootLogInstance.get().error("can't get message", mre);
}
}
- BootLog.debug("bundle=" + bundle);
+ BootLogInstance.get().debug("bundle=" + bundle);
if (bundle != null) {
try {
- BootLog.debug("got bundle " + bundleName);
+ BootLogInstance.get().debug("got bundle " + bundleName);
message = bundle.getString(messageKey);
} catch (MissingResourceException mre) {
if (!cleanFallback)
@@ -96,7 +97,7 @@
}
if (message == null && !cleanFallback) {
- BootLog.error("can't get message from bundle " + bundleName + " with key " + messageKey);
+ BootLogInstance.get().error("can't get message from bundle " + bundleName + " with key " + messageKey);
}
return (message == null) ? (cleanFallback ? messageKey : ('?' + messageKey + '?')) : message;
Modified: trunk/core/src/core/org/jnode/plugin/manager/DefaultPluginManager.java
===================================================================
--- trunk/core/src/core/org/jnode/plugin/manager/DefaultPluginManager.java 2010-05-12 10:31:48 UTC (rev 5749)
+++ trunk/core/src/core/org/jnode/plugin/manager/DefaultPluginManager.java 2010-05-16 16:48:59 UTC (rev 5750)
@@ -35,6 +35,8 @@
import javax.naming.NamingException;
+import org.jnode.bootlog.BootLog;
+import org.jnode.bootlog.BootLogInstance;
import org.jnode.naming.InitialNaming;
import org.jnode.plugin.Plugin;
import org.jnode.plugin.PluginDescriptor;
@@ -45,7 +47,6 @@
import org.jnode.plugin.PluginRegistry;
import org.jnode.plugin.model.PluginRegistryModel;
import org.jnode.security.JNodePermission;
-import org.jnode.system.BootLog;
/**
* @author epr
@@ -128,7 +129,7 @@
// 2 loops, first start all system plugins,
// then start all auto-start plugins
for (int type = 0; type < 2; type++) {
- BootLog.info("Starting " + ((type == 0) ? "system" : "auto-start") + " plugins");
+ BootLogInstance.get().info("Starting " + ((type == 0) ? "system" : "auto-start") + " plugins");
for (PluginDescriptor descr : descrList) {
try {
final boolean start;
@@ -145,7 +146,7 @@
startSinglePlugin(descr.getPlugin());
}
} catch (Throwable ex) {
- BootLog.error("Cannot start " + descr.getId(), ex);
+ BootLogInstance.get().error("Cannot start " + descr.getId(), ex);
if (debug) {
try {
Thread.sleep(5000);
@@ -159,7 +160,7 @@
// Wait a while until all plugins have finished their startup process
if (!isStartPluginsFinished()) {
- BootLog.info("Waiting for plugins to finished their startprocess");
+ BootLogInstance.get().info("Waiting for plugins to finished their startprocess");
final long start = System.currentTimeMillis();
long now = start;
int loop = 0;
@@ -202,9 +203,9 @@
//empty
}
}
- BootLog.info("Stopped all plugins");
+ BootLogInstance.get().info("Stopped all plugins");
} catch (PluginException ex) {
- BootLog.error("Cannot stop plugins", ex);
+ BootLogInstance.get().error("Cannot stop plugins", ex);
}
}
@@ -216,7 +217,7 @@
*/
public final void stopPlugin(PluginDescriptor d) throws PluginException {
final String id = d.getId();
- //BootLog.info("__Stopping " + id);
+ //BootLogInstance.get().info("__Stopping " + id);
for (PluginDescriptor descr : registry) {
if (descr.depends(id)) {
stopPlugin(descr);
@@ -245,7 +246,7 @@
for (Iterator<PluginDescriptor> i = all.values().iterator(); i.hasNext();) {
final PluginDescriptor descr = (PluginDescriptor) i.next();
if (!prerequisitesExist(descr, all)) {
- BootLog.info("Skipping plugin " + descr.getId());
+ BootLogInstance.get().info("Skipping plugin " + descr.getId());
all.remove(descr.getId());
systemSet.remove(descr.getId());
i = all.values().iterator();
@@ -351,7 +352,7 @@
final Plugin pi = descr.getPlugin();
if (pi.isActive()) {
if (!pi.isStartFinished()) {
- BootLog.error("Plugin " + descr.getId()
+ BootLogInstance.get().error("Plugin " + descr.getId()
+ " has not yet finished");
}
}
Modified: trunk/core/src/core/org/jnode/plugin/model/FragmentDescriptorModel.java
===================================================================
--- trunk/core/src/core/org/jnode/plugin/model/FragmentDescrip...
[truncated message content] |
|
From: <fd...@us...> - 2010-05-16 16:50:14
|
Revision: 5751
http://jnode.svn.sourceforge.net/jnode/?rev=5751&view=rev
Author: fduminy
Date: 2010-05-16 16:50:07 +0000 (Sun, 16 May 2010)
Log Message:
-----------
- removed dependency cycle between org.jnode.naming and org.jnode.vm by moving DefaultNameSpace to org.jnode.vm
- BootLogInstance is now using InitialNaming to store the instance
Signed-off-by: Fabien DUMINY <fab...@we...>
Modified Paths:
--------------
trunk/builder/src/builder/org/jnode/build/AbstractBootImageBuilder.java
trunk/core/src/core/org/jnode/bootlog/BootLogInstance.java
trunk/core/src/core/org/jnode/naming/InitialNaming.java
trunk/core/src/core/org/jnode/vm/BootLogImpl.java
trunk/core/src/core/org/jnode/vm/VmSystem.java
trunk/core/src/emu/org/jnode/emu/naming/BasicNameSpace.java
trunk/fs/src/test/org/jnode/test/fs/driver/stubs/StubNameSpace.java
Added Paths:
-----------
trunk/core/src/core/org/jnode/vm/DefaultNameSpace.java
Removed Paths:
-------------
trunk/core/src/core/org/jnode/naming/DefaultNameSpace.java
Modified: trunk/builder/src/builder/org/jnode/build/AbstractBootImageBuilder.java
===================================================================
--- trunk/builder/src/builder/org/jnode/build/AbstractBootImageBuilder.java 2010-05-16 16:48:59 UTC (rev 5750)
+++ trunk/builder/src/builder/org/jnode/build/AbstractBootImageBuilder.java 2010-05-16 16:50:07 UTC (rev 5751)
@@ -50,6 +50,8 @@
import org.jnode.assembler.x86.X86BinaryAssembler;
import org.jnode.bootlog.BootLog;
import org.jnode.bootlog.BootLogInstance;
+import org.jnode.emu.naming.BasicNameSpace;
+import org.jnode.naming.InitialNaming;
import org.jnode.plugin.PluginDescriptor;
import org.jnode.plugin.PluginException;
import org.jnode.plugin.PluginRegistry;
@@ -795,7 +797,8 @@
public final void execute() throws BuildException {
try {
- BootLogInstance.set(new BootLog() {
+ InitialNaming.setNameSpace(new BasicNameSpace());
+ BootLogInstance.set(new BootLog() {
@Override
public void warn(String msg) {
System.out.println(msg);
Modified: trunk/core/src/core/org/jnode/bootlog/BootLogInstance.java
===================================================================
--- trunk/core/src/core/org/jnode/bootlog/BootLogInstance.java 2010-05-16 16:48:59 UTC (rev 5750)
+++ trunk/core/src/core/org/jnode/bootlog/BootLogInstance.java 2010-05-16 16:50:07 UTC (rev 5751)
@@ -1,19 +1,19 @@
package org.jnode.bootlog;
+import javax.naming.NameAlreadyBoundException;
+import javax.naming.NameNotFoundException;
+import javax.naming.NamingException;
+import org.jnode.naming.InitialNaming;
+
+
/**
- * Class holding the {@link BootLog} instance used by the system.
- * <br/><h1>Implementation note :</h1> The reference to the actual instance of
- * the BootLog can't be stored in the InitialNaming that use VmType, which is
- * not fully initialized at build time (but BootLog is used). So, we are always
- * holding the reference in that class.
+ * Class holding the {@link BootLog} instance used by the system.
*
* @author Fabien DUMINY
*
*/
public final class BootLogInstance {
- private static BootLog BOOT_LOG_INSTANCE;
-
private BootLogInstance () {
}
@@ -22,14 +22,20 @@
* @return the system's {@link BootLog}.
*/
public static BootLog get() {
- return BOOT_LOG_INSTANCE;
+ try {
+ return InitialNaming.lookup(BootLog.class);
+ } catch (NameNotFoundException e) {
+ throw new Error("unable to find a BootLog instance", e);
+ }
}
/**
* Set the system's {@link BootLog}.
* @param bootLog the system's {@link BootLog}.
+ * @throws NamingException
+ * @throws NameAlreadyBoundException
*/
- public static void set(BootLog bootLog) {
- BOOT_LOG_INSTANCE = bootLog;
+ public static void set(BootLog bootLog) throws NameAlreadyBoundException, NamingException {
+ InitialNaming.bind(BootLog.class, bootLog);
}
}
Deleted: trunk/core/src/core/org/jnode/naming/DefaultNameSpace.java
===================================================================
--- trunk/core/src/core/org/jnode/naming/DefaultNameSpace.java 2010-05-16 16:48:59 UTC (rev 5750)
+++ trunk/core/src/core/org/jnode/naming/DefaultNameSpace.java 2010-05-16 16:50:07 UTC (rev 5751)
@@ -1,118 +0,0 @@
-/*
- * $Id$
- *
- * Copyright (C) 2003-2010 JNode.org
- *
- * This library is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation; either version 2.1 of the License, or
- * (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
- * License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this library; If not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-package org.jnode.naming;
-
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Set;
-
-import javax.naming.NameAlreadyBoundException;
-import javax.naming.NameNotFoundException;
-import javax.naming.NamingException;
-
-import org.jnode.annotation.PrivilegedActionPragma;
-import org.jnode.vm.classmgr.VmType;
-
-public class DefaultNameSpace extends AbstractNameSpace {
-
- /**
- * All bound names+services
- */
- protected final Map<VmType<?>, Object> namespace = new HashMap<VmType<?>, Object>();
-
- /**
- * Bind a given service in the namespace under a given name.
- *
- * @param name
- * @param service
- * @throws NameAlreadyBoundException if the name already exists within this namespace
- */
- @PrivilegedActionPragma
- public <T> void bind(Class<T> name, T service) throws NamingException,
- NameAlreadyBoundException {
- if (name == null) {
- throw new IllegalArgumentException("name == null");
- }
- synchronized (namespace) {
- if (namespace.containsKey(VmType.fromClass(name))) {
- throw new NameAlreadyBoundException(name.getName());
- }
- namespace.put(VmType.fromClass(name), service);
- }
-
- // notify listeners
- fireServiceBound(name, service);
- }
-
- /**
- * Unbind a service with a given name from the namespace. If the name does
- * not exist in this namespace, this method returns without an error.
- *
- * @param name
- */
- @PrivilegedActionPragma
- public void unbind(Class<?> name) {
- final Object service;
- synchronized (namespace) {
- service = namespace.remove(VmType.fromClass((Class<?>) name));
- }
-
- // notify listeners
- fireServiceUnbound(name, service);
- }
-
- /**
- * Lookup a service with a given name.
- *
- * @param name
- * @throws NameNotFoundException if the name was not found in this namespace
- */
- @PrivilegedActionPragma
- public <T> T lookup(Class<T> name) throws NameNotFoundException {
- final Object result = namespace.get(VmType.fromClass(name));
- if (result == null) {
-// if (!VmIsolate.isRoot()) {
-// System.out.println("Looking for " + name.getVmClass().hashCode());
-// for (VmType<?> type : namespace.keySet()) {
-// System.out.println(" found " + type.hashCode() + " " + (type == name.getVmClass()));
-// }
-// }
- throw new NameNotFoundException(name.getName());
- }
- return name.cast(result);
- }
-
- /**
- * Gets a set containing all names (Class) of the bound services.
- */
- public Set<Class<?>> nameSet() {
- final HashSet<VmType<?>> types;
- synchronized (namespace) {
- types = new HashSet<VmType<?>>(namespace.keySet());
- }
- final Set<Class<?>> result = new HashSet<Class<?>>(types.size());
- for (VmType<?> type : types) {
- result.add(type.asClass());
- }
- return result;
- }
-}
Modified: trunk/core/src/core/org/jnode/naming/InitialNaming.java
===================================================================
--- trunk/core/src/core/org/jnode/naming/InitialNaming.java 2010-05-16 16:48:59 UTC (rev 5750)
+++ trunk/core/src/core/org/jnode/naming/InitialNaming.java 2010-05-16 16:50:07 UTC (rev 5751)
@@ -45,7 +45,7 @@
/**
* All bound names+services
*/
- private static NameSpace namespace;
+ private static NameSpace NAME_SPACE;
/**
* Add a {@link NameSpaceListener} to the NameSpace
@@ -54,7 +54,7 @@
* @param l
*/
public static <T> void addNameSpaceListener(Class<T> name, NameSpaceListener<T> l) {
- getNameSpace().addNameSpaceListener(name, l);
+ NAME_SPACE.addNameSpaceListener(name, l);
}
/**
@@ -64,7 +64,7 @@
* @param l
*/
public static <T> void removeNameSpaceListener(Class<T> name, NameSpaceListener<T> l) {
- getNameSpace().removeNameSpaceListener(name, l);
+ NAME_SPACE.removeNameSpaceListener(name, l);
}
/**
@@ -73,11 +73,11 @@
* @param namespace
*/
public static void setNameSpace(NameSpace namespace) {
- if (InitialNaming.namespace != null) {
+ if (NAME_SPACE != null) {
throw new SecurityException(
"namespace can't be modified after first initialization");
}
- InitialNaming.namespace = namespace;
+ NAME_SPACE = namespace;
}
/**
@@ -89,7 +89,7 @@
*/
public static <T, E extends T> void bind(Class<T> name, E service) throws NamingException,
NameAlreadyBoundException {
- getNameSpace().bind(name, service);
+ NAME_SPACE.bind(name, service);
}
/**
@@ -99,7 +99,7 @@
* @param name
*/
public static void unbind(Class<?> name) {
- getNameSpace().unbind(name);
+ NAME_SPACE.unbind(name);
}
/**
@@ -109,25 +109,13 @@
* @throws NameNotFoundException if the name was not found in this namespace
*/
public static <T> T lookup(Class<T> name) throws NameNotFoundException {
- return getNameSpace().lookup(name);
+ return NAME_SPACE.lookup(name);
}
/**
* Gets a set containing all names (Class) of the bound services.
*/
public static Set<Class<?>> nameSet() {
- return getNameSpace().nameSet();
+ return NAME_SPACE.nameSet();
}
-
- /**
- * Get the actual {@link NameSpace} and use a default one
- * if none was yet defined.
- * @return
- */
- private static NameSpace getNameSpace() {
- if (namespace == null) {
- namespace = new DefaultNameSpace();
- }
- return namespace;
- }
}
Modified: trunk/core/src/core/org/jnode/vm/BootLogImpl.java
===================================================================
--- trunk/core/src/core/org/jnode/vm/BootLogImpl.java 2010-05-16 16:48:59 UTC (rev 5750)
+++ trunk/core/src/core/org/jnode/vm/BootLogImpl.java 2010-05-16 16:50:07 UTC (rev 5751)
@@ -22,6 +22,9 @@
import java.io.PrintStream;
+import javax.naming.NameAlreadyBoundException;
+import javax.naming.NamingException;
+
import org.jnode.bootlog.BootLog;
import org.jnode.bootlog.BootLogInstance;
@@ -148,6 +151,14 @@
static void initialize() {
Unsafe.debug("Initialize BootLog\n");
- BootLogInstance.set(new BootLogImpl());
+ try {
+ BootLogInstance.set(new BootLogImpl());
+ } catch (NameAlreadyBoundException e) {
+ Unsafe.debug(e.toString());
+ Unsafe.debug("\n");
+ } catch (NamingException e) {
+ Unsafe.debug(e.toString());
+ Unsafe.debug("\n");
+ }
}
}
Copied: trunk/core/src/core/org/jnode/vm/DefaultNameSpace.java (from rev 5750, trunk/core/src/core/org/jnode/naming/DefaultNameSpace.java)
===================================================================
--- trunk/core/src/core/org/jnode/vm/DefaultNameSpace.java (rev 0)
+++ trunk/core/src/core/org/jnode/vm/DefaultNameSpace.java 2010-05-16 16:50:07 UTC (rev 5751)
@@ -0,0 +1,119 @@
+/*
+ * $Id$
+ *
+ * Copyright (C) 2003-2010 JNode.org
+ *
+ * This library is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as published
+ * by the Free Software Foundation; either version 2.1 of the License, or
+ * (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; If not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+package org.jnode.vm;
+
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+
+import javax.naming.NameAlreadyBoundException;
+import javax.naming.NameNotFoundException;
+import javax.naming.NamingException;
+
+import org.jnode.annotation.PrivilegedActionPragma;
+import org.jnode.naming.AbstractNameSpace;
+import org.jnode.vm.classmgr.VmType;
+
+class DefaultNameSpace extends AbstractNameSpace {
+
+ /**
+ * All bound names+services
+ */
+ protected final Map<VmType<?>, Object> namespace = new HashMap<VmType<?>, Object>();
+
+ /**
+ * Bind a given service in the namespace under a given name.
+ *
+ * @param name
+ * @param service
+ * @throws NameAlreadyBoundException if the name already exists within this namespace
+ */
+ @PrivilegedActionPragma
+ public <T> void bind(Class<T> name, T service) throws NamingException,
+ NameAlreadyBoundException {
+ if (name == null) {
+ throw new IllegalArgumentException("name == null");
+ }
+ synchronized (namespace) {
+ if (namespace.containsKey(VmType.fromClass(name))) {
+ throw new NameAlreadyBoundException(name.getName());
+ }
+ namespace.put(VmType.fromClass(name), service);
+ }
+
+ // notify listeners
+ fireServiceBound(name, service);
+ }
+
+ /**
+ * Unbind a service with a given name from the namespace. If the name does
+ * not exist in this namespace, this method returns without an error.
+ *
+ * @param name
+ */
+ @PrivilegedActionPragma
+ public void unbind(Class<?> name) {
+ final Object service;
+ synchronized (namespace) {
+ service = namespace.remove(VmType.fromClass((Class<?>) name));
+ }
+
+ // notify listeners
+ fireServiceUnbound(name, service);
+ }
+
+ /**
+ * Lookup a service with a given name.
+ *
+ * @param name
+ * @throws NameNotFoundException if the name was not found in this namespace
+ */
+ @PrivilegedActionPragma
+ public <T> T lookup(Class<T> name) throws NameNotFoundException {
+ final Object result = namespace.get(VmType.fromClass(name));
+ if (result == null) {
+// if (!VmIsolate.isRoot()) {
+// System.out.println("Looking for " + name.getVmClass().hashCode());
+// for (VmType<?> type : namespace.keySet()) {
+// System.out.println(" found " + type.hashCode() + " " + (type == name.getVmClass()));
+// }
+// }
+ throw new NameNotFoundException(name.getName());
+ }
+ return name.cast(result);
+ }
+
+ /**
+ * Gets a set containing all names (Class) of the bound services.
+ */
+ public Set<Class<?>> nameSet() {
+ final HashSet<VmType<?>> types;
+ synchronized (namespace) {
+ types = new HashSet<VmType<?>>(namespace.keySet());
+ }
+ final Set<Class<?>> result = new HashSet<Class<?>>(types.size());
+ for (VmType<?> type : types) {
+ result.add(type.asClass());
+ }
+ return result;
+ }
+}
Modified: trunk/core/src/core/org/jnode/vm/VmSystem.java
===================================================================
--- trunk/core/src/core/org/jnode/vm/VmSystem.java 2010-05-16 16:48:59 UTC (rev 5750)
+++ trunk/core/src/core/org/jnode/vm/VmSystem.java 2010-05-16 16:50:07 UTC (rev 5751)
@@ -119,7 +119,10 @@
*/
public static void initialize() {
if (!inited) {
- // Initialize BootLog
+ // Initialize Naming
+ InitialNaming.setNameSpace(new DefaultNameSpace());
+
+ // Initialize BootLog
BootLogImpl.initialize();
// Initialize resource manager
Modified: trunk/core/src/emu/org/jnode/emu/naming/BasicNameSpace.java
===================================================================
--- trunk/core/src/emu/org/jnode/emu/naming/BasicNameSpace.java 2010-05-16 16:48:59 UTC (rev 5750)
+++ trunk/core/src/emu/org/jnode/emu/naming/BasicNameSpace.java 2010-05-16 16:50:07 UTC (rev 5751)
@@ -36,7 +36,7 @@
*
* @author cr...@jn...
*/
-public final class BasicNameSpace extends AbstractNameSpace {
+public class BasicNameSpace extends AbstractNameSpace {
protected final Map<Class<?>, Object> namespace = new HashMap<Class<?>, Object>();
public <T> void bind(Class<T> name, T service)
Modified: trunk/fs/src/test/org/jnode/test/fs/driver/stubs/StubNameSpace.java
===================================================================
--- trunk/fs/src/test/org/jnode/test/fs/driver/stubs/StubNameSpace.java 2010-05-16 16:48:59 UTC (rev 5750)
+++ trunk/fs/src/test/org/jnode/test/fs/driver/stubs/StubNameSpace.java 2010-05-16 16:50:07 UTC (rev 5751)
@@ -24,10 +24,10 @@
import javax.naming.NameNotFoundException;
import javax.naming.NamingException;
import org.apache.log4j.Logger;
-import org.jnode.naming.DefaultNameSpace;
+import org.jnode.emu.naming.BasicNameSpace;
import org.jnode.test.support.MockUtils;
-public class StubNameSpace extends DefaultNameSpace {
+public class StubNameSpace extends BasicNameSpace {
private static final Logger log = Logger.getLogger(StubNameSpace.class);
public StubNameSpace() {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <fd...@us...> - 2010-05-16 16:52:05
|
Revision: 5752
http://jnode.svn.sourceforge.net/jnode/?rev=5752&view=rev
Author: fduminy
Date: 2010-05-16 16:51:58 +0000 (Sun, 16 May 2010)
Log Message:
-----------
removed package/plugin dependency cycle org.jnode.security <-> org.jnode.plugin by moving JNodePermission class to its own package/plugin (org.jnode.permission)
Signed-off-by: Fabien DUMINY <fab...@we...>
Modified Paths:
--------------
trunk/all/conf/system-plugin-list.xml
trunk/builder/src/builder/org/jnode/build/AbstractBootImageBuilder.java
trunk/cli/descriptors/org.jnode.command.dev.ant.xml
trunk/cli/descriptors/org.jnode.command.system.xml
trunk/core/descriptors/com.sun.tools.javac.xml
trunk/core/descriptors/org.apache.tools.ant.xml
trunk/core/descriptors/org.classpath.ext.security.xml
trunk/core/descriptors/org.classpath.ext.xml.ws.tools.xml
trunk/core/descriptors/org.classpath.tools.xml
trunk/core/descriptors/org.jnode.debugger.xml
trunk/core/descriptors/org.jnode.driver.bus.pci.xml
trunk/core/descriptors/org.jnode.driver.system.acpi.xml
trunk/core/descriptors/org.jnode.driver.xml
trunk/core/descriptors/org.jnode.system.repository.xml
trunk/core/descriptors/sun.tools.xml
trunk/core/src/classpath/vm/java/lang/NativeClassLoader.java
trunk/core/src/classpath/vm/java/lang/ThreadHelper.java
trunk/core/src/core/org/jnode/plugin/PluginLoader.java
trunk/core/src/core/org/jnode/plugin/PluginSecurityConstants.java
trunk/core/src/core/org/jnode/plugin/manager/DefaultPluginManager.java
trunk/core/src/core/org/jnode/vm/Unsafe.java
trunk/core/src/core/org/jnode/vm/VmArchitecture.java
trunk/core/src/core/org/jnode/vm/VmSystem.java
trunk/core/src/core/org/jnode/vm/classmgr/VmType.java
trunk/fs/descriptors/org.jnode.fs.command.xml
trunk/fs/descriptors/org.jnode.fs.jifs.command.xml
trunk/fs/descriptors/org.jnode.fs.jifs.def.xml
trunk/fs/descriptors/org.jnode.fs.jifs.xml
trunk/net/descriptors/org.jnode.net.ipv4.xml
trunk/shell/descriptors/js.xml
trunk/shell/descriptors/org.beanshell.xml
trunk/shell/descriptors/org.jnode.shell.bjorne.xml
trunk/shell/descriptors/org.jnode.shell.command.bsh.xml
trunk/shell/descriptors/org.jnode.test.shell.xml
Added Paths:
-----------
trunk/core/descriptors/org.jnode.permission.xml
trunk/core/src/core/org/jnode/permission/
trunk/core/src/core/org/jnode/permission/JNodePermission.java
Removed Paths:
-------------
trunk/core/src/core/org/jnode/security/JNodePermission.java
Modified: trunk/all/conf/system-plugin-list.xml
===================================================================
--- trunk/all/conf/system-plugin-list.xml 2010-05-16 16:50:07 UTC (rev 5751)
+++ trunk/all/conf/system-plugin-list.xml 2010-05-16 16:51:58 UTC (rev 5752)
@@ -11,6 +11,7 @@
<plugin id="rt"/>
<plugin id="rt.vm"/>
+ <plugin id="org.jnode.permission"/>
<plugin id="org.jnode.runtime"/>
<plugin id="org.jnode.runtime.core"/>
<plugin id="org.jnode.runtime.core.bootlog"/>
Modified: trunk/builder/src/builder/org/jnode/build/AbstractBootImageBuilder.java
===================================================================
--- trunk/builder/src/builder/org/jnode/build/AbstractBootImageBuilder.java 2010-05-16 16:50:07 UTC (rev 5751)
+++ trunk/builder/src/builder/org/jnode/build/AbstractBootImageBuilder.java 2010-05-16 16:51:58 UTC (rev 5752)
@@ -1446,6 +1446,7 @@
addCompileHighOptLevel("org.jnode.boot");
addCompileHighOptLevel("org.jnode.bootlog");
addCompileHighOptLevel("org.jnode.naming");
+ addCompileHighOptLevel("org.jnode.permission");
addCompileHighOptLevel("org.jnode.plugin");
addCompileHighOptLevel("org.jnode.plugin.manager");
addCompileHighOptLevel("org.jnode.plugin.model");
Modified: trunk/cli/descriptors/org.jnode.command.dev.ant.xml
===================================================================
--- trunk/cli/descriptors/org.jnode.command.dev.ant.xml 2010-05-16 16:50:07 UTC (rev 5751)
+++ trunk/cli/descriptors/org.jnode.command.dev.ant.xml 2010-05-16 16:51:58 UTC (rev 5752)
@@ -29,7 +29,7 @@
<permission class="java.lang.RuntimePermission" name="createClassLoader" actions="*" />
<permission class="java.lang.RuntimePermission" name="setIO" actions="*" />
<permission class="java.lang.RuntimePermission" name="exitVM" actions="*" />
- <permission class="org.jnode.security.JNodePermission" name="getVmClass" actions="*" />
+ <permission class="org.jnode.permission.JNodePermission" name="getVmClass" actions="*" />
<permission class="java.util.PropertyPermission" name="*" actions="read,write"/>
</extension>
Modified: trunk/cli/descriptors/org.jnode.command.system.xml
===================================================================
--- trunk/cli/descriptors/org.jnode.command.system.xml 2010-05-16 16:50:07 UTC (rev 5751)
+++ trunk/cli/descriptors/org.jnode.command.system.xml 2010-05-16 16:51:58 UTC (rev 5752)
@@ -304,13 +304,13 @@
<permission class="java.lang.RuntimePermission" name="setContextClassLoader"/>
<permission class="java.lang.RuntimePermission" name="modifyThreadGroup"/>
<permission class="java.io.FilePermission" name="<<ALL FILES>>" actions="read,write"/>
- <permission class="org.jnode.security.JNodePermission" name="createPluginLoader"/>
- <permission class="org.jnode.security.JNodePermission" name="loadPlugin"/>
- <permission class="org.jnode.security.JNodePermission" name="unloadPlugin"/>
- <permission class="org.jnode.security.JNodePermission" name="stopPlugin"/>
- <permission class="org.jnode.security.JNodePermission" name="halt"/>
- <permission class="org.jnode.security.JNodePermission" name="getVmThread"/>
- <permission class="org.jnode.security.JNodePermission" name="getVmClass"/>
+ <permission class="org.jnode.permission.JNodePermission" name="createPluginLoader"/>
+ <permission class="org.jnode.permission.JNodePermission" name="loadPlugin"/>
+ <permission class="org.jnode.permission.JNodePermission" name="unloadPlugin"/>
+ <permission class="org.jnode.permission.JNodePermission" name="stopPlugin"/>
+ <permission class="org.jnode.permission.JNodePermission" name="halt"/>
+ <permission class="org.jnode.permission.JNodePermission" name="getVmThread"/>
+ <permission class="org.jnode.permission.JNodePermission" name="getVmClass"/>
<permission class="java.lang.reflect.ReflectPermission" name="suppressAccessChecks"/>
</extension>
Modified: trunk/core/descriptors/com.sun.tools.javac.xml
===================================================================
--- trunk/core/descriptors/com.sun.tools.javac.xml 2010-05-16 16:50:07 UTC (rev 5751)
+++ trunk/core/descriptors/com.sun.tools.javac.xml 2010-05-16 16:51:58 UTC (rev 5752)
@@ -64,8 +64,8 @@
<permission class="java.lang.RuntimePermission" name="createClassLoader"/>
<permission class="java.lang.RuntimePermission" name="setContextClassLoader"/>
<permission class="java.lang.RuntimePermission" name="modifyThreadGroup"/>
- <permission class="org.jnode.security.JNodePermission" name="getVmThread"/>
- <permission class="org.jnode.security.JNodePermission" name="getVmClass"/>
+ <permission class="org.jnode.permission.JNodePermission" name="getVmThread"/>
+ <permission class="org.jnode.permission.JNodePermission" name="getVmClass"/>
<permission class="java.net.SocketPermission" name="*" actions="resolve"/>
<permission class="java.net.SocketPermission" name="*:0-" actions="connect,resolve"/>
<permission class="java.lang.RuntimePermission" name="writeFileDescriptor"/>
Modified: trunk/core/descriptors/org.apache.tools.ant.xml
===================================================================
--- trunk/core/descriptors/org.apache.tools.ant.xml 2010-05-16 16:50:07 UTC (rev 5751)
+++ trunk/core/descriptors/org.apache.tools.ant.xml 2010-05-16 16:51:58 UTC (rev 5752)
@@ -36,7 +36,7 @@
<permission class="java.lang.RuntimePermission" name="setIO" actions="*" />
<permission class="java.lang.RuntimePermission" name="exitVM" actions="*" />
<permission class="java.lang.RuntimePermission" name="createClassLoader" actions="*" />
- <permission class="org.jnode.security.JNodePermission" name="getVmClass" actions="*" />
+ <permission class="org.jnode.permission.JNodePermission" name="getVmClass" actions="*" />
<permission class="java.util.PropertyPermission" name="*" actions="read,write"/>
</extension>
</plugin>
\ No newline at end of file
Modified: trunk/core/descriptors/org.classpath.ext.security.xml
===================================================================
--- trunk/core/descriptors/org.classpath.ext.security.xml 2010-05-16 16:50:07 UTC (rev 5751)
+++ trunk/core/descriptors/org.classpath.ext.security.xml 2010-05-16 16:51:58 UTC (rev 5752)
@@ -62,8 +62,8 @@
<permission class="java.lang.RuntimePermission" name="setContextClassLoader"/>
<permission class="java.lang.RuntimePermission" name="modifyThreadGroup"/>
<permission class="java.io.FilePermission" name="<<ALL FILES>>" actions="read,write"/>
- <permission class="org.jnode.security.JNodePermission" name="getVmThread"/>
- <permission class="org.jnode.security.JNodePermission" name="getVmClass"/>
+ <permission class="org.jnode.permission.JNodePermission" name="getVmThread"/>
+ <permission class="org.jnode.permission.JNodePermission" name="getVmClass"/>
<permission class="java.net.SocketPermission" name="*" actions="resolve"/>
<permission class="java.net.SocketPermission" name="*:0-" actions="connect,resolve"/>
<permission class="java.lang.RuntimePermission" name="writeFileDescriptor"/>
Modified: trunk/core/descriptors/org.classpath.ext.xml.ws.tools.xml
===================================================================
--- trunk/core/descriptors/org.classpath.ext.xml.ws.tools.xml 2010-05-16 16:50:07 UTC (rev 5751)
+++ trunk/core/descriptors/org.classpath.ext.xml.ws.tools.xml 2010-05-16 16:51:58 UTC (rev 5752)
@@ -98,8 +98,8 @@
<permission class="java.lang.RuntimePermission" name="createClassLoader"/>
<permission class="java.lang.RuntimePermission" name="setContextClassLoader"/>
<permission class="java.lang.RuntimePermission" name="modifyThreadGroup"/>
- <permission class="org.jnode.security.JNodePermission" name="getVmThread"/>
- <permission class="org.jnode.security.JNodePermission" name="getVmClass"/>
+ <permission class="org.jnode.permission.JNodePermission" name="getVmThread"/>
+ <permission class="org.jnode.permission.JNodePermission" name="getVmClass"/>
<permission class="java.net.SocketPermission" name="*" actions="resolve"/>
<permission class="java.net.SocketPermission" name="*:0-" actions="connect,resolve"/>
<permission class="java.lang.RuntimePermission" name="writeFileDescriptor"/>
Modified: trunk/core/descriptors/org.classpath.tools.xml
===================================================================
--- trunk/core/descriptors/org.classpath.tools.xml 2010-05-16 16:50:07 UTC (rev 5751)
+++ trunk/core/descriptors/org.classpath.tools.xml 2010-05-16 16:51:58 UTC (rev 5752)
@@ -36,8 +36,8 @@
<permission class="java.lang.RuntimePermission" name="setContextClassLoader"/>
<permission class="java.lang.RuntimePermission" name="modifyThreadGroup"/>
<permission class="java.io.FilePermission" name="<<ALL FILES>>" actions="read,write"/>
- <permission class="org.jnode.security.JNodePermission" name="getVmThread"/>
- <permission class="org.jnode.security.JNodePermission" name="getVmClass"/>
+ <permission class="org.jnode.permission.JNodePermission" name="getVmThread"/>
+ <permission class="org.jnode.permission.JNodePermission" name="getVmClass"/>
<permission class="java.net.SocketPermission" name="*" actions="resolve"/>
<permission class="java.net.SocketPermission" name="*:0-" actions="connect,resolve"/>
<permission class="java.lang.RuntimePermission" name="writeFileDescriptor"/>
Modified: trunk/core/descriptors/org.jnode.debugger.xml
===================================================================
--- trunk/core/descriptors/org.jnode.debugger.xml 2010-05-16 16:50:07 UTC (rev 5751)
+++ trunk/core/descriptors/org.jnode.debugger.xml 2010-05-16 16:51:58 UTC (rev 5752)
@@ -22,7 +22,7 @@
<extension point="org.jnode.security.permissions">
<permission class="java.lang.RuntimePermission" name="modifyThreadGroup"/>
<permission class="org.jnode.driver.DriverPermission" name="setPreferredListener"/>
- <permission class="org.jnode.security.JNodePermission" name="getVmThread"/>
+ <permission class="org.jnode.permission.JNodePermission" name="getVmThread"/>
</extension>
</plugin>
\ No newline at end of file
Modified: trunk/core/descriptors/org.jnode.driver.bus.pci.xml
===================================================================
--- trunk/core/descriptors/org.jnode.driver.bus.pci.xml 2010-05-16 16:50:07 UTC (rev 5751)
+++ trunk/core/descriptors/org.jnode.driver.bus.pci.xml 2010-05-16 16:51:58 UTC (rev 5752)
@@ -24,7 +24,7 @@
<extension point="org.jnode.security.permissions">
<permission class="org.jnode.system.ResourcePermission" name="ioports"/>
- <permission class="org.jnode.security.JNodePermission" name="getVmClass"/>
+ <permission class="org.jnode.permission.JNodePermission" name="getVmClass"/>
</extension>
</plugin>
\ No newline at end of file
Modified: trunk/core/descriptors/org.jnode.driver.system.acpi.xml
===================================================================
--- trunk/core/descriptors/org.jnode.driver.system.acpi.xml 2010-05-16 16:50:07 UTC (rev 5751)
+++ trunk/core/descriptors/org.jnode.driver.system.acpi.xml 2010-05-16 16:51:58 UTC (rev 5752)
@@ -25,7 +25,7 @@
</extension>
<extension point="org.jnode.security.permissions">
- <permission class="org.jnode.security.JNodePermission" name="getMemoryMap"/>
+ <permission class="org.jnode.permission.JNodePermission" name="getMemoryMap"/>
</extension>
</plugin>
\ No newline at end of file
Modified: trunk/core/descriptors/org.jnode.driver.xml
===================================================================
--- trunk/core/descriptors/org.jnode.driver.xml 2010-05-16 16:50:07 UTC (rev 5751)
+++ trunk/core/descriptors/org.jnode.driver.xml 2010-05-16 16:51:58 UTC (rev 5752)
@@ -26,7 +26,7 @@
<extension point="org.jnode.security.permissions">
<permission class="java.lang.RuntimePermission" name="getClassLoader"/>
<permission class="java.util.PropertyPermission" name="jnode.cmdline" actions="read"/>
- <permission class="org.jnode.security.JNodePermission" name="getVmClass"/>
+ <permission class="org.jnode.permission.JNodePermission" name="getVmClass"/>
</extension>
</plugin>
\ No newline at end of file
Added: trunk/core/descriptors/org.jnode.permission.xml
===================================================================
--- trunk/core/descriptors/org.jnode.permission.xml (rev 0)
+++ trunk/core/descriptors/org.jnode.permission.xml 2010-05-16 16:51:58 UTC (rev 5752)
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plugin SYSTEM "jnode.dtd">
+
+<plugin id="org.jnode.permission"
+ name="JNode specific permissions"
+ version="@VERSION@"
+ system="true"
+ provider-name="JNode.org"
+ license-name="lgpl">
+
+ <runtime>
+ <library name="jnode-core.jar">
+ <export name="org.jnode.permission.*"/>
+ </library>
+ </runtime>
+</plugin>
\ No newline at end of file
Modified: trunk/core/descriptors/org.jnode.system.repository.xml
===================================================================
--- trunk/core/descriptors/org.jnode.system.repository.xml 2010-05-16 16:50:07 UTC (rev 5751)
+++ trunk/core/descriptors/org.jnode.system.repository.xml 2010-05-16 16:51:58 UTC (rev 5752)
@@ -18,7 +18,7 @@
</runtime>
<extension point="org.jnode.security.permissions">
- <permission class="org.jnode.security.JNodePermission" name="createPluginLoader"/>
+ <permission class="org.jnode.permission.JNodePermission" name="createPluginLoader"/>
</extension>
</plugin>
\ No newline at end of file
Modified: trunk/core/descriptors/sun.tools.xml
===================================================================
--- trunk/core/descriptors/sun.tools.xml 2010-05-16 16:50:07 UTC (rev 5751)
+++ trunk/core/descriptors/sun.tools.xml 2010-05-16 16:51:58 UTC (rev 5752)
@@ -44,8 +44,8 @@
<permission class="java.lang.RuntimePermission" name="setContextClassLoader"/>
<permission class="java.lang.RuntimePermission" name="modifyThreadGroup"/>
<permission class="java.io.FilePermission" name="<<ALL FILES>>" actions="read,write"/>
- <permission class="org.jnode.security.JNodePermission" name="getVmThread"/>
- <permission class="org.jnode.security.JNodePermission" name="getVmClass"/>
+ <permission class="org.jnode.permission.JNodePermission" name="getVmThread"/>
+ <permission class="org.jnode.permission.JNodePermission" name="getVmClass"/>
<permission class="java.net.SocketPermission" name="*" actions="resolve"/>
<permission class="java.net.SocketPermission" name="*:0-" actions="connect,resolve"/>
<permission class="java.lang.RuntimePermission" name="writeFileDescriptor"/>
Modified: trunk/core/src/classpath/vm/java/lang/NativeClassLoader.java
===================================================================
--- trunk/core/src/classpath/vm/java/lang/NativeClassLoader.java 2010-05-16 16:50:07 UTC (rev 5751)
+++ trunk/core/src/classpath/vm/java/lang/NativeClassLoader.java 2010-05-16 16:51:58 UTC (rev 5752)
@@ -24,11 +24,12 @@
import java.security.ProtectionDomain;
import java.io.InputStream;
import java.io.IOException;
+
+import org.jnode.permission.JNodePermission;
import org.jnode.vm.classmgr.VmClassLoader;
import org.jnode.vm.classmgr.VmType;
import org.jnode.vm.VmJavaClassLoader;
import org.jnode.vm.VmSystem;
-import org.jnode.security.JNodePermission;
/**
*
Modified: trunk/core/src/classpath/vm/java/lang/ThreadHelper.java
===================================================================
--- trunk/core/src/classpath/vm/java/lang/ThreadHelper.java 2010-05-16 16:50:07 UTC (rev 5751)
+++ trunk/core/src/classpath/vm/java/lang/ThreadHelper.java 2010-05-16 16:51:58 UTC (rev 5752)
@@ -20,10 +20,10 @@
package java.lang;
+import org.jnode.permission.JNodePermission;
import org.jnode.vm.scheduler.VmThread;
import org.jnode.annotation.KernelSpace;
import org.jnode.annotation.Internal;
-import org.jnode.security.JNodePermission;
/**
*
Copied: trunk/core/src/core/org/jnode/permission/JNodePermission.java (from rev 5751, trunk/core/src/core/org/jnode/security/JNodePermission.java)
===================================================================
--- trunk/core/src/core/org/jnode/permission/JNodePermission.java (rev 0)
+++ trunk/core/src/core/org/jnode/permission/JNodePermission.java 2010-05-16 16:51:58 UTC (rev 5752)
@@ -0,0 +1,52 @@
+/*
+ * $Id$
+ *
+ * Copyright (C) 2003-2010 JNode.org
+ *
+ * This library is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as published
+ * by the Free Software Foundation; either version 2.1 of the License, or
+ * (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; If not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+package org.jnode.permission;
+
+import java.security.BasicPermission;
+
+/**
+ * JNode specific permission.
+ * <p/>
+ * Known permission names:
+ * <ul>
+ * <li>getVmClass
+ * <li>getVmThread
+ * </ul>
+ *
+ * @author Ewout Prangsma (ep...@us...)
+ */
+public class JNodePermission extends BasicPermission {
+
+ /**
+ * @param name
+ */
+ public JNodePermission(String name) {
+ super(name);
+ }
+
+ /**
+ * @param name
+ * @param actions
+ */
+ public JNodePermission(String name, String actions) {
+ super(name, actions);
+ }
+}
Modified: trunk/core/src/core/org/jnode/plugin/PluginLoader.java
===================================================================
--- trunk/core/src/core/org/jnode/plugin/PluginLoader.java 2010-05-16 16:50:07 UTC (rev 5751)
+++ trunk/core/src/core/org/jnode/plugin/PluginLoader.java 2010-05-16 16:51:58 UTC (rev 5752)
@@ -22,7 +22,7 @@
import java.nio.ByteBuffer;
-import org.jnode.security.JNodePermission;
+import org.jnode.permission.JNodePermission;
/**
Modified: trunk/core/src/core/org/jnode/plugin/PluginSecurityConstants.java
===================================================================
--- trunk/core/src/core/org/jnode/plugin/PluginSecurityConstants.java 2010-05-16 16:50:07 UTC (rev 5751)
+++ trunk/core/src/core/org/jnode/plugin/PluginSecurityConstants.java 2010-05-16 16:51:58 UTC (rev 5752)
@@ -20,7 +20,7 @@
package org.jnode.plugin;
-import org.jnode.security.JNodePermission;
+import org.jnode.permission.JNodePermission;
/**
* @author epr
Modified: trunk/core/src/core/org/jnode/plugin/manager/DefaultPluginManager.java
===================================================================
--- trunk/core/src/core/org/jnode/plugin/manager/DefaultPluginManager.java 2010-05-16 16:50:07 UTC (rev 5751)
+++ trunk/core/src/core/org/jnode/plugin/manager/DefaultPluginManager.java 2010-05-16 16:51:58 UTC (rev 5752)
@@ -38,6 +38,7 @@
import org.jnode.bootlog.BootLog;
import org.jnode.bootlog.BootLogInstance;
import org.jnode.naming.InitialNaming;
+import org.jnode.permission.JNodePermission;
import org.jnode.plugin.Plugin;
import org.jnode.plugin.PluginDescriptor;
import org.jnode.plugin.PluginException;
@@ -46,7 +47,6 @@
import org.jnode.plugin.PluginPrerequisite;
import org.jnode.plugin.PluginRegistry;
import org.jnode.plugin.model.PluginRegistryModel;
-import org.jnode.security.JNodePermission;
/**
* @author epr
Deleted: trunk/core/src/core/org/jnode/security/JNodePermission.java
===================================================================
--- trunk/core/src/core/org/jnode/security/JNodePermission.java 2010-05-16 16:50:07 UTC (rev 5751)
+++ trunk/core/src/core/org/jnode/security/JNodePermission.java 2010-05-16 16:51:58 UTC (rev 5752)
@@ -1,52 +0,0 @@
-/*
- * $Id$
- *
- * Copyright (C) 2003-2010 JNode.org
- *
- * This library is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation; either version 2.1 of the License, or
- * (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
- * License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this library; If not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-package org.jnode.security;
-
-import java.security.BasicPermission;
-
-/**
- * JNode specific permission.
- * <p/>
- * Known permission names:
- * <ul>
- * <li>getVmClass
- * <li>getVmThread
- * </ul>
- *
- * @author Ewout Prangsma (ep...@us...)
- */
-public class JNodePermission extends BasicPermission {
-
- /**
- * @param name
- */
- public JNodePermission(String name) {
- super(name);
- }
-
- /**
- * @param name
- * @param actions
- */
- public JNodePermission(String name, String actions) {
- super(name, actions);
- }
-}
Modified: trunk/core/src/core/org/jnode/vm/Unsafe.java
===================================================================
--- trunk/core/src/core/org/jnode/vm/Unsafe.java 2010-05-16 16:50:07 UTC (rev 5751)
+++ trunk/core/src/core/org/jnode/vm/Unsafe.java 2010-05-16 16:51:58 UTC (rev 5752)
@@ -24,11 +24,11 @@
import java.io.StringWriter;
import org.jnode.assembler.ObjectResolver;
-import org.jnode.security.JNodePermission;
import org.jnode.annotation.Inline;
import org.jnode.annotation.Internal;
import org.jnode.annotation.KernelSpace;
import org.jnode.annotation.MagicPermission;
+import org.jnode.permission.JNodePermission;
import org.jnode.vm.classmgr.VmMethod;
import org.jnode.vm.classmgr.VmType;
import org.jnode.vm.scheduler.VmProcessor;
Modified: trunk/core/src/core/org/jnode/vm/VmArchitecture.java
===================================================================
--- trunk/core/src/core/org/jnode/vm/VmArchitecture.java 2010-05-16 16:50:07 UTC (rev 5751)
+++ trunk/core/src/core/org/jnode/vm/VmArchitecture.java 2010-05-16 16:51:58 UTC (rev 5752)
@@ -22,7 +22,7 @@
import java.nio.ByteOrder;
-import org.jnode.security.JNodePermission;
+import org.jnode.permission.JNodePermission;
import org.jnode.system.ResourceManager;
import org.jnode.annotation.Internal;
import org.jnode.annotation.KernelSpace;
Modified: trunk/core/src/core/org/jnode/vm/VmSystem.java
===================================================================
--- trunk/core/src/core/org/jnode/vm/VmSystem.java 2010-05-16 16:50:07 UTC (rev 5751)
+++ trunk/core/src/core/org/jnode/vm/VmSystem.java 2010-05-16 16:51:58 UTC (rev 5752)
@@ -41,8 +41,8 @@
import org.jnode.annotation.Uninterruptible;
import org.jnode.bootlog.BootLogInstance;
import org.jnode.naming.InitialNaming;
+import org.jnode.permission.JNodePermission;
import org.jnode.plugin.PluginManager;
-import org.jnode.security.JNodePermission;
import org.jnode.system.MemoryResource;
import org.jnode.system.ResourceManager;
import org.jnode.system.ResourceNotFreeException;
Modified: trunk/core/src/core/org/jnode/vm/classmgr/VmType.java
===================================================================
--- trunk/core/src/core/org/jnode/vm/classmgr/VmType.java 2010-05-16 16:50:07 UTC (rev 5751)
+++ trunk/core/src/core/org/jnode/vm/classmgr/VmType.java 2010-05-16 16:51:58 UTC (rev 5752)
@@ -31,6 +31,7 @@
import java.util.HashSet;
import org.jnode.assembler.NativeStream;
+import org.jnode.permission.JNodePermission;
import org.jnode.vm.JvmType;
import org.jnode.vm.LoadCompileService;
import org.jnode.vm.Unsafe;
@@ -50,7 +51,6 @@
import org.jnode.vm.compiler.CompiledIMT;
import org.jnode.vm.compiler.NativeCodeCompiler;
import org.jnode.vm.isolate.VmIsolateLocal;
-import org.jnode.security.JNodePermission;
import org.vmmagic.unboxed.Address;
import org.vmmagic.unboxed.ObjectReference;
Modified: trunk/fs/descriptors/org.jnode.fs.command.xml
===================================================================
--- trunk/fs/descriptors/org.jnode.fs.command.xml 2010-05-16 16:50:07 UTC (rev 5751)
+++ trunk/fs/descriptors/org.jnode.fs.command.xml 2010-05-16 16:51:58 UTC (rev 5752)
@@ -47,7 +47,7 @@
<permission class="java.net.NetPermission" name="specifyStreamHandler"/>
<permission class="java.lang.RuntimePermission" name="modifyThreadGroup"/>
<permission class="java.lang.RuntimePermission" name="exitVM"/>
- <permission class="org.jnode.security.JNodePermission" name="getVmClass"/>
+ <permission class="org.jnode.permission.JNodePermission" name="getVmClass"/>
</extension>
</plugin>
Modified: trunk/fs/descriptors/org.jnode.fs.jifs.command.xml
===================================================================
--- trunk/fs/descriptors/org.jnode.fs.jifs.command.xml 2010-05-16 16:50:07 UTC (rev 5751)
+++ trunk/fs/descriptors/org.jnode.fs.jifs.command.xml 2010-05-16 16:51:58 UTC (rev 5752)
@@ -30,8 +30,8 @@
</extension>
<extension point="org.jnode.security.permissions">
- <permission class="org.jnode.security.JNodePermission" name="stopPlugin"/>
- <permission class="org.jnode.security.JNodePermission" name="startPlugin"/>
+ <permission class="org.jnode.permission.JNodePermission" name="stopPlugin"/>
+ <permission class="org.jnode.permission.JNodePermission" name="startPlugin"/>
</extension>
</plugin>
\ No newline at end of file
Modified: trunk/fs/descriptors/org.jnode.fs.jifs.def.xml
===================================================================
--- trunk/fs/descriptors/org.jnode.fs.jifs.def.xml 2010-05-16 16:50:07 UTC (rev 5751)
+++ trunk/fs/descriptors/org.jnode.fs.jifs.def.xml 2010-05-16 16:51:58 UTC (rev 5752)
@@ -24,7 +24,7 @@
<permission class="java.util.PropertyPermission" name="*" actions="read,write"/>
<permission class="java.lang.RuntimePermission" name="getProtectionDomain"/>
<permission class="java.lang.RuntimePermission" name="modifyThreadGroup"/>
- <permission class="org.jnode.security.JNodePermission" name="getVmThread"/>
+ <permission class="org.jnode.permission.JNodePermission" name="getVmThread"/>
</extension>
</plugin>
\ No newline at end of file
Modified: trunk/fs/descriptors/org.jnode.fs.jifs.xml
===================================================================
--- trunk/fs/descriptors/org.jnode.fs.jifs.xml 2010-05-16 16:50:07 UTC (rev 5751)
+++ trunk/fs/descriptors/org.jnode.fs.jifs.xml 2010-05-16 16:51:58 UTC (rev 5752)
@@ -30,7 +30,7 @@
<permission class="java.util.PropertyPermission" name="*" actions="read,write"/>
<permission class="java.lang.RuntimePermission" name="getProtectionDomain"/>
<permission class="java.lang.RuntimePermission" name="modifyThreadGroup"/>
- <permission c...
[truncated message content] |
|
From: <fd...@us...> - 2010-05-16 17:00:47
|
Revision: 5753
http://jnode.svn.sourceforge.net/jnode/?rev=5753&view=rev
Author: fduminy
Date: 2010-05-16 17:00:38 +0000 (Sun, 16 May 2010)
Log Message:
-----------
- moved (resource related) classes from org.jnode.system to org.jnode.system.resource
- these classes are in their own plugin (that breaks the plugin dependency cycle org.jnode.vm.core -> org.jnode.runtime.core -> org.jnode.plugin -> org.jnode.vm.core)
Signed-off-by: Fabien DUMINY <fab...@we...>
Modified Paths:
--------------
trunk/builder/src/builder/org/jnode/build/AbstractBootImageBuilder.java
trunk/core/descriptors/org.jnode.driver.bus.pci.xml
trunk/core/descriptors/org.jnode.driver.bus.usb.uhci.xml
trunk/core/descriptors/org.jnode.driver.chipset.i440BX.xml
trunk/core/descriptors/org.jnode.driver.serial.xml
trunk/core/descriptors/org.jnode.driver.system.cmos.xml
trunk/core/descriptors/org.jnode.driver.system.firmware.bios.xml
trunk/core/descriptors/org.jnode.runtime.core.xml
trunk/core/src/classpath/vm/java/nio/MemoryRawData.java
trunk/core/src/classpath/vm/java/nio/NativeVMDirectByteBuffer.java
trunk/core/src/core/org/jnode/boot/InitJarProcessor.java
trunk/core/src/core/org/jnode/boot/MemoryResourceInputStream.java
trunk/core/src/core/org/jnode/system/package.html
trunk/core/src/core/org/jnode/system/x86/DMA.java
trunk/core/src/core/org/jnode/system/x86/DMAPlugin.java
trunk/core/src/core/org/jnode/system/x86/X86DMAChannel.java
trunk/core/src/core/org/jnode/vm/IOResourceImpl.java
trunk/core/src/core/org/jnode/vm/MemoryResourceImpl.java
trunk/core/src/core/org/jnode/vm/MemoryScannerImpl.java
trunk/core/src/core/org/jnode/vm/MultiMediaMemoryResourceImpl.java
trunk/core/src/core/org/jnode/vm/Region.java
trunk/core/src/core/org/jnode/vm/ResourceManagerImpl.java
trunk/core/src/core/org/jnode/vm/Vm.java
trunk/core/src/core/org/jnode/vm/VmArchitecture.java
trunk/core/src/core/org/jnode/vm/VmMultiMediaSupport.java
trunk/core/src/core/org/jnode/vm/VmSystem.java
trunk/core/src/core/org/jnode/vm/scheduler/IRQManager.java
trunk/core/src/core/org/jnode/vm/scheduler/IRQThread.java
trunk/core/src/core/org/jnode/vm/x86/IOAPIC.java
trunk/core/src/core/org/jnode/vm/x86/LocalAPIC.java
trunk/core/src/core/org/jnode/vm/x86/MPBusEntry.java
trunk/core/src/core/org/jnode/vm/x86/MPConfigTable.java
trunk/core/src/core/org/jnode/vm/x86/MPEntry.java
trunk/core/src/core/org/jnode/vm/x86/MPFloatingPointerStructure.java
trunk/core/src/core/org/jnode/vm/x86/MPIOAPICEntry.java
trunk/core/src/core/org/jnode/vm/x86/MPIOInterruptAssignmentEntry.java
trunk/core/src/core/org/jnode/vm/x86/MPInterruptAssignmentEntry.java
trunk/core/src/core/org/jnode/vm/x86/MPLocalInterruptAssignmentEntry.java
trunk/core/src/core/org/jnode/vm/x86/MPProcessorEntry.java
trunk/core/src/core/org/jnode/vm/x86/PIC8259A.java
trunk/core/src/core/org/jnode/vm/x86/VmX86Architecture.java
trunk/core/src/core/org/jnode/vm/x86/VmX86Processor.java
trunk/core/src/core/org/jnode/vm/x86/VmX86Processor32.java
trunk/core/src/core/org/jnode/vm/x86/VmX86Processor64.java
trunk/core/src/driver/org/jnode/driver/Device.java
trunk/core/src/driver/org/jnode/driver/bus/pci/PCIDriver.java
trunk/core/src/driver/org/jnode/driver/bus/usb/uhci/AbstractStructure.java
trunk/core/src/driver/org/jnode/driver/bus/usb/uhci/AbstractTreeStructure.java
trunk/core/src/driver/org/jnode/driver/bus/usb/uhci/FrameList.java
trunk/core/src/driver/org/jnode/driver/bus/usb/uhci/QueueHead.java
trunk/core/src/driver/org/jnode/driver/bus/usb/uhci/Schedule.java
trunk/core/src/driver/org/jnode/driver/bus/usb/uhci/TransferDescriptor.java
trunk/core/src/driver/org/jnode/driver/bus/usb/uhci/UHCIControlPipe.java
trunk/core/src/driver/org/jnode/driver/bus/usb/uhci/UHCICore.java
trunk/core/src/driver/org/jnode/driver/bus/usb/uhci/UHCIDataPipe.java
trunk/core/src/driver/org/jnode/driver/bus/usb/uhci/UHCIDriver.java
trunk/core/src/driver/org/jnode/driver/bus/usb/uhci/UHCIIO.java
trunk/core/src/driver/org/jnode/driver/bus/usb/uhci/UHCIPipe.java
trunk/core/src/driver/org/jnode/driver/bus/usb/uhci/UHCIPipeManager.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/acpi/AcpiSystemTable.java
trunk/core/src/driver/org/jnode/driver/system/acpi/AcpiTable.java
trunk/core/src/driver/org/jnode/driver/system/acpi/DifferentiatedSystemDescriptionTable.java
trunk/core/src/driver/org/jnode/driver/system/acpi/ExtendedSystemDescriptionTable.java
trunk/core/src/driver/org/jnode/driver/system/acpi/FirmwareAcpiControlStructure.java
trunk/core/src/driver/org/jnode/driver/system/acpi/FixedAcpiDescriptionTable.java
trunk/core/src/driver/org/jnode/driver/system/acpi/RSDP.java
trunk/core/src/driver/org/jnode/driver/system/acpi/RootSystemDescriptionTable.java
trunk/core/src/driver/org/jnode/driver/system/acpi/SystemDescriptionTable.java
trunk/core/src/driver/org/jnode/driver/system/cmos/def/CMOS.java
trunk/core/src/driver/org/jnode/driver/system/cmos/def/CMOSPlugin.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/core/src/test/org/jnode/test/CMOSTest.java
trunk/fs/descriptors/org.jnode.driver.block.floppy.xml
trunk/fs/descriptors/org.jnode.driver.bus.ide.xml
trunk/fs/src/driver/org/jnode/driver/block/floppy/DefaultFDC.java
trunk/fs/src/driver/org/jnode/driver/block/floppy/FDC.java
trunk/fs/src/driver/org/jnode/driver/block/floppy/FloppyControllerDriver.java
trunk/fs/src/driver/org/jnode/driver/block/floppy/FloppyReadSectorCommand.java
trunk/fs/src/driver/org/jnode/driver/block/floppy/FloppyWriteSectorCommand.java
trunk/fs/src/driver/org/jnode/driver/block/floppy/support/DefaultFloppyDeviceFactory.java
trunk/fs/src/driver/org/jnode/driver/block/floppy/support/FloppyDeviceFactory.java
trunk/fs/src/driver/org/jnode/driver/bus/ide/DefaultIDEControllerDriver.java
trunk/fs/src/driver/org/jnode/driver/bus/ide/DefaultIDEDeviceFactory.java
trunk/fs/src/driver/org/jnode/driver/bus/ide/DefaultIDEIO.java
trunk/fs/src/driver/org/jnode/driver/bus/ide/IDEBus.java
trunk/fs/src/driver/org/jnode/driver/bus/ide/IDEDeviceFactory.java
trunk/fs/src/test/org/jnode/test/fs/driver/context/IDEDiskDriverContext.java
trunk/fs/src/test/org/jnode/test/fs/driver/factories/MockFloppyDeviceFactory.java
trunk/fs/src/test/org/jnode/test/support/MockObjectFactory.java
trunk/gui/descriptors/org.jnode.driver.ps2.xml
trunk/gui/descriptors/org.jnode.driver.sound.speaker.pc.xml
trunk/gui/descriptors/org.jnode.driver.video.ati.mach64.xml
trunk/gui/descriptors/org.jnode.driver.video.ati.radeon.xml
trunk/gui/descriptors/org.jnode.driver.video.cirrus.xml
trunk/gui/descriptors/org.jnode.driver.video.vesa.xml
trunk/gui/descriptors/org.jnode.driver.video.vga.xml
trunk/gui/descriptors/org.jnode.driver.video.vmware.xml
trunk/gui/src/awt/org/jnode/awt/image/AbstractMemoryImageConsumer.java
trunk/gui/src/awt/org/jnode/awt/image/ImageConsumerByte.java
trunk/gui/src/awt/org/jnode/awt/image/ImageConsumerInt.java
trunk/gui/src/awt/org/jnode/awt/util/AbstractBitmapGraphics.java
trunk/gui/src/awt/org/jnode/awt/util/BitmapGraphics.java
trunk/gui/src/awt/org/jnode/awt/util/BitmapGraphics16bpp.java
trunk/gui/src/awt/org/jnode/awt/util/BitmapGraphics24bpp.java
trunk/gui/src/awt/org/jnode/awt/util/BitmapGraphics32bpp.java
trunk/gui/src/awt/org/jnode/awt/util/BitmapGraphics8bpp.java
trunk/gui/src/driver/org/jnode/driver/ps2/PS2Bus.java
trunk/gui/src/driver/org/jnode/driver/ps2/PS2KeyboardDriver.java
trunk/gui/src/driver/org/jnode/driver/ps2/PS2PointerDriver.java
trunk/gui/src/driver/org/jnode/driver/sound/speaker/pc/PCSpeakerDriver.java
trunk/gui/src/driver/org/jnode/driver/video/ati/mach64/Mach64Core.java
trunk/gui/src/driver/org/jnode/driver/video/ati/mach64/Mach64Driver.java
trunk/gui/src/driver/org/jnode/driver/video/ati/mach64/Mach64Surface.java
trunk/gui/src/driver/org/jnode/driver/video/ati/mach64/Mach64VgaIO.java
trunk/gui/src/driver/org/jnode/driver/video/ati/radeon/FBInfo.java
trunk/gui/src/driver/org/jnode/driver/video/ati/radeon/FPIBlock.java
trunk/gui/src/driver/org/jnode/driver/video/ati/radeon/FPITimingBlock.java
trunk/gui/src/driver/org/jnode/driver/video/ati/radeon/PLLInfo.java
trunk/gui/src/driver/org/jnode/driver/video/ati/radeon/RadeonCore.java
trunk/gui/src/driver/org/jnode/driver/video/ati/radeon/RadeonDriver.java
trunk/gui/src/driver/org/jnode/driver/video/ati/radeon/RadeonHardwareCursor.java
trunk/gui/src/driver/org/jnode/driver/video/ati/radeon/RadeonSurface.java
trunk/gui/src/driver/org/jnode/driver/video/ati/radeon/RadeonVgaIO.java
trunk/gui/src/driver/org/jnode/driver/video/cirrus/CirrusCore.java
trunk/gui/src/driver/org/jnode/driver/video/cirrus/CirrusDriver.java
trunk/gui/src/driver/org/jnode/driver/video/cirrus/CirrusMMIO.java
trunk/gui/src/driver/org/jnode/driver/video/nvidia/NVidiaCore.java
trunk/gui/src/driver/org/jnode/driver/video/nvidia/NVidiaDriver.java
trunk/gui/src/driver/org/jnode/driver/video/nvidia/NVidiaVgaIO.java
trunk/gui/src/driver/org/jnode/driver/video/vesa/VESACommand.java
trunk/gui/src/driver/org/jnode/driver/video/vesa/VESACore.java
trunk/gui/src/driver/org/jnode/driver/video/vesa/VESADriver.java
trunk/gui/src/driver/org/jnode/driver/video/vga/StandardVGA.java
trunk/gui/src/driver/org/jnode/driver/video/vga/StandardVGAIO.java
trunk/gui/src/driver/org/jnode/driver/video/vga/VGADriver.java
trunk/gui/src/driver/org/jnode/driver/video/vga/VGASurface.java
trunk/gui/src/driver/org/jnode/driver/video/vgahw/VgaIO.java
trunk/gui/src/driver/org/jnode/driver/video/vgahw/VgaState.java
trunk/gui/src/driver/org/jnode/driver/video/vmware/VMWareCore.java
trunk/gui/src/driver/org/jnode/driver/video/vmware/VMWareDriver.java
trunk/net/descriptors/org.jnode.driver.net.3c90x.xml
trunk/net/descriptors/org.jnode.driver.net.bcm570x.xml
trunk/net/descriptors/org.jnode.driver.net.eepro100.xml
trunk/net/descriptors/org.jnode.driver.net.lance.xml
trunk/net/descriptors/org.jnode.driver.net.ne2k-pci.xml
trunk/net/descriptors/org.jnode.driver.net.prism2.xml
trunk/net/descriptors/org.jnode.driver.net.rtl8139.xml
trunk/net/descriptors/org.jnode.driver.net.via_rhine.xml
trunk/net/src/driver/org/jnode/driver/net/_3c90x/_3c90xCore.java
trunk/net/src/driver/org/jnode/driver/net/_3c90x/_3c90xDriver.java
trunk/net/src/driver/org/jnode/driver/net/_3c90x/_3c90xRxRing.java
trunk/net/src/driver/org/jnode/driver/net/_3c90x/_3c90xTxBuffer.java
trunk/net/src/driver/org/jnode/driver/net/bcm570x/BCM570xCore.java
trunk/net/src/driver/org/jnode/driver/net/bcm570x/BCM570xDriver.java
trunk/net/src/driver/org/jnode/driver/net/eepro100/EEPRO100Buffer.java
trunk/net/src/driver/org/jnode/driver/net/eepro100/EEPRO100Core.java
trunk/net/src/driver/org/jnode/driver/net/eepro100/EEPRO100Driver.java
trunk/net/src/driver/org/jnode/driver/net/eepro100/EEPRO100Registers.java
trunk/net/src/driver/org/jnode/driver/net/eepro100/EEPRO100RxFD.java
trunk/net/src/driver/org/jnode/driver/net/eepro100/EEPRO100Stats.java
trunk/net/src/driver/org/jnode/driver/net/eepro100/EEPRO100TxFD.java
trunk/net/src/driver/org/jnode/driver/net/ethernet/spi/BasicEthernetDriver.java
trunk/net/src/driver/org/jnode/driver/net/lance/BufferManager.java
trunk/net/src/driver/org/jnode/driver/net/lance/DWordIOAccess.java
trunk/net/src/driver/org/jnode/driver/net/lance/Descriptor.java
trunk/net/src/driver/org/jnode/driver/net/lance/DescriptorRing.java
trunk/net/src/driver/org/jnode/driver/net/lance/IOAccess.java
trunk/net/src/driver/org/jnode/driver/net/lance/InitializationBlock32Bit.java
trunk/net/src/driver/org/jnode/driver/net/lance/LanceCore.java
trunk/net/src/driver/org/jnode/driver/net/lance/LanceDriver.java
trunk/net/src/driver/org/jnode/driver/net/lance/RxDescriptor.java
trunk/net/src/driver/org/jnode/driver/net/lance/RxDescriptorRing.java
trunk/net/src/driver/org/jnode/driver/net/lance/TxDescriptor.java
trunk/net/src/driver/org/jnode/driver/net/lance/TxDescriptorRing.java
trunk/net/src/driver/org/jnode/driver/net/lance/WordIOAccess.java
trunk/net/src/driver/org/jnode/driver/net/ne2000/Ne2000Core.java
trunk/net/src/driver/org/jnode/driver/net/ne2000/Ne2000Driver.java
trunk/net/src/driver/org/jnode/driver/net/ne2000/pci/Ne2000PCI.java
trunk/net/src/driver/org/jnode/driver/net/ne2000/pci/Ne2000PCIDriver.java
trunk/net/src/driver/org/jnode/driver/net/prism2/Prism2Core.java
trunk/net/src/driver/org/jnode/driver/net/prism2/Prism2Driver.java
trunk/net/src/driver/org/jnode/driver/net/prism2/Prism2IO.java
trunk/net/src/driver/org/jnode/driver/net/rtl8139/RTL8139Core.java
trunk/net/src/driver/org/jnode/driver/net/rtl8139/RTL8139Driver.java
trunk/net/src/driver/org/jnode/driver/net/rtl8139/RTL8139RxRing.java
trunk/net/src/driver/org/jnode/driver/net/rtl8139/RTL8139TxBuffer.java
trunk/net/src/driver/org/jnode/driver/net/via_rhine/ViaRhineCore.java
trunk/net/src/driver/org/jnode/driver/net/via_rhine/ViaRhineDesc.java
trunk/net/src/driver/org/jnode/driver/net/via_rhine/ViaRhineDriver.java
trunk/net/src/driver/org/jnode/driver/net/via_rhine/ViaRhineRing.java
trunk/net/src/driver/org/jnode/driver/net/via_rhine/ViaRhineRxRing.java
trunk/net/src/driver/org/jnode/driver/net/via_rhine/ViaRhineTxRing.java
trunk/net/src/driver/org/jnode/driver/net/wireless/spi/WirelessEthernetDriver.java
Added Paths:
-----------
trunk/core/descriptors/org.jnode.runtime.core.resource.xml
trunk/core/src/core/org/jnode/system/resource/
trunk/core/src/core/org/jnode/system/resource/DMAException.java
trunk/core/src/core/org/jnode/system/resource/DMAManager.java
trunk/core/src/core/org/jnode/system/resource/DMAResource.java
trunk/core/src/core/org/jnode/system/resource/IOResource.java
trunk/core/src/core/org/jnode/system/resource/IRQHandler.java
trunk/core/src/core/org/jnode/system/resource/IRQResource.java
trunk/core/src/core/org/jnode/system/resource/MemoryResource.java
trunk/core/src/core/org/jnode/system/resource/MemoryScanner.java
trunk/core/src/core/org/jnode/system/resource/MultiMediaMemoryResource.java
trunk/core/src/core/org/jnode/system/resource/Resource.java
trunk/core/src/core/org/jnode/system/resource/ResourceManager.java
trunk/core/src/core/org/jnode/system/resource/ResourceNotFreeException.java
trunk/core/src/core/org/jnode/system/resource/ResourceOwner.java
trunk/core/src/core/org/jnode/system/resource/ResourcePermission.java
trunk/core/src/core/org/jnode/system/resource/SimpleResourceOwner.java
trunk/core/src/core/org/jnode/system/resource/package.html
Removed Paths:
-------------
trunk/core/src/core/org/jnode/system/DMAException.java
trunk/core/src/core/org/jnode/system/DMAManager.java
trunk/core/src/core/org/jnode/system/DMAResource.java
trunk/core/src/core/org/jnode/system/IOResource.java
trunk/core/src/core/org/jnode/system/IRQHandler.java
trunk/core/src/core/org/jnode/system/IRQResource.java
trunk/core/src/core/org/jnode/system/MemoryResource.java
trunk/core/src/core/org/jnode/system/MemoryScanner.java
trunk/core/src/core/org/jnode/system/MultiMediaMemoryResource.java
trunk/core/src/core/org/jnode/system/Resource.java
trunk/core/src/core/org/jnode/system/ResourceManager.java
trunk/core/src/core/org/jnode/system/ResourceNotFreeException.java
trunk/core/src/core/org/jnode/system/ResourceOwner.java
trunk/core/src/core/org/jnode/system/ResourcePermission.java
trunk/core/src/core/org/jnode/system/SimpleResourceOwner.java
Property Changed:
----------------
trunk/gui/descriptors/org.jnode.driver.video.vesa.xml
trunk/gui/src/driver/org/jnode/driver/video/vesa/VESADriver.java
Modified: trunk/builder/src/builder/org/jnode/build/AbstractBootImageBuilder.java
===================================================================
--- trunk/builder/src/builder/org/jnode/build/AbstractBootImageBuilder.java 2010-05-16 16:51:58 UTC (rev 5752)
+++ trunk/builder/src/builder/org/jnode/build/AbstractBootImageBuilder.java 2010-05-16 17:00:38 UTC (rev 5753)
@@ -1451,7 +1451,7 @@
addCompileHighOptLevel("org.jnode.plugin.manager");
addCompileHighOptLevel("org.jnode.plugin.model");
addCompileHighOptLevel("org.jnode.security");
- addCompileHighOptLevel("org.jnode.system");
+ addCompileHighOptLevel("org.jnode.system.resource");
addCompileHighOptLevel("org.jnode.system.event");
addCompileHighOptLevel("org.jnode.util");
addCompileHighOptLevel("org.jnode.vm");
Modified: trunk/core/descriptors/org.jnode.driver.bus.pci.xml
===================================================================
--- trunk/core/descriptors/org.jnode.driver.bus.pci.xml 2010-05-16 16:51:58 UTC (rev 5752)
+++ trunk/core/descriptors/org.jnode.driver.bus.pci.xml 2010-05-16 17:00:38 UTC (rev 5753)
@@ -23,7 +23,7 @@
</extension>
<extension point="org.jnode.security.permissions">
- <permission class="org.jnode.system.ResourcePermission" name="ioports"/>
+ <permission class="org.jnode.system.resource.ResourcePermission" name="ioports"/>
<permission class="org.jnode.permission.JNodePermission" name="getVmClass"/>
</extension>
Modified: trunk/core/descriptors/org.jnode.driver.bus.usb.uhci.xml
===================================================================
--- trunk/core/descriptors/org.jnode.driver.bus.usb.uhci.xml 2010-05-16 16:51:58 UTC (rev 5752)
+++ trunk/core/descriptors/org.jnode.driver.bus.usb.uhci.xml 2010-05-16 17:00:38 UTC (rev 5753)
@@ -25,7 +25,7 @@
</extension>
<extension point="org.jnode.security.permissions">
- <permission class="org.jnode.system.ResourcePermission" name="ioports"/>
+ <permission class="org.jnode.system.resource.ResourcePermission" name="ioports"/>
</extension>
</plugin>
Modified: trunk/core/descriptors/org.jnode.driver.chipset.i440BX.xml
===================================================================
--- trunk/core/descriptors/org.jnode.driver.chipset.i440BX.xml 2010-05-16 16:51:58 UTC (rev 5752)
+++ trunk/core/descriptors/org.jnode.driver.chipset.i440BX.xml 2010-05-16 17:00:38 UTC (rev 5753)
@@ -23,7 +23,7 @@
</extension>
<extension point="org.jnode.security.permissions">
- <permission class="org.jnode.system.ResourcePermission" name="ioports"/>
+ <permission class="org.jnode.system.resource.ResourcePermission" name="ioports"/>
</extension>
</plugin>
\ No newline at end of file
Modified: trunk/core/descriptors/org.jnode.driver.serial.xml
===================================================================
--- trunk/core/descriptors/org.jnode.driver.serial.xml 2010-05-16 16:51:58 UTC (rev 5752)
+++ trunk/core/descriptors/org.jnode.driver.serial.xml 2010-05-16 17:00:38 UTC (rev 5753)
@@ -22,7 +22,7 @@
</extension>
<extension point="org.jnode.security.permissions">
- <permission class="org.jnode.system.ResourcePermission" name="ioports"/>
+ <permission class="org.jnode.system.resource.ResourcePermission" name="ioports"/>
</extension>
</plugin>
Modified: trunk/core/descriptors/org.jnode.driver.system.cmos.xml
===================================================================
--- trunk/core/descriptors/org.jnode.driver.system.cmos.xml 2010-05-16 16:51:58 UTC (rev 5752)
+++ trunk/core/descriptors/org.jnode.driver.system.cmos.xml 2010-05-16 17:00:38 UTC (rev 5753)
@@ -20,7 +20,7 @@
</runtime>
<extension point="org.jnode.security.permissions">
- <permission class="org.jnode.system.ResourcePermission" name="ioports"/>
+ <permission class="org.jnode.system.resource.ResourcePermission" name="ioports"/>
</extension>
</plugin>
\ No newline at end of file
Modified: trunk/core/descriptors/org.jnode.driver.system.firmware.bios.xml
===================================================================
--- trunk/core/descriptors/org.jnode.driver.system.firmware.bios.xml 2010-05-16 16:51:58 UTC (rev 5752)
+++ trunk/core/descriptors/org.jnode.driver.system.firmware.bios.xml 2010-05-16 17:00:38 UTC (rev 5753)
@@ -22,7 +22,7 @@
</extension>
<extension point="org.jnode.security.permissions">
- <permission class="org.jnode.system.ResourcePermission" name="memoryScanner"/>
+ <permission class="org.jnode.system.resource.ResourcePermission" name="memoryScanner"/>
</extension>
</plugin>
\ No newline at end of file
Added: trunk/core/descriptors/org.jnode.runtime.core.resource.xml
===================================================================
--- trunk/core/descriptors/org.jnode.runtime.core.resource.xml (rev 0)
+++ trunk/core/descriptors/org.jnode.runtime.core.resource.xml 2010-05-16 17:00:38 UTC (rev 5753)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plugin SYSTEM "jnode.dtd">
+
+<plugin id="org.jnode.runtime.core.resource"
+ name="JNode core resource interfaces"
+ version="@VERSION@"
+ system="true"
+ license-name="lgpl"
+ provider-name="JNode.org">
+
+ <runtime>
+ <library name="jnode-core.jar">
+ <export name="org.jnode.system.resource.*"/>
+ </library>
+ </runtime>
+
+</plugin>
\ No newline at end of file
Modified: trunk/core/descriptors/org.jnode.runtime.core.xml
===================================================================
--- trunk/core/descriptors/org.jnode.runtime.core.xml 2010-05-16 16:51:58 UTC (rev 5752)
+++ trunk/core/descriptors/org.jnode.runtime.core.xml 2010-05-16 17:00:38 UTC (rev 5753)
@@ -24,7 +24,6 @@
<export name="org.jnode.plugin.model.*"/>
<export name="org.jnode.protocol.plugin.*"/>
<export name="org.jnode.protocol.system.*"/>
- <export name="org.jnode.system.*"/>
<export name="org.jnode.system.event.*"/>
</library>
</runtime>
Modified: trunk/core/src/classpath/vm/java/nio/MemoryRawData.java
===================================================================
--- trunk/core/src/classpath/vm/java/nio/MemoryRawData.java 2010-05-16 16:51:58 UTC (rev 5752)
+++ trunk/core/src/classpath/vm/java/nio/MemoryRawData.java 2010-05-16 17:00:38 UTC (rev 5753)
@@ -21,11 +21,12 @@
package java.nio;
import gnu.classpath.Pointer;
-import org.jnode.system.MemoryResource;
-import org.jnode.system.ResourceManager;
-import org.jnode.system.ResourceOwner;
-import org.jnode.system.SimpleResourceOwner;
-import org.jnode.system.ResourceNotFreeException;
+
+import org.jnode.system.resource.MemoryResource;
+import org.jnode.system.resource.ResourceManager;
+import org.jnode.system.resource.ResourceNotFreeException;
+import org.jnode.system.resource.ResourceOwner;
+import org.jnode.system.resource.SimpleResourceOwner;
import org.jnode.naming.InitialNaming;
import org.vmmagic.unboxed.Address;
import javax.naming.NameNotFoundException;
Modified: trunk/core/src/classpath/vm/java/nio/NativeVMDirectByteBuffer.java
===================================================================
--- trunk/core/src/classpath/vm/java/nio/NativeVMDirectByteBuffer.java 2010-05-16 16:51:58 UTC (rev 5752)
+++ trunk/core/src/classpath/vm/java/nio/NativeVMDirectByteBuffer.java 2010-05-16 17:00:38 UTC (rev 5753)
@@ -21,8 +21,9 @@
package java.nio;
import gnu.classpath.Pointer;
-import org.jnode.system.MemoryResource;
-import org.jnode.system.ResourceNotFreeException;
+
+import org.jnode.system.resource.MemoryResource;
+import org.jnode.system.resource.ResourceNotFreeException;
import org.vmmagic.unboxed.Offset;
import org.vmmagic.unboxed.Extent;
Modified: trunk/core/src/core/org/jnode/boot/InitJarProcessor.java
===================================================================
--- trunk/core/src/core/org/jnode/boot/InitJarProcessor.java 2010-05-16 16:51:58 UTC (rev 5752)
+++ trunk/core/src/core/org/jnode/boot/InitJarProcessor.java 2010-05-16 17:00:38 UTC (rev 5753)
@@ -36,7 +36,7 @@
import org.jnode.plugin.PluginException;
import org.jnode.plugin.PluginLoader;
import org.jnode.plugin.PluginRegistry;
-import org.jnode.system.MemoryResource;
+import org.jnode.system.resource.MemoryResource;
import org.jnode.util.JarBuffer;
/**
Modified: trunk/core/src/core/org/jnode/boot/MemoryResourceInputStream.java
===================================================================
--- trunk/core/src/core/org/jnode/boot/MemoryResourceInputStream.java 2010-05-16 16:51:58 UTC (rev 5752)
+++ trunk/core/src/core/org/jnode/boot/MemoryResourceInputStream.java 2010-05-16 17:00:38 UTC (rev 5753)
@@ -23,7 +23,7 @@
import java.io.IOException;
import java.io.InputStream;
-import org.jnode.system.MemoryResource;
+import org.jnode.system.resource.MemoryResource;
import org.jnode.annotation.MagicPermission;
Deleted: trunk/core/src/core/org/jnode/system/DMAException.java
===================================================================
--- trunk/core/src/core/org/jnode/system/DMAException.java 2010-05-16 16:51:58 UTC (rev 5752)
+++ trunk/core/src/core/org/jnode/system/DMAException.java 2010-05-16 17:00:38 UTC (rev 5753)
@@ -1,58 +0,0 @@
-/*
- * $Id$
- *
- * Copyright (C) 2003-2010 JNode.org
- *
- * This library is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation; either version 2.1 of the License, or
- * (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
- * License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this library; If not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-package org.jnode.system;
-
-/**
- * Direct Memory Access Exception.
- *
- * @author Ewout Prangsma (ep...@us...)
- */
-public class DMAException extends Exception {
-
- /**
- *
- */
- public DMAException() {
- super();
- }
-
- /**
- * @param message
- * @param cause
- */
- public DMAException(String message, Throwable cause) {
- super(message, cause);
- }
-
- /**
- * @param cause
- */
- public DMAException(Throwable cause) {
- super(cause);
- }
-
- /**
- * @param s
- */
- public DMAException(String s) {
- super(s);
- }
-}
Deleted: trunk/core/src/core/org/jnode/system/DMAManager.java
===================================================================
--- trunk/core/src/core/org/jnode/system/DMAManager.java 2010-05-16 16:51:58 UTC (rev 5752)
+++ trunk/core/src/core/org/jnode/system/DMAManager.java 2010-05-16 17:00:38 UTC (rev 5753)
@@ -1,49 +0,0 @@
-/*
- * $Id$
- *
- * Copyright (C) 2003-2010 JNode.org
- *
- * This library is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation; either version 2.1 of the License, or
- * (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
- * License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this library; If not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-package org.jnode.system;
-
-
-/**
- * Interface of Manager or Direct Memory Access resources.
- *
- * @author Ewout Prangsma (ep...@us...)
- */
-public interface DMAManager {
-
- /**
- * Name used to bind this service into the Initial Namespace
- */
- public static final Class<DMAManager> NAME = DMAManager.class; //"system/DMAService";
-
- /**
- * Claim a DMA channel identified by the given number.
- *
- * @param owner
- * @param dmanr
- * @return The claimed resource
- * @throws IllegalArgumentException Invalid dmanr
- * @throws ResourceNotFreeException Requested DMA channel is in use
- */
- public DMAResource claimDMAChannel(ResourceOwner owner, int dmanr)
- throws IllegalArgumentException, ResourceNotFreeException;
-
-
-}
Deleted: trunk/core/src/core/org/jnode/system/DMAResource.java
===================================================================
--- trunk/core/src/core/org/jnode/system/DMAResource.java 2010-05-16 16:51:58 UTC (rev 5752)
+++ trunk/core/src/core/org/jnode/system/DMAResource.java 2010-05-16 17:00:38 UTC (rev 5753)
@@ -1,69 +0,0 @@
-/*
- * $Id$
- *
- * Copyright (C) 2003-2010 JNode.org
- *
- * This library is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation; either version 2.1 of the License, or
- * (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Publ...
[truncated message content] |
|
From: <fd...@us...> - 2010-05-16 17:01:17
|
Revision: 5754
http://jnode.svn.sourceforge.net/jnode/?rev=5754&view=rev
Author: fduminy
Date: 2010-05-16 17:01:11 +0000 (Sun, 16 May 2010)
Log Message:
-----------
extracted org.jnode.plugin packages from org.jnode.runtime.core by adding 2 new plugins :
- org.jnode.plugin for the API
- org.jnode.plugin.impl for its implementation
Signed-off-by: Fabien DUMINY <fab...@we...>
Modified Paths:
--------------
trunk/all/conf/system-plugin-list.xml
trunk/core/descriptors/org.jnode.runtime.core.xml
Added Paths:
-----------
trunk/core/descriptors/org.jnode.plugin.impl.xml
trunk/core/descriptors/org.jnode.plugin.xml
Modified: trunk/all/conf/system-plugin-list.xml
===================================================================
--- trunk/all/conf/system-plugin-list.xml 2010-05-16 17:00:38 UTC (rev 5753)
+++ trunk/all/conf/system-plugin-list.xml 2010-05-16 17:01:11 UTC (rev 5754)
@@ -12,9 +12,12 @@
<plugin id="rt.vm"/>
<plugin id="org.jnode.permission"/>
+ <plugin id="org.jnode.plugin"/>
+ <plugin id="org.jnode.plugin.impl"/>
<plugin id="org.jnode.runtime"/>
<plugin id="org.jnode.runtime.core"/>
<plugin id="org.jnode.runtime.core.bootlog"/>
+ <plugin id="org.jnode.runtime.core.resource"/>
<plugin id="org.jnode.security"/>
<plugin id="org.jnode.util"/>
<plugin id="org.jnode.vm"/>
Copied: trunk/core/descriptors/org.jnode.plugin.impl.xml (from rev 5753, trunk/core/descriptors/org.jnode.runtime.core.xml)
===================================================================
--- trunk/core/descriptors/org.jnode.plugin.impl.xml (rev 0)
+++ trunk/core/descriptors/org.jnode.plugin.impl.xml 2010-05-16 17:01:11 UTC (rev 5754)
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plugin SYSTEM "jnode.dtd">
+
+<plugin id="org.jnode.plugin.impl"
+ name="implementation of JNode plugin framework"
+ version="@VERSION@"
+ system="true"
+ license-name="lgpl"
+ provider-name="JNode.org">
+
+ <requires>
+ <import plugin="nanoxml"/>
+ <import plugin="org.jnode.plugin"/>
+ <import plugin="org.jnode.security"/>
+ <import plugin="org.jnode.util"/>
+ <import plugin="org.jnode.vm"/>
+ </requires>
+
+ <runtime>
+ <library name="jnode-core.jar">
+ <export name="org.jnode.plugin.manager.*"/>
+ <export name="org.jnode.plugin.model.*"/>
+ </library>
+ </runtime>
+
+</plugin>
\ No newline at end of file
Added: trunk/core/descriptors/org.jnode.plugin.xml
===================================================================
--- trunk/core/descriptors/org.jnode.plugin.xml (rev 0)
+++ trunk/core/descriptors/org.jnode.plugin.xml 2010-05-16 17:01:11 UTC (rev 5754)
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plugin SYSTEM "jnode.dtd">
+
+<plugin id="org.jnode.plugin"
+ name="API of JNode plugin framework"
+ version="@VERSION@"
+ system="true"
+ license-name="lgpl"
+ provider-name="JNode.org">
+
+ <requires>
+ <import plugin="org.jnode.vm.core"/>
+ </requires>
+
+ <runtime>
+ <library name="jnode-core.jar">
+ <export name="org.jnode.plugin.*"/>
+ </library>
+ </runtime>
+
+</plugin>
\ No newline at end of file
Modified: trunk/core/descriptors/org.jnode.runtime.core.xml
===================================================================
--- trunk/core/descriptors/org.jnode.runtime.core.xml 2010-05-16 17:00:38 UTC (rev 5753)
+++ trunk/core/descriptors/org.jnode.runtime.core.xml 2010-05-16 17:01:11 UTC (rev 5754)
@@ -10,6 +10,8 @@
<requires>
<import plugin="nanoxml"/>
+ <import plugin="org.jnode.plugin"/>
+ <import plugin="org.jnode.plugin.impl"/>
<import plugin="org.jnode.util"/>
<import plugin="org.jnode.security"/>
<import plugin="org.jnode.vm"/>
@@ -19,9 +21,6 @@
<library name="jnode-core.jar">
<export name="org.jnode.boot.*"/>
<export name="org.jnode.naming.*"/>
- <export name="org.jnode.plugin.*"/>
- <export name="org.jnode.plugin.manager.*"/>
- <export name="org.jnode.plugin.model.*"/>
<export name="org.jnode.protocol.plugin.*"/>
<export name="org.jnode.protocol.system.*"/>
<export name="org.jnode.system.event.*"/>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <fd...@us...> - 2010-07-11 14:27:47
|
Revision: 5756
http://jnode.svn.sourceforge.net/jnode/?rev=5756&view=rev
Author: fduminy
Date: 2010-07-11 14:27:38 +0000 (Sun, 11 Jul 2010)
Log Message:
-----------
Merge git://gitorious.org/~fduminy/jnode/maven into HEAD
Conflicts:
builder/src/builder/org/jnode/build/AbstractBootImageBuilder.java
builder/src/builder/org/jnode/build/ObjectEmitter.java
core/src/classpath/vm/java/lang/ThreadHelper.java
core/src/core/org/jnode/assembler/x86/X86Register.java
core/src/core/org/jnode/plugin/model/PluginJar.java
core/src/core/org/jnode/plugin/model/PluginRegistryModel.java
core/src/core/org/jnode/system/IRQResource.java
core/src/core/org/jnode/system/resource/IRQResource.java
core/src/core/org/jnode/vm/BaseVmArchitecture.java
core/src/core/org/jnode/vm/BootLogImpl.java
core/src/core/org/jnode/vm/InternString.java
core/src/core/org/jnode/vm/MemoryBlockManager.java
core/src/core/org/jnode/vm/Unsafe.java
core/src/core/org/jnode/vm/VmImpl.java
core/src/core/org/jnode/vm/bytecode/BasicBlock.java
core/src/core/org/jnode/vm/classmgr/ClassDecoder.java
core/src/core/org/jnode/vm/classmgr/SelectorMap.java
core/src/core/org/jnode/vm/classmgr/VmType.java
core/src/core/org/jnode/vm/compiler/OptimizingBytecodeVisitor.java
core/src/core/org/jnode/vm/isolate/VmIsolate.java
core/src/core/org/jnode/vm/objects/VmSystemObject.java
core/src/core/org/jnode/vm/scheduler/IRQManager.java
core/src/core/org/jnode/vm/x86/VmX86Architecture.java
core/src/core/org/jnode/vm/x86/VmX86Processor.java
core/src/core/org/jnode/vm/x86/VmX86Processor32.java
core/src/core/org/jnode/vm/x86/VmX86Processor64.java
core/src/core/org/jnode/vm/x86/compiler/l1a/X86BytecodeVisitor.java
core/src/core/org/jnode/vm/x86/compiler/l1b/X86BytecodeVisitor.java
core/src/mmtk-vm/org/jnode/vm/memmgr/mmtk/BaseMmtkHeapManager.java
core/src/mmtk-vm/org/mmtk/vm/Assert.java
Modified Paths:
--------------
trunk/builder/src/builder/org/jnode/ant/taskdefs/NativeCheckTask.java
trunk/builder/src/builder/org/jnode/build/AbstractAsmConstBuilder.java
trunk/builder/src/builder/org/jnode/build/AbstractBootImageBuilder.java
trunk/builder/src/builder/org/jnode/build/ObjectEmitter.java
trunk/builder/src/builder/org/jnode/build/x86/AsmConstBuilder.java
trunk/builder/src/builder/org/jnode/build/x86/BootImageBuilder.java
trunk/cli/src/commands/org/jnode/command/system/GcCommand.java
trunk/cli/src/commands/org/jnode/command/system/OnHeapCommand.java
trunk/cli/src/commands/org/jnode/command/system/PluginCommand.java
trunk/cli/src/commands/org/jnode/command/system/VmInfoCommand.java
trunk/core/descriptors/org.jnode.vm.core.xml
trunk/core/src/classpath/vm/gnu/classpath/jdwp/NativeVMVirtualMachine.java
trunk/core/src/classpath/vm/java/lang/ThreadHelper.java
trunk/core/src/classpath/vm/java/lang/VMRuntime.java
trunk/core/src/classpath/vm/java/lang/VMSystem.java
trunk/core/src/core/org/jnode/assembler/ObjectResolver.java
trunk/core/src/core/org/jnode/assembler/x86/X86Register.java
trunk/core/src/core/org/jnode/plugin/AutoUnzipPlugin.java
trunk/core/src/core/org/jnode/plugin/PluginClassLoader.java
trunk/core/src/core/org/jnode/plugin/PluginDescriptor.java
trunk/core/src/core/org/jnode/plugin/model/AbstractModelObject.java
trunk/core/src/core/org/jnode/plugin/model/AttributeModel.java
trunk/core/src/core/org/jnode/plugin/model/ExtensionPointModel.java
trunk/core/src/core/org/jnode/plugin/model/PluginClassLoaderImpl.java
trunk/core/src/core/org/jnode/plugin/model/PluginJar.java
trunk/core/src/core/org/jnode/plugin/model/PluginRegistryModel.java
trunk/core/src/core/org/jnode/vm/AllocationBitmap.java
trunk/core/src/core/org/jnode/vm/BootLogImpl.java
trunk/core/src/core/org/jnode/vm/HeapHelperImpl.java
trunk/core/src/core/org/jnode/vm/InternString.java
trunk/core/src/core/org/jnode/vm/LoadCompileService.java
trunk/core/src/core/org/jnode/vm/MemoryBlockManager.java
trunk/core/src/core/org/jnode/vm/MemoryResourceImpl.java
trunk/core/src/core/org/jnode/vm/SoftByteCodes.java
trunk/core/src/core/org/jnode/vm/Unsafe.java
trunk/core/src/core/org/jnode/vm/VmAddress.java
trunk/core/src/core/org/jnode/vm/VmJavaClassLoader.java
trunk/core/src/core/org/jnode/vm/VmReflection.java
trunk/core/src/core/org/jnode/vm/VmStackFrame.java
trunk/core/src/core/org/jnode/vm/VmStackReader.java
trunk/core/src/core/org/jnode/vm/VmSystem.java
trunk/core/src/core/org/jnode/vm/VmSystemClassLoader.java
trunk/core/src/core/org/jnode/vm/bytecode/BasicBlock.java
trunk/core/src/core/org/jnode/vm/classmgr/AbstractCode.java
trunk/core/src/core/org/jnode/vm/classmgr/AbstractExceptionHandler.java
trunk/core/src/core/org/jnode/vm/classmgr/ClassDecoder.java
trunk/core/src/core/org/jnode/vm/classmgr/CompiledCodeList.java
trunk/core/src/core/org/jnode/vm/classmgr/ObjectLayout.java
trunk/core/src/core/org/jnode/vm/classmgr/SelectorMap.java
trunk/core/src/core/org/jnode/vm/classmgr/Signature.java
trunk/core/src/core/org/jnode/vm/classmgr/VmAddressMap.java
trunk/core/src/core/org/jnode/vm/classmgr/VmAnnotatedElement.java
trunk/core/src/core/org/jnode/vm/classmgr/VmAnnotation.java
trunk/core/src/core/org/jnode/vm/classmgr/VmArray.java
trunk/core/src/core/org/jnode/vm/classmgr/VmByteCode.java
trunk/core/src/core/org/jnode/vm/classmgr/VmCP.java
trunk/core/src/core/org/jnode/vm/classmgr/VmClassLoader.java
trunk/core/src/core/org/jnode/vm/classmgr/VmClassType.java
trunk/core/src/core/org/jnode/vm/classmgr/VmConstObject.java
trunk/core/src/core/org/jnode/vm/classmgr/VmExceptions.java
trunk/core/src/core/org/jnode/vm/classmgr/VmField.java
trunk/core/src/core/org/jnode/vm/classmgr/VmImplementedInterface.java
trunk/core/src/core/org/jnode/vm/classmgr/VmIsolatedStatics.java
trunk/core/src/core/org/jnode/vm/classmgr/VmLineNumberMap.java
trunk/core/src/core/org/jnode/vm/classmgr/VmLocalVariable.java
trunk/core/src/core/org/jnode/vm/classmgr/VmLocalVariableTable.java
trunk/core/src/core/org/jnode/vm/classmgr/VmMember.java
trunk/core/src/core/org/jnode/vm/classmgr/VmMethod.java
trunk/core/src/core/org/jnode/vm/classmgr/VmMethodCode.java
trunk/core/src/core/org/jnode/vm/classmgr/VmSharedStatics.java
trunk/core/src/core/org/jnode/vm/classmgr/VmStatics.java
trunk/core/src/core/org/jnode/vm/classmgr/VmStaticsBase.java
trunk/core/src/core/org/jnode/vm/classmgr/VmType.java
trunk/core/src/core/org/jnode/vm/compiler/CompiledIMT.java
trunk/core/src/core/org/jnode/vm/compiler/CompiledMethod.java
trunk/core/src/core/org/jnode/vm/compiler/EntryPoints.java
trunk/core/src/core/org/jnode/vm/compiler/IMTCompiler.java
trunk/core/src/core/org/jnode/vm/compiler/NativeCodeCompiler.java
trunk/core/src/core/org/jnode/vm/compiler/OptimizingBytecodeVisitor.java
trunk/core/src/core/org/jnode/vm/isolate/VmIsolate.java
trunk/core/src/core/org/jnode/vm/isolate/VmIsolateLocal.java
trunk/core/src/core/org/jnode/vm/memmgr/HeapHelper.java
trunk/core/src/core/org/jnode/vm/memmgr/VmHeapManager.java
trunk/core/src/core/org/jnode/vm/memmgr/def/DefGCStatistics.java
trunk/core/src/core/org/jnode/vm/memmgr/def/DefHeapStatistics.java
trunk/core/src/core/org/jnode/vm/memmgr/def/DefaultHeapManager.java
trunk/core/src/core/org/jnode/vm/memmgr/def/DefaultWriteBarrier.java
trunk/core/src/core/org/jnode/vm/memmgr/def/FinalizerVisitor.java
trunk/core/src/core/org/jnode/vm/memmgr/def/GCManager.java
trunk/core/src/core/org/jnode/vm/memmgr/def/GCMarkVisitor.java
trunk/core/src/core/org/jnode/vm/memmgr/def/GCSetWhiteVisitor.java
trunk/core/src/core/org/jnode/vm/memmgr/def/GCStack.java
trunk/core/src/core/org/jnode/vm/memmgr/def/GCSweepVisitor.java
trunk/core/src/core/org/jnode/vm/memmgr/def/GCVerifyVisitor.java
trunk/core/src/core/org/jnode/vm/memmgr/def/HeapStatisticsVisitor.java
trunk/core/src/core/org/jnode/vm/memmgr/def/VmAbstractHeap.java
trunk/core/src/core/org/jnode/vm/memmgr/def/VmBootHeap.java
trunk/core/src/core/org/jnode/vm/memmgr/def/VmDefaultHeap.java
trunk/core/src/core/org/jnode/vm/objects/BootableArrayList.java
trunk/core/src/core/org/jnode/vm/objects/BootableHashMap.java
trunk/core/src/core/org/jnode/vm/objects/Statistic.java
trunk/core/src/core/org/jnode/vm/scheduler/IRQManager.java
trunk/core/src/core/org/jnode/vm/scheduler/MonitorManager.java
trunk/core/src/core/org/jnode/vm/scheduler/SpinLock.java
trunk/core/src/core/org/jnode/vm/scheduler/VmProcessor.java
trunk/core/src/core/org/jnode/vm/scheduler/VmScheduler.java
trunk/core/src/core/org/jnode/vm/scheduler/VmThread.java
trunk/core/src/core/org/jnode/vm/scheduler/VmThreadQueue.java
trunk/core/src/core/org/jnode/vm/scheduler/VmThreadQueueEntry.java
trunk/core/src/core/org/jnode/vm/x86/VmX86Architecture.java
trunk/core/src/core/org/jnode/vm/x86/VmX86Architecture32.java
trunk/core/src/core/org/jnode/vm/x86/VmX86Architecture64.java
trunk/core/src/core/org/jnode/vm/x86/VmX86Processor.java
trunk/core/src/core/org/jnode/vm/x86/VmX86Processor32.java
trunk/core/src/core/org/jnode/vm/x86/VmX86Processor64.java
trunk/core/src/core/org/jnode/vm/x86/VmX86Thread.java
trunk/core/src/core/org/jnode/vm/x86/VmX86Thread64.java
trunk/core/src/core/org/jnode/vm/x86/X86MemoryMapEntry.java
trunk/core/src/core/org/jnode/vm/x86/compiler/AbstractX86Compiler.java
trunk/core/src/core/org/jnode/vm/x86/compiler/X86CompilerHelper.java
trunk/core/src/core/org/jnode/vm/x86/compiler/l1a/DoubleItem.java
trunk/core/src/core/org/jnode/vm/x86/compiler/l1a/DoubleWordItem.java
trunk/core/src/core/org/jnode/vm/x86/compiler/l1a/FPCompilerFPU.java
trunk/core/src/core/org/jnode/vm/x86/compiler/l1a/FloatItem.java
trunk/core/src/core/org/jnode/vm/x86/compiler/l1a/IntItem.java
trunk/core/src/core/org/jnode/vm/x86/compiler/l1a/Item.java
trunk/core/src/core/org/jnode/vm/x86/compiler/l1a/ItemFactory.java
trunk/core/src/core/org/jnode/vm/x86/compiler/l1a/ItemStack.java
trunk/core/src/core/org/jnode/vm/x86/compiler/l1a/LongItem.java
trunk/core/src/core/org/jnode/vm/x86/compiler/l1a/MagicHelper.java
trunk/core/src/core/org/jnode/vm/x86/compiler/l1a/RefItem.java
trunk/core/src/core/org/jnode/vm/x86/compiler/l1a/VirtualStack.java
trunk/core/src/core/org/jnode/vm/x86/compiler/l1a/WordItem.java
trunk/core/src/core/org/jnode/vm/x86/compiler/l1a/X86BytecodeVisitor.java
trunk/core/src/core/org/jnode/vm/x86/compiler/l1a/X86StackFrame.java
trunk/core/src/core/org/jnode/vm/x86/compiler/l1b/DoubleItem.java
trunk/core/src/core/org/jnode/vm/x86/compiler/l1b/DoubleWordItem.java
trunk/core/src/core/org/jnode/vm/x86/compiler/l1b/FPCompilerFPU.java
trunk/core/src/core/org/jnode/vm/x86/compiler/l1b/FloatItem.java
trunk/core/src/core/org/jnode/vm/x86/compiler/l1b/IntItem.java
trunk/core/src/core/org/jnode/vm/x86/compiler/l1b/Item.java
trunk/core/src/core/org/jnode/vm/x86/compiler/l1b/ItemFactory.java
trunk/core/src/core/org/jnode/vm/x86/compiler/l1b/ItemStack.java
trunk/core/src/core/org/jnode/vm/x86/compiler/l1b/LongItem.java
trunk/core/src/core/org/jnode/vm/x86/compiler/l1b/MagicHelper.java
trunk/core/src/core/org/jnode/vm/x86/compiler/l1b/RefItem.java
trunk/core/src/core/org/jnode/vm/x86/compiler/l1b/VirtualStack.java
trunk/core/src/core/org/jnode/vm/x86/compiler/l1b/WordItem.java
trunk/core/src/core/org/jnode/vm/x86/compiler/l1b/X86BytecodeVisitor.java
trunk/core/src/core/org/jnode/vm/x86/compiler/l1b/X86StackFrame.java
trunk/core/src/driver/org/jnode/driver/bus/pci/PCIDriver.java
trunk/core/src/driver/org/jnode/driver/system/acpi/AcpiDriver.java
trunk/core/src/mmtk-vm/org/jnode/vm/memmgr/mmtk/BaseMmtkGCStatistics.java
trunk/core/src/mmtk-vm/org/jnode/vm/memmgr/mmtk/BaseMmtkHeapManager.java
trunk/core/src/mmtk-vm/org/jnode/vm/memmgr/mmtk/genrc/HeapManager.java
trunk/core/src/mmtk-vm/org/jnode/vm/memmgr/mmtk/ms/HeapManager.java
trunk/core/src/mmtk-vm/org/jnode/vm/memmgr/mmtk/nogc/HeapManager.java
trunk/core/src/mmtk-vm/org/mmtk/vm/Assert.java
trunk/core/src/mmtk-vm/org/mmtk/vm/Memory.java
trunk/core/src/mmtk-vm/org/mmtk/vm/Scanning.java
trunk/core/src/mmtk-vm/org/mmtk/vm/Strings.java
trunk/core/src/mmtk-vm/org/mmtk/vm/VMConstants.java
trunk/core/src/openjdk/vm/java/lang/NativeRuntime.java
trunk/core/src/openjdk/vm/java/lang/reflect/NativeArray.java
trunk/core/src/openjdk/vm/sun/management/NativeThreadImpl.java
trunk/core/src/openjdk/vm/sun/management/NativeVMManagementImpl.java
trunk/core/src/openjdk/vm/sun/misc/NativeUnsafe.java
trunk/core/src/test/org/jnode/test/ResolverTest.java
trunk/core/src/test/org/jnode/test/core/CompilerTest.java
trunk/core/src/test/org/jnode/test/core/IMTCompilerTest.java
trunk/core/src/test/org/jnode/test/core/StackView.java
trunk/core/src/vmmagic/org/vmmagic/unboxed/MagicUtils.java
trunk/gui/src/awt/org/jnode/awt/font/renderer/SummedAreaTable.java
trunk/gui/src/awt/org/jnode/awt/font/spi/AbstractTextRenderer.java
trunk/gui/src/awt/org/jnode/awt/util/BasicSurfaceGraphics.java
trunk/gui/src/desktop/org/jnode/desktop/Desktop.java
trunk/gui/src/driver/org/jnode/driver/video/vga/VGABitmapGraphics.java
trunk/gui/src/driver/org/jnode/driver/video/vga/VGADriver.java
Added Paths:
-----------
trunk/core/src/core/org/jnode/vm/BaseVmArchitecture.java
trunk/core/src/core/org/jnode/vm/VmImpl.java
trunk/core/src/core/org/jnode/vm/classmgr/Mangler.java
trunk/core/src/core/org/jnode/vm/facade/
trunk/core/src/core/org/jnode/vm/facade/GCStatistics.java
trunk/core/src/core/org/jnode/vm/facade/HeapStatistics.java
trunk/core/src/core/org/jnode/vm/facade/MemoryMapEntry.java
trunk/core/src/core/org/jnode/vm/facade/ObjectVisitor.java
trunk/core/src/core/org/jnode/vm/facade/TypeSizeInfo.java
trunk/core/src/core/org/jnode/vm/facade/Vm.java
trunk/core/src/core/org/jnode/vm/facade/VmArchitecture.java
trunk/core/src/core/org/jnode/vm/facade/VmHeapManager.java
trunk/core/src/core/org/jnode/vm/facade/VmProcessor.java
trunk/core/src/core/org/jnode/vm/facade/VmThread.java
trunk/core/src/core/org/jnode/vm/facade/VmThreadVisitor.java
trunk/core/src/core/org/jnode/vm/facade/VmUtils.java
trunk/core/src/core/org/jnode/vm/facade/VmWriteBarrier.java
trunk/core/src/core/org/jnode/vm/objects/BootableObject.java
trunk/core/src/core/org/jnode/vm/objects/VmSystemObject.java
Removed Paths:
-------------
trunk/core/src/core/org/jnode/vm/BootableObject.java
trunk/core/src/core/org/jnode/vm/MemoryMapEntry.java
trunk/core/src/core/org/jnode/vm/ObjectVisitor.java
trunk/core/src/core/org/jnode/vm/Vm.java
trunk/core/src/core/org/jnode/vm/VmArchitecture.java
trunk/core/src/core/org/jnode/vm/VmSystemObject.java
trunk/core/src/core/org/jnode/vm/VmUtils.java
trunk/core/src/core/org/jnode/vm/classmgr/TypeSizeInfo.java
trunk/core/src/core/org/jnode/vm/memmgr/GCStatistics.java
trunk/core/src/core/org/jnode/vm/memmgr/HeapStatistics.java
trunk/core/src/core/org/jnode/vm/memmgr/VmWriteBarrier.java
trunk/core/src/core/org/jnode/vm/scheduler/VmThreadVisitor.java
Property Changed:
----------------
trunk/core/src/core/org/jnode/vm/x86/compiler/l1a/DoubleItem.java
trunk/core/src/core/org/jnode/vm/x86/compiler/l1a/FloatItem.java
trunk/core/src/core/org/jnode/vm/x86/compiler/l1a/IntItem.java
trunk/core/src/core/org/jnode/vm/x86/compiler/l1a/LongItem.java
trunk/core/src/core/org/jnode/vm/x86/compiler/l1a/RefItem.java
Modified: trunk/builder/src/builder/org/jnode/ant/taskdefs/NativeCheckTask.java
===================================================================
--- trunk/builder/src/builder/org/jnode/ant/taskdefs/NativeCheckTask.java 2010-05-16 17:01:30 UTC (rev 5755)
+++ trunk/builder/src/builder/org/jnode/ant/taskdefs/NativeCheckTask.java 2010-07-11 14:27:38 UTC (rev 5756)
@@ -30,8 +30,9 @@
import java.util.Map;
import java.util.Set;
import java.util.TreeSet;
+
import org.apache.tools.ant.BuildException;
-import org.jnode.vm.VmUtils;
+import org.jnode.vm.facade.VmUtils;
import org.objectweb.asm.Attribute;
import org.objectweb.asm.ClassAdapter;
import org.objectweb.asm.ClassReader;
Modified: trunk/builder/src/builder/org/jnode/build/AbstractAsmConstBuilder.java
===================================================================
--- trunk/builder/src/builder/org/jnode/build/AbstractAsmConstBuilder.java 2010-05-16 17:01:30 UTC (rev 5755)
+++ trunk/builder/src/builder/org/jnode/build/AbstractAsmConstBuilder.java 2010-07-11 14:27:38 UTC (rev 5756)
@@ -30,13 +30,15 @@
import java.net.URL;
import java.util.ArrayList;
import java.util.Date;
-import org.jnode.vm.Vm;
-import org.jnode.vm.VmArchitecture;
+
+import org.jnode.vm.BaseVmArchitecture;
+import org.jnode.vm.VmImpl;
import org.jnode.vm.VmSystemClassLoader;
import org.jnode.vm.classmgr.VmField;
import org.jnode.vm.classmgr.VmInstanceField;
import org.jnode.vm.classmgr.VmNormalClass;
import org.jnode.vm.classmgr.VmType;
+import org.jnode.vm.facade.Vm;
/**
* TODO describe the class.
@@ -75,14 +77,14 @@
private void doExecute()
throws BuildException, ClassNotFoundException, IllegalAccessException, IOException, InstantiationException {
- final VmArchitecture arch = getArchitecture();
+ final BaseVmArchitecture arch = getArchitecture();
String[] urls = classesURL.split(",");
URL[] urla = new URL[urls.length];
for (int i = 0; i < urls.length; i++)
urla[i] = new URL(urls[i].trim());
final VmSystemClassLoader cl = new VmSystemClassLoader(urla, arch);
- final Vm vm = new Vm("?", arch, cl.getSharedStatics(), false, cl, null);
+ final Vm vm = new VmImpl("?", arch, cl.getSharedStatics(), false, cl, null);
vm.toString(); // Just to avoid compiler warnings
VmType.initializeForBootImage(cl);
long lastModified = 0;
@@ -249,5 +251,5 @@
this.classesURL = classesURL;
}
- protected abstract VmArchitecture getArchitecture();
+ protected abstract BaseVmArchitecture getArchitecture();
}
Modified: trunk/builder/src/builder/org/jnode/build/AbstractBootImageBuilder.java
===================================================================
--- trunk/builder/src/builder/org/jnode/build/AbstractBootImageBuilder.java 2010-05-16 17:01:30 UTC (rev 5755)
+++ trunk/builder/src/builder/org/jnode/build/AbstractBootImageBuilder.java 2010-07-11 14:27:38 UTC (rev 5756)
@@ -60,13 +60,12 @@
import org.jnode.plugin.model.PluginJar;
import org.jnode.plugin.model.PluginRegistryModel;
import org.jnode.util.NumberUtils;
+import org.jnode.vm.BaseVmArchitecture;
import org.jnode.vm.JvmType;
import org.jnode.vm.Unsafe;
import org.jnode.vm.VirtualMemoryRegion;
-import org.jnode.vm.Vm;
-import org.jnode.vm.VmArchitecture;
+import org.jnode.vm.VmImpl;
import org.jnode.vm.VmSystemClassLoader;
-import org.jnode.vm.VmSystemObject;
import org.jnode.vm.bytecode.BytecodeParser;
import org.jnode.vm.classmgr.Modifier;
import org.jnode.vm.classmgr.ObjectLayout;
@@ -83,9 +82,13 @@
import org.jnode.vm.classmgr.VmStatics;
import org.jnode.vm.classmgr.VmType;
import org.jnode.vm.compiler.NativeCodeCompiler;
+import org.jnode.vm.facade.Vm;
+import org.jnode.vm.facade.VmArchitecture;
+import org.jnode.vm.facade.VmUtils;
import org.jnode.vm.memmgr.HeapHelper;
import org.jnode.vm.memmgr.VmHeapManager;
import org.jnode.vm.objects.BootableHashMap;
+import org.jnode.vm.objects.VmSystemObject;
import org.jnode.vm.scheduler.VmProcessor;
import org.vmmagic.unboxed.UnboxedObject;
@@ -206,7 +209,7 @@
* @param arch
* @throws ClassNotFoundException
*/
- private final void compileClasses(NativeStream os, VmArchitecture arch)
+ private final void compileClasses(NativeStream os, BaseVmArchitecture arch)
throws ClassNotFoundException {
final NativeCodeCompiler[] compilers = arch.getCompilers();
final int optLevel = compilers.length - 1;
@@ -389,7 +392,7 @@
* @return The processor
* @throws BuildException
*/
- protected abstract VmProcessor createProcessor(Vm vm, VmSharedStatics statics,
+ protected abstract VmProcessor createProcessor(VmImpl vm, VmSharedStatics statics,
VmIsolatedStatics isolatedStatics) throws BuildException;
private final void doExecute() throws BuildException {
@@ -448,7 +451,7 @@
final Map<String, byte[]> resources = loadSystemResource(piRegistry);
/* Now create the processor */
- final VmArchitecture arch = getArchitecture();
+ final BaseVmArchitecture arch = getArchitecture();
final NativeStream os = createNativeStream();
clsMgr = new VmSystemClassLoader(null/*classesURL*/, arch,
new BuildObjectResolver(os, this));
@@ -468,9 +471,9 @@
}
// Create the VM
- final Vm vm = new Vm(version, arch, clsMgr.getSharedStatics(), debug, clsMgr, piRegistry);
+ final VmImpl vm = new VmImpl(version, arch, clsMgr.getSharedStatics(), debug, clsMgr, piRegistry);
blockedObjects.add(vm);
- blockedObjects.add(Vm.getCompiledMethods());
+ blockedObjects.add(VmUtils.getVm().getCompiledMethods());
final VmProcessor proc = createProcessor(vm, clsMgr.getSharedStatics(),
clsMgr.getIsolatedStatics());
@@ -504,14 +507,14 @@
loadClass(VmType[].class);
loadClass(Vm.class);
loadClass(VirtualMemoryRegion.class).link();
- Vm.getHeapManager().loadClasses(clsMgr);
+ vm.getHeapManager().loadClasses(clsMgr);
loadClass(VmHeapManager.class);
loadClass(VmSharedStatics.class);
loadClass(VmIsolatedStatics.class);
- loadClass(Vm.getHeapManager().getClass());
+ loadClass(VmUtils.getVm().getHeapManager().getClass());
loadClass(HeapHelper.class);
loadClass("org.jnode.vm.HeapHelperImpl");
- loadClass(Vm.getCompiledMethods().getClass());
+ loadClass(VmUtils.getVm().getCompiledMethods().getClass());
loadClass(VmCompiledCode[].class);
loadSystemClasses(resources.keySet());
@@ -558,8 +561,8 @@
// Emit the compiled method list
log("Emit compiled methods", Project.MSG_VERBOSE);
- blockedObjects.remove(Vm.getCompiledMethods());
- final int compiledMethods = Vm.getCompiledMethods().size();
+ blockedObjects.remove(VmUtils.getVm().getCompiledMethods());
+ final int compiledMethods = VmUtils.getVm().getCompiledMethods().size();
emitObjects(os, arch, blockedObjects, false);
// Twice, this is intended!
emitObjects(os, arch, blockedObjects, false);
@@ -595,7 +598,7 @@
// Verify no methods have been compiled after we wrote the
// CompiledCodeList.
- if (Vm.getCompiledMethods().size() != compiledMethods) {
+ if (VmUtils.getVm().getCompiledMethods().size() != compiledMethods) {
throw new BuildException(
"Method have been compiled after CompiledCodeList was written.");
}
@@ -638,7 +641,7 @@
clsMgr.getSharedStatics().dumpStatistics(out);
log("Isolated statics");
clsMgr.getIsolatedStatics().dumpStatistics(out);
- vm.dumpStatistics(out);
+ VmUtils.dumpStatistics(out);
logStatistics(os);
@@ -670,7 +673,7 @@
* @param blockObjects
* @throws BuildException
*/
- private final void emitObjects(NativeStream os, VmArchitecture arch,
+ private final void emitObjects(NativeStream os, BaseVmArchitecture arch,
Set<Object> blockObjects, boolean skipCopyStatics)
throws BuildException {
log("Emitting objects", Project.MSG_DEBUG);
@@ -883,7 +886,7 @@
* @return The target architecture
* @throws BuildException
*/
- protected abstract VmArchitecture getArchitecture() throws BuildException;
+ protected abstract BaseVmArchitecture getArchitecture() throws BuildException;
/**
* Gets the internal class loader.
@@ -1458,6 +1461,7 @@
addCompileHighOptLevel("org.jnode.vm.bytecode");
addCompileHighOptLevel("org.jnode.vm.classmgr");
addCompileHighOptLevel("org.jnode.vm.compiler");
+ addCompileHighOptLevel("org.jnode.vm.facade");
addCompileHighOptLevel("org.jnode.vm.isolate");
addCompileHighOptLevel("org.jnode.vm.objects");
addCompileHighOptLevel("org.jnode.vm.scheduler");
Modified: trunk/builder/src/builder/org/jnode/build/ObjectEmitter.java
===================================================================
--- trunk/builder/src/builder/org/jnode/build/ObjectEmitter.java 2010-05-16 17:01:30 UTC (rev 5755)
+++ trunk/builder/src/builder/org/jnode/build/ObjectEmitter.java 2010-07-11 14:27:38 UTC (rev 5756)
@@ -32,8 +32,6 @@
import org.jnode.assembler.NativeStream;
import org.jnode.assembler.x86.X86BinaryAssembler;
import org.jnode.bootlog.BootLogInstance;
-import org.jnode.vm.BootableObject;
-import org.jnode.vm.VmSystemObject;
import org.jnode.vm.classmgr.VmArrayClass;
import org.jnode.vm.classmgr.VmClassLoader;
import org.jnode.vm.classmgr.VmClassType;
@@ -41,6 +39,8 @@
import org.jnode.vm.classmgr.VmInstanceField;
import org.jnode.vm.classmgr.VmNormalClass;
import org.jnode.vm.classmgr.VmType;
+import org.jnode.vm.objects.BootableObject;
+import org.jnode.vm.objects.VmSystemObject;
import org.vmmagic.unboxed.UnboxedObject;
public class ObjectEmitter {
Modified: trunk/builder/src/builder/org/jnode/build/x86/AsmConstBuilder.java
===================================================================
--- trunk/builder/src/builder/org/jnode/build/x86/AsmConstBuilder.java 2010-05-16 17:01:30 UTC (rev 5755)
+++ trunk/builder/src/builder/org/jnode/build/x86/AsmConstBuilder.java 2010-07-11 14:27:38 UTC (rev 5756)
@@ -21,7 +21,7 @@
package org.jnode.build.x86;
import org.jnode.build.AbstractAsmConstBuilder;
-import org.jnode.vm.VmArchitecture;
+import org.jnode.vm.BaseVmArchitecture;
import org.jnode.vm.x86.VmX86Architecture32;
import org.jnode.vm.x86.VmX86Architecture64;
@@ -32,9 +32,9 @@
private int bits = 32;
- private VmArchitecture arch;
+ private BaseVmArchitecture arch;
- protected VmArchitecture getArchitecture() {
+ protected BaseVmArchitecture getArchitecture() {
if (arch == null) {
switch (bits) {
case 32:
Modified: trunk/builder/src/builder/org/jnode/build/x86/BootImageBuilder.java
===================================================================
--- trunk/builder/src/builder/org/jnode/build/x86/BootImageBuilder.java 2010-05-16 17:01:30 UTC (rev 5755)
+++ trunk/builder/src/builder/org/jnode/build/x86/BootImageBuilder.java 2010-07-11 14:27:38 UTC (rev 5756)
@@ -43,11 +43,10 @@
import org.jnode.linker.ElfLinker;
import org.jnode.plugin.PluginRegistry;
import org.jnode.util.NumberUtils;
+import org.jnode.vm.BaseVmArchitecture;
import org.jnode.vm.SoftByteCodes;
-import org.jnode.vm.Vm;
-import org.jnode.vm.VmArchitecture;
+import org.jnode.vm.VmImpl;
import org.jnode.vm.VmSystem;
-import org.jnode.vm.VmSystemObject;
import org.jnode.vm.classmgr.ObjectLayout;
import org.jnode.vm.classmgr.VmArray;
import org.jnode.vm.classmgr.VmClassType;
@@ -58,6 +57,9 @@
import org.jnode.vm.classmgr.VmSharedStatics;
import org.jnode.vm.classmgr.VmStaticField;
import org.jnode.vm.classmgr.VmType;
+import org.jnode.vm.facade.Vm;
+import org.jnode.vm.facade.VmUtils;
+import org.jnode.vm.objects.VmSystemObject;
import org.jnode.vm.scheduler.MonitorManager;
import org.jnode.vm.scheduler.VmProcessor;
import org.jnode.vm.scheduler.VmScheduler;
@@ -155,7 +157,7 @@
* @return The processor
* @throws BuildException
*/
- protected VmProcessor createProcessor(Vm vm, VmSharedStatics statics, VmIsolatedStatics isolatedStatics)
+ protected VmProcessor createProcessor(VmImpl vm, VmSharedStatics statics, VmIsolatedStatics isolatedStatics)
throws BuildException {
this.sharedStatics = statics;
VmScheduler scheduler = new VmScheduler(getArchitecture());
@@ -185,7 +187,7 @@
* @return The target architecture
* @throws BuildException
*/
- protected final VmArchitecture getArchitecture() throws BuildException {
+ protected final BaseVmArchitecture getArchitecture() throws BuildException {
if (arch == null) {
switch (bits) {
case 32:
@@ -483,8 +485,8 @@
protected void initVm(X86BinaryAssembler os, Vm vm) throws BuildException,
ClassNotFoundException {
os.setObjectRef(new Label("$$Initialize Vm"));
- VmType<?> vmClass = loadClass(Vm.class);
- VmStaticField vmField = (VmStaticField) vmClass.getField("instance");
+ VmType<?> vmClass = loadClass(VmUtils.class);
+ VmStaticField vmField = (VmStaticField) vmClass.getField("VM_INSTANCE");
final GPR abx = os.isCode32() ? (GPR) X86Register.EBX : X86Register.RBX;
final GPR adi = os.isCode32() ? (GPR) X86Register.EDI : X86Register.RDI;
Modified: trunk/cli/src/commands/org/jnode/command/system/GcCommand.java
===================================================================
--- trunk/cli/src/commands/org/jnode/command/system/GcCommand.java 2010-05-16 17:01:30 UTC (rev 5755)
+++ trunk/cli/src/commands/org/jnode/command/system/GcCommand.java 2010-07-11 14:27:38 UTC (rev 5756)
@@ -27,8 +27,9 @@
import org.jnode.shell.syntax.EnumArgument;
import org.jnode.shell.syntax.FlagArgument;
import org.jnode.util.NumberUtils;
-import org.jnode.vm.Vm;
-import org.jnode.vm.memmgr.GCStatistics;
+import ...
[truncated message content] |
|
From: <cr...@us...> - 2010-10-02 09:48:16
|
Revision: 5757
http://jnode.svn.sourceforge.net/jnode/?rev=5757&view=rev
Author: crawley
Date: 2010-10-02 09:48:09 +0000 (Sat, 02 Oct 2010)
Log Message:
-----------
Move the lists of classes/packages that need to be optimized by the boot
image builder to config files.
Modified Paths:
--------------
trunk/all/build-x86.xml
trunk/all/build.xml
trunk/builder/src/builder/org/jnode/build/AbstractBootImageBuilder.java
trunk/builder/src/builder/org/jnode/build/x86/BootImageBuilder.java
Added Paths:
-----------
trunk/all/conf/core-classes.txt
trunk/all/conf/x86-classes.txt
Modified: trunk/all/build-x86.xml
===================================================================
--- trunk/all/build-x86.xml 2010-07-11 14:27:38 UTC (rev 5756)
+++ trunk/all/build-x86.xml 2010-10-02 09:48:09 UTC (rev 5757)
@@ -182,8 +182,10 @@
listfile="${build.bootimage.dir}/bootimage.lst"
debugfile="${build.bootimage.dir}/bootimage.debug"
kernelfile="${build.native.dir}/output/jnode.o"
- pluginList="${system-plugin-list}"
+ pluginList="${system-plugin-list}"
pluginDir="${plugins.dir}"
+ coreClassListFile="${jnode-core-class-list}"
+ archClassListFile="${jnode-x86-class-list}"
targetArch="x86"
memMgrPluginId="${jnode.memmgr.plugin.id}"
cpu="${cpu}"
Modified: trunk/all/build.xml
===================================================================
--- trunk/all/build.xml 2010-07-11 14:27:38 UTC (rev 5756)
+++ trunk/all/build.xml 2010-10-02 09:48:09 UTC (rev 5757)
@@ -102,6 +102,11 @@
<property name="jnode-x86.iso" value="${cdroms.dir}/jnode-x86.iso"/>
<property name="jnode-x86-lite.iso" value="${cdroms.dir}/jnode-x86-lite.iso"/>
<property name="jnode-x86_64-lite.iso" value="${cdroms.dir}/jnode-x86_64-lite.iso"/>
+
+ <!-- list of classes and packages that should to be compiled to native code
+ in the boot image. -->
+ <property name="jnode-core-class-list" value="${root.dir}/all/conf/core-classes.txt"/>
+ <property name="jnode-x86-class-list" value="${root.dir}/all/conf/x86-classes.txt"/>
<path id="cp">
<pathelement location="${classlib.jar}"/>
Added: trunk/all/conf/core-classes.txt
===================================================================
--- trunk/all/conf/core-classes.txt (rev 0)
+++ trunk/all/conf/core-classes.txt 2010-10-02 09:48:09 UTC (rev 5757)
@@ -0,0 +1,191 @@
+# The classes and packages listed in this file will be compiled to optimized native code by
+# the boot image builder. Entries can be a package name, a fully qualified class
+# name or a fully qualified classname with a trailing wildcard in the classname part.
+
+java.io.Data*
+java.io.String*
+java.io.ByteArray*
+java.io.CharArray*
+java.io.Print*
+java.io.Reader
+java.io.Input*
+java.io.Buffered*
+java.io.Writer
+java.io.Output*
+java.io.Filter*
+java.io.IOException
+java.io.ObjectStreamField
+java.io.ObjectStreamClass
+
+java.lang
+java.lang.ref
+//java.lang.reflect //<- produces inconsistent bootimage
+
+java.net.URL
+
+java.nio.Buffer
+java.nio.ByteBuffer*
+java.nio.DirectByteBuffer*
+java.nio.ByteOrder
+java.nio.Char*
+java.nio.charset.spi
+java.nio.charset
+
+java.security.ProtectionDomain
+java.security.AccessController
+java.security.AccessControlContext
+java.security.AccessControlException
+java.security.Permission
+java.security.PrivilegedAction
+java.security.PrivilegedActionException
+java.security.PrivilegedExceptionAction
+java.security.PermissionCollection
+java.security.CodeSource
+java.security.Policy
+java.security.AllPermission
+java.security.Permissions
+java.security.Security
+java.security.SecurityPermission
+java.security.BasicPermission
+
+java.util.Collection*
+java.util.Map*
+java.util.List*
+java.util.Set*
+java.util.Iterator*
+java.util.Array*
+java.util.Abstract*
+java.util.Hash*
+java.util.TreeMap*
+java.util.TreeSet*
+java.util.Linked*
+java.util.Vector*
+java.util.Locale*
+java.util.WeakHashMap*
+java.util.Properties*
+java.util.Dictionary*
+java.util.StringTokenizer*
+java.util.Property*
+java.util.Enum*
+
+java.util.jar
+java.util.zip
+
+gnu.classpath
+
+org.jnode.assembler
+org.jnode.boot
+org.jnode.bootlog
+org.jnode.naming
+org.jnode.permission
+org.jnode.plugin
+org.jnode.plugin.manager
+org.jnode.plugin.model
+org.jnode.security
+org.jnode.system.resource
+org.jnode.system.event
+org.jnode.util
+org.jnode.vm
+org.jnode.vm.bytecode
+org.jnode.vm.classmgr
+org.jnode.vm.compiler
+org.jnode.vm.facade
+org.jnode.vm.isolate
+org.jnode.vm.objects
+org.jnode.vm.scheduler
+
+org.jnode.vm.memmgr
+org.jnode.vm.memmgr.def
+
+//org.jnode.vm.memmgr.mmtk
+//org.jnode.vm.memmgr.mmtk.genrc
+//org.jnode.vm.memmgr.mmtk.nogc
+//org.jnode.vm.memmgr.mmtk.ms
+
+//todo review for boot image size reduction
+//sun.misc
+//sun.reflect <-- // this kills jnode while booting, maybe Reflection static{...}
+//sun.reflect.annotation
+//sun.reflect.generics
+//sun.reflect.generics.factory
+//sun.reflect.generics.parser
+//sun.reflect.generics.reflectiveObjects
+//sun.reflect.generics.repository
+//sun.reflect.generics.scope
+//sun.reflect.generics.tree
+//sun.reflect.generics.visitor
+//sun.reflect.misc
+sun.misc.VM
+sun.nio
+sun.nio.cs.US_ASCII
+sun.nio.cs.ISO_8859_1*
+sun.nio.cs.Surrogate*
+sun.nio.cs.StreamEncoder
+sun.nio.cs.SingleByteDecoder
+sun.nio.cs.SingleByteEncoder
+sun.nio.cs.FastCharsetProvider
+sun.nio.cs.StandardCharsets
+sun.nio.cs.HistoricallyNamedCharset
+sun.nio.cs.StreamDecoder
+sun.nio.cs.ThreadLocalCoders
+sun.nio.cs.Unicode*
+sun.nio.cs.UTF*
+
+// org.mmtk.plan
+// org.mmtk.policy
+// org.mmtk.utility
+// org.mmtk.utility.alloc
+// org.mmtk.utility.deque
+// org.mmtk.utility.gcspy
+// org.mmtk.utility.gcspy.drivers
+// org.mmtk.utility.heap
+// org.mmtk.utility.options
+// org.mmtk.utility.scan
+// org.mmtk.utility.statistics
+// org.mmtk.vm
+// org.mmtk.vm.gcspy
+//
+// java.awt
+// java.awt.event
+// java.awt.peer
+// java.awt.font
+// java.awt.geom
+//
+// gnu.javax.swing.text.html.parser
+// gnu.javax.swing.text.html.parser.models
+// gnu.javax.swing.text.html.parser.support
+// gnu.javax.swing.text.html.parser.support.low
+//
+// javax.swing
+// javax.swing.border
+// javax.swing.event
+// javax.swing.plaf
+// javax.swing.plaf.basic
+// javax.swing.plaf.metal
+// javax.swing.text
+// javax.swing.text.html
+// javax.swing.text.html.parser
+// javax.swing.text.rtf
+// javax.swing.table
+// javax.swing.tree
+// javax.swing.colorchooser
+// javax.swing.filechooser
+// javax.swing.undo
+//
+// org.jnode.awt
+// org.jnode.awt.swingpeers
+//
+// gnu.java.locale
+//
+// javax.net
+// javax.net.ssl
+//
+// javax.security
+// javax.security.auth
+// javax.security.auth.callback
+// javax.security.auth.login
+// javax.security.auth.spi
+// javax.security.cert
+// javax.security.sasl
+//
+// org.ietf.jgss
Added: trunk/all/conf/x86-classes.txt
===================================================================
--- trunk/all/conf/x86-classes.txt (rev 0)
+++ trunk/all/conf/x86-classes.txt 2010-10-02 09:48:09 UTC (rev 5757)
@@ -0,0 +1,10 @@
+# The classes and packages listed in this file will be compiled to optimized native code by
+# the boot image builder. Entries can be a package name, a fully qualified class
+# name or a fully qualified classname with a trailing wildcard in the classname part.
+#
+# This file supplements core-classes.txt with classes / packages that are specific
+# to the x86 architecture
+
+org.jnode.assembler.x86
+org.jnode.system.x86
+org.jnode.vm.x86
Modified: trunk/builder/src/builder/org/jnode/build/AbstractBootImageBuilder.java
===================================================================
--- trunk/builder/src/builder/org/jnode/build/AbstractBootImageBuilder.java 2010-07-11 14:27:38 UTC (rev 5756)
+++ trunk/builder/src/builder/org/jnode/build/AbstractBootImageBuilder.java 2010-10-02 09:48:09 UTC (rev 5757)
@@ -20,8 +20,10 @@
package org.jnode.build;
+import java.io.BufferedReader;
import java.io.File;
import java.io.FileOutputStream;
+import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.OutputStreamWriter;
@@ -36,6 +38,7 @@
import java.util.Comparator;
import java.util.HashSet;
import java.util.Iterator;
+import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.SortedMap;
@@ -83,7 +86,6 @@
import org.jnode.vm.classmgr.VmType;
import org.jnode.vm.compiler.NativeCodeCompiler;
import org.jnode.vm.facade.Vm;
-import org.jnode.vm.facade.VmArchitecture;
import org.jnode.vm.facade.VmUtils;
import org.jnode.vm.memmgr.HeapHelper;
import org.jnode.vm.memmgr.VmHeapManager;
@@ -119,7 +121,7 @@
private static final String zero16 = zero8 + zero8;
/**
- * Set of jbects that should not yet be emitted.
+ * Set of objects that should not yet be emitted.
*/
private final Set<Object> blockedObjects = new HashSet<Object>();
@@ -147,6 +149,8 @@
private File listFile;
+ private File coreClassListFile;
+
private int totalHighMethods;
private int totalHighMethodSize;
@@ -1372,204 +1376,63 @@
public void setListFile(File listFile) {
this.listFile = listFile;
}
+
+ /**
+ * Sets the core class list file.
+ *
+ * @param coreClassListFile The coreClassListFile to set
+ */
+ public void setCoreClassListFile(File coreClassListFile) {
+ this.coreClassListFile = coreClassListFile;
+ }
protected void setupCompileHighOptLevelPackages() {
- addCompileHighOptLevel("java.io.Data*");
- addCompileHighOptLevel("java.io.String*");
- addCompileHighOptLevel("java.io.ByteArray*");
- addCompileHighOptLevel("java.io.CharArray*");
- addCompileHighOptLevel("java.io.Print*");
- addCompileHighOptLevel("java.io.Reader");
- addCompileHighOptLevel("java.io.Input*");
- addCompileHighOptLevel("java.io.Buffered*");
- addCompileHighOptLevel("java.io.Writer");
- addCompileHighOptLevel("java.io.Output*");
- addCompileHighOptLevel("java.io.Filter*");
- addCompileHighOptLevel("java.io.IOException");
- addCompileHighOptLevel("java.io.ObjectStreamField");
- addCompileHighOptLevel("java.io.ObjectStreamClass");
-
- addCompileHighOptLevel("java.lang");
- addCompileHighOptLevel("java.lang.ref");
-// addCompileHighOptLevel("java.lang.reflect"); //<- produces inconsistent bootimage
-
- addCompileHighOptLevel("java.net.URL");
-
- addCompileHighOptLevel("java.nio.Buffer");
- addCompileHighOptLevel("java.nio.ByteBuffer*");
- addCompileHighOptLevel("java.nio.DirectByteBuffer*");
- addCompileHighOptLevel("java.nio.ByteOrder");
- addCompileHighOptLevel("java.nio.Char*");
- addCompileHighOptLevel("java.nio.charset.spi");
- addCompileHighOptLevel("java.nio.charset");
-
- addCompileHighOptLevel("java.security.ProtectionDomain");
- addCompileHighOptLevel("java.security.AccessController");
- addCompileHighOptLevel("java.security.AccessControlContext");
- addCompileHighOptLevel("java.security.AccessControlException");
- addCompileHighOptLevel("java.security.Permission");
- addCompileHighOptLevel("java.security.PrivilegedAction");
- addCompileHighOptLevel("java.security.PrivilegedActionException");
- addCompileHighOptLevel("java.security.PrivilegedExceptionAction");
- addCompileHighOptLevel("java.security.PermissionCollection");
- addCompileHighOptLevel("java.security.CodeSource");
- addCompileHighOptLevel("java.security.Policy");
- addCompileHighOptLevel("java.security.AllPermission");
- addCompileHighOptLevel("java.security.Permissions");
- addCompileHighOptLevel("java.security.Security");
- addCompileHighOptLevel("java.security.SecurityPermission");
- addCompileHighOptLevel("java.security.BasicPermission");
-
- addCompileHighOptLevel("java.util.Collection*");
- addCompileHighOptLevel("java.util.Map*");
- addCompileHighOptLevel("java.util.List*");
- addCompileHighOptLevel("java.util.Set*");
- addCompileHighOptLevel("java.util.Iterator*");
- addCompileHighOptLevel("java.util.Array*");
- addCompileHighOptLevel("java.util.Abstract*");
- addCompileHighOptLevel("java.util.Hash*");
- addCompileHighOptLevel("java.util.TreeMap*");
- addCompileHighOptLevel("java.util.TreeSet*");
- addCompileHighOptLevel("java.util.Linked*");
- addCompileHighOptLevel("java.util.Vector*");
- addCompileHighOptLevel("java.util.Locale*");
- addCompileHighOptLevel("java.util.WeakHashMap*");
- addCompileHighOptLevel("java.util.Properties*");
- addCompileHighOptLevel("java.util.Dictionary*");
- addCompileHighOptLevel("java.util.StringTokenizer*");
- addCompileHighOptLevel("java.util.Property*");
- addCompileHighOptLevel("java.util.Enum*");
-
- addCompileHighOptLevel("java.util.jar");
- addCompileHighOptLevel("java.util.zip");
-
- addCompileHighOptLevel("gnu.classpath");
-
- addCompileHighOptLevel("org.jnode.assembler");
- addCompileHighOptLevel("org.jnode.boot");
- addCompileHighOptLevel("org.jnode.bootlog");
- addCompileHighOptLevel("org.jnode.naming");
- addCompileHighOptLevel("org.jnode.permission");
- addCompileHighOptLevel("org.jnode.plugin");
- addCompileHighOptLevel("org.jnode.plugin.manager");
- addCompileHighOptLevel("org.jnode.plugin.model");
- addCompileHighOptLevel("org.jnode.security");
- addCompileHighOptLevel("org.jnode.system.resource");
- addCompileHighOptLevel("org.jnode.system.event");
- addCompileHighOptLevel("org.jnode.util");
- addCompileHighOptLevel("org.jnode.vm");
- addCompileHighOptLevel("org.jnode.vm.bytecode");
- addCompileHighOptLevel("org.jnode.vm.classmgr");
- addCompileHighOptLevel("org.jnode.vm.compiler");
- addCompileHighOptLevel("org.jnode.vm.facade");
- addCompileHighOptLevel("org.jnode.vm.isolate");
- addCompileHighOptLevel("org.jnode.vm.objects");
- addCompileHighOptLevel("org.jnode.vm.scheduler");
+ addCompileHighOptLevel(loadClassList(coreClassListFile));
for (NativeCodeCompiler compiler : getArchitecture().getCompilers()) {
for (String packageName : compiler.getCompilerPackages()) {
addCompileHighOptLevel(packageName);
}
}
-
- addCompileHighOptLevel("org.jnode.vm.memmgr");
- addCompileHighOptLevel("org.jnode.vm.memmgr.def");
-// addCompileHighOptLevel("org.jnode.vm.memmgr.mmtk");
-// addCompileHighOptLevel("org.jnode.vm.memmgr.mmtk.genrc");
-// addCompileHighOptLevel("org.jnode.vm.memmgr.mmtk.nogc");
-// addCompileHighOptLevel("org.jnode.vm.memmgr.mmtk.ms");
-
- //todo review for boot image size reduction
-// addCompileHighOptLevel("sun.misc");
-// addCompileHighOptLevel("sun.reflect"); <-- // this kills jnode while booting, maybe Reflection static{...}
-// addCompileHighOptLevel("sun.reflect.annotation");
-// addCompileHighOptLevel("sun.reflect.generics");
-// addCompileHighOptLevel("sun.reflect.generics.factory");
-// addCompileHighOptLevel("sun.reflect.generics.parser");
-// addCompileHighOptLevel("sun.reflect.generics.reflectiveObjects");
-// addCompileHighOptLevel("sun.reflect.generics.repository");
-// addCompileHighOptLevel("sun.reflect.generics.scope");
-// addCompileHighOptLevel("sun.reflect.generics.tree");
-// addCompileHighOptLevel("sun.reflect.generics.visitor");
-// addCompileHighOptLevel("sun.reflect.misc");
- addCompileHighOptLevel("sun.misc.VM");
- addCompileHighOptLevel("sun.nio");
- addCompileHighOptLevel("sun.nio.cs.US_ASCII");
- addCompileHighOptLevel("sun.nio.cs.ISO_8859_1*");
- addCompileHighOptLevel("sun.nio.cs.Surrogate*");
- addCompileHighOptLevel("sun.nio.cs.StreamEncoder");
- addCompileHighOptLevel("sun.nio.cs.SingleByteDecoder");
- addCompileHighOptLevel("sun.nio.cs.SingleByteEncoder");
- addCompileHighOptLevel("sun.nio.cs.FastCharsetProvider");
- addCompileHighOptLevel("sun.nio.cs.StandardCharsets");
- addCompileHighOptLevel("sun.nio.cs.HistoricallyNamedCharset");
- addCompileHighOptLevel("sun.nio.cs.StreamDecoder");
- addCompileHighOptLevel("sun.nio.cs.ThreadLocalCoders");
- addCompileHighOptLevel("sun.nio.cs.Unicode*");
- addCompileHighOptLevel("sun.nio.cs.UTF*");
-
- if (false) {
- addCompileHighOptLevel("org.mmtk.plan");
- addCompileHighOptLevel("org.mmtk.policy");
- addCompileHighOptLevel("org.mmtk.utility");
- addCompileHighOptLevel("org.mmtk.utility.alloc");
- addCompileHighOptLevel("org.mmtk.utility.deque");
- addCompileHighOptLevel("org.mmtk.utility.gcspy");
- addCompileHighOptLevel("org.mmtk.utility.gcspy.drivers");
- addCompileHighOptLevel("org.mmtk.utility.heap");
- addCompileHighOptLevel("org.mmtk.utility.options");
- addCompileHighOptLevel("org.mmtk.utility.scan");
- addCompileHighOptLevel("org.mmtk.utility.statistics");
- addCompileHighOptLevel("org.mmtk.vm");
- addCompileHighOptLevel("org.mmtk.vm.gcspy");
-
- addCompileHighOptLevel("java.awt");
- addCompileHighOptLevel("java.awt.event");
- addCompileHighOptLevel("java.awt.peer");
- addCompileHighOptLevel("java.awt.font");
- addCompileHighOptLevel("java.awt.geom");
-
- addCompileHighOptLevel("gnu.javax.swing.text.html.parser");
- addCompileHighOptLevel("gnu.javax.swing.text.html.parser.models");
- addCompileHighOptLevel("gnu.javax.swing.text.html.parser.support");
- addCompileHighOptLevel("gnu.javax.swing.text.html.parser.support.low");
-
- addCompileHighOptLevel("javax.swing");
- addCompileHighOptLevel("javax.swing.border");
- addCompileHighOptLevel("javax.swing.event");
- addCompileHighOptLevel("javax.swing.plaf");
- addCompileHighOptLevel("javax.swing.plaf.basic");
- addCompileHighOptLevel("javax.swing.plaf.metal");
- addCompileHighOptLevel("javax.swing.text");
- addCompileHighOptLevel("javax.swing.text.html");
- addCompileHighOptLevel("javax.swing.text.html.parser");
- addCompileHighOptLevel("javax.swing.text.rtf");
- addCompileHighOptLevel("javax.swing.table");
- addCompileHighOptLevel("javax.swing.tree");
- addCompileHighOptLevel("javax.swing.colorchooser");
- addCompileHighOptLevel("javax.swing.filechooser");
- addCompileHighOptLevel("javax.swing.undo");
-
- addCompileHighOptLevel("org.jnode.awt");
- addCompileHighOptLevel("org.jnode.awt.swingpeers");
-
- addCompileHighOptLevel("gnu.java.locale");
-
- addCompileHighOptLevel("javax.net");
- addCompileHighOptLevel("javax.net.ssl");
-
- addCompileHighOptLevel("javax.security");
- addCompileHighOptLevel("javax.security.auth");
- addCompileHighOptLevel("javax.security.auth.callback");
- addCompileHighOptLevel("javax.security.auth.login");
- addCompileHighOptLevel("javax.security.auth.spi");
- addCompileHighOptLevel("javax.security.cert");
- addCompileHighOptLevel("javax.security.sasl");
-
- addCompileHighOptLevel("org.ietf.jgss");
-
- }
}
+
+ protected void addCompileHighOptLevel(List<String> classNames) {
+ for (String className : classNames) {
+ addCompileHighOptLevel(className);
+ }
+ }
+ protected List<String> loadClassList(File file) {
+ ArrayList<String> classNames = new ArrayList<String>();
+ FileReader fr;
+ try {
+ fr = new FileReader(file);
+ } catch (IOException ex) {
+ throw new BuildException("Cannot open '" + file + "'", ex);
+ }
+ try {
+ BufferedReader br = new BufferedReader(fr);
+ String line;
+ while ((line = br.readLine()) != null) {
+ line = line.trim();
+ if (line.isEmpty() || line.startsWith("#") || line.startsWith("/")) {
+ continue;
+ }
+ classNames.add(line);
+ }
+ } catch (IOException ex) {
+ throw new BuildException("Error reading '" + file + "'", ex);
+ } finally {
+ try {
+ fr.close();
+ } catch (IOException ex) {
+ // ignore
+ }
+ }
+ return classNames;
+ }
+
+
+
/**
* Create a set of the names of those classes that can be safely
* instantiated during the boot process (and written as instance to the boot
Modified: trunk/builder/src/builder/org/jnode/build/x86/BootImageBuilder.java
===================================================================
--- trunk/builder/src/builder/org/jnode/build/x86/BootImageBuilder.java 2010-07-11 14:27:38 UTC (rev 5756)
+++ trunk/builder/src/builder/org/jnode/build/x86/BootImageBuilder.java 2010-10-02 09:48:09 UTC (rev 5757)
@@ -20,6 +20,7 @@
package org.jnode.build.x86;
+import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.HashMap;
@@ -83,6 +84,8 @@
public static final int INITIAL_OBJREFS_CAPACITY = 750000;
public static final int INITIAL_SIZE = 64 * 1024 * 1024;
+
+ private File archClassListFile;
private VmX86Processor processor;
@@ -690,13 +693,13 @@
}
/**
+ * Include x86 class files.
+ *
* @see org.jnode.build.AbstractBootImageBuilder#setupCompileHighOptLevelPackages()
*/
protected void setupCompileHighOptLevelPackages() {
super.setupCompileHighOptLevelPackages();
- addCompileHighOptLevel("org.jnode.assembler.x86");
- addCompileHighOptLevel("org.jnode.system.x86");
- addCompileHighOptLevel("org.jnode.vm.x86");
+ addCompileHighOptLevel(loadClassList(archClassListFile));
}
/**
@@ -764,4 +767,22 @@
throw new BuildException(e);
}
}
+
+ /**
+ * Gets the architecture specific class list file.
+ *
+ * @return The archClassListFile to set
+ */
+ public File getArchClassListFile() {
+ return archClassListFile;
+ }
+
+ /**
+ * Sets the architecture specific class list file.
+ *
+ * @param archClassListFile The archClassListFile to set
+ */
+ public void setArchClassListFile(File archClassListFile) {
+ this.archClassListFile = archClassListFile;
+ }
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ls...@us...> - 2010-12-27 18:44:22
|
Revision: 5760
http://jnode.svn.sourceforge.net/jnode/?rev=5760&view=rev
Author: lsantha
Date: 2010-12-27 18:44:14 +0000 (Mon, 27 Dec 2010)
Log Message:
-----------
Checkstyle fixes.
Modified Paths:
--------------
trunk/builder/src/builder/org/jnode/build/AbstractBootImageBuilder.java
trunk/builder/src/builder/org/jnode/build/ObjectEmitter.java
trunk/builder/src/builder/org/jnode/build/x86/BootImageBuilder.java
trunk/cli/src/commands/org/jnode/command/system/GcCommand.java
trunk/cli/src/commands/org/jnode/command/system/OnHeapCommand.java
trunk/fs/src/driver/org/jnode/driver/block/ide/disk/IDEDiskDriver.java
trunk/fs/src/fs/org/jnode/fs/iso9660/ISO9660FileSystem.java
trunk/fs/src/fs/org/jnode/fs/iso9660/ISO9660Volume.java
trunk/fs/src/fs/org/jnode/fs/iso9660/SupplementaryVolumeDescriptor.java
trunk/fs/src/fs/org/jnode/partitions/command/FdiskCommand.java
trunk/fs/src/test/org/jnode/test/support/MockObjectFactory.java
trunk/gui/src/awt/org/jnode/awt/util/BasicSurfaceGraphics.java
trunk/gui/src/driver/org/jnode/driver/video/vga/VGABitmapGraphics.java
trunk/gui/src/driver/org/jnode/driver/video/vga/VGADriver.java
Modified: trunk/builder/src/builder/org/jnode/build/AbstractBootImageBuilder.java
===================================================================
--- trunk/builder/src/builder/org/jnode/build/AbstractBootImageBuilder.java 2010-12-27 18:41:44 UTC (rev 5759)
+++ trunk/builder/src/builder/org/jnode/build/AbstractBootImageBuilder.java 2010-12-27 18:44:14 UTC (rev 5760)
@@ -17,7 +17,7 @@
* along with this library; If not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-
+
package org.jnode.build;
import java.io.BufferedReader;
@@ -611,7 +611,7 @@
emitStaticInitializerCalls(os, bootClasses, clInitCaller);
// This is the end of the image
- X86BinaryAssembler.ObjectInfo dummyObjectAtEnd =
+ X86BinaryAssembler.ObjectInfo dummyObjectAtEnd =
os.startObject(loadClass(VmMethodCode.class));
pageAlign(os);
dummyObjectAtEnd.markEnd();
@@ -756,7 +756,7 @@
}
if (!ref.isResolved()) {
throw new RuntimeException("Unresolved reference to object " + ((obj == null) ?
- "null" : obj.getClass() .getName()));
+ "null" : obj.getClass().getName()));
}
}
}
@@ -803,85 +803,85 @@
throws ClassNotFoundException;
public final void execute() throws BuildException {
- try {
- InitialNaming.setNameSpace(new BasicNameSpace());
- BootLogInstance.set(new BootLog() {
- @Override
- public void warn(String msg) {
- System.out.println(msg);
- }
-
- @Override
- public void warn(String msg, Throwable ex) {
- System.out.println(msg);
- ex.printStackTrace(System.out);
- }
-
- @Override
- public void setDebugOut(PrintStream out) {
- // ignore
- }
-
- @Override
- public void info(String msg, Throwable ex) {
- System.out.println(msg);
- ex.printStackTrace(System.out);
- }
-
- @Override
- public void info(String msg) {
- System.out.println(msg);
- }
-
- @Override
- public void fatal(String msg, Throwable ex) {
- System.out.println(msg);
- ex.printStackTrace(System.out);
- }
-
- @Override
- public void fatal(String msg) {
- System.out.println(msg);
- }
-
- @Override
- public void error(String msg, Throwable ex) {
- System.out.println(msg);
- ex.printStackTrace(System.out);
- }
-
- @Override
- public void error(String msg) {
- System.out.println(msg);
- }
-
- @Override
- public void debug(String msg, Throwable ex) {
- System.out.println(msg);
- ex.printStackTrace(System.out);
- }
-
- @Override
- public void debug(String msg) {
- System.out.println(msg);
- }
- });
-
- // Create the image
- doExecute();
- // Remove all garbage objects
- cleanup();
- System.gc();
- // Make sure that all finalizers are called, in order to remove tmp
- // files.
- Runtime.getRuntime().runFinalization();
- } catch (BuildException be) {
- be.printStackTrace();
- throw be;
- } catch (Throwable t) {
- t.printStackTrace();
- throw new BuildException(t);
- }
+ try {
+ InitialNaming.setNameSpace(new BasicNameSpace());
+ BootLogInstance.set(new BootLog() {
+ @Override
+ public void warn(String msg) {
+ System.out.println(msg);
+ }
+
+ @Override
+ public void warn(String msg, Throwable ex) {
+ System.out.println(msg);
+ ex.printStackTrace(System.out);
+ }
+
+ @Override
+ public void setDebugOut(PrintStream out) {
+ // ignore
+ }
+
+ @Override
+ public void info(String msg, Throwable ex) {
+ System.out.println(msg);
+ ex.printStackTrace(System.out);
+ }
+
+ @Override
+ public void info(String msg) {
+ System.out.println(msg);
+ }
+
+ @Override
+ public void fatal(String msg, Throwable ex) {
+ System.out.println(msg);
+ ex.printStackTrace(System.out);
+ }
+
+ @Override
+ public void fatal(String msg) {
+ System.out.println(msg);
+ }
+
+ @Override
+ public void error(String msg, Throwable ex) {
+ System.out.println(msg);
+ ex.printStackTrace(System.out);
+ }
+
+ @Override
+ public void error(String msg) {
+ System.out.println(msg);
+ }
+
+ @Override
+ public void debug(String msg, Throwable ex) {
+ System.out.println(msg);
+ ex.printStackTrace(System.out);
+ }
+
+ @Override
+ public void debug(String msg) {
+ System.out.println(msg);
+ }
+ });
+
+ // Create the image
+ doExecute();
+ // Remove all garbage objects
+ cleanup();
+ System.gc();
+ // Make sure that all finalizers are called, in order to remove tmp
+ // files.
+ Runtime.getRuntime().runFinalization();
+ } catch (BuildException be) {
+ be.printStackTrace();
+ throw be;
+ } catch (Throwable t) {
+ t.printStackTrace();
+ throw new BuildException(t);
+ }
}
/**
@@ -997,7 +997,7 @@
protected boolean isCompileHighOptLevel(VmType<?> vmClass) {
return vmClass.isArray() || isCompileHighOptLevel(vmClass.getName());
}
-
+
private boolean isCompileHighOptLevel(String name) {
if (compileHighOptLevelPackages.contains(name)) {
return true;
@@ -1020,9 +1020,8 @@
return false;
}
-
-
+
/**
* Link all undefined symbols from the kernel native code.
*
@@ -1112,8 +1111,8 @@
eName.length() - ".class".length()).replace('/', '.');
final int lastDotIdx = cName.lastIndexOf('.');
final String pkg = (lastDotIdx > 0) ? cName.substring(0, lastDotIdx) : "";
- if (isCompileHighOptLevel(cName) ||
- preloadPackages.contains(cName) || preloadPackages.contains(pkg)) {
+ if (isCompileHighOptLevel(cName) ||
+ preloadPackages.contains(cName) || preloadPackages.contains(pkg)) {
loadClass(cName, true);
}
}
@@ -1351,7 +1350,7 @@
public void setListFile(File listFile) {
this.listFile = listFile;
}
-
+
/**
* Sets the core class list file.
*
@@ -1362,52 +1361,51 @@
}
protected void setupCompileHighOptLevelPackages() {
- addCompileHighOptLevel(loadClassList(coreClassListFile));
+ addCompileHighOptLevel(loadClassList(coreClassListFile));
for (NativeCodeCompiler compiler : getArchitecture().getCompilers()) {
for (String packageName : compiler.getCompilerPackages()) {
addCompileHighOptLevel(packageName);
}
}
}
-
+
protected void addCompileHighOptLevel(List<String> classNames) {
- for (String className : classNames) {
- addCompileHighOptLevel(className);
- }
+ for (String className : classNames) {
+ addCompileHighOptLevel(className);
+ }
}
- protected List<String> loadClassList(File file) {
- ArrayList<String> classNames = new ArrayList<String>();
- FileReader fr;
- try {
- fr = new FileReader(file);
- } catch (IOException ex) {
- throw new BuildException("Cannot open '" + file + "'", ex);
- }
- try {
- BufferedReader br = new BufferedReader(fr);
- String line;
- while ((line = br.readLine()) != null) {
- line = line.trim();
- if (line.isEmpty() || line.startsWith("#") || line.startsWith("/")) {
- continue;
- }
- classNames.add(line);
- }
- } catch (IOException ex) {
- throw new BuildException("Error reading '" + file + "'", ex);
- } finally {
- try {
- fr.close();
- } catch (IOException ex) {
- // ignore
- }
- }
- return classNames;
- }
-
-
+ protected List<String> loadClassList(File file) {
+ ArrayList<String> classNames = new ArrayList<String>();
+ FileReader fr;
+ try {
+ fr = new FileReader(file);
+ } catch (IOException ex) {
+ throw new BuildException("Cannot open '" + file + "'", ex);
+ }
+ try {
+ BufferedReader br = new BufferedReader(fr);
+ String line;
+ while ((line = br.readLine()) != null) {
+ line = line.trim();
+ if (line.isEmpty() || line.startsWith("#") || line.startsWith("/")) {
+ continue;
+ }
+ classNames.add(line);
+ }
+ } catch (IOException ex) {
+ throw new BuildException("Error reading '" + file + "'", ex);
+ } finally {
+ try {
+ fr.close();
+ } catch (IOException ex) {
+ // ignore
+ }
+ }
+ return classNames;
+ }
+
/**
* Create a set of the names of those classes that can be safely
* instantiated during the boot process (and written as instance to the boot
Modified: trunk/builder/src/builder/org/jnode/build/ObjectEmitter.java
===================================================================
--- trunk/builder/src/builder/org/jnode/build/ObjectEmitter.java 2010-12-27 18:41:44 UTC (rev 5759)
+++ trunk/builder/src/builder/org/jnode/build/ObjectEmitter.java 2010-12-27 18:44:14 UTC (rev 5760)
@@ -17,7 +17,7 @@
* along with this library; If not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-
+
package org.jnode.build;
import java.io.PrintWriter;
@@ -334,7 +334,7 @@
/**
* Allocate and write and object of a given type.
- *
+ *
* @param cls
* @param obj
* @param vmType
@@ -461,7 +461,7 @@
+ jdkField.getName() + " of class "
+ cls.getName(), ex);
} catch (JNodeClassNotFoundException ex) {
- BootLogInstance.get()
+ BootLogInstance.get()
.warn("JNode class not found "
+ ex.getMessage());
value = null;
Modified: trunk/builder/src/builder/org/jnode/build/x86/BootImageBuilder.java
===================================================================
--- trunk/builder/src/builder/org/jnode/build/x86/BootImageBuilder.java 2010-12-27 18:41:44 UTC (rev 5759)
+++ trunk/builder/src/builder/org/jnode/build/x86/BootImageBuilder.java 2010-12-27 18:44:14 UTC (rev 5760)
@@ -17,7 +17,7 @@
* along with this library; If not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-
+
package org.jnode.build.x86;
import java.io.File;
@@ -84,7 +84,7 @@
public static final int INITIAL_OBJREFS_CAPACITY = 750000;
public static final int INITIAL_SIZE = 64 * 1024 * 1024;
-
+
private File archClassListFile;
private VmX86Processor processor;
@@ -351,9 +351,9 @@
refJava = os
.getObjectRef(vmSystemClass
.getMethod(
- "findThrowableHandler",
- "(Ljava/lang/Throwable;Lorg/vmmagic/unboxed/Address;Lorg/vmmagic/unboxed/Address;)" +
- "Lorg/vmmagic/unboxed/Address;"));
+ "findThrowableHandler",
+ "(Ljava/lang/Throwable;Lorg/vmmagic/unboxed/Address;Lorg/vmmagic/unboxed/Address;)" +
+ "Lorg/vmmagic/unboxed/Address;"));
os.getObjectRef(vmFindThrowableHandler).link(refJava);
// Link Luser_esp
@@ -694,7 +694,7 @@
/**
* Include x86 class files.
- *
+ *
* @see org.jnode.build.AbstractBootImageBuilder#setupCompileHighOptLevelPackages()
*/
protected void setupCompileHighOptLevelPackages() {
@@ -773,16 +773,16 @@
*
* @return The archClassListFile to set
*/
- public File getArchClassListFile() {
- return archClassListFile;
- }
+ public File getArchClassListFile() {
+ return archClassListFile;
+ }
- /**
+ /**
* Sets the architecture specific class list file.
*
* @param archClassListFile The archClassListFile to set
*/
- public void setArchClassListFile(File archClassListFile) {
- this.archClassListFile = archClassListFile;
- }
+ public void setArchClassListFile(File archClassListFile) {
+ this.archClassListFile = archClassListFile;
+ }
}
Modified: trunk/cli/src/commands/org/jnode/command/system/GcCommand.java
===================================================================
--- trunk/cli/src/commands/org/jnode/command/system/GcCommand.java 2010-12-27 18:41:44 UTC (rev 5759)
+++ trunk/cli/src/commands/org/jnode/command/system/GcCommand.java 2010-12-27 18:44:14 UTC (rev 5760)
@@ -17,7 +17,7 @@
* along with this library; If not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-
+
package org.jnode.command.system;
import java.io.PrintWriter;
@@ -27,7 +27,6 @@
import org.jnode.shell.syntax.EnumArgument;
import org.jnode.shell.syntax.FlagArgument;
import org.jnode.util.NumberUtils;
-import org.jnode.vm.VmImpl;
import org.jnode.vm.facade.GCStatistics;
import org.jnode.vm.facade.VmUtils;
import org.jnode.vm.memmgr.VmHeapManager;
@@ -37,7 +36,7 @@
* @author cr...@jn...
*/
public class GcCommand extends AbstractCommand {
-
+
private static final String help_debug_flags = "the heap debug flags";
private static final String help_set = "set these debug flags";
private static final String help_clear = "clear these debug flags";
@@ -51,11 +50,11 @@
private static final String str_start = "Starting gc";
private static final String str_no_flags = "No heap debug flags set";
private static final String fmt_flags = "Heap debug flags: %s";
-
+
private enum HeapFlag {
- TRACE_BASIC(VmHeapManager.TRACE_BASIC),
- TRACE_ALLOC(VmHeapManager.TRACE_ALLOC),
- TRACE_TRIGGER(VmHeapManager.TRACE_TRIGGER),
+ TRACE_BASIC(VmHeapManager.TRACE_BASIC),
+ TRACE_ALLOC(VmHeapManager.TRACE_ALLOC),
+ TRACE_TRIGGER(VmHeapManager.TRACE_TRIGGER),
TRACE_OOM(VmHeapManager.TRACE_OOM),
TRACE_AD_HOC(VmHeapManager.TRACE_AD_HOC),
all(-1); // All flags
@@ -71,12 +70,13 @@
public HeapDebugFlagArgument() {
super("debugFlag", Argument.OPTIONAL | Argument.MULTIPLE, HeapFlag.class, help_debug_flags);
}
+
@Override
protected String argumentKind() {
return "debug flag";
}
}
-
+
private final HeapDebugFlagArgument argDebugFlags;
private final FlagArgument argSet;
private final FlagArgument argClear;
@@ -85,9 +85,9 @@
public GcCommand() {
super(help_super);
argDebugFlags = new HeapDebugFlagArgument();
- argSet = new FlagArgument("set", Argument.OPTIONAL, help_set);
- argClear = new FlagArgument("clear", Argument.OPTIONAL, help_clear);
- argShow = new FlagArgument("show", Argument.OPTIONAL, help_show);
+ argSet = new FlagArgument("set", Argument.OPTIONAL, help_set);
+ argClear = new FlagArgument("clear", Argument.OPTIONAL, help_clear);
+ argShow = new FlagArgument("show", Argument.OPTIONAL, help_show);
registerArguments(argDebugFlags, argClear, argSet, argShow);
}
@@ -101,7 +101,7 @@
public void execute() throws Exception {
final PrintWriter out = getOutput().getPrintWriter();
if (argSet.isSet()) {
- VmUtils.getVm().getHeapManager().setHeapFlags(getFlags());
+ VmUtils.getVm().getHeapManager().setHeapFlags(getFlags());
} else if (argClear.isSet()) {
int flags = VmUtils.getVm().getHeapManager().getHeapFlags() ^ getFlags();
VmUtils.getVm().getHeapManager().setHeapFlags(flags);
@@ -118,14 +118,14 @@
GCStatistics stats = VmUtils.getVm().getHeapManager().getStatistics();
Thread.yield();
long end = System.currentTimeMillis();
-
+
out.format(fmt_out, str_mem_size, NumberUtils.toBinaryByte(rt.totalMemory()));
out.format(fmt_out, str_mem_free, NumberUtils.toBinaryByte(rt.freeMemory()));
out.format(fmt_out, str_time, (end - start) + "ms");
out.format(fmt_out, str_stats, stats.toString());
}
}
-
+
private void showFlags(int flags, PrintWriter out) {
StringBuilder sb = new StringBuilder();
for (int flagBitMask = 1; flagBitMask != 0; flagBitMask = flagBitMask << 1) {
Modified: trunk/cli/src/commands/org/jnode/command/system/OnHeapCommand.java
===================================================================
--- trunk/cli/src/commands/org/jnode/command/system/OnHeapCommand.java 2010-12-27 18:41:44 UTC (rev 5759)
+++ trunk/cli/src/commands/org/jnode/command/system/OnHeapCommand.java 2010-12-27 18:44:14 UTC (rev 5760)
@@ -27,7 +27,6 @@
import org.jnode.shell.syntax.Argument;
import org.jnode.shell.syntax.IntegerArgument;
import org.jnode.shell.syntax.LongArgument;
-import org.jnode.vm.VmImpl;
import org.jnode.vm.facade.HeapStatistics;
import org.jnode.vm.facade.VmUtils;
Modified: trunk/fs/src/driver/org/jnode/driver/block/ide/disk/IDEDiskDriver.java
===================================================================
--- trunk/fs/src/driver/org/jnode/driver/block/ide/disk/IDEDiskDriver.java 2010-12-27 18:41:44 UTC (rev 5759)
+++ trunk/fs/src/driver/org/jnode/driver/block/ide/disk/IDEDiskDriver.java 2010-12-27 18:44:14 UTC (rev 5760)
@@ -17,7 +17,7 @@
* along with this library; If not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-
+
package org.jnode.driver.block.ide.disk;
import java.io.IOException;
@@ -68,18 +68,18 @@
* My logger
*/
private static final Logger log = Logger.getLogger(IDEDiskDriver.class);
-
+
/**
* Number of addressable sectors
*/
private long maxSector;
-
+
/** Has LBA support? */
//private boolean lba;
-
+
/** Has DMA support? */
//private boolean dma;
-
+
/**
* Support 48-bit addressing?
*/
@@ -124,7 +124,7 @@
int i = 0;
for (IBMPartitionTableEntry pte : pt) {
if (pte == null) {
- BootLogInstance.get().warn("PartitionTableEntry #" + i + " is null");
+ BootLogInstance.get().warn("PartitionTableEntry #" + i + " is null");
} else if (pte.isValid()) {
if (pte.isExtended()) {
// Create partition devices for the extended partition
@@ -299,9 +299,10 @@
* @param partIndex the first partition index to use
* @return the next partition index
* @throws DeviceAlreadyRegisteredException
+ *
* @throws DriverException
*/
- private int registerExtendedPartition(DeviceManager devMan, IDEDevice dev, int partIndex)
+ private int registerExtendedPartition(DeviceManager devMan, IDEDevice dev, int partIndex)
throws DeviceAlreadyRegisteredException, DriverException {
//now we should have an filled vector in the pt
final List<IBMPartitionTableEntry> extendedPartitions = pt.getExtendedPartitions();
Modified: trunk/fs/src/fs/org/jnode/fs/iso9660/ISO9660FileSystem.java
===================================================================
--- trunk/fs/src/fs/org/jnode/fs/iso9660/ISO9660FileSystem.java 2010-12-27 18:41:44 UTC (rev 5759)
+++ trunk/fs/src/fs/org/jnode/fs/iso9660/ISO9660FileSystem.java 2010-12-27 18:44:14 UTC (rev 5760)
@@ -43,7 +43,7 @@
* @see org.jnode.fs.FileSystem#getDevice()
*/
public ISO9660FileSystem(Device device, boolean readOnly, ISO9660FileSystemType type)
- throws FileSystemException {
+ throws FileSystemException {
super(device, readOnly, type);
try {
@@ -84,7 +84,7 @@
}
/**
- *
+ *
*/
protected FSFile createFile(FSEntry entry) throws IOException {
// TODO Auto-generated method stub
@@ -92,7 +92,7 @@
}
/**
- *
+ *
*/
protected FSDirectory createDirectory(FSEntry entry) throws IOException {
// TODO Auto-generated method stub
@@ -100,7 +100,7 @@
}
/**
- *
+ *
*/
protected ISO9660Entry createRootEntry() throws IOException {
// TODO Auto-generated method stub
Modified: trunk/fs/src/fs/org/jnode/fs/iso9660/ISO9660Volume.java
===================================================================
--- trunk/fs/src/fs/org/jnode/fs/iso9660/ISO9660Volume.java 2010-12-27 18:41:44 UTC (rev 5759)
+++ trunk/fs/src/fs/org/jnode/fs/iso9660/ISO9660Volume.java 2010-12-27 18:44:14 UTC (rev 5760)
@@ -43,7 +43,7 @@
/**
* Initialize this instance.
- *
+ *
* @param api
* @throws IOException
*/
@@ -65,26 +65,26 @@
done = true;
break;
case VolumeDescriptorType.BOOTRECORD:
- BootLogInstance.get().debug("Found boot record");
+ BootLogInstance.get().debug("Found boot record");
break;
case VolumeDescriptorType.PRIMARY_DESCRIPTOR:
- BootLogInstance.get().debug("Found primary descriptor");
+ BootLogInstance.get().debug("Found primary descriptor");
pVD = new PrimaryVolumeDescriptor(this, buffer);
// pVD.dump(System.out);
break;
case VolumeDescriptorType.SUPPLEMENTARY_DESCRIPTOR:
- BootLogInstance.get().debug("Found supplementatory descriptor");
+ BootLogInstance.get().debug("Found supplementatory descriptor");
final SupplementaryVolumeDescriptor d =
- new SupplementaryVolumeDescriptor(this, buffer);
+ new SupplementaryVolumeDescriptor(this, buffer);
if (d.isEncodingKnown()) {
sVD = d;
}
break;
case VolumeDescriptorType.PARTITION_DESCRIPTOR:
- BootLogInstance.get().debug("Found partition descriptor");
+ BootLogInstance.get().debug("Found partition descriptor");
break;
default:
- BootLogInstance.get().debug("Found unknown descriptor with type " + type);
+ BootLogInstance.get().debug("Found unknown descriptor with type " + type);
}
}
if (pVD == null) {
@@ -96,7 +96,7 @@
/**
* Read a block of data from this volume.
- *
+ *
* @param startLBN
* @param offset
* @param buffer
Modified: trunk/fs/src/fs/org/jnode/fs/iso9660/SupplementaryVolumeDescriptor.java
===================================================================
--- trunk/fs/src/fs/org/jnode/fs/iso9660/SupplementaryVolumeDescriptor.java 2010-12-27 18:41:44 UTC (rev 5759)
+++ trunk/fs/src/fs/org/jnode/fs/iso9660/SupplementaryVolumeDescriptor.java 2010-12-27 18:44:14 UTC (rev 5760)
@@ -45,7 +45,7 @@
* @param buffer
*/
public SupplementaryVolumeDescriptor(ISO9660Volume volume, byte[] buffer)
- throws UnsupportedEncodingException {
+ throws UnsupportedEncodingException {
super(volume, buffer);
this.flags = getUInt8(buffer, 8);
this.escapeSequences = getDChars(buffer, 89, 121 - 89);
@@ -115,7 +115,7 @@
/**
* Gets a derived encoding name from the given escape sequences.
- *
+ *
* @param escapeSequences
* @return the encoding name
*/
@@ -137,7 +137,7 @@
/**
* Is the used encoding known to this system.
- *
+ *
* @return {@code true} if the encoding known, otherwise {@code false}.
*/
public final boolean isEncodingKnown() {
Modified: trunk/fs/src/fs/org/jnode/partitions/command/FdiskCommand.java
===================================================================
--- trunk/fs/src/fs/org/jnode/partitions/command/FdiskCommand.java 2010-12-27 18:41:44 UTC (rev 5759)
+++ trunk/fs/src/fs/org/jnode/partitions/command/FdiskCommand.java 2010-12-27 18:44:14 UTC (rev 5760)
@@ -51,165 +51,165 @@
* @author cr...@jn...
*/
public class FdiskCommand extends AbstractCommand {
- // FIXME ... this is a dangerous command and it needs some extra checking to help
- // avoid catastrophic errors. At the very least, it needs a mode that shows the
- // user what would happen but does nothing.
+ // FIXME ... this is a dangerous command and it needs some extra checking to help
+ // avoid catastrophic errors. At the very least, it needs a mode that shows the
+ // user what would happen but does nothing.
private final FlagArgument FLAG_INIT_MBR =
- new FlagArgument("initMBR", Argument.OPTIONAL,
- "if set, init the device's Master Boot Record");
+ new FlagArgument("initMBR", Argument.OPTIONAL,
+ "if set, init the device's Master Boot Record");
private final FlagArgument FLAG_DELETE =
- new FlagArgument("delete", Argument.OPTIONAL, "if set, delete a partition");
+ new FlagArgument("delete", Argument.OPTIONAL, "if set, delete a partition");
private final FlagArgument FLAG_BOOTABLE =
- new FlagArgument("bootable", Argument.OPTIONAL,
- "if set, toggle the partition's bootable flag");
+ new FlagArgument("bootable", Argument.OPTIONAL,
+ "if set, toggle the partition's bootable flag");
private final FlagArgument FLAG_MODIFY =
- new FlagArgument("modify", Argument.OPTIONAL, "if set, modify or create a partition");
+ new FlagArgument("modify", Argument.OPTIONAL, "if set, modify or create a partition");
private final IntegerArgument ARG_PARTITION =
- new IntegerArgument("partition", Argument.OPTIONAL, "Target partition number (0..3)");
+ new IntegerArgument("partition", Argument.OPTIONAL, "Target partition number (0..3)");
private final LongArgument ARG_START =
- new LongArgument("start", Argument.OPTIONAL, "Partition start sector");
+ new LongArgument("start", Argument.OPTIONAL, "Partition start sector");
private final LongArgument ARG_SECTORS =
- new LongArgument("sectors", Argument.OPTIONAL, "Partition size in sectors");
+ new LongArgument("sectors", Argument.OPTIONAL, "Partition size in sectors");
private final SizeArgument ARG_BYTES =
- new SizeArgument("bytes", Argument.OPTIONAL, "Partition size in bytes (300K, 45M, etc)");
+ new SizeArgument("bytes", Argument.OPTIONAL, "Partition size in bytes (300K, 45M, etc)");
private final IBMPartitionTypeArgument ARG_TYPE =
- new IBMPartitionTypeArgument("type", Argument.OPTIONAL, "IBM partition type code");
+ new IBMPartitionTypeArgument("type", Argument.OPTIONAL, "IBM partition type code");
private final DeviceArgument ARG_DEVICE =
- new DeviceArgument("deviceId", Argument.OPTIONAL, "Target device", BlockDeviceAPI.class);
+ new DeviceArgument("deviceId", Argument.OPTIONAL, "Target device", BlockDeviceAPI.class);
- public FdiskCommand() {
- super("perform disk partition management tasks");
+ public FdiskCommand() {
+ super("perform disk partition management tasks");
registerArguments(FLAG_BOOTABLE, FLAG_DELETE, FLAG_INIT_MBR, FLAG_MODIFY, ARG_DEVICE,
- ARG_PARTITION, ARG_START, ARG_SECTORS, ARG_BYTES, ARG_TYPE);
- }
+ ARG_PARTITION, ARG_START, ARG_SECTORS, ARG_BYTES, ARG_TYPE);
+ }
...
[truncated message content] |
|
From: <ls...@us...> - 2010-12-27 21:02:44
|
Revision: 5762
http://jnode.svn.sourceforge.net/jnode/?rev=5762&view=rev
Author: lsantha
Date: 2010-12-27 21:02:37 +0000 (Mon, 27 Dec 2010)
Log Message:
-----------
Javadoc fixes.
Modified Paths:
--------------
trunk/all/build.xml
trunk/builder/src/builder/org/jnode/linker/Elf.java
trunk/core/src/core/org/jnode/vm/VmMagic.java
Modified: trunk/all/build.xml
===================================================================
--- trunk/all/build.xml 2010-12-27 18:48:53 UTC (rev 5761)
+++ trunk/all/build.xml 2010-12-27 21:02:37 UTC (rev 5762)
@@ -727,6 +727,7 @@
<pathelement location="${root.dir}/core/src/openjdk/vm"/>
<pathelement location="${root.dir}/core/src/core"/>
<pathelement location="${root.dir}/core/src/driver"/>
+ <pathelement location="${root.dir}/core/src/emu"/>
<pathelement location="${root.dir}/core/src/mmtk-vm"/>
<pathelement location="${root.dir}/core/src/endorsed/nanoxml"/>
<pathelement location="${root.dir}/core/src/test"/>
Modified: trunk/builder/src/builder/org/jnode/linker/Elf.java
===================================================================
--- trunk/builder/src/builder/org/jnode/linker/Elf.java 2010-12-27 18:48:53 UTC (rev 5761)
+++ trunk/builder/src/builder/org/jnode/linker/Elf.java 2010-12-27 21:02:37 UTC (rev 5762)
@@ -282,7 +282,7 @@
/**
* Does this elf file contain 32-bit objects.
*
- * @return
+ * @return true is the file contains 32-bit objects
*/
public boolean isClass32() {
return (e_ident[EI_CLASS] == ELFCLASS32);
@@ -291,7 +291,7 @@
/**
* Does this elf file contain 64-bit objects.
*
- * @return
+ * @return true is the file contains 64-bit objects
*/
public boolean isClass64() {
return (e_ident[EI_CLASS] == ELFCLASS64);
@@ -300,7 +300,7 @@
/**
* Gets the entry point address.
*
- * @return
+ * @return the address
*/
public long getEntry() {
return e_entry;
Modified: trunk/core/src/core/org/jnode/vm/VmMagic.java
===================================================================
--- trunk/core/src/core/org/jnode/vm/VmMagic.java 2010-12-27 18:48:53 UTC (rev 5761)
+++ trunk/core/src/core/org/jnode/vm/VmMagic.java 2010-12-27 21:02:37 UTC (rev 5762)
@@ -34,11 +34,12 @@
* bodies are not used.
* <p/>
* Methods in this class can also be called from inside JNode.
+ * <p/>
+ * See {@link org.jnode.vm.classmgr.VmType VmType} to get the list of "magic" classes and
+ * {@link org.jnode.vm.compiler.BaseMagicHelper.MagicMethod MagicMethod}
+ * to get the list of "magic" methods.
*
* @author Ewout Prangsma (ep...@us...)
- * @see {@link org.jnode.classmgr.VmType VmType} to get the list of "magic" classes
- * @see {@link org.jnode.vm.compiler.BaseMagicHelper.MagicMethod MagicMethod}
- * to get the list of "magic" methods
*/
@MagicPermission
public final class VmMagic {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ls...@us...> - 2011-01-03 10:19:18
|
Revision: 5763
http://jnode.svn.sourceforge.net/jnode/?rev=5763&view=rev
Author: lsantha
Date: 2011-01-03 10:19:11 +0000 (Mon, 03 Jan 2011)
Log Message:
-----------
Javadoc fixes.
Modified Paths:
--------------
trunk/builder/src/builder/org/jnode/linker/LoadUtil.java
trunk/builder/src/builder/org/jnode/linker/StoreUtil.java
trunk/builder/src/configure/org/jnode/configure/PatternType.java
trunk/core/src/classlib/org/jnode/java/io/VMFileSystemAPI.java
trunk/core/src/core/org/jnode/vm/facade/Vm.java
trunk/core/src/core/org/jnode/vm/memmgr/def/DefaultHeapManager.java
trunk/core/src/vmmagic/org/vmmagic/unboxed/Address.java
trunk/core/src/vmmagic/org/vmmagic/unboxed/AddressArray.java
trunk/core/src/vmmagic/org/vmmagic/unboxed/Extent.java
trunk/core/src/vmmagic/org/vmmagic/unboxed/ExtentArray.java
trunk/core/src/vmmagic/org/vmmagic/unboxed/ObjectReference.java
trunk/core/src/vmmagic/org/vmmagic/unboxed/ObjectReferenceArray.java
trunk/core/src/vmmagic/org/vmmagic/unboxed/Offset.java
trunk/core/src/vmmagic/org/vmmagic/unboxed/OffsetArray.java
trunk/core/src/vmmagic/org/vmmagic/unboxed/Word.java
trunk/core/src/vmmagic/org/vmmagic/unboxed/WordArray.java
trunk/fs/src/driver/org/jnode/driver/block/floppy/DefaultFDC.java
trunk/fs/src/driver/org/jnode/driver/block/floppy/FDC.java
trunk/gui/src/driver/org/jnode/driver/ps2/PS2Bus.java
trunk/gui/src/driver/org/jnode/driver/ps2/PS2ByteChannel.java
trunk/net/src/driver/org/jnode/driver/net/_3c90x/_3c90xCore.java
trunk/net/src/driver/org/jnode/driver/net/lance/LanceCore.java
trunk/net/src/driver/org/jnode/driver/net/ne2000/Ne2000Core.java
Modified: trunk/builder/src/builder/org/jnode/linker/LoadUtil.java
===================================================================
--- trunk/builder/src/builder/org/jnode/linker/LoadUtil.java 2010-12-27 21:02:37 UTC (rev 5762)
+++ trunk/builder/src/builder/org/jnode/linker/LoadUtil.java 2011-01-03 10:19:11 UTC (rev 5763)
@@ -193,7 +193,7 @@
/**
* Load a program address.
*
- * @param out
+ * @param in
* @param e_ident
* @return
* @throws IOException
@@ -210,7 +210,7 @@
/**
* Load a program address.
*
- * @param out
+ * @param in
* @param e_ident
* @return
* @throws IOException
@@ -227,7 +227,7 @@
/**
* Load a file offset.
*
- * @param out
+ * @param in
* @param e_ident
* @return
* @throws IOException
@@ -244,7 +244,7 @@
/**
* Load a file offset.
*
- * @param out
+ * @param in
* @param e_ident
* @return
* @throws IOException
@@ -261,7 +261,7 @@
/**
* Load an Xword.
*
- * @param out
+ * @param in
* @param e_ident
* @return
* @throws IOException
@@ -278,7 +278,7 @@
/**
* Load an Xword.
*
- * @param out
+ * @param in
* @param e_ident
* @return
* @throws IOException
Modified: trunk/builder/src/builder/org/jnode/linker/StoreUtil.java
===================================================================
--- trunk/builder/src/builder/org/jnode/linker/StoreUtil.java 2010-12-27 21:02:37 UTC (rev 5762)
+++ trunk/builder/src/builder/org/jnode/linker/StoreUtil.java 2011-01-03 10:19:11 UTC (rev 5763)
@@ -136,7 +136,7 @@
*
* @param out
* @param e_ident
- * @param address
+ * @param off
* @return
* @throws IOException
*/
@@ -154,7 +154,7 @@
*
* @param out
* @param e_ident
- * @param address
+ * @param xword
* @return
* @throws IOException
*/
Modified: trunk/builder/src/configure/org/jnode/configure/PatternType.java
===================================================================
--- trunk/builder/src/configure/org/jnode/configure/PatternType.java 2010-12-27 21:02:37 UTC (rev 5762)
+++ trunk/builder/src/configure/org/jnode/configure/PatternType.java 2011-01-03 10:19:11 UTC (rev 5763)
@@ -29,7 +29,7 @@
* This class represents a property type defined by a regex. The constructor
* allows you to provide an "emptyToken" value. If provided, this value defines
* a special token that will be mapped to the empty string by the
- * {@link fromToken} method.
+ * {@link #fromValue(String)} method.
*
* @author cr...@jn...
*/
Modified: trunk/core/src/classlib/org/jnode/java/io/VMFileSystemAPI.java
===================================================================
--- trunk/core/src/classlib/org/jnode/java/io/VMFileSystemAPI.java 2010-12-27 21:02:37 UTC (rev 5762)
+++ trunk/core/src/classlib/org/jnode/java/io/VMFileSystemAPI.java 2011-01-03 10:19:11 UTC (rev 5763)
@@ -29,7 +29,8 @@
* filesystem services.
* The file paths given to the various methods are absolute and canonical.
*
- * @modif add mkDir mkFile Yves Galante (yve...@jm...) 01.04.2004
+ * Modified: add mkDir mkFile Yves Galante (yve...@jm...) 01.04.2004
+ *
* @author epr
*/
public interface VMFileSystemAPI {
Modified: trunk/core/src/core/org/jnode/vm/facade/Vm.java
===================================================================
--- trunk/core/src/core/org/jnode/vm/facade/Vm.java 2010-12-27 21:02:37 UTC (rev 5762)
+++ trunk/core/src/core/org/jnode/vm/facade/Vm.java 2011-01-03 10:19:11 UTC (rev 5763)
@@ -51,7 +51,7 @@
* @param name
* @return The counter
*/
- Counter getCounter(String string);
+ Counter getCounter(String name);
/**
* Gets or creates a counter group with a given name.
Modified: trunk/core/src/core/org/jnode/vm/memmgr/def/DefaultHeapManager.java
===================================================================
--- trunk/core/src/core/org/jnode/vm/memmgr/def/DefaultHeapManager.java 2010-12-27 21:02:37 UTC (rev 5762)
+++ trunk/core/src/core/org/jnode/vm/memmgr/def/DefaultHeapManager.java 2011-01-03 10:19:11 UTC (rev 5763)
@@ -468,7 +468,7 @@
}
/**
- * @see org.jnode.vm.memmgr.VmHeapManager#createProcessorHeapData(org.jnode.vm.scheduler.VmProcessor)
+ * @see org.jnode.vm.memmgr.VmHeapManager#createProcessorHeapData(org.jnode.vm.facade.VmProcessor)
*/
public Object createProcessorHeapData(VmProcessor cpu) {
// No need here, so return null.
Modified: trunk/core/src/vmmagic/org/vmmagic/unboxed/Address.java
===================================================================
--- trunk/core/src/vmmagic/org/vmmagic/unboxed/Address.java 2010-12-27 21:02:37 UTC (rev 5762)
+++ trunk/core/src/vmmagic/org/vmmagic/unboxed/Address.java 2011-01-03 10:19:11 UTC (rev 5763)
@@ -24,8 +24,8 @@
* <u>JNode specific notes</u> : This class contains some "magic"
* methods that are interpreted by the VM itself, instead of being executed
* as normal java methods. <b>The actual method bodies are never used</b>.
- * @see {@link org.jnode.classmgr.VmType VmType} to get the list of "magic" classes
- * @see {@link org.jnode.vm.compiler.BaseMagicHelper.MagicMethod MagicMethod}
+ * See {@link org.jnode.vm.classmgr.VmType VmType} to get the list of "magic" classes
+ * and see {@link org.jnode.vm.compiler.BaseMagicHelper.MagicMethod MagicMethod}
* to get the list of "magic" methods
* @author Daniel Frampton
*/
Modified: trunk/core/src/vmmagic/org/vmmagic/unboxed/AddressArray.java
===================================================================
--- trunk/core/src/vmmagic/org/vmmagic/unboxed/AddressArray.java 2010-12-27 21:02:37 UTC (rev 5762)
+++ trunk/core/src/vmmagic/org/vmmagic/unboxed/AddressArray.java 2011-01-03 10:19:11 UTC (rev 5763)
@@ -17,8 +17,8 @@
* <u>JNode specific notes</u> : This class contains some "magic"
* methods that are interpreted by the VM itself, instead of being executed
* as normal java methods. <b>The actual method bodies are never used</b>.
- * @see {@link org.jnode.classmgr.VmType VmType} to get the list of "magic" classes
- * @see {@link org.jnode.vm.compiler.BaseMagicHelper.MagicMethod MagicMethod}
+ * See {@link org.jnode.vm.classmgr.VmType VmType} to get the list of "magic" classes
+ * and see {@link org.jnode.vm.compiler.BaseMagicHelper.MagicMethod MagicMethod}
* to get the list of "magic" methods
* @author Daniel Frampton
*/
Modified: trunk/core/src/vmmagic/org/vmmagic/unboxed/Extent.java
===================================================================
--- trunk/core/src/vmmagic/org/vmmagic/unboxed/Extent.java 2010-12-27 21:02:37 UTC (rev 5762)
+++ trunk/core/src/vmmagic/org/vmmagic/unboxed/Extent.java 2011-01-03 10:19:11 UTC (rev 5763)
@@ -17,8 +17,8 @@
* <u>JNode specific notes</u> : This class contains some "magic"
* methods that are interpreted by the VM itself, instead of being executed
* as normal java methods. <b>The actual method bodies are never used</b>.
- * @see {@link org.jnode.classmgr.VmType VmType} to get the list of "magic" classes
- * @see {@link org.jnode.vm.compiler.BaseMagicHelper.MagicMethod MagicMethod}
+ * See {@link org.jnode.vm.classmgr.VmType VmType} to get the list of "magic" classes
+ * and see {@link org.jnode.vm.compiler.BaseMagicHelper.MagicMethod MagicMethod}
* to get the list of "magic" methods
* @author Daniel Frampton
*/
Modified: trunk/core/src/vmmagic/org/vmmagic/unboxed/ExtentArray.java
===================================================================
--- trunk/core/src/vmmagic/org/vmmagic/unboxed/ExtentArray.java 2010-12-27 21:02:37 UTC (rev 5762)
+++ trunk/core/src/vmmagic/org/vmmagic/unboxed/ExtentArray.java 2011-01-03 10:19:11 UTC (rev 5763)
@@ -17,8 +17,8 @@
* <u>JNode specific notes</u> : This class contains some "magic"
* methods that are interpreted by the VM itself, instead of being executed
* as normal java methods. <b>The actual method bodies are never used</b>.
- * @see {@link org.jnode.classmgr.VmType VmType} to get the list of "magic" classes
- * @see {@link org.jnode.vm.compiler.BaseMagicHelper.MagicMethod MagicMethod}
+ * See {@link org.jnode.vm.classmgr.VmType VmType} to get the list of "magic" classes
+ * and see {@link org.jnode.vm.compiler.BaseMagicHelper.MagicMethod MagicMethod}
* to get the list of "magic" methods
* @author Daniel Frampton
*/
Modified: trunk/core/src/vmmagic/org/vmmagic/unboxed/ObjectReference.java
===================================================================
--- trunk/core/src/vmmagic/org/vmmagic/unboxed/ObjectReference.java 2010-12-27 21:02:37 UTC (rev 5762)
+++ trunk/core/src/vmmagic/org/vmmagic/unboxed/ObjectReference.java 2011-01-03 10:19:11 UTC (rev 5763)
@@ -27,8 +27,8 @@
* <u>JNode specific notes</u> : This class contains some "magic"
* methods that are interpreted by the VM itself, instead of being executed
* as normal java methods. <b>The actual method bodies are never used</b>.
- * @see {@link org.jnode.classmgr.VmType VmType} to get the list of "magic" classes
- * @see {@link org.jnode.vm.compiler.BaseMagicHelper.MagicMethod MagicMethod}
+ * See {@link org.jnode.vm.classmgr.VmType VmType} to get the list of "magic" classes
+ * and see {@link org.jnode.vm.compiler.BaseMagicHelper.MagicMethod MagicMethod}
* to get the list of "magic" methods
* @author Daniel Frampton
*/
Modified: trunk/core/src/vmmagic/org/vmmagic/unboxed/ObjectReferenceArray.java
===================================================================
--- trunk/core/src/vmmagic/org/vmmagic/unboxed/ObjectReferenceArray.java 2010-12-27 21:02:37 UTC (rev 5762)
+++ trunk/core/src/vmmagic/org/vmmagic/unboxed/ObjectReferenceArray.java 2011-01-03 10:19:11 UTC (rev 5763)
@@ -17,8 +17,8 @@
* <u>JNode specific notes</u> : This class contains some "magic"
* methods that are interpreted by the VM itself, instead of being executed
* as normal java methods. <b>The actual method bodies are never used</b>.
- * @see {@link org.jnode.classmgr.VmType VmType} to get the list of "magic" classes
- * @see {@link org.jnode.vm.compiler.BaseMagicHelper.MagicMethod MagicMethod}
+ * See {@link org.jnode.vm.classmgr.VmType VmType} to get the list of "magic" classes
+ * and see {@link org.jnode.vm.compiler.BaseMagicHelper.MagicMethod MagicMethod}
* to get the list of "magic" methods
* @author Daniel Frampton
*/
Modified: trunk/core/src/vmmagic/org/vmmagic/unboxed/Offset.java
===================================================================
--- trunk/core/src/vmmagic/org/vmmagic/unboxed/Offset.java 2010-12-27 21:02:37 UTC (rev 5762)
+++ trunk/core/src/vmmagic/org/vmmagic/unboxed/Offset.java 2011-01-03 10:19:11 UTC (rev 5763)
@@ -18,8 +18,8 @@
* <u>JNode specific notes</u> : This class contains some "magic"
* methods that are interpreted by the VM itself, instead of being executed
* as normal java methods. <b>The actual method bodies are never used</b>.
- * @see {@link org.jnode.classmgr.VmType VmType} to get the list of "magic" classes
- * @see {@link org.jnode.vm.compiler.BaseMagicHelper.MagicMethod MagicMethod}
+ * See {@link org.jnode.vm.classmgr.VmType VmType} to get the list of "magic" classes
+ * and see {@link org.jnode.vm.compiler.BaseMagicHelper.MagicMethod MagicMethod}
* to get the list of "magic" methods
* @author Ewout Prangsma (ep...@us...)
* @author Daniel Frampton
Modified: trunk/core/src/vmmagic/org/vmmagic/unboxed/OffsetArray.java
===================================================================
--- trunk/core/src/vmmagic/org/vmmagic/unboxed/OffsetArray.java 2010-12-27 21:02:37 UTC (rev 5762)
+++ trunk/core/src/vmmagic/org/vmmagic/unboxed/OffsetArray.java 2011-01-03 10:19:11 UTC (rev 5763)
@@ -17,8 +17,8 @@
* <u>JNode specific notes</u> : This class contains some "magic"
* methods that are interpreted by the VM itself, instead of being executed
* as normal java methods. <b>The actual method bodies are never used</b>.
- * @see {@link org.jnode.classmgr.VmType VmType} to get the list of "magic" classes
- * @see {@link org.jnode.vm.compiler.BaseMagicHelper.MagicMethod MagicMethod}
+ * See {@link org.jnode.vm.classmgr.VmType VmType} to get the list of "magic" classes
+ * and see {@link org.jnode.vm.compiler.BaseMagicHelper.MagicMethod MagicMethod}
* to get the list of "magic" methods
* @author Daniel Frampton
*/
Modified: trunk/core/src/vmmagic/org/vmmagic/unboxed/Word.java
===================================================================
--- trunk/core/src/vmmagic/org/vmmagic/unboxed/Word.java 2010-12-27 21:02:37 UTC (rev 5762)
+++ trunk/core/src/vmmagic/org/vmmagic/unboxed/Word.java 2011-01-03 10:19:11 UTC (rev 5763)
@@ -21,8 +21,8 @@
* <u>JNode specific notes</u> : This class contains some "magic"
* methods that are interpreted by the VM itself, instead of being executed
* as normal java methods. <b>The actual method bodies are never used</b>.
- * @see {@link org.jnode.classmgr.VmType VmType} to get the list of "magic" classes
- * @see {@link org.jnode.vm.compiler.BaseMagicHelper.MagicMethod MagicMethod}
+ * See {@link org.jnode.vm.classmgr.VmType VmType} to get the list of "magic" classes
+ * and see {@link org.jnode.vm.compiler.BaseMagicHelper.MagicMethod MagicMethod}
* to get the list of "magic" methods
* @author Ewout Prangsma (ep...@us...)
* @author Daniel Frampton
Modified: trunk/core/src/vmmagic/org/vmmagic/unboxed/WordArray.java
===================================================================
--- trunk/core/src/vmmagic/org/vmmagic/unboxed/WordArray.java 2010-12-27 21:02:37 UTC (rev 5762)
+++ trunk/core/src/vmmagic/org/vmmagic/unboxed/WordArray.java 2011-01-03 10:19:11 UTC (rev 5763)
@@ -17,8 +17,8 @@
* <u>JNode specific notes</u> : This class contains some "magic"
* methods that are interpreted by the VM itself, instead of being executed
* as normal java methods. <b>The actual method bodies are never used</b>.
- * @see {@link org.jnode.classmgr.VmType VmType} to get the list of "magic" classes
- * @see {@link org.jnode.vm.compiler.BaseMagicHelper.MagicMethod MagicMethod}
+ * See {@link org.jnode.vm.classmgr.VmType VmType} to get the list of "magic" classes
+ * see {@link org.jnode.vm.compiler.BaseMagicHelper.MagicMethod MagicMethod}
* to get the list of "magic" methods
* @author Daniel Frampton
*/
Modified: trunk/fs/src/driver/org/jnode/driver/block/floppy/DefaultFDC.java
===================================================================
--- trunk/fs/src/driver/org/jnode/driver/block/floppy/DefaultFDC.java 2010-12-27 21:02:37 UTC (rev 5762)
+++ trunk/fs/src/driver/org/jnode/driver/block/floppy/DefaultFDC.java 2011-01-03 10:19:11 UTC (rev 5763)
@@ -493,7 +493,7 @@
/**
* @param irq
- * @see org.jnode.system.IRQHandler#handleInterrupt(int)
+ * @see org.jnode.system.resource.IRQHandler#handleInterrupt(int)
*/
public void handleInterrupt(int irq) {
final FloppyCommand cmd = currentCommand;
Modified: trunk/fs/src/driver/org/jnode/driver/block/floppy/FDC.java
===================================================================
--- trunk/fs/src/driver/org/jnode/driver/block/floppy/FDC.java 2010-12-27 21:02:37 UTC (rev 5762)
+++ trunk/fs/src/driver/org/jnode/driver/block/floppy/FDC.java 2011-01-03 10:19:11 UTC (rev 5763)
@@ -82,7 +82,7 @@
/**
* @param irq
- * @see org.jnode.system.IRQHandler#handleInterrupt(int)
+ * @see org.jnode.system.resource.IRQHandler#handleInterrupt(int)
*/
public void handleInterrupt(int irq);
Modified: trunk/gui/src/driver/org/jnode/driver/ps2/PS2Bus.java
===================================================================
--- trunk/gui/src/driver/org/jnode/driver/ps2/PS2Bus.java 2010-12-27 21:02:37 UTC (rev 5762)
+++ trunk/gui/src/driver/org/jnode/driver/ps2/PS2Bus.java 2011-01-03 10:19:11 UTC (rev 5763)
@@ -107,7 +107,7 @@
/**
* Handles a PS/2 interrupt
*
- * @see org.jnode.system.IRQHandler#handleInterrupt(int)
+ * @see org.jnode.system.resource.IRQHandler#handleInterrupt(int)
*/
public final synchronized void handleInterrupt(int irq) {
processQueues();
Modified: trunk/gui/src/driver/org/jnode/driver/ps2/PS2ByteChannel.java
===================================================================
--- trunk/gui/src/driver/org/jnode/driver/ps2/PS2ByteChannel.java 2010-12-27 21:02:37 UTC (rev 5762)
+++ trunk/gui/src/driver/org/jnode/driver/ps2/PS2ByteChannel.java 2011-01-03 10:19:11 UTC (rev 5763)
@@ -41,7 +41,7 @@
}
/**
- * @see org.jnode.system.IRQHandler#handleInterrupt(int)
+ * @see org.jnode.system.resource.IRQHandler#handleInterrupt(int)
*/
public void handleScancode(int b) {
queue.enQueue((byte) b);
Modified: trunk/net/src/driver/org/jnode/driver/net/_3c90x/_3c90xCore.java
===================================================================
--- trunk/net/src/driver/org/jnode/driver/net/_3c90x/_3c90xCore.java 2010-12-27 21:02:37 UTC (rev 5762)
+++ trunk/net/src/driver/org/jnode/driver/net/_3c90x/_3c90xCore.java 2011-01-03 10:19:11 UTC (rev 5763)
@@ -321,7 +321,7 @@
}
/**
- * @see org.jnode.system.IRQHandler#handleInterrupt(int)
+ * @see org.jnode.system.resource.IRQHandler#handleInterrupt(int)
*/
public synchronized void handleInterrupt(int irq) {
Modified: trunk/net/src/driver/org/jnode/driver/net/lance/LanceCore.java
===================================================================
--- trunk/net/src/driver/org/jnode/driver/net/lance/LanceCore.java 2010-12-27 21:02:37 UTC (rev 5762)
+++ trunk/net/src/driver/org/jnode/driver/net/lance/LanceCore.java 2011-01-03 10:19:11 UTC (rev 5763)
@@ -283,7 +283,7 @@
}
/**
- * @see org.jnode.system.IRQHandler#handleInterrupt(int)
+ * @see org.jnode.system.resource.IRQHandler#handleInterrupt(int)
*/
public void handleInterrupt(int irq) {
while ((io.getCSR(0) & CSR0_INTR) != 0) {
Modified: trunk/net/src/driver/org/jnode/driver/net/ne2000/Ne2000Core.java
===================================================================
--- trunk/net/src/driver/org/jnode/driver/net/ne2000/Ne2000Core.java 2010-12-27 21:02:37 UTC (rev 5762)
+++ trunk/net/src/driver/org/jnode/driver/net/ne2000/Ne2000Core.java 2011-01-03 10:19:11 UTC (rev 5763)
@@ -287,7 +287,7 @@
}
/**
- * @see org.jnode.system.IRQHandler#handleInterrupt(int)
+ * @see org.jnode.system.resource.IRQHandler#handleInterrupt(int)
*/
public synchronized void handleInterrupt(int irq) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ls...@us...> - 2011-01-03 10:44:38
|
Revision: 5764
http://jnode.svn.sourceforge.net/jnode/?rev=5764&view=rev
Author: lsantha
Date: 2011-01-03 10:44:31 +0000 (Mon, 03 Jan 2011)
Log Message:
-----------
Javadoc fixes.
Modified Paths:
--------------
trunk/builder/src/builder/org/jnode/linker/LoadUtil.java
trunk/builder/src/builder/org/jnode/linker/Section.java
trunk/builder/src/builder/org/jnode/linker/StoreUtil.java
trunk/core/src/core/org/jnode/vm/compiler/IMTCompiler.java
trunk/core/src/core/org/jnode/vm/facade/VmHeapManager.java
trunk/core/src/core/org/jnode/vm/x86/VmX86Thread64.java
trunk/core/src/core/org/jnode/vm/x86/compiler/BaseX86MagicHelper.java
trunk/fs/src/fs/org/jnode/fs/hfsplus/catalog/Catalog.java
Modified: trunk/builder/src/builder/org/jnode/linker/LoadUtil.java
===================================================================
--- trunk/builder/src/builder/org/jnode/linker/LoadUtil.java 2011-01-03 10:19:11 UTC (rev 5763)
+++ trunk/builder/src/builder/org/jnode/linker/LoadUtil.java 2011-01-03 10:44:31 UTC (rev 5764)
@@ -195,7 +195,7 @@
*
* @param in
* @param e_ident
- * @return
+ * @return the address
* @throws IOException
*/
public static long loadAddr(RandomAccessFile in, byte[] e_ident)
@@ -212,7 +212,7 @@
*
* @param in
* @param e_ident
- * @return
+ * @return the address
* @throws IOException
*/
public static long loadAddr(InputStream in, byte[] e_ident)
@@ -229,7 +229,7 @@
*
* @param in
* @param e_ident
- * @return
+ * @return the offset
* @throws IOException
*/
public static long loadOff(RandomAccessFile in, byte[] e_ident)
@@ -246,7 +246,7 @@
*
* @param in
* @param e_ident
- * @return
+ * @return the offset
* @throws IOException
*/
public static long loadOff(InputStream in, byte[] e_ident)
@@ -263,7 +263,7 @@
*
* @param in
* @param e_ident
- * @return
+ * @return the xword
* @throws IOException
*/
public static long loadXword(RandomAccessFile in, byte[] e_ident)
@@ -275,12 +275,12 @@
}
}
- /**
+ /** Sc
* Load an Xword.
*
* @param in
* @param e_ident
- * @return
+ * @return the xword
* @throws IOException
*/
public static long loadXword(InputStream in, byte[] e_ident)
Modified: trunk/builder/src/builder/org/jnode/linker/Section.java
===================================================================
--- trunk/builder/src/builder/org/jnode/linker/Section.java 2011-01-03 10:19:11 UTC (rev 5763)
+++ trunk/builder/src/builder/org/jnode/linker/Section.java 2011-01-03 10:44:31 UTC (rev 5764)
@@ -181,7 +181,7 @@
/**
* Gets the name of this section.
*
- * @return
+ * @return the name of this section
*/
public String getName() {
return elf.getSHString(sh_name);
Modified: trunk/builder/src/builder/org/jnode/linker/StoreUtil.java
===================================================================
--- trunk/builder/src/builder/org/jnode/linker/StoreUtil.java 2011-01-03 10:19:11 UTC (rev 5763)
+++ trunk/builder/src/builder/org/jnode/linker/StoreUtil.java 2011-01-03 10:44:31 UTC (rev 5764)
@@ -119,7 +119,7 @@
* @param out
* @param e_ident
* @param address
- * @return
+ * @return the number of bytes stored
* @throws IOException
*/
public static int storeAddr(OutputStream out, byte[] e_ident,
@@ -137,7 +137,7 @@
* @param out
* @param e_ident
* @param off
- * @return
+ * @return the number of bytes stored
* @throws IOException
*/
public static int storeOff(OutputStream out, byte[] e_ident,
@@ -155,7 +155,7 @@
* @param out
* @param e_ident
* @param xword
- * @return
+ * @return the number of bytes stored
* @throws IOException
*/
public static int storeXword(OutputStream out, byte[] e_ident,
Modified: trunk/core/src/core/org/jnode/vm/compiler/IMTCompiler.java
===================================================================
--- trunk/core/src/core/org/jnode/vm/compiler/IMTCompiler.java 2011-01-03 10:19:11 UTC (rev 5763)
+++ trunk/core/src/core/org/jnode/vm/compiler/IMTCompiler.java 2011-01-03 10:44:31 UTC (rev 5764)
@@ -45,7 +45,7 @@
* @param resolver
* @param imt
* @param imtCollisions
- * @return
+ * @return the CompiledIMT instance
*/
public abstract CompiledIMT compile(ObjectResolver resolver, Object[] imt, boolean[] imtCollisions);
}
Modified: trunk/core/src/core/org/jnode/vm/facade/VmHeapManager.java
===================================================================
--- trunk/core/src/core/org/jnode/vm/facade/VmHeapManager.java 2011-01-03 10:19:11 UTC (rev 5763)
+++ trunk/core/src/core/org/jnode/vm/facade/VmHeapManager.java 2011-01-03 10:44:31 UTC (rev 5764)
@@ -92,14 +92,14 @@
/**
* Get this heap's statistics.
*
- * @return
+ * @return the heap statistics
*/
HeapStatistics getHeapStatistics();
/**
* Get this heap GC's statistics.
*
- * @return
+ * @return the heap GC statistics
*/
GCStatistics getStatistics();
Modified: trunk/core/src/core/org/jnode/vm/x86/VmX86Thread64.java
===================================================================
--- trunk/core/src/core/org/jnode/vm/x86/VmX86Thread64.java 2011-01-03 10:19:11 UTC (rev 5763)
+++ trunk/core/src/core/org/jnode/vm/x86/VmX86Thread64.java 2011-01-03 10:44:31 UTC (rev 5764)
@@ -82,7 +82,7 @@
}
/**
- * @see org.jnode.vm.scheduler.VmThread#accept(org.jnode.vm.facade.ObjectVisitor, org.jnode.vm.memmgr.VmHeapManager)
+ * @see org.jnode.vm.scheduler.VmThread#accept(org.jnode.vm.facade.ObjectVisitor, org.jnode.vm.facade.VmHeapManager)
*/
public boolean accept(ObjectVisitor visitor, VmHeapManager heapManager) {
if (!super.accept(visitor, heapManager)) {
Modified: trunk/core/src/core/org/jnode/vm/x86/compiler/BaseX86MagicHelper.java
===================================================================
--- trunk/core/src/core/org/jnode/vm/x86/compiler/BaseX86MagicHelper.java 2011-01-03 10:19:11 UTC (rev 5763)
+++ trunk/core/src/core/org/jnode/vm/x86/compiler/BaseX86MagicHelper.java 2011-01-03 10:44:31 UTC (rev 5764)
@@ -34,7 +34,7 @@
* Convert a method code into an X86 condition code.
*
* @param mcode
- * @return
+ * @return the x86 condition code
*/
protected final int methodToCC(MagicMethod mcode) {
switch (mcode) {
@@ -65,10 +65,10 @@
}
/**
- * Convert a method code into an X86 condition code.
+ * Convert a method code into an x86 shift code.
*
* @param mcode
- * @return
+ * @return the x86 shift code
*/
protected final int methodToShift(MagicMethod mcode) {
switch (mcode) {
Modified: trunk/fs/src/fs/org/jnode/fs/hfsplus/catalog/Catalog.java
===================================================================
--- trunk/fs/src/fs/org/jnode/fs/hfsplus/catalog/Catalog.java 2011-01-03 10:19:11 UTC (rev 5763)
+++ trunk/fs/src/fs/org/jnode/fs/hfsplus/catalog/Catalog.java 2011-01-03 10:44:31 UTC (rev 5764)
@@ -160,7 +160,7 @@
* @param parentId
* @param nodeId
* @param nodeType
- * @return
+ * @return the new node instance
*/
public LeafRecord createNode(String filename, CatalogNodeId parentId, CatalogNodeId nodeId,
int nodeType) throws IOException {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ls...@us...> - 2011-03-06 21:00:22
|
Revision: 5808
http://jnode.svn.sourceforge.net/jnode/?rev=5808&view=rev
Author: lsantha
Date: 2011-03-06 21:00:15 +0000 (Sun, 06 Mar 2011)
Log Message:
-----------
Following up class library changes.
Modified Paths:
--------------
trunk/all/conf/core-classes.txt
trunk/core/descriptors/org.classpath.core.xml
Modified: trunk/all/conf/core-classes.txt
===================================================================
--- trunk/all/conf/core-classes.txt 2011-03-06 20:51:14 UTC (rev 5807)
+++ trunk/all/conf/core-classes.txt 2011-03-06 21:00:15 UTC (rev 5808)
@@ -116,6 +116,7 @@
//sun.reflect.generics.visitor
//sun.reflect.misc
sun.misc.VM
+sun.net.ApplicationProxy
sun.nio
sun.nio.cs.US_ASCII
sun.nio.cs.ISO_8859_1*
Modified: trunk/core/descriptors/org.classpath.core.xml
===================================================================
--- trunk/core/descriptors/org.classpath.core.xml 2011-03-06 20:51:14 UTC (rev 5807)
+++ trunk/core/descriptors/org.classpath.core.xml 2011-03-06 21:00:15 UTC (rev 5808)
@@ -53,6 +53,7 @@
<export name="sun.misc.ServiceConfigurationError"/>
<export name="sun.misc.VM"/>
+ <export name="sun.net.ApplicationProxy*"/>
<export name="sun.nio.cs.*"/>
<export name="sun.text.*"/>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ls...@us...> - 2011-07-31 13:43:50
|
Revision: 5839
http://jnode.svn.sourceforge.net/jnode/?rev=5839&view=rev
Author: lsantha
Date: 2011-07-31 13:43:44 +0000 (Sun, 31 Jul 2011)
Log Message:
-----------
Added support for loading the removable media into a removable device.
Modified Paths:
--------------
trunk/core/src/driver/org/jnode/driver/RemovableDeviceAPI.java
trunk/fs/src/driver/org/jnode/driver/block/floppy/FloppyDriver.java
trunk/fs/src/driver/org/jnode/driver/block/scsi/cdrom/SCSICDROMDriver.java
trunk/fs/src/driver/org/jnode/driver/block/usb/storage/scsi/USBStorageSCSIDriver.java
Modified: trunk/core/src/driver/org/jnode/driver/RemovableDeviceAPI.java
===================================================================
--- trunk/core/src/driver/org/jnode/driver/RemovableDeviceAPI.java 2011-07-31 13:42:10 UTC (rev 5838)
+++ trunk/core/src/driver/org/jnode/driver/RemovableDeviceAPI.java 2011-07-31 13:43:44 UTC (rev 5839)
@@ -73,4 +73,12 @@
*/
public void eject()
throws IOException;
+
+ /**
+ * Eject this device.
+ *
+ * @throws IOException
+ */
+ public void load()
+ throws IOException;
}
Modified: trunk/fs/src/driver/org/jnode/driver/block/floppy/FloppyDriver.java
===================================================================
--- trunk/fs/src/driver/org/jnode/driver/block/floppy/FloppyDriver.java 2011-07-31 13:42:10 UTC (rev 5838)
+++ trunk/fs/src/driver/org/jnode/driver/block/floppy/FloppyDriver.java 2011-07-31 13:43:44 UTC (rev 5839)
@@ -290,6 +290,11 @@
throw new IOException("Unsupported operation");
}
+ @Override
+ public void load() throws IOException {
+ throw new IOException("Unsupported operation");
+ }
+
/**
* Test if the disk has been changed and/or the format of the loaded floppy
* is known. If the floppy has been changed or the format of the floppy is
Modified: trunk/fs/src/driver/org/jnode/driver/block/scsi/cdrom/SCSICDROMDriver.java
===================================================================
--- trunk/fs/src/driver/org/jnode/driver/block/scsi/cdrom/SCSICDROMDriver.java 2011-07-31 13:42:10 UTC (rev 5838)
+++ trunk/fs/src/driver/org/jnode/driver/block/scsi/cdrom/SCSICDROMDriver.java 2011-07-31 13:43:44 UTC (rev 5839)
@@ -239,6 +239,31 @@
}
/**
+ * Load this device.
+ *
+ * @throws IOException
+ */
+ public void load() throws IOException {
+ if (locked) {
+ throw new IOException("Device is locked");
+ }
+ final SCSIDevice dev = (SCSIDevice) getDevice();
+ try {
+ MMCUtils.startStopUnit(dev, CDBStartStopUnit.Action.LOAD, false);
+ } catch (SCSIException ex) {
+ final IOException ioe = new IOException();
+ ioe.initCause(ex);
+ throw ioe;
+ } catch (TimeoutException ex) {
+ final IOException ioe = new IOException();
+ ioe.initCause(ex);
+ throw ioe;
+ } catch (InterruptedException ex) {
+ throw new InterruptedIOException();
+ }
+ }
+
+ /**
* Process the changed flag.
*
* @throws IOException
Modified: trunk/fs/src/driver/org/jnode/driver/block/usb/storage/scsi/USBStorageSCSIDriver.java
===================================================================
--- trunk/fs/src/driver/org/jnode/driver/block/usb/storage/scsi/USBStorageSCSIDriver.java 2011-07-31 13:42:10 UTC (rev 5838)
+++ trunk/fs/src/driver/org/jnode/driver/block/usb/storage/scsi/USBStorageSCSIDriver.java 2011-07-31 13:43:44 UTC (rev 5839)
@@ -217,4 +217,9 @@
// TODO Auto-generated method stub
}
+
+ @Override
+ public void load() throws IOException {
+ //To change body of implemented methods use File | Settings | File Templates.
+ }
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ga...@us...> - 2011-08-11 11:42:19
|
Revision: 5845
http://jnode.svn.sourceforge.net/jnode/?rev=5845&view=rev
Author: galatnm
Date: 2011-08-11 11:42:10 +0000 (Thu, 11 Aug 2011)
Log Message:
-----------
FS : clean up HFS+ code.
Modified Paths:
--------------
trunk/JNode.ipr
trunk/fs/src/fs/org/jnode/fs/ext2/Ext2File.java
trunk/fs/src/fs/org/jnode/fs/ext2/Ext2FileSystem.java
trunk/fs/src/fs/org/jnode/fs/ext2/Superblock.java
trunk/fs/src/fs/org/jnode/fs/hfsplus/HfsPlusDirectory.java
trunk/fs/src/fs/org/jnode/fs/hfsplus/HfsPlusEntry.java
trunk/fs/src/fs/org/jnode/fs/hfsplus/HfsPlusFile.java
trunk/fs/src/fs/org/jnode/fs/hfsplus/HfsPlusFileSystem.java
trunk/fs/src/fs/org/jnode/fs/hfsplus/HfsPlusFileSystemType.java
trunk/fs/src/fs/org/jnode/fs/hfsplus/catalog/Catalog.java
trunk/fs/src/fs/org/jnode/fs/spi/AbstractFSFile.java
trunk/fs/src/test/org/jnode/fs/hfsplus/HfsPlusFileSystemTest.java
Added Paths:
-----------
trunk/fs/src/fs/org/jnode/fs/hfsplus/SuperBlock.java
Removed Paths:
-------------
trunk/fs/src/fs/org/jnode/fs/hfsplus/Superblock.java
Modified: trunk/JNode.ipr
===================================================================
--- trunk/JNode.ipr 2011-08-07 08:53:41 UTC (rev 5844)
+++ trunk/JNode.ipr 2011-08-11 11:42:10 UTC (rev 5845)
@@ -17,11 +17,11 @@
<component name="CheckStyle-IDEA">
<option name="configuration">
<map>
- <entry key="active-configuration" value="FILE:$PROJECT_DIR$/all/jnode_checks.xml:JNode" />
+ <entry key="active-configuration" value="FILE:/home/flesire/developement/sources/jnode/jnode.orig/all/jnode_checks.xml:JNode" />
<entry key="check-test-classes" value="true" />
<entry key="config-file" value="$PROJECT_DIR$/all/jnode_checks.xml" />
<entry key="location-0" value="CLASSPATH:/sun_checks.xml:The default CheckStyle rules." />
- <entry key="location-1" value="FILE:$PROJECT_DIR$/all/jnode_checks.xml:JNode" />
+ <entry key="location-1" value="FILE:/home/flesire/developement/sources/jnode/jnode.orig/all/jnode_checks.xml:JNode" />
<entry key="thirdparty-classpath" value="" />
</map>
</option>
@@ -214,12 +214,13 @@
</component>
<component name="IdProvider" IDEtalkID="435AAC2234C36B0F2257FA7F02C447FB" />
<component name="InspectionProjectProfileManager">
- <list size="5">
+ <list size="6">
<item index="0" class="java.lang.String" itemvalue="SERVER PROBLEM" />
- <item index="1" class="java.lang.String" itemvalue="INFO" />
- <item index="2" class="java.lang.String" itemvalue="TYPO" />
- <item index="3" class="java.lang.String" itemvalue="WARNING" />
- <item index="4" class="java.lang.String" itemvalue="ERROR" />
+ <item index="1" class="java.lang.String" itemvalue="WEAK WARNING" />
+ <item index="2" class="java.lang.String" itemvalue="INFO" />
+ <item index="3" class="java.lang.String" itemvalue="TYPO" />
+ <item index="4" class="java.lang.String" itemvalue="WARNING" />
+ <item index="5" class="java.lang.String" itemvalue="ERROR" />
</list>
</component>
<component name="JavacSettings">
Modified: trunk/fs/src/fs/org/jnode/fs/ext2/Ext2File.java
===================================================================
--- trunk/fs/src/fs/org/jnode/fs/ext2/Ext2File.java 2011-08-07 08:53:41 UTC (rev 5844)
+++ trunk/fs/src/fs/org/jnode/fs/ext2/Ext2File.java 2011-08-11 11:42:10 UTC (rev 5845)
@@ -45,32 +45,13 @@
log.setLevel(Level.DEBUG);
}
- /**
- * @see org.jnode.fs.FSFile#getLength()
- */
+ @Override
public long getLength() {
//log.debug("getLength(): "+iNode.getSize());
return iNode.getSize();
}
- private long getLengthInBlocks() {
- return iNode.getSizeInBlocks();
- }
-
- private void rereadInode() throws IOException {
- int iNodeNr = iNode.getINodeNr();
- try {
- iNode = ((Ext2FileSystem) getFileSystem()).getINode(iNodeNr);
- } catch (FileSystemException ex) {
- final IOException ioe = new IOException();
- ioe.initCause(ex);
- throw ioe;
- }
- }
-
- /**
- * @see org.jnode.fs.FSFile#setLength(long)
- */
+ @Override
public void setLength(long length) throws IOException {
if (!canWrite())
throw new ReadOnlyFileSystemException("FileSystem or File is readonly");
@@ -163,9 +144,9 @@
} // synchronized(inode)
}
- /**
- * @see org.jnode.fs.FSFile#read(long, ByteBuffer)
- */
+
+
+ @Override
public void read(long fileOffset, ByteBuffer destBuf) throws IOException {
final int len = destBuf.remaining();
final int off = 0;
@@ -174,8 +155,7 @@
final byte[] dest = destBA.toArray();
//synchronize to the inode cache to make sure that the inode does not
- // get
- //flushed between reading it and locking it
+ // get flushed between reading it and locking it
synchronized (((Ext2FileSystem) getFileSystem()).getInodeCache()) {
//reread the inode before synchronizing to it to make sure
//all threads use the same instance
@@ -228,13 +208,7 @@
destBA.refreshByteBuffer();
}
- /**
- * Write into the file. fileOffset is between 0 and getLength() (see the
- * methods write(byte[], int, int), setPosition(long), setLength(long) in
- * org.jnode.fs.service.def.FileHandleImpl)
- *
- * @see org.jnode.fs.FSFile#write(long, ByteBuffer)
- */
+ @Override
public void write(long fileOffset, ByteBuffer srcBuf) throws IOException {
final int len = srcBuf.remaining();
final int off = 0;
@@ -331,11 +305,7 @@
}
}
- /**
- * Flush any cached data to the disk.
- *
- * @throws IOException
- */
+ @Override
public void flush() throws IOException {
log.debug("Ext2File.flush()");
iNode.update();
@@ -343,4 +313,19 @@
//been allocated or deallocated
iNode.getExt2FileSystem().updateFS();
}
+
+ private long getLengthInBlocks() {
+ return iNode.getSizeInBlocks();
+ }
+
+ private void rereadInode() throws IOException {
+ int iNodeNr = iNode.getINodeNr();
+ try {
+ iNode = ((Ext2FileSystem) getFileSystem()).getINode(iNodeNr);
+ } catch (FileSystemException ex) {
+ final IOException ioe = new IOException();
+ ioe.initCause(ex);
+ throw ioe;
+ }
+ }
}
Modified: trunk/fs/src/fs/org/jnode/fs/ext2/Ext2FileSystem.java
===================================================================
--- trunk/fs/src/fs/org/jnode/fs/ext2/Ext2FileSystem.java 2011-08-07 08:53:41 UTC (rev 5844)
+++ trunk/fs/src/fs/org/jnode/fs/ext2/Ext2FileSystem.java 2011-08-11 11:42:10 UTC (rev 5845)
@@ -91,7 +91,7 @@
// skip the first 1024 bytes (bootsector) and read the superblock
// TODO: the superblock should read itself
getApi().read(1024, data);
- // superblock = new Superblock(data, this);
+ // superblock = new SuperBlock(data, this);
superblock = new Superblock();
superblock.read(data.array(), this);
Modified: trunk/fs/src/fs/org/jnode/fs/ext2/Superblock.java
===================================================================
--- trunk/fs/src/fs/org/jnode/fs/ext2/Superblock.java 2011-08-07 08:53:41 UTC (rev 5844)
+++ trunk/fs/src/fs/org/jnode/fs/ext2/Superblock.java 2011-08-11 11:42:10 UTC (rev 5845)
@@ -157,7 +157,7 @@
setPreallocBlocks(8);
setPreallocDirBlocks(0);
- log.debug("Superblock.create(): getBlockSize(): " + getBlockSize());
+ log.debug("SuperBlock.create(): getBlockSize(): " + getBlockSize());
}
/**
@@ -693,7 +693,7 @@
}
/**
- * @return the Superblock's dirty flag
+ * @return the SuperBlock's dirty flag
*/
public boolean isDirty() {
return dirty;
Modified: trunk/fs/src/fs/org/jnode/fs/hfsplus/HfsPlusDirectory.java
===================================================================
--- trunk/fs/src/fs/org/jnode/fs/hfsplus/HfsPlusDirectory.java 2011-08-07 08:53:41 UTC (rev 5844)
+++ trunk/fs/src/fs/org/jnode/fs/hfsplus/HfsPlusDirectory.java 2011-08-11 11:42:10 UTC (rev 5845)
@@ -29,6 +29,7 @@
import org.apache.log4j.Logger;
import org.jnode.fs.FSDirectory;
import org.jnode.fs.FSEntry;
+import org.jnode.fs.FileSystem;
import org.jnode.fs.ReadOnlyFileSystemException;
import org.jnode.fs.hfsplus.catalog.Catalog;
import org.jnode.fs.hfsplus.catalog.CatalogFile;
@@ -38,26 +39,29 @@
import org.jnode.fs.hfsplus.tree.LeafRecord;
import org.jnode.fs.spi.FSEntryTable;
-public class HfsPlusDirectory extends HfsPlusEntry implements FSDirectory {
+public class HfsPlusDirectory implements FSDirectory {
private static final Logger log = Logger.getLogger(HfsPlusDirectory.class);
+ /** The directory entry */
+ private HfsPlusEntry entry;
+
/** Table of entries of our parent */
private FSEntryTable entries;
+ /** The catalog directory record */
private CatalogFolder folder;
- public HfsPlusDirectory(HfsPlusFileSystem fs, HfsPlusDirectory parent, String name,
- LeafRecord record) {
- super(fs, parent, name, record);
- this.folder = new CatalogFolder(record.getData());
+ public HfsPlusDirectory(HfsPlusEntry entry) {
+ this.entry = entry;
+ this.folder = new CatalogFolder(entry.getData());
this.entries = FSEntryTable.EMPTY_TABLE;
}
@Override
public FSEntry addDirectory(String name) throws IOException {
log.debug("<<< BEGIN addDirectory " + name + " >>>");
- if (fs.isReadOnly()) {
+ if (getFileSystem().isReadOnly()) {
throw new ReadOnlyFileSystemException();
}
@@ -73,7 +77,7 @@
@Override
public FSEntry addFile(String name) throws IOException {
log.debug("<<< BEGIN addFile " + name + " >>>");
- if (fs.isReadOnly()) {
+ if (getFileSystem().isReadOnly()) {
throw new ReadOnlyFileSystemException();
}
if (getEntry(name) != null) {
@@ -86,10 +90,11 @@
return newEntry;
}
- private final FSEntry createFileEntry(final String name) throws IOException {
+ private FSEntry createFileEntry(final String name) throws IOException {
+ //TODO implements this method.
/*
* if (fs.isReadOnly()) { throw new ReadOnlyFileSystemException(); }
- * Catalog catalog = fs.getCatalog(); Superblock volumeHeader =
+ * Catalog catalog = fs.getCatalog(); SuperBlock volumeHeader =
* ((HfsPlusFileSystem) getFileSystem()).getVolumeHeader(); LeafRecord
* fileRecord = catalog.createNode(name, this.folder .getFolderId(), new
* CatalogNodeId(volumeHeader.getNextCatalogId()),
@@ -107,14 +112,14 @@
@Override
public void flush() throws IOException {
log.debug("<<< BEGIN flush >>>");
- if (fs.isReadOnly()) {
+ if (getFileSystem().isReadOnly()) {
throw new ReadOnlyFileSystemException();
}
boolean flushEntries = isEntriesLoaded() && entries.isDirty();
- if (isDirty() || flushEntries) {
+ if (entry.isDirty() || flushEntries) {
writeEntries(entries);
// entries.resetDirty();
- resetDirty();
+ entry.resetDirty();
}
log.debug("<<< END flush >>>");
}
@@ -137,13 +142,12 @@
@Override
public void remove(String name) throws IOException {
- if (fs.isReadOnly()) {
+ if (getFileSystem().isReadOnly()) {
throw new ReadOnlyFileSystemException();
}
if (entries.remove(name) >= 0) {
- setDirty();
+ entry.setDirty();
flush();
- return;
} else {
throw new FileNotFoundException(name);
}
@@ -160,7 +164,7 @@
if (!isEntriesLoaded()) {
log.debug("checkEntriesLoaded : loading");
try {
- if (rights.canRead()) {
+ if (entry.getAccessRights().canRead()) {
entries = readEntries();
log.debug("Load " + entries.size() + " entrie(s).");
} else {
@@ -169,7 +173,7 @@
entries = FSEntryTable.EMPTY_TABLE;
log.debug("checkEntriesLoaded : can't read, using EMPTY_TABLE");
}
- resetDirty();
+ entry.resetDirty();
} catch (IOException e) {
log.fatal("unable to read directory entries", e);
// the next time, we will call checkEntriesLoaded()
@@ -185,16 +189,16 @@
*
* @return if the entries are already loaded from the device
*/
- private final boolean isEntriesLoaded() {
+ private boolean isEntriesLoaded() {
return (entries != FSEntryTable.EMPTY_TABLE);
}
/**
*
- * @return
+ * @return read all entries link to the current directory in the file system.
* @throws IOException
*/
- private final FSEntryTable readEntries() throws IOException {
+ private FSEntryTable readEntries() throws IOException {
List<FSEntry> pathList = new LinkedList<FSEntry>();
HfsPlusFileSystem fs = (HfsPlusFileSystem) getFileSystem();
if (fs.getVolumeHeader().getFolderCount() > 0) {
@@ -203,7 +207,7 @@
if (rec.getType() == CatalogFolder.RECORD_TYPE_FOLDER ||
rec.getType() == CatalogFile.RECORD_TYPE_FILE) {
String name = ((CatalogKey) rec.getKey()).getNodeName().getUnicodeString();
- HfsPlusEntry e = new HfsPlusDirectory(fs, this, name, rec);
+ HfsPlusEntry e = new HfsPlusEntry(fs, this, name, rec);
pathList.add(e);
}
}
@@ -217,23 +221,23 @@
/**
*
- * @param name
- * @return
- * @throws IOException
+ * @param name The name of the entry.
+ * @return Return the newly created entry.
+ * @throws IOException if problem occurs during catalog node creation or if system is read-only.
*/
- private final FSEntry createDirectoryEntry(final String name) throws IOException {
- if (fs.isReadOnly()) {
+ private FSEntry createDirectoryEntry(final String name) throws IOException {
+ if (getFileSystem().isReadOnly()) {
throw new ReadOnlyFileSystemException();
}
- Catalog catalog = fs.getCatalog();
- Superblock volumeHeader = ((HfsPlusFileSystem) getFileSystem()).getVolumeHeader();
+ Catalog catalog = ((HfsPlusFileSystem)getFileSystem()).getCatalog();
+ SuperBlock volumeHeader = ((HfsPlusFileSystem) getFileSystem()).getVolumeHeader();
LeafRecord folderRecord =
catalog.createNode(name, this.folder.getFolderId(),
new CatalogNodeId(volumeHeader.getNextCatalogId()),
CatalogFolder.RECORD_TYPE_FOLDER_THREAD);
folder.setValence(folder.getValence() + 1);
- HfsPlusEntry newEntry = new HfsPlusDirectory(fs, this, name, folderRecord);
+ HfsPlusEntry newEntry = new HfsPlusEntry((HfsPlusFileSystem)getFileSystem(), this, name, folderRecord);
newEntry.setDirty();
volumeHeader.setFolderCount(volumeHeader.getFolderCount() + 1);
log.debug("New volume header :\n" + volumeHeader.toString());
@@ -247,14 +251,22 @@
* @param newEntry
* @throws IOException
*/
- private final void setFreeEntry(FSEntry newEntry) throws IOException {
+ private void setFreeEntry(FSEntry newEntry) throws IOException {
checkEntriesLoaded();
if (entries.setFreeEntry(newEntry) >= 0) {
log.debug("setFreeEntry: free entry found !");
- setDirty();
+ entry.setDirty();
flush();
- return;
}
}
+ @Override
+ public boolean isValid() {
+ return entry.isValid();
+ }
+
+ @Override
+ public FileSystem<?> getFileSystem() {
+ return entry.getFileSystem();
+ }
}
Modified: trunk/fs/src/fs/org/jnode/fs/hfsplus/HfsPlusEntry.java
===================================================================
--- trunk/fs/src/fs/org/jnode/fs/hfsplus/HfsPlusEntry.java 2011-08-07 08:53:41 UTC (rev 5844)
+++ trunk/fs/src/fs/org/jnode/fs/hfsplus/HfsPlusEntry.java 2011-08-11 11:42:10 UTC (rev 5845)
@@ -26,6 +26,7 @@
import org.jnode.fs.FSDirectory;
import org.jnode.fs.FSEntry;
import org.jnode.fs.FSFile;
+import org.jnode.fs.FSObject;
import org.jnode.fs.FileSystem;
import org.jnode.fs.hfsplus.catalog.CatalogFile;
import org.jnode.fs.hfsplus.catalog.CatalogFolder;
@@ -87,7 +88,7 @@
if (!isDirectory()) {
throw new IOException("It is not a Directory");
}
- return (HfsPlusDirectory) this;
+ return new HfsPlusDirectory(this);
}
@Override
@@ -95,7 +96,7 @@
if (!isFile()) {
throw new IOException("It is not a file");
}
- return (HfsPlusFile) this;
+ return new HfsPlusFile(this);
}
@Override
@@ -164,4 +165,8 @@
return valid;
}
+ public byte[] getData(){
+ return this.record.getData();
+ }
+
}
Modified: trunk/fs/src/fs/org/jnode/fs/hfsplus/HfsPlusFile.java
===================================================================
--- trunk/fs/src/fs/org/jnode/fs/hfsplus/HfsPlusFile.java 2011-08-07 08:53:41 UTC (rev 5844)
+++ trunk/fs/src/fs/org/jnode/fs/hfsplus/HfsPlusFile.java 2011-08-11 11:42:10 UTC (rev 5845)
@@ -24,17 +24,19 @@
import java.nio.ByteBuffer;
import org.jnode.fs.FSFile;
+import org.jnode.fs.FileSystem;
import org.jnode.fs.hfsplus.catalog.CatalogFile;
import org.jnode.fs.hfsplus.extent.ExtentDescriptor;
import org.jnode.fs.hfsplus.tree.LeafRecord;
-public class HfsPlusFile extends HfsPlusEntry implements FSFile {
+public class HfsPlusFile implements FSFile {
+ private HfsPlusEntry entry;
+
private CatalogFile file;
- public HfsPlusFile(HfsPlusFileSystem fs, HfsPlusDirectory parent, String name, LeafRecord record) {
- super(fs, parent, name, record);
- this.file = new CatalogFile(record.getData());
+ public HfsPlusFile(HfsPlusEntry entry) {
+ this.file = new CatalogFile(entry.getData());
}
@Override
@@ -48,11 +50,16 @@
}
@Override
+ public void setLength(final long length) throws IOException {
+ // TODO Auto-generated method stub
+ }
+
+ @Override
public final void read(final long fileOffset, final ByteBuffer dest) throws IOException {
HfsPlusFileSystem fs = (HfsPlusFileSystem) getFileSystem();
for (ExtentDescriptor d : file.getDatas().getExtents()) {
if (!d.isEmpty()) {
- long firstOffset = d.getStartOffset(fs.getVolumeHeader().getBlockSize());
+ long firstOffset = (long) d.getStartOffset(fs.getVolumeHeader().getBlockSize());
fs.getApi().read(firstOffset, dest);
}
}
@@ -64,9 +71,14 @@
}
- public void setLength(final long length) throws IOException {
- // TODO Auto-generated method stub
+ @Override
+ public boolean isValid() {
+ return entry.isValid();
}
+ @Override
+ public FileSystem<?> getFileSystem() {
+ return entry.getFileSystem();
+ }
}
Modified: trunk/fs/src/fs/org/jnode/fs/hfsplus/HfsPlusFileSystem.java
===================================================================
--- trunk/fs/src/fs/org/jnode/fs/hfsplus/HfsPlusFileSystem.java 2011-08-07 08:53:41 UTC (rev 5844)
+++ trunk/fs/src/fs/org/jnode/fs/hfsplus/HfsPlusFileSystem.java 2011-08-11 11:42:10 UTC (rev 5845)
@@ -37,7 +37,7 @@
private final Logger log = Logger.getLogger(getClass());
/** HFS volume header */
- private Superblock volumeHeader;
+ private SuperBlock volumeHeader;
/** Catalog special file for this instance */
private Catalog catalog;
@@ -55,22 +55,22 @@
}
/**
- *
+ *
* @throws FileSystemException
*/
public final void read() throws FileSystemException {
- volumeHeader = new Superblock(this, false);
+ volumeHeader = new SuperBlock(this, false);
log.debug(volumeHeader.toString());
- if (!volumeHeader.isAttribute(Superblock.HFSPLUS_VOL_UNMNT_BIT)) {
+ if (!volumeHeader.isAttribute(SuperBlock.HFSPLUS_VOL_UNMNT_BIT)) {
log.info(getDevice().getId() +
" Filesystem has not been cleanly unmounted, mounting it readonly");
setReadOnly(true);
}
- if (volumeHeader.isAttribute(Superblock.HFSPLUS_VOL_SOFTLOCK_BIT)) {
+ if (volumeHeader.isAttribute(SuperBlock.HFSPLUS_VOL_SOFTLOCK_BIT)) {
log.info(getDevice().getId() + " Filesystem is marked locked, mounting it readonly");
setReadOnly(true);
}
- if (volumeHeader.isAttribute(Superblock.HFSPLUS_VOL_JOURNALED_BIT)) {
+ if (volumeHeader.isAttribute(SuperBlock.HFSPLUS_VOL_JOURNALED_BIT)) {
log
.info(getDevice().getId() +
" Filesystem is journaled, write access is not supported. Mounting it readonly");
@@ -98,35 +98,20 @@
log.info("Create root entry.");
LeafRecord record = catalog.getRecord(CatalogNodeId.HFSPLUS_POR_CNID);
if (record != null) {
- return new HfsPlusDirectory(this, null, "/", record);
+ return new HfsPlusEntry(this, null, "/", record);
}
log.error("Root entry : No record found.");
return null;
}
- /*
- * (non-Javadoc)
- *
- * @see org.jnode.fs.FileSystem#getFreeSpace()
- */
public final long getFreeSpace() {
return volumeHeader.getFreeBlocks() * volumeHeader.getBlockSize();
}
- /*
- * (non-Javadoc)
- *
- * @see org.jnode.fs.FileSystem#getTotalSpace()
- */
public final long getTotalSpace() {
return volumeHeader.getTotalBlocks() * volumeHeader.getBlockSize();
}
- /*
- * (non-Javadoc)
- *
- * @see org.jnode.fs.FileSystem#getUsableSpace()
- */
public final long getUsableSpace() {
return -1;
}
@@ -135,7 +120,7 @@
return catalog;
}
- public final Superblock getVolumeHeader() {
+ public final SuperBlock getVolumeHeader() {
return volumeHeader;
}
@@ -147,7 +132,7 @@
* @throws FileSystemException
*/
public void create(HFSPlusParams params) throws FileSystemException {
- volumeHeader = new Superblock(this, true);
+ volumeHeader = new SuperBlock(this, true);
try {
params.initializeDefaultsValues(this);
volumeHeader.create(params);
Modified: trunk/fs/src/fs/org/jnode/fs/hfsplus/HfsPlusFileSystemType.java
===================================================================
--- trunk/fs/src/fs/org/jnode/fs/hfsplus/HfsPlusFileSystemType.java 2011-08-07 08:53:41 UTC (rev 5844)
+++ trunk/fs/src/fs/org/jnode/fs/hfsplus/HfsPlusFileSystemType.java 2011-08-11 11:42:10 UTC (rev 5845)
@@ -63,7 +63,7 @@
return false;
}
int magicNumber = BigEndian.getInt16(magic.array(), 0);
- return (magicNumber == Superblock.HFSPLUS_SUPER_MAGIC);
+ return (magicNumber == SuperBlock.HFSPLUS_SUPER_MAGIC);
}
}
Copied: trunk/fs/src/fs/org/jnode/fs/hfsplus/SuperBlock.java (from rev 5844, trunk/fs/src/fs/org/jnode/fs/hfsplus/Superblock.java)
===================================================================
--- trunk/fs/src/fs/org/jnode/fs/hfsplus/SuperBlock.java (rev 0)
+++ trunk/fs/src/fs/org/jnode/fs/hfsplus/SuperBlock.java 2011-08-11 11:42:10 UTC (rev 5845)
@@ -0,0 +1,475 @@
+/*
+ * $Id$
+ *
+ * Copyright (C) 2003-2010 JNode.org
+ *
+ * This library is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as published
+ * by the Free Software Foundation; either version 2.1 of the License, or
+ * (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; If not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+package org.jnode.fs.hfsplus;
+
+import java.io.IOException;
+import java.nio.ByteBuffer;
+import java.util.Calendar;
+import java.util.Date;
+
+import org.apache.log4j.Level;
+import org.apache.log4j.Logger;
+import org.jnode.fs.FileSystemException;
+import org.jnode.fs.hfsplus.catalog.CatalogNodeId;
+import org.jnode.fs.hfsplus.extent.ExtentDescriptor;
+import org.jnode.util.BigEndian;
+import org.jnode.util.NumberUtils;
+
+/**
+ * HFS+ volume header definition.
+ *
+ * @author Fabien Lesire
+ *
+ */
+public class SuperBlock extends HfsPlusObject {
+
+ public static final int HFSPLUS_SUPER_MAGIC = 0x482b;
+
+ public static final int HFSPLUS_MIN_VERSION = 0x0004; /* HFS+ */
+ public static final int HFSPLUS_CURRENT_VERSION = 5; /* HFSX */
+
+ /* HFS+ volume attributes */
+ public static final int HFSPLUS_VOL_UNMNT_BIT = 8;
+ public static final int HFSPLUS_VOL_SPARE_BLK_BIT = 9;
+ public static final int HFSPLUS_VOL_NOCACHE_BIT = 10;
+ public static final int HFSPLUS_VOL_INCNSTNT_BIT = 11;
+ public static final int HFSPLUS_VOL_NODEID_REUSED_BIT = 12;
+ public static final int HFSPLUS_VOL_JOURNALED_BIT = 13;
+ public static final int HFSPLUS_VOL_SOFTLOCK_BIT = 15;
+
+ private final Logger log = Logger.getLogger(getClass());
+
+ /** Volume header data length */
+ public static final int SUPERBLOCK_LENGTH = 1024;
+
+ /** Data bytes array that contains volume header information */
+ private byte[] data;
+
+ /**
+ * Create the volume header and load information for the file system passed
+ * as parameter.
+ *
+ * @param fs The file system contains HFS+ partition.
+ *
+ * @throws FileSystemException If magic number (0X482B) is incorrect or not
+ * available.
+ */
+ public SuperBlock(final HfsPlusFileSystem fs, boolean create) throws FileSystemException {
+ super(fs);
+ log.setLevel(Level.INFO);
+ data = new byte[SUPERBLOCK_LENGTH];
+ try {
+ if (!create) {
+ log.info("load HFS+ volume header.");
+ // skip the first 1024 bytes (boot sector) and read the volume
+ // header.
+ ByteBuffer b = ByteBuffer.allocate(SUPERBLOCK_LENGTH);
+ fs.getApi().read(1024, b);
+ data = new byte[SUPERBLOCK_LENGTH];
+ System.arraycopy(b.array(), 0, data, 0, SUPERBLOCK_LENGTH);
+ if (getMagic() != HFSPLUS_SUPER_MAGIC) {
+ throw new FileSystemException("Not hfs+ volume header (" + getMagic() +
+ ": bad magic)");
+ }
+
+ }
+ } catch (IOException e) {
+ throw new FileSystemException(e);
+ }
+ }
+
+ /**
+ * Create a new volume header.
+ *
+ * @param params File system format parameters.
+ * @throws IOException
+ */
+ public void create(HFSPlusParams params) throws IOException {
+ log.info("Create new HFS+ volume header (" + params.getVolumeName() +
+ ") with block size of " + params.getBlockSize() + " bytes.");
+ int burnedBlocksBeforeVH = 0;
+ int burnedBlocksAfterAltVH = 0;
+ /*
+ * Volume header is located at sector 2. Block before this position must
+ * be invalidated.
+ */
+ int blockSize = params.getBlockSize();
+ if (blockSize == 512) {
+ burnedBlocksBeforeVH = 2;
+ burnedBlocksAfterAltVH = 1;
+ } else if (blockSize == 1024) {
+ burnedBlocksBeforeVH = 1;
+ }
+ // Populate volume header.
+ this.setMagic(HFSPLUS_SUPER_MAGIC);
+ this.setVersion(HFSPLUS_MIN_VERSION);
+ // Set attributes.
+ this.setAttribute(HFSPLUS_VOL_UNMNT_BIT);
+ this.setLastMountedVersion(0x446534a);
+ Calendar now = Calendar.getInstance();
+ now.setTime(new Date());
+ int macDate = HfsUtils.getNow();
+ this.setCreateDate(macDate);
+ this.setModifyDate(macDate);
+ this.setCheckedDate(macDate);
+ // ---
+ this.setBlockSize(blockSize);
+ this.setTotalBlocks((int) params.getBlockCount());
+ this.setFreeBlocks((int) params.getBlockCount());
+ this.setRsrcClumpSize(params.getResourceClumpSize());
+ this.setDataClumpSize(params.getDataClumpSize());
+ this.setNextCatalogId(CatalogNodeId.HFSPLUS_FIRSTUSER_CNID.getId());
+ // Allocation file creation
+ log.info("Init allocation file.");
+ long allocationClumpSize = getClumpSize(params.getBlockCount());
+ long bitmapBlocks = allocationClumpSize / blockSize;
+ long blockUsed = 2 + burnedBlocksBeforeVH + burnedBlocksAfterAltVH + bitmapBlocks;
+ int startBlock = 1 + burnedBlocksBeforeVH;
+ int blockCount = (int) bitmapBlocks;
+ HfsPlusForkData forkdata =
+ new HfsPlusForkData(allocationClumpSize, (int) allocationClumpSize,
+ (int) bitmapBlocks);
+ ExtentDescriptor desc = new ExtentDescriptor(startBlock, blockCount);
+ forkdata.addDescriptor(0, desc);
+ forkdata.write(data, 112);
+ // Journal creation
+ int nextBlock = 0;
+ if (params.isJournaled()) {
+ this.setFileCount(2);
+ this.setAttri...
[truncated message content] |
|
From: <ls...@us...> - 2011-08-16 21:16:07
|
Revision: 5850
http://jnode.svn.sourceforge.net/jnode/?rev=5850&view=rev
Author: lsantha
Date: 2011-08-16 21:16:00 +0000 (Tue, 16 Aug 2011)
Log Message:
-----------
Checkstyle fixes.
Modified Paths:
--------------
trunk/cli/src/commands/org/jnode/command/system/ThreadCommand.java
trunk/fs/src/driver/org/jnode/driver/block/ide/disk/IDEDiskDriver.java
trunk/fs/src/fs/org/jnode/fs/hfsplus/HfsPlusDirectory.java
trunk/fs/src/fs/org/jnode/fs/hfsplus/HfsPlusEntry.java
trunk/fs/src/fs/org/jnode/fs/hfsplus/HfsPlusFile.java
Modified: trunk/cli/src/commands/org/jnode/command/system/ThreadCommand.java
===================================================================
--- trunk/cli/src/commands/org/jnode/command/system/ThreadCommand.java 2011-08-16 20:52:13 UTC (rev 5849)
+++ trunk/cli/src/commands/org/jnode/command/system/ThreadCommand.java 2011-08-16 21:16:00 UTC (rev 5850)
@@ -88,7 +88,7 @@
// standard API.
grp.list();
} else {
- if(!argVerbose.isSet() && !argName.isSet()) {
+ if (!argVerbose.isSet() && !argName.isSet()) {
showDefaultInfo(grp);
} else {
// Show the threads in the ThreadGroup tree.
@@ -107,7 +107,7 @@
findThreads(grp, threadSet);
PrintWriter out = getOutput().getPrintWriter();
- for(final Thread thread : threadSet) {
+ for (final Thread thread : threadSet) {
VmThread vmThread = AccessController.doPrivileged(new PrivilegedAction<VmThread>() {
public VmThread run() {
return ThreadHelper.getVmThread(thread);
Modified: trunk/fs/src/driver/org/jnode/driver/block/ide/disk/IDEDiskDriver.java
===================================================================
--- trunk/fs/src/driver/org/jnode/driver/block/ide/disk/IDEDiskDriver.java 2011-08-16 20:52:13 UTC (rev 5849)
+++ trunk/fs/src/driver/org/jnode/driver/block/ide/disk/IDEDiskDriver.java 2011-08-16 21:16:00 UTC (rev 5850)
@@ -40,8 +40,6 @@
import org.jnode.driver.DriverException;
import org.jnode.driver.block.BlockDeviceAPI;
import org.jnode.driver.block.BlockDeviceAPIHelper;
-import org.jnode.driver.block.PartitionableBlockAlignmentSupport;
-import org.jnode.driver.block.PartitionableBlockDeviceAPI;
import org.jnode.driver.bus.ide.IDEBus;
import org.jnode.driver.bus.ide.IDEConstants;
import org.jnode.driver.bus.ide.IDEDevice;
Modified: trunk/fs/src/fs/org/jnode/fs/hfsplus/HfsPlusDirectory.java
===================================================================
--- trunk/fs/src/fs/org/jnode/fs/hfsplus/HfsPlusDirectory.java 2011-08-16 20:52:13 UTC (rev 5849)
+++ trunk/fs/src/fs/org/jnode/fs/hfsplus/HfsPlusDirectory.java 2011-08-16 21:16:00 UTC (rev 5850)
@@ -229,7 +229,7 @@
if (getFileSystem().isReadOnly()) {
throw new ReadOnlyFileSystemException();
}
- Catalog catalog = ((HfsPlusFileSystem)getFileSystem()).getCatalog();
+ Catalog catalog = ((HfsPlusFileSystem) getFileSystem()).getCatalog();
SuperBlock volumeHeader = ((HfsPlusFileSystem) getFileSystem()).getVolumeHeader();
LeafRecord folderRecord =
catalog.createNode(name, this.folder.getFolderId(),
@@ -237,7 +237,7 @@
CatalogFolder.RECORD_TYPE_FOLDER_THREAD);
folder.setValence(folder.getValence() + 1);
- HfsPlusEntry newEntry = new HfsPlusEntry((HfsPlusFileSystem)getFileSystem(), this, name, folderRecord);
+ HfsPlusEntry newEntry = new HfsPlusEntry((HfsPlusFileSystem) getFileSystem(), this, name, folderRecord);
newEntry.setDirty();
volumeHeader.setFolderCount(volumeHeader.getFolderCount() + 1);
log.debug("New volume header :\n" + volumeHeader.toString());
Modified: trunk/fs/src/fs/org/jnode/fs/hfsplus/HfsPlusEntry.java
===================================================================
--- trunk/fs/src/fs/org/jnode/fs/hfsplus/HfsPlusEntry.java 2011-08-16 20:52:13 UTC (rev 5849)
+++ trunk/fs/src/fs/org/jnode/fs/hfsplus/HfsPlusEntry.java 2011-08-16 21:16:00 UTC (rev 5850)
@@ -26,7 +26,6 @@
import org.jnode.fs.FSDirectory;
import org.jnode.fs.FSEntry;
import org.jnode.fs.FSFile;
-import org.jnode.fs.FSObject;
import org.jnode.fs.FileSystem;
import org.jnode.fs.hfsplus.catalog.CatalogFile;
import org.jnode.fs.hfsplus.catalog.CatalogFolder;
@@ -165,7 +164,7 @@
return valid;
}
- public byte[] getData(){
+ public byte[] getData() {
return this.record.getData();
}
Modified: trunk/fs/src/fs/org/jnode/fs/hfsplus/HfsPlusFile.java
===================================================================
--- trunk/fs/src/fs/org/jnode/fs/hfsplus/HfsPlusFile.java 2011-08-16 20:52:13 UTC (rev 5849)
+++ trunk/fs/src/fs/org/jnode/fs/hfsplus/HfsPlusFile.java 2011-08-16 21:16:00 UTC (rev 5850)
@@ -27,7 +27,6 @@
import org.jnode.fs.FileSystem;
import org.jnode.fs.hfsplus.catalog.CatalogFile;
import org.jnode.fs.hfsplus.extent.ExtentDescriptor;
-import org.jnode.fs.hfsplus.tree.LeafRecord;
public class HfsPlusFile implements FSFile {
@@ -74,7 +73,7 @@
@Override
public boolean isValid() {
- return entry.isValid();
+ return entry.isValid();
}
@Override
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <fd...@us...> - 2011-08-24 18:27:31
|
Revision: 5861
http://jnode.svn.sourceforge.net/jnode/?rev=5861&view=rev
Author: fduminy
Date: 2011-08-24 18:27:24 +0000 (Wed, 24 Aug 2011)
Log Message:
-----------
added class name filter to OnHeapCommand
Signed-off-by: Fabien DUMINY <fd...@jn...>
Modified Paths:
--------------
trunk/cli/descriptors/org.jnode.command.system.xml
trunk/cli/src/commands/org/jnode/command/system/OnHeapCommand.java
trunk/core/src/core/org/jnode/vm/facade/HeapStatistics.java
trunk/core/src/core/org/jnode/vm/facade/VmHeapManager.java
trunk/core/src/core/org/jnode/vm/memmgr/VmHeapManager.java
trunk/core/src/core/org/jnode/vm/memmgr/def/DefHeapStatistics.java
trunk/core/src/core/org/jnode/vm/memmgr/def/DefaultHeapManager.java
trunk/core/src/mmtk-vm/org/jnode/vm/memmgr/mmtk/BaseMmtkHeapManager.java
Added Paths:
-----------
trunk/core/src/core/org/jnode/vm/facade/NoObjectFilter.java
trunk/core/src/core/org/jnode/vm/facade/ObjectFilter.java
trunk/core/src/core/org/jnode/vm/facade/SimpleObjectFilter.java
Modified: trunk/cli/descriptors/org.jnode.command.system.xml
===================================================================
--- trunk/cli/descriptors/org.jnode.command.system.xml 2011-08-24 18:26:16 UTC (rev 5860)
+++ trunk/cli/descriptors/org.jnode.command.system.xml 2011-08-24 18:27:24 UTC (rev 5861)
@@ -220,6 +220,7 @@
<optionSet>
<option argLabel="minCount" longName="minCount"/>
<option argLabel="minTotalSize" longName="minTotalSize"/>
+ <option argLabel="className" longName="className"/>
</optionSet>
</syntax>
<syntax alias="page">
Modified: trunk/cli/src/commands/org/jnode/command/system/OnHeapCommand.java
===================================================================
--- trunk/cli/src/commands/org/jnode/command/system/OnHeapCommand.java 2011-08-24 18:26:16 UTC (rev 5860)
+++ trunk/cli/src/commands/org/jnode/command/system/OnHeapCommand.java 2011-08-24 18:27:24 UTC (rev 5861)
@@ -27,7 +27,10 @@
import org.jnode.shell.syntax.Argument;
import org.jnode.shell.syntax.IntegerArgument;
import org.jnode.shell.syntax.LongArgument;
+import org.jnode.shell.syntax.StringArgument;
import org.jnode.vm.facade.HeapStatistics;
+import org.jnode.vm.facade.ObjectFilter;
+import org.jnode.vm.facade.SimpleObjectFilter;
import org.jnode.vm.facade.VmUtils;
/**
@@ -37,17 +40,20 @@
private static final String help_inst = "the minimum instance count to show";
private static final String help_size = "the minimum total size to show";
+ private static final String HELP_CLASSNAME = "the classname filter";
private static final String help_super = "Show the number of instances on the heap with memory usage";
private static final String str_on_heap = "On Heap:";
private final IntegerArgument argMinInstanceCount;
private final LongArgument argMinTotalSize;
+ private final StringArgument className;
public OnHeapCommand() {
super(help_super);
argMinInstanceCount = new IntegerArgument("minCount", Argument.OPTIONAL, 1, Integer.MAX_VALUE, help_inst);
argMinTotalSize = new LongArgument("minTotalSize", Argument.OPTIONAL, 1L, Long.MAX_VALUE, help_size);
- registerArguments(argMinInstanceCount, argMinTotalSize);
+ className = new StringArgument("className", Argument.OPTIONAL | Argument.MULTIPLE, HELP_CLASSNAME);
+ registerArguments(argMinInstanceCount, argMinTotalSize, className);
}
public static void main(String[] args) throws Exception {
@@ -61,8 +67,16 @@
public void execute() throws Exception {
PrintWriter out = getOutput().getPrintWriter();
out.println(str_on_heap);
- final HeapStatistics stats = VmUtils.getVm().getHeapManager().getHeapStatistics();
+ ObjectFilter filter = null;
+ if (className.isSet()) {
+ SimpleObjectFilter f = new SimpleObjectFilter();
+ f.setClassName(className.getValues());
+ filter = f;
+ }
+
+ final HeapStatistics stats = VmUtils.getVm().getHeapManager().getHeapStatistics(filter);
+
if (argMinInstanceCount.isSet()) {
stats.setMinimumInstanceCount(argMinInstanceCount.getValue());
}
Modified: trunk/core/src/core/org/jnode/vm/facade/HeapStatistics.java
===================================================================
--- trunk/core/src/core/org/jnode/vm/facade/HeapStatistics.java 2011-08-24 18:26:16 UTC (rev 5860)
+++ trunk/core/src/core/org/jnode/vm/facade/HeapStatistics.java 2011-08-24 18:27:24 UTC (rev 5861)
@@ -46,6 +46,14 @@
void setMinimumTotalSize(long bytes);
/**
+ * Sets the object filter. If the filter accept the object,
+ * then it will be added to statistics.
+ * @param objectFilter
+ *
+ */
+ void setObjectFilter(ObjectFilter objectFilter);
+
+ /**
* Write the statistical data to an {@link Appendable}.
*
* @param a
Added: trunk/core/src/core/org/jnode/vm/facade/NoObjectFilter.java
===================================================================
--- trunk/core/src/core/org/jnode/vm/facade/NoObjectFilter.java (rev 0)
+++ trunk/core/src/core/org/jnode/vm/facade/NoObjectFilter.java 2011-08-24 18:27:24 UTC (rev 5861)
@@ -0,0 +1,24 @@
+package org.jnode.vm.facade;
+
+/**
+ * An {@link ObjectFilter} that accepts all objects.
+ * Call {@link NoObjectFilter#INSTANCE} to get the singleton.
+ *
+ * @author Fabien DUMINY (fd...@jn...)
+ *
+ */
+public class NoObjectFilter implements ObjectFilter {
+ public static final NoObjectFilter INSTANCE = new NoObjectFilter();
+
+ private NoObjectFilter() {
+ }
+
+ /**
+ * {@inheritDoc}
+ * <br>This implementation always returns true.
+ */
+ @Override
+ public final boolean accept(String className) {
+ return true;
+ }
+}
Added: trunk/core/src/core/org/jnode/vm/facade/ObjectFilter.java
===================================================================
--- trunk/core/src/core/org/jnode/vm/facade/ObjectFilter.java (rev 0)
+++ trunk/core/src/core/org/jnode/vm/facade/ObjectFilter.java 2011-08-24 18:27:24 UTC (rev 5861)
@@ -0,0 +1,16 @@
+package org.jnode.vm.facade;
+
+/**
+ * This interface is used to filter objects founds on heap.
+ *
+ * @author Fabien DUMINY (fd...@jn...)
+ *
+ */
+public interface ObjectFilter {
+ /**
+ * Does this filter accept the provided class ?
+ * @param className The class of the object.
+ * @return true if the filter accept the provided class.
+ */
+ boolean accept(String className);
+}
Added: trunk/core/src/core/org/jnode/vm/facade/SimpleObjectFilter.java
===================================================================
--- trunk/core/src/core/org/jnode/vm/facade/SimpleObjectFilter.java (rev 0)
+++ trunk/core/src/core/org/jnode/vm/facade/SimpleObjectFilter.java 2011-08-24 18:27:24 UTC (rev 5861)
@@ -0,0 +1,42 @@
+package org.jnode.vm.facade;
+
+
+/**
+ * An {@link ObjectFilter} that accepts objects whose class name contains
+ * the string given by {@link #className}.
+ *
+ * @author Fabien DUMINY (fd...@jn...)
+ *
+ */
+public class SimpleObjectFilter implements ObjectFilter {
+ private String[] className = null;
+
+ /**
+ * Sets the className filter. Any class whose full name contains a value
+ * from <code>classNameFilter</code> array will be accepted. Other classes
+ * will be ignored and no statistics will be computed and displayed for
+ * them.
+ * @param className
+ */
+ public void setClassName(String[] className) {
+ this.className = ((className != null) && (className.length > 0)) ? className : null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean accept(String className) {
+ if (className == null) {
+ return true;
+ }
+
+ for (String f : this.className) {
+ if (className.contains(f)) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+}
Modified: trunk/core/src/core/org/jnode/vm/facade/VmHeapManager.java
===================================================================
--- trunk/core/src/core/org/jnode/vm/facade/VmHeapManager.java 2011-08-24 18:26:16 UTC (rev 5860)
+++ trunk/core/src/core/org/jnode/vm/facade/VmHeapManager.java 2011-08-24 18:27:24 UTC (rev 5861)
@@ -91,10 +91,10 @@
/**
* Get this heap's statistics.
- *
+ * @param objectFilter The optional filter to apply to objects found on heap.
* @return the heap statistics
*/
- HeapStatistics getHeapStatistics();
+ HeapStatistics getHeapStatistics(ObjectFilter objectFilter);
/**
* Get this heap GC's statistics.
Modified: trunk/core/src/core/org/jnode/vm/memmgr/VmHeapManager.java
===================================================================
--- trunk/core/src/core/org/jnode/vm/memmgr/VmHeapManager.java 2011-08-24 18:26:16 UTC (rev 5860)
+++ trunk/core/src/core/org/jnode/vm/memmgr/VmHeapManager.java 2011-08-24 18:27:24 UTC (rev 5861)
@@ -35,6 +35,7 @@
import org.jnode.vm.classmgr.VmType;
import org.jnode.vm.facade.GCStatistics;
import org.jnode.vm.facade.HeapStatistics;
+import org.jnode.vm.facade.ObjectFilter;
import org.jnode.vm.facade.VmProcessor;
import org.jnode.vm.facade.VmWriteBarrier;
import org.jnode.vm.objects.VmSystemObject;
@@ -321,7 +322,7 @@
/**
* {@inheritDoc}
*/
- public abstract HeapStatistics getHeapStatistics();
+ public abstract HeapStatistics getHeapStatistics(ObjectFilter objectFilter);
/**
* {@inheritDoc}
Modified: trunk/core/src/core/org/jnode/vm/memmgr/def/DefHeapStatistics.java
===================================================================
--- trunk/core/src/core/org/jnode/vm/memmgr/def/DefHeapStatistics.java 2011-08-24 18:26:16 UTC (rev 5860)
+++ trunk/core/src/core/org/jnode/vm/memmgr/def/DefHeapStatistics.java 2011-08-24 18:27:24 UTC (rev 5861)
@@ -25,6 +25,8 @@
import org.jnode.util.NumberUtils;
import org.jnode.vm.facade.HeapStatistics;
+import org.jnode.vm.facade.NoObjectFilter;
+import org.jnode.vm.facade.ObjectFilter;
import org.jnode.vm.objects.VmSystemObject;
/**
@@ -35,25 +37,28 @@
private int minInstanceCount = 0;
private long minTotalSize = 0;
+ private ObjectFilter objectFilter = NoObjectFilter.INSTANCE;
private final TreeMap<String, HeapCounter> countData = new TreeMap<String, HeapCounter>();
private static final char newline = '\n';
public boolean contains(String classname) {
- return countData.containsKey(classname);
+ // If we don't accept this class, we pretend to have it already to (maybe) avoid unnecessary work
+ // and memory allocation (we also hope to avoid a call to add(String, int)).
+ return !objectFilter.accept(classname) || countData.containsKey(classname);
}
public void add(String className, int size) {
- HeapCounter count = (HeapCounter) countData.get(className);
-
- if (count == null) {
- count = new HeapCounter(className, size);
- countData.put(className, count);
- }
-
- count.inc();
-
- count = null;
+ if (objectFilter.accept(className)) {
+ HeapCounter count = (HeapCounter) countData.get(className);
+
+ if (count == null) {
+ count = new HeapCounter(className, size);
+ countData.put(className, count);
+ }
+
+ count.inc();
+ }
}
/**
@@ -75,22 +80,34 @@
public void setMinimumTotalSize(long bytes) {
this.minTotalSize = bytes;
}
-
+
/**
* {@inheritDoc}
+ */
+ @Override
+ public void setObjectFilter(ObjectFilter objectFilter) {
+ this.objectFilter = (objectFilter == null) ? NoObjectFilter.INSTANCE : objectFilter;
+ }
+
+ /**
+ * {@inheritDoc}
* @throws IOException
*/
public void writeTo(Appendable a) throws IOException {
boolean first = true;
- for (HeapCounter c : countData.values()) {
- if ((c.getInstanceCount() >= minInstanceCount) && (c.getTotalSize() >= minTotalSize)) {
- if (first) {
- first = false;
- } else {
- a.append(newline);
+ if (countData.isEmpty()) {
+ a.append("No object is matching criteria");
+ } else {
+ for (HeapCounter c : countData.values()) {
+ if ((c.getInstanceCount() >= minInstanceCount) && (c.getTotalSize() >= minTotalSize)) {
+ if (first) {
+ first = false;
+ } else {
+ a.append(newline);
+ }
+ c.append(a);
}
- c.append(a);
}
}
a.append(newline);
Modified: trunk/core/src/core/org/jnode/vm/memmgr/def/DefaultHeapManager.java
===================================================================
--- trunk/core/src/core/org/jnode/vm/memmgr/def/DefaultHeapManager.java 2011-08-24 18:26:16 UTC (rev 5860)
+++ trunk/core/src/core/org/jnode/vm/memmgr/def/DefaultHeapManager.java 2011-08-24 18:27:24 UTC (rev 5861)
@@ -35,6 +35,7 @@
import org.jnode.vm.classmgr.VmType;
import org.jnode.vm.facade.GCStatistics;
import org.jnode.vm.facade.HeapStatistics;
+import org.jnode.vm.facade.ObjectFilter;
import org.jnode.vm.facade.ObjectVisitor;
import org.jnode.vm.facade.VmProcessor;
import org.jnode.vm.memmgr.HeapHelper;
@@ -447,8 +448,12 @@
return gcManager.getStatistics();
}
- public HeapStatistics getHeapStatistics() {
+ /**
+ * {@inheritDoc}
+ */
+ public HeapStatistics getHeapStatistics(ObjectFilter objectFilter) {
final DefHeapStatistics heapStatistics = new DefHeapStatistics();
+ heapStatistics.setObjectFilter(objectFilter);
final HeapStatisticsVisitor heapStatisticsVisitor = new HeapStatisticsVisitor(
heapStatistics);
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 2011-08-24 18:26:16 UTC (rev 5860)
+++ trunk/core/src/mmtk-vm/org/jnode/vm/memmgr/mmtk/BaseMmtkHeapManager.java 2011-08-24 18:27:24 UTC (rev 5861)
@@ -40,6 +40,7 @@
import org.jnode.vm.classmgr.VmNormalClass;
import org.jnode.vm.classmgr.VmType;
import org.jnode.vm.facade.HeapStatistics;
+import org.jnode.vm.facade.ObjectFilter;
import org.jnode.vm.facade.VmArchitecture;
import org.jnode.vm.facade.VmProcessor;
import org.jnode.vm.facade.VmUtils;
@@ -179,7 +180,10 @@
return BasePlan.freeMemory().toLong();
}
- public HeapStatistics getHeapStatistics() {
+ /**
+ * {@inheritDoc}
+ */
+ public HeapStatistics getHeapStatistics(ObjectFilter objectFilter) {
return null;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <fd...@us...> - 2011-08-24 18:28:11
|
Revision: 5862
http://jnode.svn.sourceforge.net/jnode/?rev=5862&view=rev
Author: fduminy
Date: 2011-08-24 18:28:04 +0000 (Wed, 24 Aug 2011)
Log Message:
-----------
applied coding rules
Signed-off-by: Fabien DUMINY <fd...@jn...>
Modified Paths:
--------------
trunk/cli/src/commands/org/jnode/command/system/OnHeapCommand.java
trunk/core/src/core/org/jnode/vm/memmgr/def/DefHeapStatistics.java
Modified: trunk/cli/src/commands/org/jnode/command/system/OnHeapCommand.java
===================================================================
--- trunk/cli/src/commands/org/jnode/command/system/OnHeapCommand.java 2011-08-24 18:27:24 UTC (rev 5861)
+++ trunk/cli/src/commands/org/jnode/command/system/OnHeapCommand.java 2011-08-24 18:28:04 UTC (rev 5862)
@@ -38,20 +38,20 @@
*/
public class OnHeapCommand extends AbstractCommand {
- private static final String help_inst = "the minimum instance count to show";
- private static final String help_size = "the minimum total size to show";
+ private static final String HELP_INST = "the minimum instance count to show";
+ private static final String HELP_SIZE = "the minimum total size to show";
private static final String HELP_CLASSNAME = "the classname filter";
- private static final String help_super = "Show the number of instances on the heap with memory usage";
- private static final String str_on_heap = "On Heap:";
+ private static final String HELP_SUPER = "Show the number of instances on the heap with memory usage";
+ private static final String STR_ON_HEAP = "On Heap:";
private final IntegerArgument argMinInstanceCount;
private final LongArgument argMinTotalSize;
private final StringArgument className;
public OnHeapCommand() {
- super(help_super);
- argMinInstanceCount = new IntegerArgument("minCount", Argument.OPTIONAL, 1, Integer.MAX_VALUE, help_inst);
- argMinTotalSize = new LongArgument("minTotalSize", Argument.OPTIONAL, 1L, Long.MAX_VALUE, help_size);
+ super(HELP_SUPER);
+ argMinInstanceCount = new IntegerArgument("minCount", Argument.OPTIONAL, 1, Integer.MAX_VALUE, HELP_INST);
+ argMinTotalSize = new LongArgument("minTotalSize", Argument.OPTIONAL, 1L, Long.MAX_VALUE, HELP_SIZE);
className = new StringArgument("className", Argument.OPTIONAL | Argument.MULTIPLE, HELP_CLASSNAME);
registerArguments(argMinInstanceCount, argMinTotalSize, className);
}
@@ -66,7 +66,7 @@
@Override
public void execute() throws Exception {
PrintWriter out = getOutput().getPrintWriter();
- out.println(str_on_heap);
+ out.println(STR_ON_HEAP);
ObjectFilter filter = null;
if (className.isSet()) {
Modified: trunk/core/src/core/org/jnode/vm/memmgr/def/DefHeapStatistics.java
===================================================================
--- trunk/core/src/core/org/jnode/vm/memmgr/def/DefHeapStatistics.java 2011-08-24 18:27:24 UTC (rev 5861)
+++ trunk/core/src/core/org/jnode/vm/memmgr/def/DefHeapStatistics.java 2011-08-24 18:28:04 UTC (rev 5862)
@@ -40,8 +40,10 @@
private ObjectFilter objectFilter = NoObjectFilter.INSTANCE;
private final TreeMap<String, HeapCounter> countData = new TreeMap<String, HeapCounter>();
- private static final char newline = '\n';
-
+ private static final char NEWLINE = '\n';
+ private static final String USAGE = " memory usage=";
+ private static final String NO_MATCHING_OBJECT = "No object is matching criteria";
+
public boolean contains(String classname) {
// If we don't accept this class, we pretend to have it already to (maybe) avoid unnecessary work
// and memory allocation (we also hope to avoid a call to add(String, int)).
@@ -97,20 +99,20 @@
boolean first = true;
if (countData.isEmpty()) {
- a.append("No object is matching criteria");
+ a.append(NO_MATCHING_OBJECT);
} else {
for (HeapCounter c : countData.values()) {
if ((c.getInstanceCount() >= minInstanceCount) && (c.getTotalSize() >= minTotalSize)) {
if (first) {
first = false;
} else {
- a.append(newline);
+ a.append(NEWLINE);
}
c.append(a);
}
}
}
- a.append(newline);
+ a.append(NEWLINE);
}
/**
@@ -133,8 +135,6 @@
private int instanceCount;
private int objectSize = 0;
- private static final String usage = " memory usage=";
-
public HeapCounter(String objectName, int objectSize) {
this.name = objectName;
this.objectSize = objectSize;
@@ -163,7 +163,7 @@
a.append(Integer.toString(instanceCount));
if (objectSize != 0) {
- a.append(usage);
+ a.append(USAGE);
long size = getTotalSize();
if (size >= 1024) {
a.append(NumberUtils.toBinaryByte(size)).append(" (");
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ga...@us...> - 2011-12-22 15:30:45
|
Revision: 5881
http://jnode.svn.sourceforge.net/jnode/?rev=5881&view=rev
Author: galatnm
Date: 2011-12-22 15:30:32 +0000 (Thu, 22 Dec 2011)
Log Message:
-----------
build files clean up.
Modified Paths:
--------------
trunk/all/build.xml
trunk/builder/build.xml
Modified: trunk/all/build.xml
===================================================================
--- trunk/all/build.xml 2011-12-15 21:22:44 UTC (rev 5880)
+++ trunk/all/build.xml 2011-12-22 15:30:32 UTC (rev 5881)
@@ -1,541 +1,540 @@
<project name="JNode" default="help" basedir=".">
- <property name="root.dir" value="${basedir}/.."/>
-
+ <property name="root.dir" value="${basedir}/.."/>
+
<!-- if task is used from this -->
- <taskdef resource="net/sf/antcontrib/antcontrib.properties"/>
+ <taskdef resource="net/sf/antcontrib/antcontrib.properties"/>
<!-- before including jnode.xml, we must set this property -->
- <condition property="memoryMaximumSize" value="1512m" else="768m">
- <os arch="amd64"/>
- </condition>
- <echo message="Setting memoryMaximumSize to ${memoryMaximumSize}"/>
-
- <!-- Include antlib -->
- <typedef file="${root.dir}/all/lib/jnode.xml"/>
+ <condition property="memoryMaximumSize" value="1512m" else="768m">
+ <os arch="amd64"/>
+ </condition>
+ <echo message="Setting memoryMaximumSize to ${memoryMaximumSize}"/>
- <!-- JNode version -->
- <property name="jnode-ver" value="0.2.9-dev"/>
+ <!-- Include antlib -->
+ <typedef file="${root.dir}/all/lib/jnode.xml"/>
- <!-- Java target and source version -->
- <property name="java.target" value="1.6"/>
- <property name="java.source" value="1.6"/>
- <property name="java.encoding" value="US-ASCII"/>
+ <!-- JNode version -->
+ <property name="jnode-ver" value="0.2.9-dev"/>
- <property name="build.dir" value="${basedir}/build"/>
- <property name="reports.dir" value="${build.dir}/reports"/>
- <property name="cdroms.dir" value="${build.dir}/cdroms"/>
- <property name="descriptors.dir" value="${build.dir}/descriptors"/>
- <property name="plugins.dir" value="${build.dir}/plugins"/>
- <property name="initjars.dir" value="${build.dir}/initjars"/>
- <property name="save.dir" value="${basedir}/save"/>
- <property name="backup.dir" value="${build.dir}/backup"/>
+ <!-- Java target and source version -->
+ <property name="java.target" value="1.6"/>
+ <property name="java.source" value="1.6"/>
+ <property name="java.encoding" value="US-ASCII"/>
- <property name="jnode-builder.jar" value="${build.dir}/descriptors/jnode-builder.jar"/>
- <property name="jnode-configure.jar" value="${build.dir}/descriptors/jnode-configure.jar"/>
- <property name="jnode-core.jar" value="${root.dir}/core/build/classes"/>
- <property name="jnode-distr.jar" value="${root.dir}/distr/build/classes"/>
- <property name="jnode-fs.jar" value="${root.dir}/fs/build/classes"/>
- <property name="jnode-gui.jar" value="${root.dir}/gui/build/classes"/>
- <property name="thinlet.jar" value="${root.dir}/gui/build/classes"/>
- <property name="jnode-textui.jar" value="${root.dir}/textui/build/classes"/>
- <property name="jnode-net.jar" value="${root.dir}/net/build/classes"/>
- <property name="jnode-shell.jar" value="${root.dir}/shell/build/classes"/>
- <property name="jnode-cli.jar" value="${root.dir}/cli/build/classes"/>
- <property name="jnode-fonts.jar" value="${build.dir}/descriptors/jnode-fonts.jar"/>
- <property name="jnode-images.jar" value="${build.dir}/descriptors/jnode-images.jar"/>
+ <property name="build.dir" value="${basedir}/build"/>
+ <property name="reports.dir" value="${build.dir}/reports"/>
+ <property name="cdroms.dir" value="${build.dir}/cdroms"/>
+ <property name="descriptors.dir" value="${build.dir}/descriptors"/>
+ <property name="plugins.dir" value="${build.dir}/plugins"/>
+ <property name="initjars.dir" value="${build.dir}/initjars"/>
+ <property name="save.dir" value="${basedir}/save"/>
+ <property name="backup.dir" value="${build.dir}/backup"/>
- <property name="jnode-mmtk-genrc.jar" value="${root.dir}/core/build/classes-plan/org.jnode.vm.memmgr.mmtk.genrc"/>
+ <property name="jnode-builder.jar" value="${build.dir}/descriptors/jnode-builder.jar"/>
+ <property name="jnode-configure.jar" value="${build.dir}/descriptors/jnode-configure.jar"/>
+ <property name="jnode-core.jar" value="${root.dir}/core/build/classes"/>
+ <property name="jnode-distr.jar" value="${root.dir}/distr/build/classes"/>
+ <property name="jnode-fs.jar" value="${root.dir}/fs/build/classes"/>
+ <property name="jnode-gui.jar" value="${root.dir}/gui/build/classes"/>
+ <property name="thinlet.jar" value="${root.dir}/gui/build/classes"/>
+ <property name="jnode-textui.jar" value="${root.dir}/textui/build/classes"/>
+ <property name="jnode-net.jar" value="${root.dir}/net/build/classes"/>
+ <property name="jnode-shell.jar" value="${root.dir}/shell/build/classes"/>
+ <property name="jnode-cli.jar" value="${root.dir}/cli/build/classes"/>
+ <property name="jnode-fonts.jar" value="${build.dir}/descriptors/jnode-fonts.jar"/>
+ <property name="jnode-images.jar" value="${build.dir}/descriptors/jnode-images.jar"/>
+
+ <property name="jnode-mmtk-genrc.jar" value="${root.dir}/core/build/classes-plan/org.jnode.vm.memmgr.mmtk.genrc"/>
<property name="jnode-mmtk-ms.jar" value="${root.dir}/core/build/classes-plan/org.jnode.vm.memmgr.mmtk.ms"/>
<property name="jnode-mmtk-nogc.jar" value="${root.dir}/core/build/classes-plan/org.jnode.vm.memmgr.mmtk.nogc"/>
- <property name="classlib.jar" value="${root.dir}/all/lib/classlib.jar"/>
- <property name="classlib-src.jar" value="${root.dir}/all/lib/classlib-src.jar"/>
- <property name="ant.jar" value="${root.dir}/core/lib/ant.jar"/>
- <property name="ant-launcher.jar" value="${root.dir}/core/lib/ant-launcher.jar"/>
- <property name="commons-net.jar" value="${root.dir}/core/lib/commons-net-1.1.0.jar"/>
- <property name="dnsjava.jar" value="${root.dir}/net/lib/dnsjava-1.6.6.jar"/>
- <property name="jsch.jar" value="${root.dir}/net/lib/jsch-0.1.24.jar"/>
- <property name="junit.jar" value="${root.dir}/core/lib/junit-4.5.jar"/>
- <property name="mmtk.jar" value="${root.dir}/core/lib/mmtk/mmtk.jar"/>
+ <property name="classlib.jar" value="${root.dir}/all/lib/classlib.jar"/>
+ <property name="classlib-src.jar" value="${root.dir}/all/lib/classlib-src.jar"/>
+ <property name="ant.jar" value="${root.dir}/core/lib/ant.jar"/>
+ <property name="ant-launcher.jar" value="${root.dir}/core/lib/ant-launcher.jar"/>
+ <property name="commons-net.jar" value="${root.dir}/core/lib/commons-net-1.1.0.jar"/>
+ <property name="dnsjava.jar" value="${root.dir}/net/lib/dnsjava-1.6.6.jar"/>
+ <property name="jsch.jar" value="${root.dir}/net/lib/jsch-0.1.24.jar"/>
+ <property name="junit.jar" value="${root.dir}/core/lib/junit-4.5.jar"/>
+ <property name="mmtk.jar" value="${root.dir}/core/lib/mmtk/mmtk.jar"/>
<property name="mauve.jar" value="${root.dir}/core/lib/mauve.jar"/>
- <property name="edtftpj.jar" value="${root.dir}/fs/lib/edtftpj-1.5.2.jar"/>
- <property name="jcifs.jar" value="${root.dir}/fs/lib/jcifs-1.2.6.jar"/>
- <property name="ejc.jar" value="${root.dir}/core/lib/ejc-3.1.1.jar"/>
+ <property name="edtftpj.jar" value="${root.dir}/fs/lib/edtftpj-1.5.2.jar"/>
+ <property name="jcifs.jar" value="${root.dir}/fs/lib/jcifs-1.2.6.jar"/>
+ <property name="ejc.jar" value="${root.dir}/core/lib/ejc-3.1.1.jar"/>
<property name="oncrpc.jar" value="${root.dir}/net/lib/oncrpc.jar"/>
<property name="telnetd.jar" value="${root.dir}/distr/lib/telnetd.jar" />
<property name="commons-logging.jar" value="${root.dir}/distr/lib/commons-logging.jar" />
<property name="jawk.jar" value="${root.dir}/distr/lib/jawk-1.02.jar"/>
<property name="jetty.jar" value="${root.dir}/distr/lib/jetty-6.1.5.jar" />
<property name="jetty-util.jar" value="${root.dir}/distr/lib/jetty-util-6.1.5.jar" />
- <property name="jsp.jar" value="${root.dir}/distr/lib/jsp-2.1.jar" />
- <property name="jsp-api.jar" value="${root.dir}/distr/lib/jsp-api-2.1.jar" />
- <property name="servlet.jar" value="${root.dir}/distr/lib/servlet-api-2.5-6.1.5.jar" />
- <property name="derby.jar" value="${root.dir}/distr/lib/derby.jar" />
- <property name="derbynet.jar" value="${root.dir}/distr/lib/derbynet.jar" />
- <property name="derbytools.jar" value="${root.dir}/distr/lib/derbytools.jar" />
- <property name="nanoxml-java.jar" value="${root.dir}/shell/lib/nanoxml-2.2.3.jar" />
+ <property name="jsp.jar" value="${root.dir}/distr/lib/jsp-2.1.jar" />
+ <property name="jsp-api.jar" value="${root.dir}/distr/lib/jsp-api-2.1.jar" />
+ <property name="servlet.jar" value="${root.dir}/distr/lib/servlet-api-2.5-6.1.5.jar" />
+ <property name="derby.jar" value="${root.dir}/distr/lib/derby.jar" />
+ <property name="derbynet.jar" value="${root.dir}/distr/lib/derbynet.jar" />
+ <property name="derbytools.jar" value="${root.dir}/distr/lib/derbytools.jar" />
+ <property name="nanoxml-java.jar" value="${root.dir}/shell/lib/nanoxml-2.2.3.jar" />
- <property name="iso9660.jar" value="${root.dir}/builder/lib/iso9660.jar" />
- <property name="sabre.jar" value="${root.dir}/builder/lib/sabre.jar" />
+ <property name="iso9660.jar" value="${root.dir}/builder/lib/iso9660.jar" />
+ <property name="sabre.jar" value="${root.dir}/builder/lib/sabre.jar" />
- <!-- libraries needed to run tests -->
- <property name="jmock-cglib.jar" value="${root.dir}/core/lib/jmock-cglib-1.0.1.jar"/>
- <property name="jmock.jar" value="${root.dir}/core/lib/jmock-1.0.1.jar"/>
- <property name="cglib.jar" value="${root.dir}/core/lib/cglib-2.1.jar"/>
- <property name="asm.jar" value="${root.dir}/core/lib/asm-1.5.3.jar"/>
+ <!-- libraries needed to run tests -->
+ <property name="jmock-cglib.jar" value="${root.dir}/core/lib/jmock-cglib-1.0.1.jar"/>
+ <property name="jmock.jar" value="${root.dir}/core/lib/jmock-1.0.1.jar"/>
+ <property name="cglib.jar" value="${root.dir}/core/lib/cglib-2.1.jar"/>
+ <property name="asm.jar" value="${root.dir}/core/lib/asm-1.5.3.jar"/>
<property name="asm-attrs.jar" value="${root.dir}/core/lib/asm-attrs-1.5.3.jar"/>
<property name="asm-util.jar" value="${root.dir}/core/lib/asm-util-1.5.3.jar"/>
-
- <property name="log4j.jar" value="${root.dir}/core/lib/log4j-1.2.8.jar"/>
- <property name="beanshell.jar" value="${root.dir}/shell/lib/bsh-2.0b5.jar"/>
- <property name="js.jar" value="${root.dir}/shell/lib/rhino1.6r5-jsr223.jar"/>
- <!-- libraries needed to check plugin dependencies -->
- <property name="bcel-5.1.jar" value="${root.dir}/builder/lib/bcel-5.1.jar" />
+ <property name="log4j.jar" value="${root.dir}/core/lib/log4j-1.2.8.jar"/>
+ <property name="beanshell.jar" value="${root.dir}/shell/lib/bsh-2.0b5.jar"/>
+ <property name="js.jar" value="${root.dir}/shell/lib/rhino1.6r5-jsr223.jar"/>
- <!-- lists of plugins to use while booting -->
- <property name="default-plugin-list" value="${root.dir}/all/conf/default-plugin-list.xml"/>
- <property name="full-plugin-list" value="${root.dir}/all/conf/full-plugin-list.xml"/>
- <property name="install-plugin-list" value="${root.dir}/all/conf/install-plugin-list.xml"/>
- <property name="system-plugin-list" value="${root.dir}/all/conf/system-plugin-list.xml"/>
- <property name="sources.dist.tar.gz" value="${build.dir}/jnodesources-${jnode-ver}.tar.gz"/>
- <property name="jnode-x86.iso" value="${cdroms.dir}/jnode-x86.iso"/>
- <property name="jnode-x86-lite.iso" value="${cdroms.dir}/jnode-x86-lite.iso"/>
- <property name="jnode-x86_64-lite.iso" value="${cdroms.dir}/jnode-x86_64-lite.iso"/>
-
+ <!-- libraries needed to check plugin dependencies -->
+ <property name="bcel-5.1.jar" value="${root.dir}/builder/lib/bcel-5.1.jar" />
+
+ <!-- lists of plugins to use while booting -->
+ <property name="default-plugin-list" value="${root.dir}/all/conf/default-plugin-list.xml"/>
+ <property name="full-plugin-list" value="${root.dir}/all/conf/full-plugin-list.xml"/>
+ <property name="install-plugin-list" value="${root.dir}/all/conf/install-plugin-list.xml"/>
+ <property name="system-plugin-list" value="${root.dir}/all/conf/system-plugin-list.xml"/>
+ <property name="sources.dist.tar.gz" value="${build.dir}/jnodesources-${jnode-ver}.tar.gz"/>
+ <property name="jnode-x86.iso" value="${cdroms.dir}/jnode-x86.iso"/>
+ <property name="jnode-x86-lite.iso" value="${cdroms.dir}/jnode-x86-lite.iso"/>
+ <property name="jnode-x86_64-lite.iso" value="${cdroms.dir}/jnode-x86_64-lite.iso"/>
+
<!-- list of classes and packages that should to be compiled to native code
in the boot image. -->
<property name="jnode-core-class-list" value="${root.dir}/all/conf/core-classes.txt"/>
<property name="jnode-x86-class-list" value="${root.dir}/all/conf/x86-classes.txt"/>
- <path id="cp">
- <pathelement location="${classlib.jar}"/>
- <pathelement location="${mmtk.jar}"/>
- <pathelement location="${ant.jar}"/>
- <pathelement location="${junit.jar}"/>
- <pathelement location="${jmock.jar}"/>
- <pathelement location="${jmock-cglib.jar}"/>
- <pathelement location="${asm.jar}"/>
- <pathelement location="${asm-attrs.jar}"/>
- <pathelement location="${asm-util.jar}"/>
- <pathelement location="${cglib.jar}"/>
- <pathelement location="${log4j.jar}"/>
- <pathelement location="${root.dir}/all/conf"/>
- <pathelement location="${beanshell.jar}"/>
- <pathelement location="${js.jar}"/>
- <pathelement location="${oncrpc.jar}"/>
- <pathelement location="${edtftpj.jar}"/>
- <pathelement location="${jcifs.jar}"/>
- <pathelement location="${commons-net.jar}"/>
- <pathelement location="${dnsjava.jar}"/>
- <pathelement location="${mauve.jar}"/>
- <pathelement location="${derby.jar}"/>
- <pathelement location="${derbynet.jar}"/>
- <pathelement location="${derbytools.jar}"/>
- <pathelement location="${iso9660.jar}"/>
- <pathelement location="${sabre.jar}"/>
- </path>
+ <path id="cp">
+ <pathelement location="${classlib.jar}"/>
+ <pathelement location="${mmtk.jar}"/>
+ <pathelement location="${ant.jar}"/>
+ <pathelement location="${junit.jar}"/>
+ <pathelement location="${jmock.jar}"/>
+ <pathelement location="${jmock-cglib.jar}"/>
+ <pathelement location="${asm.jar}"/>
+ <pathelement location="${asm-attrs.jar}"/>
+ <pathelement location="${asm-util.jar}"/>
+ <pathelement location="${cglib.jar}"/>
+ <pathelement location="${log4j.jar}"/>
+ <pathelement location="${root.dir}/all/conf"/>
+ <pathelement location="${beanshell.jar}"/>
+ <pathelement location="${js.jar}"/>
+ <pathelement location="${oncrpc.jar}"/>
+ <pathelement location="${edtftpj.jar}"/>
+ <pathelement location="${jcifs.jar}"/>
+ <pathelement location="${commons-net.jar}"/>
+ <pathelement location="${dnsjava.jar}"/>
+ <pathelement location="${mauve.jar}"/>
+ <pathelement location="${derby.jar}"/>
+ <pathelement location="${derbynet.jar}"/>
+ <pathelement location="${derbytools.jar}"/>
+ <pathelement location="${iso9660.jar}"/>
+ <pathelement location="${sabre.jar}"/>
+ </path>
- <path id="cp-jnode">
- <pathelement location="${jnode-builder.jar}"/>
- <pathelement location="${jnode-core.jar}"/>
- <pathelement location="${jnode-distr.jar}"/>
- <pathelement location="${jnode-fs.jar}"/>
- <pathelement location="${jnode-shell.jar}"/>
- <pathelement location="${jnode-net.jar}"/>
- <pathelement location="${jnode-gui.jar}"/>
- <pathelement location="${jnode-cli.jar}"/>
- <pathelement location="${thinlet.jar}"/>
- <pathelement location="${jnode-textui.jar}"/>
- <pathelement location="${bcel-5.1.jar}"/>
- <path refid="cp"/>
- </path>
-
+ <path id="cp-jnode">
+ <pathelement location="${jnode-builder.jar}"/>
+ <pathelement location="${jnode-core.jar}"/>
+ <pathelement location="${jnode-distr.jar}"/>
+ <pathelement location="${jnode-fs.jar}"/>
+ <pathelement location="${jnode-shell.jar}"/>
+ <pathelement location="${jnode-net.jar}"/>
+ <pathelement location="${jnode-gui.jar}"/>
+ <pathelement location="${jnode-cli.jar}"/>
+ <pathelement location="${thinlet.jar}"/>
+ <pathelement location="${jnode-textui.jar}"/>
+ <pathelement location="${bcel-5.1.jar}"/>
+ <path refid="cp"/>
+ </path>
+
<path id="cp-test">
- <pathelement location="${root.dir}/core/build/classes"/>
- <pathelement location="${root.dir}/distr/build/classes"/>
- <pathelement location="${root.dir}/fs/build/classes"/>
- <pathelement location="${root.dir}/shell/build/classes"/>
- <pathelement location="${root.dir}/net/build/classes"/>
- <pathelement location="${root.dir}/gui/build/classes"/>
- <pathelement location="${root.dir}/cli/build/classes"/>
- <pathelement location="${root.dir}/textui/build/classes"/>
- <pathelement location="${root.dir}/shell/lib/nanoxml-2.2.3.jar"/>
- <path refid="cp"/>
- </path>
+ <pathelement location="${root.dir}/core/build/classes"/>
+ <pathelement location="${root.dir}/distr/build/classes"/>
+ <pathelement location="${root.dir}/fs/build/classes"/>
+ <pathelement location="${root.dir}/shell/build/classes"/>
+ <pathelement location="${root.dir}/net/build/classes"/>
+ <pathelement location="${root.dir}/gui/build/classes"/>
+ <pathelement location="${root.dir}/cli/build/classes"/>
+ <pathelement location="${root.dir}/textui/build/classes"/>
+ <pathelement location="${root.dir}/shell/lib/nanoxml-2.2.3.jar"/>
+ <path refid="cp"/>
+ </path>
- <filterset id="descriptors-filter">
- <filter token="PROVIDER" value="JNode.org"/>
- <filter token="VERSION" value="${jnode-ver}"/>
- </filterset>
+ <filterset id="descriptors-filter">
+ <filter token="PROVIDER" value="JNode.org"/>
+ <filter token="VERSION" value="${jnode-ver}"/>
+ </filterset>
- <patternset id="exts">
- <include name="**/*.dat"/>
- <include name="**/*.ids"/>
- <include name="**/*.properties"/>
- <include name="**/*.xml"/>
- </patternset>
+ <patternset id="exts">
+ <include name="**/*.dat"/>
+ <include name="**/*.ids"/>
+ <include name="**/*.properties"/>
+ <include name="**/*.xml"/>
+ </patternset>
- <target name="prepare">
- <!-- Fail on a Windows platform if there are spaces in the root dir's pathname. It will
+ <target name="prepare">
+ <!-- Fail on a Windows platform if there are spaces in the root dir's pathname. It will
lead to mkisofs dying with a misleading error message. bluebit / crawley 2008-05-03 -->
- <fail message="Cannot build JNode from a directory with spaces in the pathname.">
- <condition>
- <and>
- <os family="windows"/>
- <contains string="${root.dir}" substring=" " casesensitive="false" />
- </and>
- </condition>
- </fail>
-
- <fail message="Java Runtime version 1.6 needed. Your version is: ${java.runtime.version}">
- <condition>
- <not>
- <contains string="${java.runtime.version}" substring="1.6" casesensitive="false"/>
- </not>
- </condition>
- </fail>
+ <fail message="Cannot build JNode from a directory with spaces in the pathname.">
+ <condition>
+ <and>
+ <os family="windows"/>
+ <contains string="${root.dir}" substring=" " casesensitive="false" />
+ </and>
+ </condition>
+ </fail>
- <!-- Initialize all project directories -->
- <property file="${root.dir}/jnode.properties"/>
- <!-- Set overwritable properties -->
- <property name="jnode.memmgr.plugin.id" value="org.jnode.vm.memmgr.def"/>
- <property name="compilerarg" value="-nowarn"/>
+ <fail message="Java Runtime version 1.6 needed. Your version is: ${java.runtime.version}">
+ <condition>
+ <not>
+ <contains string="${java.runtime.version}" substring="1.6" casesensitive="false"/>
+ </not>
+ </condition>
+ </fail>
- <!-- Derive properties -->
- <property name="jnode-mmtk.jar" value="${root.dir}/core/build/classes-plan/${jnode.memmgr.plugin.id}"/>
+ <!-- Initialize all project directories -->
+ <property file="${root.dir}/jnode.properties"/>
+ <!-- Set overwritable properties -->
+ <property name="jnode.memmgr.plugin.id" value="org.jnode.vm.memmgr.def"/>
+ <property name="compilerarg" value="-nowarn"/>
- <!-- Initialize timestamp -->
- <tstamp/>
-
- <property name="hotswap.class.tstamp.pattern" value="MM/dd/yyyy kk:mm:ss.SSS"/>
- <tstamp>
- <format property="hotswap.class.tstamp" pattern="${hotswap.class.tstamp.pattern}" />
- </tstamp>
+ <!-- Derive properties -->
+ <property name="jnode-mmtk.jar" value="${root.dir}/core/build/classes-plan/${jnode.memmgr.plugin.id}"/>
+ <!-- Initialize timestamp -->
+ <tstamp/>
- <!-- Update default excludes -->
- <defaultexcludes add="**/_svn"/>
- <defaultexcludes add="**/_svn/**"/>
-
- <!-- Create basic build directories -->
- <mkdir dir="${build.dir}"/>
- <mkdir dir="${reports.dir}"/>
- <mkdir dir="${save.dir}"/>
- <mkdir dir="${cdroms.dir}"/>
- <mkdir dir="${descriptors.dir}"/>
- <mkdir dir="${plugins.dir}"/>
- <mkdir dir="${initjars.dir}"/>
- <property file="${root.dir}/all/lib/ftp.properties"/>
- <!-- check for classlib update -->
- <if>
- <or>
- <not>
- <uptodate srcfile="${root.dir}/all/lib/ftp.properties" targetfile="${root.dir}/all/lib/classlib.pack.gz"/>
- </not>
- <not>
- <uptodate srcfile="${root.dir}/all/lib/ftp.properties" targetfile="${root.dir}/all/lib/classlib-src.jar.bz2"/>
- </not>
- </or>
- <then>
- <!-- check if classlib update should be done locally or from the FTP server -->
- <if>
- <isset property="jnode.local.classlib"/>
- <then>
- <fail message="classlib is out of date, run copy or quickdeploy in classlib project">
- <condition>
- <or>
- <not>
- <uptodate srcfile="${root.dir}/all/lib/ftp.properties"
+ <property name="hotswap.class.tstamp.pattern" value="MM/dd/yyyy kk:mm:ss.SSS"/>
+ <tstamp>
+ <format property="hotswap.class.tstamp" pattern="${hotswap.class.tstamp.pattern}" />
+ </tstamp>
+
+
+ <!-- Update default excludes -->
+ <defaultexcludes add="**/_svn"/>
+ <defaultexcludes add="**/_svn/**"/>
+
+ <!-- Create basic build directories -->
+ <mkdir dir="${build.dir}"/>
+ <mkdir dir="${reports.dir}"/>
+ <mkdir dir="${save.dir}"/>
+ <mkdir dir="${cdroms.dir}"/>
+ <mkdir dir="${descriptors.dir}"/>
+ <mkdir dir="${plugins.dir}"/>
+ <mkdir dir="${initjars.dir}"/>
+ <property file="${root.dir}/all/lib/ftp.properties"/>
+ <!-- check for classlib update -->
+ <if>
+ <or>
+ <not>
+ <uptodate srcfile="${root.dir}/all/lib/ftp.properties" targetfile="${root.dir}/all/lib/classlib.pack.gz"/>
+ </not>
+ <not>
+ <uptodate srcfile="${root.dir}/all/lib/ftp.properties" targetfile="${root.dir}/all/lib/classlib-src.jar.bz2"/>
+ </not>
+ </or>
+ <then>
+ <!-- check if classlib update should be done locally or from the FTP server -->
+ <if>
+ <isset property="jnode.local.classlib"/>
+ <then>
+ <fail message="classlib is out of date, run copy or quickdeploy in classlib project">
+ <condition>
+ <or>
+ <not>
+ <uptodate srcfile="${root.dir}/all/lib/ftp.properties"
targetfile="${root.dir}/all/lib/classlib.jar"/>
- </not>
- <not>
- <uptodate srcfile="${root.dir}/all/lib/ftp.properties"
+ </not>
+ <not>
+ <uptodate srcfile="${root.dir}/all/lib/ftp.properties"
targetfile="${root.dir}/all/lib/classlib-src.jar"/>
- </not>
- </or>
- </condition>
- </fail>
- </then>
- <else>
- <!-- classlib update from the FTP server -->
- <delete file="${root.dir}/all/lib/classlib.pack.gz"/>
- <delete file="${root.dir}/all/lib/classlib-src.jar.bz2"/>
- <get src="${classlib.url}/classlib.pack.gz" dest="${root.dir}/all/lib/classlib.pack.gz"/>
- <get src="${classlib.url}/classlib-src.jar.bz2" dest="${root.dir}/all/lib/classlib-src.jar.bz2"/>
- <!-- verify checksum for downloaded files -->
- <if>
- <not>
- <checksum algorithm="MD5" file="${root.dir}/all/lib/classlib.pack.gz" property="${classlib.md5}"/>
- </not>
- <then>
- <delete file="${root.dir}/all/lib/classlib.pack.gz"/>
- <fail message="checksum failed for classlib.pack.gz"/>
- </then>
- </if>
- <if>
- <not>
- <checksum algorithm="MD5" file="${root.dir}/all/lib/classlib-src.jar.bz2" property="${classlib-src.md5}"/>
- </not>
- <then>
- <delete file="${root.dir}/all/lib/classlib-src.jar.bz2"/>
- <fail message="checksum failed for classlib-src.jar.bz2"/>
- </then>
- </if>
- </else>
- </if>
- </then>
- </if>
- <if>
- <or>
- <not>
- <available file="${classlib.jar}" />
- </not>
- <uptodate srcfile="${classlib.jar}" targetfile="${root.dir}/all/lib/classlib.pack.gz"/>
- </or>
- <then>
- <delete file="${classlib.jar}"/>
- <echo message="Creating ${classlib.jar}"/>
- <exec executable="${java.home}/bin/unpack200">
- <arg file="${root.dir}/all/lib/classlib.pack.gz"/>
- <arg file="${classlib.jar}"/>
- </exec>
- </then>
- </if>
- <if>
- <or>
- <not>
- <available file="${classlib-src.jar}" />
- </not>
- <uptodate srcfile="${classlib-src.jar}" targetfile="${root.dir}/all/lib/classlib-src.jar.bz2"/>
- </or>
- <then>
- <delete file="${classlib-src.jar}"/>
- <echo message="Creating ${classlib-src.jar}"/>
- <bunzip2 src="${root.dir}/all/lib/classlib-src.jar.bz2" dest="${classlib-src.jar}"/>
- </then>
- </if>
- <property name="classlib.stamp" value="${root.dir}/all/build/classlib.stamp" />
- </target>
+ </not>
+ </or>
+ </condition>
+ </fail>
+ </then>
+ <else>
+ <!-- classlib update from the FTP server -->
+ <delete file="${root.dir}/all/lib/classlib.pack.gz"/>
+ <delete file="${root.dir}/all/lib/classlib-src.jar.bz2"/>
+ <get src="${classlib.url}/classlib.pack.gz" dest="${root.dir}/all/lib/classlib.pack.gz"/>
+ <get src="${classlib.url}/classlib-src.jar.bz2" dest="${root.dir}/all/lib/classlib-src.jar.bz2"/>
+ <!-- verify checksum for downloaded files -->
+ <if>
+ <not>
+ <checksum algorithm="MD5" file="${root.dir}/all/lib/classlib.pack.gz" property="${classlib.md5}"/>
+ </not>
+ <then>
+ <delete file="${root.dir}/all/lib/classlib.pack.gz"/>
+ <fail message="checksum failed for classlib.pack.gz"/>
+ </then>
+ </if>
+ <if>
+ <not>
+ <checksum algorithm="MD5" file="${root.dir}/all/lib/classlib-src.jar.bz2" property="${classlib-src.md5}"/>
+ </not>
+ <then>
+ <delete file="${root.dir}/all/lib/classlib-src.jar.bz2"/>
+ <fail message="checksum failed for classlib-src.jar.bz2"/>
+ </then>
+ </if>
+ </else>
+ </if>
+ </then>
+ </if>
+ <if>
+ <or>
+ <not>
+ <available file="${classlib.jar}" />
+ </not>
+ <uptodate srcfile="${classlib.jar}" targetfile="${root.dir}/all/lib/classlib.pack.gz"/>
+ </or>
+ <then>
+ <delete file="${classlib.jar}"/>
+ <echo message="Creating ${classlib.jar}"/>
+ <exec executable="${java.home}/bin/unpack200">
+ <arg file="${root.dir}/all/lib/classlib.pack.gz"/>
+ <arg file="${classlib.jar}"/>
+ </exec>
+ </then>
+ </if>
+ <if>
+ <or>
+ <not>
+ <available file="${classlib-src.jar}" />
+ </not>
+ <uptodate srcfile="${classlib-src.jar}" targetfile="${root.dir}/all/lib/classlib-src.jar.bz2"/>
+ </or>
+ <then>
+ <delete file="${classlib-src.jar}"/>
+ <echo message="Creating ${classlib-src.jar}"/>
+ <bunzip2 src="${root.dir}/all/lib/classlib-src.jar.bz2" dest="${classlib-src.jar}"/>
+ </then>
+ </if>
+ <property name="classlib.stamp" value="${root.dir}/all/build/classlib.stamp" />
+ </target>
- <!-- Call the assemble target of all subprojects -->
- <target name="assemble-projects" depends="prepare">
- <!-- pre compile tasks needed for compilation -->
- <ant target="pre-compile" dir="${root.dir}/builder" inheritall="on" inheritrefs="on" />
- <jnode.antall target="assemble"/>
- </target>
+ <!-- Call the assemble target of all subprojects -->
+ <target name="assemble-projects" depends="prepare">
+ <!-- pre compile tasks needed for compilation -->
+ <ant target="pre-compile" dir="${root.dir}/builder" inheritall="on" in...
[truncated message content] |
|
From: <ga...@us...> - 2012-03-27 15:16:51
|
Revision: 5893
http://jnode.svn.sourceforge.net/jnode/?rev=5893&view=rev
Author: galatnm
Date: 2012-03-27 15:16:35 +0000 (Tue, 27 Mar 2012)
Log Message:
-----------
Various clean up for performance.
Modified Paths:
--------------
trunk/cli/src/commands/org/jnode/command/system/JavaCommand.java
trunk/cli/src/commands/org/jnode/command/system/PageCommand.java
trunk/core/src/core/org/jnode/assembler/x86/X86BinaryAssembler.java
trunk/core/src/core/org/jnode/assembler/x86/X86TextAssembler.java
trunk/core/src/core/org/jnode/debugger/ThreadState.java
trunk/core/src/core/org/jnode/log4j/config/VirtualConsoleAppender.java
trunk/core/src/core/org/jnode/plugin/AutoUnzipPlugin.java
trunk/core/src/core/org/jnode/plugin/PluginLoader.java
trunk/core/src/core/org/jnode/plugin/PluginUtils.java
trunk/core/src/core/org/jnode/plugin/model/ExtensionModel.java
trunk/core/src/core/org/jnode/plugin/model/ExtensionPointModel.java
trunk/core/src/core/org/jnode/plugin/model/PluginClassLoaderImpl.java
trunk/core/src/core/org/jnode/util/BinaryScaleFactor.java
trunk/core/src/core/org/jnode/util/DecimalScaleFactor.java
trunk/core/src/core/org/jnode/util/JarBuffer.java
trunk/core/src/core/org/jnode/util/NumberUtils.java
trunk/core/src/core/org/jnode/vm/IOResourceImpl.java
trunk/core/src/core/org/jnode/vm/VmStackFrame.java
trunk/core/src/core/org/jnode/vm/VmSystem.java
trunk/core/src/core/org/jnode/vm/VmSystemClassLoader.java
trunk/core/src/core/org/jnode/vm/bytecode/BasicBlockFinder.java
trunk/core/src/core/org/jnode/vm/bytecode/BytecodeParser.java
trunk/core/src/core/org/jnode/vm/bytecode/BytecodeViewer.java
trunk/core/src/core/org/jnode/vm/classmgr/ClassDecoder.java
trunk/core/src/core/org/jnode/vm/classmgr/Signature.java
trunk/core/src/core/org/jnode/vm/classmgr/VmConstMemberRef.java
trunk/core/src/core/org/jnode/vm/classmgr/VmField.java
trunk/core/src/core/org/jnode/vm/classmgr/VmLocalVariableTable.java
trunk/core/src/core/org/jnode/vm/classmgr/VmMethod.java
trunk/core/src/core/org/jnode/vm/classmgr/VmType.java
trunk/core/src/core/org/jnode/vm/compiler/CompilerBytecodeViewer.java
trunk/core/src/core/org/jnode/vm/compiler/ir/IRBasicBlock.java
trunk/core/src/core/org/jnode/vm/compiler/ir/IRControlFlowGraph.java
trunk/core/src/core/org/jnode/vm/compiler/ir/LiveRange.java
trunk/core/src/core/org/jnode/vm/compiler/ir/NativeTest.java
trunk/core/src/core/org/jnode/vm/compiler/ir/PhiOperand.java
trunk/core/src/core/org/jnode/vm/compiler/ir/quad/BinaryQuad.java
trunk/core/src/core/org/jnode/vm/compiler/ir/quad/ConditionalBranchQuad.java
trunk/core/src/core/org/jnode/vm/compiler/ir/quad/UnaryQuad.java
trunk/core/src/core/org/jnode/vm/isolate/IsolateStatusImpl.java
trunk/core/src/core/org/jnode/vm/isolate/VmIsolate.java
trunk/core/src/core/org/jnode/vm/memmgr/VmHeapManager.java
trunk/core/src/core/org/jnode/vm/memmgr/def/DefGCStatistics.java
trunk/core/src/core/org/jnode/vm/objects/CounterGroup.java
trunk/core/src/core/org/jnode/vm/objects/SynchronizedCounter.java
trunk/core/src/core/org/jnode/vm/scheduler/VmThread.java
trunk/core/src/core/org/jnode/vm/x86/GDT.java
trunk/core/src/core/org/jnode/vm/x86/IOAPIC.java
trunk/core/src/core/org/jnode/vm/x86/MPInterruptAssignmentEntry.java
trunk/core/src/core/org/jnode/vm/x86/VmX86Processor.java
trunk/core/src/core/org/jnode/vm/x86/compiler/X86CompilerHelper.java
trunk/core/src/core/org/jnode/vm/x86/compiler/l1a/Item.java
trunk/core/src/core/org/jnode/vm/x86/compiler/l1a/ItemStack.java
trunk/core/src/core/org/jnode/vm/x86/compiler/l1a/X86BytecodeVisitor.java
trunk/core/src/core/org/jnode/vm/x86/compiler/l1a/X86RegisterPool.java
trunk/core/src/core/org/jnode/vm/x86/compiler/l1b/Item.java
trunk/core/src/core/org/jnode/vm/x86/compiler/l1b/ItemStack.java
trunk/core/src/core/org/jnode/vm/x86/compiler/l1b/X86BytecodeVisitor.java
trunk/core/src/core/org/jnode/vm/x86/compiler/l1b/X86RegisterPool.java
trunk/core/src/driver/org/jnode/driver/bus/firewire/FireWireDevice.java
trunk/core/src/driver/org/jnode/driver/bus/pci/PCIBaseAddress.java
trunk/core/src/driver/org/jnode/driver/bus/pci/PCIDescriptors.java
trunk/core/src/driver/org/jnode/driver/bus/pci/PCIDevice.java
trunk/core/src/driver/org/jnode/driver/bus/pci/PCIDriver.java
trunk/core/src/driver/org/jnode/driver/bus/pci/PCIHeaderType0.java
trunk/core/src/driver/org/jnode/driver/bus/pci/PCIRomAddress.java
trunk/core/src/driver/org/jnode/driver/bus/pci/VendorDescriptor.java
trunk/core/src/driver/org/jnode/driver/bus/pcmcia/CardBusDevice.java
trunk/core/src/driver/org/jnode/driver/bus/smbus/DIMM.java
trunk/core/src/driver/org/jnode/driver/bus/smbus/DIMMDriver.java
trunk/core/src/driver/org/jnode/driver/bus/usb/ConfigurationDescriptor.java
trunk/core/src/driver/org/jnode/driver/bus/usb/DeviceDescriptor.java
trunk/core/src/driver/org/jnode/driver/bus/usb/EndPointDescriptor.java
trunk/core/src/driver/org/jnode/driver/bus/usb/InterfaceDescriptor.java
trunk/core/src/driver/org/jnode/driver/bus/usb/USBConfiguration.java
trunk/core/src/driver/org/jnode/driver/bus/usb/USBInterface.java
trunk/core/src/driver/org/jnode/driver/bus/usb/uhci/QueueHead.java
trunk/core/src/driver/org/jnode/driver/bus/usb/uhci/Schedule.java
trunk/core/src/driver/org/jnode/driver/bus/usb/uhci/TransferDescriptor.java
trunk/core/src/driver/org/jnode/driver/bus/usb/uhci/UHCIControlRequest.java
trunk/core/src/driver/org/jnode/driver/console/spi/AbstractConsoleManager.java
trunk/core/src/driver/org/jnode/driver/input/Key.java
trunk/core/src/driver/org/jnode/driver/input/KeyboardLayoutManager.java
trunk/core/src/driver/org/jnode/driver/input/Keys.java
trunk/core/src/driver/org/jnode/driver/input/PointerEvent.java
trunk/core/src/driver/org/jnode/driver/system/acpi/AcpiDriver.java
trunk/core/src/driver/org/jnode/driver/system/acpi/AcpiSystemTable.java
trunk/core/src/driver/org/jnode/driver/system/acpi/AcpiTable.java
trunk/core/src/driver/org/jnode/driver/system/acpi/GenericAddress.java
trunk/core/src/driver/org/jnode/driver/system/acpi/aml/ParseNode.java
trunk/core/src/driver/org/jnode/driver/system/acpi/aml/Parser.java
trunk/core/src/driver/org/jnode/driver/system/acpi/vm/Device.java
trunk/net/src/driver/org/jnode/driver/net/_3c90x/_3c90xCore.java
trunk/net/src/driver/org/jnode/driver/net/via_rhine/ViaRhineRing.java
Modified: trunk/cli/src/commands/org/jnode/command/system/JavaCommand.java
===================================================================
--- trunk/cli/src/commands/org/jnode/command/system/JavaCommand.java 2012-03-26 12:56:18 UTC (rev 5892)
+++ trunk/cli/src/commands/org/jnode/command/system/JavaCommand.java 2012-03-27 15:16:35 UTC (rev 5893)
@@ -29,7 +29,6 @@
import java.lang.reflect.Modifier;
import java.net.MalformedURLException;
import java.net.URL;
-
import org.jnode.shell.AbstractCommand;
import org.jnode.shell.syntax.Argument;
import org.jnode.shell.syntax.ClassNameArgument;
@@ -143,17 +142,21 @@
}
}
- private URL findResource(String name, String[] dirs)
+ private URL findResource(String name, String[] dirs)
throws MalformedURLException {
- for (int i = 0; i < dirs.length; i++) {
- File d = new File(dirs[i]);
- if (d.isDirectory()) {
- return findResource(name, d.list());
- } else if (d.getName().equals(name)) {
- return d.toURI().toURL();
+ findResource:
+ while (true) {
+ for (int i = 0; i < dirs.length; i++) {
+ File d = new File(dirs[i]);
+ if (d.isDirectory()) {
+ dirs = d.list();
+ continue findResource;
+ } else if (d.getName().equals(name)) {
+ return d.toURI().toURL();
+ }
}
+ return null;
}
- return null;
}
private byte[] loadClassData(String name) throws ClassNotFoundException {
Modified: trunk/cli/src/commands/org/jnode/command/system/PageCommand.java
===================================================================
--- trunk/cli/src/commands/org/jnode/command/system/PageCommand.java 2012-03-26 12:56:18 UTC (rev 5892)
+++ trunk/cli/src/commands/org/jnode/command/system/PageCommand.java 2012-03-27 15:16:35 UTC (rev 5893)
@@ -33,9 +33,7 @@
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.regex.PatternSyntaxException;
-
import javax.naming.NameNotFoundException;
-
import org.jnode.driver.console.ConsoleManager;
import org.jnode.driver.console.TextConsole;
import org.jnode.driver.console.textscreen.TextScreenConsoleManager;
@@ -498,25 +496,28 @@
/**
* Prepare lines for output by painting them to our private buffer in the forward
* direction starting at a given line number and (rendered) subline number.
- *
+ *
* @param startLineNo
*/
private ScreenBuffer prepare(int startLineNo, int startSublineNo) {
- ScreenBuffer buffer = new ScreenBuffer(true);
- int lineNo = startLineNo;
- boolean more;
- do {
- String line = lineStore.getLine(lineNo);
- if (line == null) {
- break;
+ while (true) {
+ ScreenBuffer buffer = new ScreenBuffer(true);
+ int lineNo = startLineNo;
+ boolean more;
+ do {
+ String line = lineStore.getLine(lineNo);
+ if (line == null) {
+ break;
+ }
+ more = prepareLine(line, lineNo, buffer);
+ lineNo++;
+ } while (more);
+ if (buffer.adjust(startLineNo, startSublineNo) || startLineNo == 0) {
+ return buffer;
+ } else {
+ startLineNo -= 1;
+ startSublineNo = LAST_SUBLINE;
}
- more = prepareLine(line, lineNo, buffer);
- lineNo++;
- } while (more);
- if (buffer.adjust(startLineNo, startSublineNo) || startLineNo == 0) {
- return buffer;
- } else {
- return prepare(startLineNo - 1, LAST_SUBLINE);
}
}
Modified: trunk/core/src/core/org/jnode/assembler/x86/X86BinaryAssembler.java
===================================================================
--- trunk/core/src/core/org/jnode/assembler/x86/X86BinaryAssembler.java 2012-03-26 12:56:18 UTC (rev 5892)
+++ trunk/core/src/core/org/jnode/assembler/x86/X86BinaryAssembler.java 2012-03-27 15:16:35 UTC (rev 5893)
@@ -20,20 +20,12 @@
package org.jnode.assembler.x86;
-import static org.jnode.assembler.x86.X86Register.CS;
-import static org.jnode.assembler.x86.X86Register.DS;
-import static org.jnode.assembler.x86.X86Register.ES;
-import static org.jnode.assembler.x86.X86Register.FS;
-import static org.jnode.assembler.x86.X86Register.GS;
-import static org.jnode.assembler.x86.X86Register.SS;
-
import java.io.IOException;
import java.io.OutputStream;
import java.util.Collection;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.Map;
-
import org.jnode.assembler.BootImageNativeStream;
import org.jnode.assembler.Label;
import org.jnode.assembler.NativeStream;
@@ -52,6 +44,13 @@
import org.jnode.vm.classmgr.VmType;
import org.jnode.vm.x86.X86CpuID;
+import static org.jnode.assembler.x86.X86Register.CS;
+import static org.jnode.assembler.x86.X86Register.DS;
+import static org.jnode.assembler.x86.X86Register.ES;
+import static org.jnode.assembler.x86.X86Register.FS;
+import static org.jnode.assembler.x86.X86Register.GS;
+import static org.jnode.assembler.x86.X86Register.SS;
+
/**
* Implementation of AbstractX86Stream.
*
@@ -247,12 +246,12 @@
*/
public void setOffset(int offset) {
if (this.dataOffset != -1) {
- if ("".equals(getObject().toString())) {
+ if (getObject().toString().isEmpty()) {
return;
}
throw new RuntimeException(
"Offset is already set. Duplicate labels? ("
- + getObject() + ")");
+ + getObject() + ')');
}
if (offset < 0) {
throw new IllegalArgumentException("Offset: " + offset);
@@ -292,7 +291,7 @@
// System.out.println("offset " + offset);
final int distance = offset - addr - 1; //get8(addr);
if (!X86Utils.isByte(distance)) {
- throw new IllegalArgumentException("Jump out of byte-range (" + distance + ")");
+ throw new IllegalArgumentException("Jump out of byte-range (" + distance + ')');
}
if (isRelJump() && (distance == 0)) {
// JMP
@@ -2219,7 +2218,7 @@
write8(distance);
} else {
throw new UnresolvedObjectRefException("Label " + label
- + " is out of range (distance " + distance + ")");
+ + " is out of range (distance " + distance + ')');
}
} catch (UnresolvedObjectRefException x) {
throw new RuntimeException(x);
@@ -2478,7 +2477,7 @@
write8(distance);
} else {
throw new UnresolvedObjectRefException("Label " + label
- + " is out of range (distance " + distance + ")");
+ + " is out of range (distance " + distance + ')');
}
} else {
throw new UnresolvedObjectRefException("Label " + label
Modified: trunk/core/src/core/org/jnode/assembler/x86/X86TextAssembler.java
===================================================================
--- trunk/core/src/core/org/jnode/assembler/x86/X86TextAssembler.java 2012-03-26 12:56:18 UTC (rev 5892)
+++ trunk/core/src/core/org/jnode/assembler/x86/X86TextAssembler.java 2012-03-27 15:16:35 UTC (rev 5893)
@@ -25,7 +25,6 @@
import java.io.PrintWriter;
import java.io.Writer;
import java.util.Collection;
-
import org.jnode.assembler.Label;
import org.jnode.assembler.NativeStream;
import org.jnode.assembler.ObjectResolver;
@@ -308,7 +307,7 @@
}
public ObjectRef setObjectRef(Object label) {
- println(label(label) + ":");
+ println(label(label) + ':');
return new ObjectRefImpl(label);
}
@@ -364,11 +363,11 @@
* @param imm32
*/
public void writeADC(GPR dstReg, int imm32) {
- println("\tadc " + dstReg + "," + imm32);
+ println("\tadc " + dstReg + ',' + imm32);
}
public void writeADC(int operandSize, GPR dstReg, int dstDisp, int imm32) {
- println("\tadc " + size(operandSize) + "[" + dstReg + disp(dstDisp)
+ println("\tadc " + size(operandSize) + '[' + dstReg + disp(dstDisp)
+ "]," + imm32);
}
@@ -383,7 +382,7 @@
* @param srcReg
*/
public void writeADC(GPR dstReg, GPR srcReg) {
- println("\tadc " + dstReg + "," + srcReg);
+ println("\tadc " + dstReg + ',' + srcReg);
}
/**
@@ -394,7 +393,7 @@
* @param srcDisp
*/
public void writeADC(GPR dstReg, GPR srcReg, int srcDisp) {
- println("\tadc " + dstReg + ",[" + srcReg + disp(srcDisp) + "]");
+ println("\tadc " + dstReg + ",[" + srcReg + disp(srcDisp) + ']');
}
// LS
@@ -407,7 +406,7 @@
}
public void writeADD(int operandSize, int dstDisp, int imm32) {
- println("\tadd " + size(operandSize) + "[" + disp(dstDisp)
+ println("\tadd " + size(operandSize) + '[' + disp(dstDisp)
+ "],0x" + NumberUtils.hex(imm32));
}
@@ -419,17 +418,17 @@
* @param imm32
*/
public void writeADD(int operandSize, GPR dstReg, int dstDisp, int imm32) {
- println("\tadd " + size(operandSize) + "[" + dstReg + disp(dstDisp)
+ println("\tadd " + size(operandSize) + '[' + dstReg + disp(dstDisp)
+ "],0x" + NumberUtils.hex(imm32));
}
public void writeADD(int operandSize, SR dstReg, int dstDisp, int imm32) {
- println("\tadd " + size(operandSize) + "[" + dstReg + ":0x"
+ println("\tadd " + size(operandSize) + '[' + dstReg + ":0x"
+ NumberUtils.hex(dstDisp) + "],0x" + NumberUtils.hex(imm32));
}
public void writeADD_MEM(X86Register.GPR reg, int memPtr32) {
- println("\tadd " + reg + ",[0x" + NumberUtils.hex(memPtr32) + "]");
+ println("\tadd " + reg + ",[0x" + NumberUtils.hex(memPtr32) + ']');
}
public void writeADD(GPR dstReg, int dstDisp, GPR srcReg) {
@@ -437,7 +436,7 @@
}
public void writeADD(GPR dstReg, GPR srcReg) {
- println("\tadd " + dstReg + "," + srcReg);
+ println("\tadd " + dstReg + ',' + srcReg);
}
/**
@@ -448,7 +447,7 @@
* @param srcDisp
*/
public void writeADD(GPR dstReg, GPR srcReg, int srcDisp) {
- println("\tadd " + dstReg + ",[" + srcReg + disp(srcDisp) + "]");
+ println("\tadd " + dstReg + ",[" + srcReg + disp(srcDisp) + ']');
}
public void writeAND(GPR reg, int imm32) {
@@ -456,7 +455,7 @@
}
public void writeAND(int operandSize, int dstDisp, int imm32) {
- println("\tand " + size(operandSize) + "[" + disp(dstDisp)
+ println("\tand " + size(operandSize) + '[' + disp(dstDisp)
+ "],0x" + NumberUtils.hex(imm32));
}
@@ -466,7 +465,7 @@
* @param imm32
*/
public void writeAND(int operandSize, GPR dstReg, int dstDisp, int imm32) {
- println("\tand " + size(operandSize) + "[" + dstReg + disp(dstDisp)
+ println("\tand " + size(operandSize) + '[' + dstReg + disp(dstDisp)
+ "],0x" + NumberUtils.hex(imm32));
}
@@ -481,12 +480,12 @@
* @param imm32
*/
public void writeAND(int operandSize, X86Register.SR dstReg, int dstDisp, int imm32) {
- println("\tand " + size(operandSize) + "[" + dstReg + ":0x" + NumberUtils.hex(dstDisp)
+ println("\tand " + size(operandSize) + '[' + dstReg + ":0x" + NumberUtils.hex(dstDisp)
+ "],0x" + NumberUtils.hex(imm32));
}
public void writeAND(GPR dstReg, GPR srcReg) {
- println("\tand " + dstReg + "," + srcReg);
+ println("\tand " + dstReg + ',' + srcReg);
}
/**
@@ -495,31 +494,31 @@
* @param srcDisp
*/
public void writeAND(GPR dstReg, GPR srcReg, int srcDisp) {
- println("\tand " + dstReg + ",[" + srcReg + disp(srcDisp) + "]");
+ println("\tand " + dstReg + ",[" + srcReg + disp(srcDisp) + ']');
}
public void writeArithSSEDOp(int operation, XMM dst, GPR src, int srcDisp) {
final String op = getSSEOperationName(operation);
- println("\t" + op + "D" + dst + ", qword [" + src + disp(srcDisp) + "]");
+ println('\t' + op + 'D' + dst + ", qword [" + src + disp(srcDisp) + ']');
}
public void writeArithSSEDOp(int operation, XMM dst, XMM src) {
final String op = getSSEOperationName(operation);
- println("\t" + op + "D" + dst + ", " + src);
+ println('\t' + op + 'D' + dst + ", " + src);
}
public void writeArithSSESOp(int operation, XMM dst, GPR src, int srcDisp) {
final String op = getSSEOperationName(operation);
- println("\t" + op + "S" + dst + ", dword [" + src + disp(srcDisp) + "]");
+ println('\t' + op + 'S' + dst + ", dword [" + src + disp(srcDisp) + ']');
}
public void writeArithSSESOp(int operation, XMM dst, XMM src) {
final String op = getSSEOperationName(operation);
- println("\t" + op + "S" + dst + ", " + src);
+ println('\t' + op + 'S' + dst + ", " + src);
}
public void writeBOUND(GPR lReg, GPR rReg, int rDisp) {
- println("\tbound " + lReg + ",[" + rReg + disp(rDisp) + "]");
+ println("\tbound " + lReg + ",[" + rReg + disp(rDisp) + ']');
}
public void writeBreakPoint() {
@@ -540,7 +539,7 @@
* @param rawAddress If true, tablePtr is a raw address
*/
public void writeCALL(Object tablePtr, int offset, boolean rawAddress) {
- println("\tcall [" + tablePtr + disp(offset) + "]");
+ println("\tcall [" + tablePtr + disp(offset) + ']');
}
public void writeCALL(GPR reg) {
@@ -554,16 +553,16 @@
* @param offset
*/
public void writeCALL(GPR reg, int offset) {
- println("\tcall [" + reg + disp(offset) + "]");
+ println("\tcall [" + reg + disp(offset) + ']');
}
public void writeCALL(GPR regBase, GPR regIndex, int scale, int disp) {
- println("\tcall [" + regBase + "+" + regIndex + "*" + scale
- + disp(disp) + "]");
+ println("\tcall [" + regBase + '+' + regIndex + '*' + scale
+ + disp(disp) + ']');
}
public void writeCALL(GPR regIndex, int scale, int disp) {
- println("\tcall [" + regIndex + "*" + scale + disp(disp) + "]");
+ println("\tcall [" + regIndex + '*' + scale + disp(disp) + ']');
}
public void writeCDQ(int operandSize) {
@@ -611,7 +610,7 @@
* @param src
*/
public void writeCMOVcc(int ccOpcode, GPR dst, GPR src) {
- println("\tCMOV" + ccName(ccOpcode) + " " + dst + "," + src);
+ println("\tCMOV" + ccName(ccOpcode) + ' ' + dst + ',' + src);
}
/**
@@ -622,8 +621,8 @@
* @param srcDisp
*/
public void writeCMOVcc(int ccOpcode, GPR dst, GPR src, int srcDisp) {
- println("\tCMOV" + ccName(ccOpcode) + " " + dst + ",[" + src
- + disp(srcDisp) + "]");
+ println("\tCMOV" + ccName(ccOpcode) + ' ' + dst + ",[" + src
+ + disp(srcDisp) + ']');
}
/**
@@ -638,7 +637,7 @@
}
public void writeCMP(GPR reg1, GPR reg2) {
- println("\tcmp " + reg1 + "," + reg2);
+ println("\tcmp " + reg1 + ',' + reg2);
}
/**
@@ -649,7 +648,7 @@
* @param disp
*/
public void writeCMP(GPR reg1, SR reg2, int disp) {
- println("\tcmp " + reg1 + ",[" + reg2 + ":0x" + NumberUtils.hex(disp) + "]");
+ println("\tcmp " + reg1 + ",[" + reg2 + ":0x" + NumberUtils.hex(disp) + ']');
}
/**
@@ -660,7 +659,7 @@
* @param disp
*/
public void writeCMP(GPR reg1, GPR reg2, int disp) {
- println("\tcmp " + reg1 + ",[" + reg2 + disp(disp) + "]");
+ println("\tcmp " + reg1 + ",[" + reg2 + disp(disp) + ']');
}
public void writeCMP_Const(GPR reg, int imm32) {
@@ -675,7 +674,7 @@
* @param imm32
*/
public void writeCMP_Const(int operandSize, GPR reg, int disp, int imm32) {
- println("\tcmp " + size(operandSize) + "[" + reg + disp(disp) + "],0x"
+ println("\tcmp " + size(operandSize) + '[' + reg + disp(disp) + "],0x"
+ NumberUtils.hex(imm32));
}
@@ -688,7 +687,7 @@
* @param imm32
*/
public void writeCMP_Const(int operandSize, X86Register.SR dstReg, int dstDisp, int imm32) {
- println("\tcmp " + size(operandSize) + "[" + dstReg + ":0x" + NumberUtils.hex(dstDisp) + "],0x"
+ println("\tcmp " + size(operandSize) + '[' + dstReg + ":0x" + NumberUtils.hex(dstDisp) + "],0x"
+ NumberUtils.hex(imm32));
}
@@ -702,7 +701,7 @@
}
public void writeCMP_MEM(int operandSize, int memPtr, int imm32) {
- println("\tcmp " + size(operandSize) + "[" + memPtr + "],0x"
+ println("\tcmp " + size(operandSize) + '[' + memPtr + "],0x"
+ NumberUtils.hex(imm32));
}
@@ -713,7 +712,7 @@
* @param memPtr
*/
public void writeCMP_MEM(GPR reg, int memPtr) {
- println("\tcmp " + reg + ", [" + memPtr + "]");
+ println("\tcmp " + reg + ", [" + memPtr + ']');
}
public void writeCMPXCHG_EAX(GPR dstReg, int dstDisp, GPR srcReg,
@@ -730,8 +729,8 @@
}
public void writeDEC(int operandSize, GPR dstReg, int dstDisp) {
- println("\tdec " + size(operandSize) + "[" + dstReg + disp(dstDisp)
- + "]");
+ println("\tdec " + size(operandSize) + '[' + dstReg + disp(dstDisp)
+ + ']');
}
public void writeDIV_EAX(GPR srcReg) {
@@ -744,11 +743,11 @@
}
public void writeFADD32(GPR srcReg, int srcDisp) {
- println("\tfadd dword [" + srcReg + disp(srcDisp) + "]");
+ println("\tfadd dword [" + srcReg + disp(srcDisp) + ']');
}
public void writeFADD64(GPR srcReg, int srcDisp) {
- println("\tfadd qword [" + srcReg + disp(srcDisp) + "]");
+ println("\tfadd qword [" + srcReg + disp(srcDisp) + ']');
}
public void writeFADDP(X86Register fpuReg) {
@@ -760,11 +759,11 @@
}
public void writeFDIV32(GPR srcReg, int srcDisp) {
- println("\tfdiv dword [" + srcReg + disp(srcDisp) + "]");
+ println("\tfdiv dword [" + srcReg + disp(srcDisp) + ']');
}
public void writeFDIV64(GPR srcReg, int srcDisp) {
- println("\tfdiv qword [" + srcReg + disp(srcDisp) + "]");
+ println("\tfdiv qword [" + srcReg + disp(srcDisp) + ']');
}
public void writeFDIVP(X86Register fpuReg) {
@@ -776,51 +775,51 @@
}
public void writeFILD32(GPR dstReg, int dstDisp) {
- println("\tfild dword [" + dstReg + disp(dstDisp) + "]");
+ println("\tfild dword [" + dstReg + disp(dstDisp) + ']');
}
public void writeFILD64(GPR dstReg, int dstDisp) {
- println("\tfild qword [" + dstReg + disp(dstDisp) + "]");
+ println("\tfild qword [" + dstReg + disp(dstDisp) + ']');
}
public void writeFISTP32(GPR dstReg, int dstDisp) {
- println("\tfistp dword [" + dstReg + disp(dstDisp) + "]");
+ println("\tfistp dword [" + dstReg + disp(dstDisp) + ']');
}
public void writeFISTP64(GPR dstReg, int dstDisp) {
- println("\tfistp qword [" + dstReg + disp(dstDisp) + "]");
+ println("\tfistp qword [" + dstReg + disp(dstDisp) + ']');
}
public void writeFLD32(GPR srcReg, int srcDisp) {
- println("\tfld dword [" + srcReg + disp(srcDisp) + "]");
+ println("\tfld dword [" + srcReg + disp(srcDisp) + ']');
}
public void writeFLD32(GPR srcBaseReg, GPR srcIndexReg, int srcScale,
int srcDisp) {
println("\tfld dword [" + srcBaseReg + '+' + srcIndexReg + '*'
- + srcScale + disp(srcDisp) + "]");
+ + srcScale + disp(srcDisp) + ']');
}
public void writeFLD64(GPR srcReg, int srcDisp) {
- println("\tfld qword [" + srcReg + disp(srcDisp) + "]");
+ println("\tfld qword [" + srcReg + disp(srcDisp) + ']');
}
public void writeFLD64(GPR srcBaseReg, GPR srcIndexReg, int srcScale,
int srcDisp) {
println("\tfld qword [" + srcBaseReg + '+' + srcIndexReg + '*'
- + srcScale + disp(srcDisp) + "]");
+ + srcScale + disp(srcDisp) + ']');
}
public void writeFLDCW(GPR srcReg, int srcDisp) {
- println("\tfldcw word [" + srcReg + disp(srcDisp) + "]");
+ println("\tfldcw word [" + srcReg + disp(srcDisp) + ']');
}
public void writeFMUL32(GPR srcReg, int srcDisp) {
- println("\tfmul dword [" + srcReg + disp(srcDisp) + "]");
+ println("\tfmul dword [" + srcReg + disp(srcDisp) + ']');
}
public void writeFMUL64(GPR srcReg, int srcDisp) {
- println("\tfmul qword [" + srcReg + disp(srcDisp) + "]");
+ println("\tfmul qword [" + srcReg + disp(srcDisp) + ']');
}
public void writeFMULP(X86Register fpuReg) {
@@ -832,7 +831,7 @@
}
public void writeFNSAVE(GPR srcReg, int srcDisp) {
- println("\tfnsave [" + srcReg + disp(srcDisp) + "]");
+ println("\tfnsave [" + srcReg + disp(srcDisp) + ']');
}
public void writeFNSTSW_AX() {
@@ -844,11 +843,11 @@
}
public void writeFRSTOR(GPR srcReg, int srcDisp) {
- println("\tfrstor [" + srcReg + disp(srcDisp) + "]");
+ println("\tfrstor [" + srcReg + disp(srcDisp) + ']');
}
public void writeFSTCW(GPR srcReg, int srcDisp) {
- println("\tfstcw word [" + srcReg + disp(srcDisp) + "]");
+ println("\tfstcw word [" + srcReg + disp(srcDisp) + ']');
}
public void writeFSTP(X86Register fpuReg) {
@@ -856,19 +855,19 @@
}
public void writeFSTP32(GPR dstReg, int dstDisp) {
- println("\tfstp dword [" + dstReg + disp(dstDisp) + "]");
+ println("\tfstp dword [" + dstReg + disp(dstDisp) + ']');
}
public void writeFSTP64(GPR dstReg, int dstDisp) {
- println("\tfstp qword [" + dstReg + disp(dstDisp) + "]");
+ println("\tfstp qword [" + dstReg + disp(dstDisp) + ']');
}
public void writeFSUB32(GPR srcReg, int srcDisp) {
- println("\tfsub32 dword [" + srcReg + disp(srcDisp) + "]");
+ println("\tfsub32 dword [" + srcReg + disp(srcDisp) + ']');
}
public void writeFSUB64(GPR srcReg, int srcDisp) {
- println("\tfsub64 qword [" + srcReg + disp(srcDisp) + "]");
+ println("\tfsub64 qword [" + srcReg + disp(srcDisp) + ']');
}
public void writeFSUBP(X86Register fpuReg) {
@@ -884,11 +883,11 @@
}
public void writeFXRSTOR(GPR srcReg, int srcDisp) {
- println("\tfxrstor [" + srcReg + disp(srcDisp) + "]");
+ println("\tfxrstor [" + srcReg + disp(srcDisp) + ']');
}
public void writeFXSAVE(GPR srcReg, int srcDisp) {
- println("\tfxsave [" + srcReg + disp(srcDisp) + "]");
+ println("\tfxsave [" + srcReg + disp(srcDisp) + ']');
}
public void writeHLT() {
@@ -900,12 +899,12 @@
}
public void writeIDIV_EAX(int operandSize, GPR srcReg, int srcDisp) {
- println("\tidiv " + size(operandSize) + "[" + srcReg + disp(srcDisp)
- + "]");
+ ...
[truncated message content] |
|
From: <ga...@us...> - 2012-03-28 14:03:45
|
Revision: 5894
http://jnode.svn.sourceforge.net/jnode/?rev=5894&view=rev
Author: galatnm
Date: 2012-03-28 14:03:32 +0000 (Wed, 28 Mar 2012)
Log Message:
-----------
Various clean up for performance.
Modified Paths:
--------------
trunk/cli/src/commands/org/jnode/command/archive/TarCommand.java
trunk/cli/src/commands/org/jnode/command/archive/ZipCommand.java
trunk/cli/src/commands/org/jnode/command/argument/NumberListArgument.java
trunk/cli/src/commands/org/jnode/command/common/ExprCommand.java
trunk/cli/src/commands/org/jnode/command/common/TimeCommand.java
trunk/cli/src/commands/org/jnode/command/common/UnixTestCommand.java
trunk/cli/src/commands/org/jnode/command/file/CpCommand.java
trunk/cli/src/commands/org/jnode/command/file/CutCommand.java
trunk/cli/src/commands/org/jnode/command/file/DirCommand.java
trunk/cli/src/commands/org/jnode/command/file/DuCommand.java
trunk/cli/src/commands/org/jnode/command/file/FindCommand.java
trunk/cli/src/commands/org/jnode/command/file/GrepCommand.java
trunk/cli/src/commands/org/jnode/command/file/HexdumpCommand.java
trunk/cli/src/commands/org/jnode/command/file/SortCommand.java
trunk/cli/src/commands/org/jnode/command/file/WcCommand.java
trunk/cli/src/commands/org/jnode/command/net/NetstatCommand.java
trunk/cli/src/commands/org/jnode/command/net/RpcInfoCommand.java
trunk/cli/src/commands/org/jnode/command/system/BindKeysCommand.java
trunk/cli/src/commands/org/jnode/command/system/ClasspathCommand.java
trunk/cli/src/commands/org/jnode/command/system/IsolateCommand.java
trunk/cli/src/commands/org/jnode/command/system/JavaCommand.java
trunk/cli/src/commands/org/jnode/command/system/LocaleCommand.java
trunk/cli/src/commands/org/jnode/command/system/Log4jCommand.java
trunk/cli/src/commands/org/jnode/command/system/LsIRQCommand.java
trunk/cli/src/commands/org/jnode/command/system/PluginCommand.java
trunk/net/src/driver/org/jnode/driver/net/eepro100/EEPRO100Buffer.java
trunk/net/src/driver/org/jnode/driver/net/eepro100/EEPRO100Core.java
trunk/net/src/driver/org/jnode/driver/net/eepro100/EEPRO100Flags.java
trunk/net/src/driver/org/jnode/driver/net/eepro100/EEPRO100Registers.java
trunk/net/src/driver/org/jnode/driver/net/eepro100/EEPRO100Stats.java
trunk/net/src/driver/org/jnode/driver/net/eepro100/EEPRO100TxFD.java
trunk/net/src/driver/org/jnode/driver/net/prism2/Prism2Core.java
trunk/net/src/driver/org/jnode/driver/net/spi/AbstractNetDriver.java
trunk/net/src/driver/org/jnode/driver/net/usb/bluetooth/UsbBluetoothDriver.java
trunk/net/src/driver/org/jnode/driver/net/via_rhine/ViaRhineCore.java
trunk/net/src/net/org/jnode/net/SocketBuffer.java
trunk/net/src/net/org/jnode/net/arp/ARPCacheEntry.java
trunk/net/src/net/org/jnode/net/arp/ARPHeader.java
trunk/net/src/net/org/jnode/net/arp/ARPNetworkLayer.java
trunk/net/src/net/org/jnode/net/ipv4/IPv4ControlBlock.java
trunk/net/src/net/org/jnode/net/ipv4/IPv4FragmentList.java
trunk/net/src/net/org/jnode/net/ipv4/bootp/BOOTPServer.java
trunk/net/src/net/org/jnode/net/ipv4/config/impl/Route.java
trunk/net/src/net/org/jnode/net/ipv4/tcp/TCPControlBlock.java
trunk/net/src/net/org/jnode/net/ipv4/tcp/TCPDataBuffer.java
trunk/net/src/net/org/jnode/net/ipv4/tcp/TCPHeader.java
trunk/net/src/net/org/jnode/net/ipv4/tcp/TCPOutChannel.java
trunk/net/src/net/org/jnode/net/ipv4/tcp/TCPProtocol.java
trunk/net/src/net/org/jnode/net/ipv4/tftp/TFTPClient.java
trunk/net/src/net/org/jnode/net/ipv4/tftp/TFTPServer.java
trunk/net/src/net/org/jnode/net/ipv4/udp/UDPProtocol.java
trunk/net/src/net/org/jnode/net/nfs/nfs2/NFS2Client.java
trunk/net/src/net/org/jnode/net/nfs/nfs2/mount/Mount1Client.java
trunk/net/src/net/org/jnode/protocol/nfs/nfs2/NFS2OutputStream.java
Removed Paths:
-------------
trunk/net/src/driver/org/jnode/driver/net/eepro100/EEPRO100Utils.java
Modified: trunk/cli/src/commands/org/jnode/command/archive/TarCommand.java
===================================================================
--- trunk/cli/src/commands/org/jnode/command/archive/TarCommand.java 2012-03-27 15:16:35 UTC (rev 5893)
+++ trunk/cli/src/commands/org/jnode/command/archive/TarCommand.java 2012-03-28 14:03:32 UTC (rev 5894)
@@ -21,19 +21,19 @@
package org.jnode.command.archive;
import java.io.File;
+import java.io.IOException;
import java.io.InputStream;
-import java.io.IOException;
import java.io.OutputStream;
import java.util.ArrayList;
import java.util.Collections;
import java.util.TreeMap;
import java.util.zip.GZIPInputStream;
import java.util.zip.GZIPOutputStream;
+import org.apache.tools.bzip2.CBZip2InputStream;
+import org.apache.tools.bzip2.CBZip2OutputStream;
import org.apache.tools.tar.TarEntry;
import org.apache.tools.tar.TarInputStream;
import org.apache.tools.tar.TarOutputStream;
-import org.apache.tools.bzip2.CBZip2InputStream;
-import org.apache.tools.bzip2.CBZip2OutputStream;
import org.jnode.shell.syntax.Argument;
import org.jnode.shell.syntax.FileArgument;
import org.jnode.shell.syntax.FlagArgument;
@@ -524,7 +524,7 @@
ArrayList<File> list = new ArrayList<File>();
for (File file : files) {
if (entries.containsKey(file.getPath())) {
- etime = entries.get(file.getPath()).longValue();
+ etime = entries.get(file.getPath());
ftime = file.lastModified();
if (etime >= ftime) {
continue;
Modified: trunk/cli/src/commands/org/jnode/command/archive/ZipCommand.java
===================================================================
--- trunk/cli/src/commands/org/jnode/command/archive/ZipCommand.java 2012-03-27 15:16:35 UTC (rev 5893)
+++ trunk/cli/src/commands/org/jnode/command/archive/ZipCommand.java 2012-03-28 14:03:32 UTC (rev 5894)
@@ -21,9 +21,10 @@
package org.jnode.command.archive;
import java.util.ArrayList;
+import java.util.Collections;
import org.jnode.shell.syntax.Argument;
-import org.jnode.shell.syntax.FlagArgument;
import org.jnode.shell.syntax.FileArgument;
+import org.jnode.shell.syntax.FlagArgument;
import org.jnode.shell.syntax.StringArgument;
/**
@@ -104,15 +105,11 @@
}
if (Exclude.isSet()) {
excludes = new ArrayList<String>(Exclude.getValues().length);
- for (String pattern : Exclude.getValues()) {
- excludes.add(pattern);
- }
+ Collections.addAll(excludes, Exclude.getValues());
}
if (Include.isSet()) {
includes = new ArrayList<String>(Include.getValues().length);
- for (String pattern : Include.getValues()) {
- includes.add(pattern);
- }
+ Collections.addAll(includes, Include.getValues());
}
super.execute("zip");
}
Modified: trunk/cli/src/commands/org/jnode/command/argument/NumberListArgument.java
===================================================================
--- trunk/cli/src/commands/org/jnode/command/argument/NumberListArgument.java 2012-03-27 15:16:35 UTC (rev 5893)
+++ trunk/cli/src/commands/org/jnode/command/argument/NumberListArgument.java 2012-03-28 14:03:32 UTC (rev 5894)
@@ -21,13 +21,13 @@
package org.jnode.command.argument;
import java.util.Arrays;
-
import org.jnode.command.util.NumberRange;
-//import org.jnode.driver.console.CompletionInfo;
import org.jnode.shell.CommandLine.Token;
-import org.jnode.shell.syntax.CommandSyntaxException;
import org.jnode.shell.syntax.Argument;
+import org.jnode.shell.syntax.CommandSyntaxException;
+//import org.jnode.driver.console.CompletionInfo;
+
/**
* Captures a list of multiple number ranges.
*
@@ -93,9 +93,7 @@
i++;
}
}
- for (int i = 0; i < (ranges.length - 1); i++) {
- values.add(ranges[i]);
- }
+ values.addAll(Arrays.asList(ranges).subList(0, ranges.length - 1));
return ranges[ranges.length - 1];
}
Modified: trunk/cli/src/commands/org/jnode/command/common/ExprCommand.java
===================================================================
--- trunk/cli/src/commands/org/jnode/command/common/ExprCommand.java 2012-03-27 15:16:35 UTC (rev 5893)
+++ trunk/cli/src/commands/org/jnode/command/common/ExprCommand.java 2012-03-28 14:03:32 UTC (rev 5894)
@@ -24,7 +24,6 @@
import java.util.Arrays;
import java.util.HashSet;
import java.util.Set;
-
import org.jnode.shell.AbstractCommand;
@@ -319,7 +318,7 @@
private int asInteger(Object obj) throws ExprException {
if (obj instanceof Integer) {
- return ((Integer) obj).intValue();
+ return (Integer) obj;
} else {
try {
return Integer.parseInt(obj.toString());
Modified: trunk/cli/src/commands/org/jnode/command/common/TimeCommand.java
===================================================================
--- trunk/cli/src/commands/org/jnode/command/common/TimeCommand.java 2012-03-27 15:16:35 UTC (rev 5893)
+++ trunk/cli/src/commands/org/jnode/command/common/TimeCommand.java 2012-03-28 14:03:32 UTC (rev 5894)
@@ -63,7 +63,7 @@
StringBuilder sb = new StringBuilder(Alias.getValue());
for (String arg : Args.getValues()) {
- sb.append(" ");
+ sb.append(' ');
sb.append(arg);
}
Modified: trunk/cli/src/commands/org/jnode/command/common/UnixTestCommand.java
===================================================================
--- trunk/cli/src/commands/org/jnode/command/common/UnixTestCommand.java 2012-03-27 15:16:35 UTC (rev 5893)
+++ trunk/cli/src/commands/org/jnode/command/common/UnixTestCommand.java 2012-03-28 14:03:32 UTC (rev 5894)
@@ -24,7 +24,6 @@
import java.io.PrintWriter;
import java.util.HashMap;
import java.util.Stack;
-
import org.jnode.shell.AbstractCommand;
import org.jnode.shell.CommandLine;
import org.jnode.shell.syntax.CommandSyntaxException;
@@ -144,7 +143,7 @@
if (obj instanceof Boolean) {
res = obj == Boolean.TRUE;
} else if (obj instanceof Long) {
- res = ((Long) obj).longValue() != 0;
+ res = (Long) obj != 0;
} else {
res = obj.toString().length() > 0;
}
@@ -329,7 +328,7 @@
} else if (option.equals("--version")) {
err.println("JNode test 0.0");
} else {
- throw new CommandSyntaxException("unknown option '" + option + "'");
+ throw new CommandSyntaxException("unknown option '" + option + '\'');
}
}
}
@@ -343,7 +342,7 @@
}
private void pushOperand(long value) {
- operandStack.push(new Long(value));
+ operandStack.push(value);
}
private Object popOperand() throws CommandSyntaxException {
@@ -355,13 +354,13 @@
private long toNumber(Object obj) throws CommandSyntaxException {
if (obj instanceof Long) {
- return ((Long) obj).longValue();
+ return (Long) obj;
} else if (obj instanceof String) {
try {
return Long.parseLong((String) obj);
} catch (NumberFormatException ex) {
throw new CommandSyntaxException(
- "operand is not a number: '" + obj.toString() + "'");
+ "operand is not a number: '" + obj.toString() + '\'');
}
} else {
throw new CommandSyntaxException("subexpression is not an INTEGER");
Modified: trunk/cli/src/commands/org/jnode/command/file/CpCommand.java
===================================================================
--- trunk/cli/src/commands/org/jnode/command/file/CpCommand.java 2012-03-27 15:16:35 UTC (rev 5893)
+++ trunk/cli/src/commands/org/jnode/command/file/CpCommand.java 2012-03-28 14:03:32 UTC (rev 5894)
@@ -28,7 +28,6 @@
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
-
import org.jnode.shell.AbstractCommand;
import org.jnode.shell.syntax.Argument;
import org.jnode.shell.syntax.FileArgument;
@@ -370,7 +369,7 @@
if (line.charAt(0) == 'y' || line.charAt(0) == 'Y') {
return true;
} else if (line.charAt(0) == 'n' || line.charAt(0) == 'N') {
- return vskip("'" + target + "'");
+ return vskip("'" + target + '\'');
}
}
out.print(STR_ASK_AGAIN);
Modified: trunk/cli/src/commands/org/jnode/command/file/CutCommand.java
===================================================================
--- trunk/cli/src/commands/org/jnode/command/file/CutCommand.java 2012-03-27 15:16:35 UTC (rev 5893)
+++ trunk/cli/src/commands/org/jnode/command/file/CutCommand.java 2012-03-28 14:03:32 UTC (rev 5894)
@@ -26,7 +26,6 @@
import java.io.IOException;
import java.io.PrintWriter;
import java.util.List;
-
import org.jnode.command.argument.NumberListArgument;
import org.jnode.command.util.IOUtils;
import org.jnode.command.util.NumberRange;
@@ -157,7 +156,7 @@
boolean first;
int limit, start, end;
for (String line : lines) {
- if (line.indexOf(inDelim) == -1) {
+ if (!line.contains(inDelim)) {
if (!suppress) {
out.write(line);
out.newLine();
Modified: trunk/cli/src/commands/org/jnode/command/file/DirCommand.java
===================================================================
--- trunk/cli/src/commands/org/jnode/command/file/DirCommand.java 2012-03-27 15:16:35 UTC (rev 5893)
+++ trunk/cli/src/commands/org/jnode/command/file/DirCommand.java 2012-03-28 14:03:32 UTC (rev 5894)
@@ -28,7 +28,6 @@
import java.util.Arrays;
import java.util.Comparator;
import java.util.Date;
-
import org.jnode.shell.AbstractCommand;
import org.jnode.shell.syntax.Argument;
import org.jnode.shell.syntax.FileArgument;
@@ -121,7 +120,7 @@
for (int j = 0; j < LEFT_MARGIN + SEPARATOR_SIZE; j++) sb.append(' ');
sb.append(dateFormat.format(lastModified));
sb.append(SEPARATOR);
- sb.append("[");
+ sb.append('[');
sb.append(f.getName());
sb.append(']');
}
Modified: trunk/cli/src/commands/org/jnode/command/file/DuCommand.java
===================================================================
--- trunk/cli/src/commands/org/jnode/command/file/DuCommand.java 2012-03-27 15:16:35 UTC (rev 5893)
+++ trunk/cli/src/commands/org/jnode/command/file/DuCommand.java 2012-03-28 14:03:32 UTC (rev 5894)
@@ -24,9 +24,7 @@
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Stack;
-
import javax.naming.NameNotFoundException;
-
import org.apache.log4j.Logger;
import org.jnode.command.util.AbstractDirectoryWalker;
import org.jnode.driver.Device;
@@ -240,22 +238,22 @@
private void printFileSize(final File filename, final long size) {
if (argAll.isSet()) {
- out.println(sizeToString(size) + "\t" + filename);
+ out.println(sizeToString(size) + '\t' + filename);
}
}
private void printDirSize(final File filename, final long dirSizeOnly, final long subDirSize) {
if (!argSum.isSet()) {
if (argSeperateDirs.isSet()) {
- out.println(sizeToString(dirSizeOnly) + "\t" + filename);
+ out.println(sizeToString(dirSizeOnly) + '\t' + filename);
} else {
- out.println(sizeToString(dirSizeOnly + subDirSize) + "\t" + filename);
+ out.println(sizeToString(dirSizeOnly + subDirSize) + '\t' + filename);
}
}
}
private void printSize(final String filename, final long size) {
- out.println(sizeToString(size) + "\t" + filename);
+ out.println(sizeToString(size) + '\t' + filename);
}
private void log(String message) {
Modified: trunk/cli/src/commands/org/jnode/command/file/FindCommand.java
===================================================================
--- trunk/cli/src/commands/org/jnode/command/file/FindCommand.java 2012-03-27 15:16:35 UTC (rev 5893)
+++ trunk/cli/src/commands/org/jnode/command/file/FindCommand.java 2012-03-28 14:03:32 UTC (rev 5894)
@@ -26,7 +26,6 @@
import java.io.PrintWriter;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
-
import org.jnode.command.util.AbstractDirectoryWalker;
import org.jnode.shell.AbstractCommand;
import org.jnode.shell.syntax.Argument;
@@ -47,7 +46,7 @@
@Override
protected void handleRestrictedFile(File file) throws IOException {
- err.println("Permission denied for \"" + file + "\"");
+ err.println("Permission denied for \"" + file + '"');
}
@Override
Modified: trunk/cli/src/commands/org/jnode/command/file/GrepCommand.java
===================================================================
--- trunk/cli/src/commands/org/jnode/command/file/GrepCommand.java 2012-03-27 15:16:35 UTC (rev 5893)
+++ trunk/cli/src/commands/org/jnode/command/file/GrepCommand.java 2012-03-28 14:03:32 UTC (rev 5894)
@@ -21,22 +21,26 @@
package org.jnode.command.file;
import java.io.BufferedReader;
+import java.io.Closeable;
import java.io.File;
import java.io.FileFilter;
-import java.io.InputStream;
+import java.io.Flushable;
import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
import java.io.LineNumberReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.Reader;
-
-import java.util.regex.Matcher;
+import java.io.Writer;
+import java.util.ArrayDeque;
+import java.util.ArrayList;
+import java.util.Deque;
+import java.util.List;
import java.util.regex.MatchResult;
+import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.regex.PatternSyntaxException;
-import java.util.ArrayList;
-import java.util.List;
-
import org.apache.log4j.Logger;
import org.jnode.command.util.AbstractDirectoryWalker;
import org.jnode.command.util.AbstractDirectoryWalker.PathnamePatternFilter;
@@ -48,13 +52,6 @@
import org.jnode.shell.syntax.IntegerArgument;
import org.jnode.shell.syntax.StringArgument;
-import java.io.Closeable;
-import java.io.Flushable;
-import java.io.Writer;
-import java.io.InputStreamReader;
-import java.util.ArrayDeque;
-import java.util.Deque;
-
/**
* TODO implement Fixed/Basic/Ext matchers
* TODO implement --color (if/when possible)
@@ -680,20 +677,20 @@
if ((prefix & PREFIX_FILE) != 0) {
sb.append(name);
if ((prefix & (PREFIX_LINE | PREFIX_BYTE)) == 0) {
- sb.append("\t");
+ sb.append('\t');
}
sb.append(fieldSep);
}
if ((prefix & PREFIX_LINE) != 0) {
sb.append(padNumber(lineCount, 4));
if ((prefix & PREFIX_BYTE) == 0) {
- sb.append("\t");
+ sb.append('\t');
}
sb.append(fieldSep);
}
if ((prefix & PREFIX_BYTE) != 0) {
sb.append(padNumber(byteCount, 9));
- sb.append("\t");
+ sb.append('\t');
sb.append(fieldSep);
}
} else {
@@ -756,7 +753,7 @@
}
private String padNumber(int n, int size) {
- return String.format("%" + size + "d", n);
+ return String.format("%" + size + 'd', n);
}
/**
Modified: trunk/cli/src/commands/org/jnode/command/file/HexdumpCommand.java
===================================================================
--- trunk/cli/src/commands/org/jnode/command/file/HexdumpCommand.java 2012-03-27 15:16:35 UTC (rev 5893)
+++ trunk/cli/src/commands/org/jnode/command/file/HexdumpCommand.java 2012-03-28 14:03:32 UTC (rev 5894)
@@ -27,7 +27,6 @@
import java.io.InputStream;
import java.io.PrintWriter;
import java.net.URL;
-
import org.jnode.shell.AbstractCommand;
import org.jnode.shell.syntax.Argument;
import org.jnode.shell.syntax.FileArgument;
@@ -112,10 +111,10 @@
sb.append(" ");
}
if ((i + 1) < rowlen) {
- sb.append(" ");
+ sb.append(' ');
}
if ((i + 1) == rowlen / 2) {
- sb.append(" ");
+ sb.append(' ');
}
}
@@ -127,14 +126,14 @@
if ((c >= ' ') && (c < (char) 0x7f)) {
sb.append(c);
} else {
- sb.append(".");
+ sb.append('.');
}
} else {
- sb.append(" ");
+ sb.append(' ');
}
}
- sb.append("|");
+ sb.append('|');
left -= sz;
ofs += sz;
Modified: trunk/cli/src/commands/org/jnode/command/file/SortCommand.java
===================================================================
--- trunk/cli/src/commands/org/jnode/command/file/SortCommand.java 2012-03-27 15:16:35 UTC (rev 5893)
+++ trunk/cli/src/commands/org/jnode/command/file/SortCommand.java 2012-03-28 14:03:32 UTC (rev 5894)
@@ -21,15 +21,14 @@
package org.jnode.command.file;
import java.io.File;
+import java.io.IOException;
import java.io.PrintWriter;
-import java.io.IOException;
+import java.util.ArrayList;
import java.util.Arrays;
-import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
+import java.util.LinkedList;
import java.util.List;
-import java.util.LinkedList;
-
import org.jnode.command.util.IOUtils;
import org.jnode.shell.AbstractCommand;
import org.jnode.shell.CommandLine;
@@ -39,6 +38,7 @@
import org.jnode.shell.syntax.FlagArgument;
import org.jnode.shell.syntax.IntegerArgument;
import org.jnode.shell.syntax.StringArgument;
+
import static org.jnode.shell.syntax.Argument.EXISTING;
import static org.jnode.shell.syntax.Argument.MULTIPLE;
import static org.jnode.shell.syntax.Argument.NONEXISTENT;
@@ -106,7 +106,7 @@
protected FieldRange doAccept(CommandLine.Token token, int flags) throws CommandSyntaxException {
String text = token.text;
FieldRange range = new FieldRange();
- int i = text.indexOf(",");
+ int i = text.indexOf(',');
if (i == -1) {
range.start = parseField(text, false);
range.end = new Field();
@@ -165,7 +165,7 @@
i--;
}
text = text.substring(0, i + 1);
- i = text.indexOf(".");
+ i = text.indexOf('.');
if (i == 0) {
throw new CommandSyntaxException("Field offset cannot be empty");
}
Modified: trunk/cli/src/commands/org/jnode/command/file/WcCommand.java
===================================================================
--- trunk/cli/src/commands/org/jnode/command/file/WcCommand.java 2012-03-27 15:16:35 UTC (rev 5893)
+++ trunk/cli/src/commands/org/jnode/command/file/WcCommand.java 2012-03-28 14:03:32 UTC (rev 5894)
@@ -28,7 +28,6 @@
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.List;
-
import org.jnode.shell.AbstractCommand;
import org.jnode.shell.syntax.Argument;
import org.jnode.shell.syntax.FileArgument;
@@ -126,13 +125,13 @@
private void checkFile(File file) {
if (!file.exists()) {
- getError().getPrintWriter().println(STR_ERROR_NOT_EXIST + " " + file.getAbsolutePath());
+ getError().getPrintWriter().println(STR_ERROR_NOT_EXIST + ' ' + file.getAbsolutePath());
exit(1);
} else if (file.isDirectory()) {
- getError().getPrintWriter().println(STR_ERROR_DIR + " " + file.getAbsolutePath());
+ getError().getPrintWriter().println(STR_ERROR_DIR + ' ' + file.getAbsolutePath());
exit(1);
} else if (!file.canRead()) {
- getError().getPrintWriter().println(STR_ERROR_CANT_READ + " " + file.getAbsolutePath());
+ getError().getPrintWriter().println(STR_ERROR_CANT_READ + ' ' + file.getAbsolutePath());
exit(1);
}
}
@@ -191,7 +190,7 @@
printLine(printWriter, paddingSize, wc.getLinesCount(), wc.getWordsCount(), wc.getCharsCount(), wc
.getBytesRead(), wc.getMaxCharsInLine());
if (wc.getFileName() != null) {
- printWriter.print(" " + wc.getFileName());
+ printWriter.print(' ' + wc.getFileName());
}
printWriter.println();
}
@@ -199,7 +198,7 @@
if (listWc.size() > 1) {
printLine(printWriter, paddingSize, totalLinesCount, totalWordsCount, totalCharsCount, totalBytesRead,
maxCharsInLine);
- printWriter.println(" " + STR_TOTAL);
+ printWriter.println(' ' + STR_TOTAL);
}
printWriter.flush();
}
@@ -253,10 +252,10 @@
sValue.append(value);
while (sValue.length() < paddingSize) {
- sValue.insert(0, " ");
+ sValue.insert(0, ' ');
}
if (!first) {
- sValue.insert(0, " ");
+ sValue.insert(0, ' ');
}
printWriter.print(sValue);
}
Modified: trunk/cli/src/commands/org/jnode/command/net/NetstatCommand.java
===================================================================
--- trunk/cli/src/commands/org/jnode/command/net/NetstatCommand.java 2012-03-27 15:16:35 UTC (rev 5893)
+++ trunk/cli/src/commands/org/jnode/command/net/NetstatCommand.java 2012-03-28 14:03:32 UTC (rev 5894)
@@ -21,7 +21,6 @@
package org.jnode.command.net;
import java.io.PrintWriter;
-
import org.jnode.driver.net.NetworkException;
import org.jnode.net.NetworkLayer;
import org.jnode.net.NetworkLayerManager;
@@ -83,7 +82,7 @@
int width = 0;
for (int i = 0; i < list.length; i++) {
final Statistic st = list[i];
- String msg = st.getName() + " " + st.getValue();
+ String msg = st.getName() + ' ' + st.getValue();
if (i + 1 < list.length) {
msg = msg + ", ";
}
Modified: trunk/cli/src/commands/org/jnode/command/net/RpcInfoCommand.java
===================================================================
--- trunk/cli/src/commands/org/jnode/command/net/RpcInfoCommand.java 2012-03-27 15:16:35 UTC (rev 5893)
+++ trunk/cli/src/commands/org/jnode/command/net/RpcInfoCommand.java 2012-03-28 14:03:32 UTC (rev 5894)
@@ -24,7 +24,6 @@
import java.io.PrintWriter;
import java.net.InetAddress;
import java.net.UnknownHostException;
-
import org.acplt.oncrpc.OncRpcException;
import org.acplt.oncrpc.OncRpcPortmapClient;
import org.acplt.oncrpc.OncRpcProtocols;
@@ -87,11 +86,10 @@
out.printf(fmt_list_serv, str_program, str_version, str_protocol, str_port, str_name);
out.println();
- for (int i = 0; i < servers.length; i++) {
- OncRpcServerIdent server = servers[i];
- out.printf(fmt_list_serv, server.program, server.version,
- server.protocol == 6 ? str_tcp : str_udp,
- server.port, getName(server.program));
+ for (OncRpcServerIdent server : servers) {
+ out.printf(fmt_list_serv, server.program, server.version,
+ server.protocol == 6 ? str_tcp : str_udp,
+ server.port, getName(server.program));
out.println();
}
} catch (OncRpcException e) {
Modified: trunk/cli/src/commands/org/jnode/command/system/BindKeysCommand.java
===================================================================
--- trunk/cli/src/commands/org/jnode/command/system/BindKeysCommand.java 2012-03-27 15:16:35 UTC (rev 5893)
+++ trunk/cli/src/commands/org/jnode/command/system/BindKeysCommand.java 2012-03-28 14:03:32 UTC (rev 5894)
@@ -29,7 +29,6 @@
import java.util.HashMap;
import java.util.List;
import java.util.Map;
-
import org.jnode.driver.console.Console;
import org.jnode.driver.console.KeyEventBindings;
import org.jnode.driver.console.TextConsole;
@@ -37,8 +36,8 @@
import org.jnode.driver.console.textscreen.ConsoleKeyEventBindings;
import org.jnode.driver.console.textscreen.KeyboardReaderAction;
import org.jnode.shell.AbstractCommand;
+import org.jnode.shell.CommandLine.Token;
import org.jnode.shell.ShellUtils;
-import org.jnode.shell.CommandLine.Token;
import org.jnode.shell.syntax.Argument;
import org.jnode.shell.syntax.CommandSyntaxException;
import org.jnode.shell.syntax.EnumArgument;
@@ -84,7 +83,7 @@
field.getName().startsWith("VK_")) {
try {
Integer vk = (Integer) field.get(null);
- String name = constCase(KeyEvent.getKeyText(vk.intValue()));
+ String name = constCase(KeyEvent.getKeyText(vk));
VK_NAME_MAP.put(name, vk);
VK_MAP.put(vk, name);
} catch (IllegalAccessException ex) {
@@ -432,7 +431,11 @@
} else if (ch < '\177') {
sb.append('\'').append(ch).append('\'');
} else {
- sb.append('\'').append(ch).append("' (0x" + Integer.toHexString(ch)).append(')');
+ sb.append('\'');
+ sb.append(ch);
+ ...
[truncated message content] |
|
From: <ga...@us...> - 2012-04-19 12:57:22
|
Revision: 5896
http://jnode.svn.sourceforge.net/jnode/?rev=5896&view=rev
Author: galatnm
Date: 2012-04-19 12:57:10 +0000 (Thu, 19 Apr 2012)
Log Message:
-----------
Network code clean-up.
Modified Paths:
--------------
trunk/core/src/core/org/jnode/plugin/manager/DefaultPluginManager.java
trunk/core/src/core/org/jnode/plugin/model/ConfigurationElementModel.java
trunk/core/src/core/org/jnode/plugin/model/ExtensionModel.java
trunk/core/src/core/org/jnode/plugin/model/LibraryModel.java
trunk/core/src/core/org/jnode/plugin/model/PluginDescriptorModel.java
trunk/core/src/core/org/jnode/plugin/model/PluginRegistryModel.java
trunk/core/src/core/org/jnode/plugin/model/RuntimeModel.java
trunk/core/src/core/org/jnode/vm/VmStackReader.java
trunk/core/src/core/org/jnode/vm/bytecode/BasicBlockFinder.java
trunk/core/src/core/org/jnode/vm/bytecode/DeadBlockFinder.java
trunk/core/src/core/org/jnode/vm/classmgr/ClassDecoder.java
trunk/core/src/core/org/jnode/vm/classmgr/SelectorMap.java
trunk/core/src/core/org/jnode/vm/classmgr/Signature.java
trunk/core/src/core/org/jnode/vm/classmgr/TIBBuilder.java
trunk/core/src/core/org/jnode/vm/classmgr/VmAnnotation.java
trunk/core/src/core/org/jnode/vm/compiler/ir/IRBasicBlockFinder.java
trunk/core/src/core/org/jnode/vm/compiler/ir/IRControlFlowGraph.java
trunk/core/src/core/org/jnode/vm/compiler/ir/IRTest.java
trunk/core/src/core/org/jnode/vm/compiler/ir/NativeTest.java
trunk/core/src/core/org/jnode/vm/facade/VmUtils.java
trunk/core/src/core/org/jnode/vm/isolate/VmIsolate.java
trunk/core/src/core/org/jnode/vm/x86/VmX86Architecture.java
trunk/net/src/net/org/jnode/net/NetworkLayerHeader.java
trunk/net/src/net/org/jnode/net/arp/ARPHeader.java
trunk/net/src/net/org/jnode/net/ipv4/tcp/TCPHeader.java
Modified: trunk/core/src/core/org/jnode/plugin/manager/DefaultPluginManager.java
===================================================================
--- trunk/core/src/core/org/jnode/plugin/manager/DefaultPluginManager.java 2012-03-28 14:33:09 UTC (rev 5895)
+++ trunk/core/src/core/org/jnode/plugin/manager/DefaultPluginManager.java 2012-04-19 12:57:10 UTC (rev 5896)
@@ -21,7 +21,6 @@
package org.jnode.plugin.manager;
import gnu.java.security.action.GetPropertyAction;
-
import java.security.AccessController;
import java.util.ArrayList;
import java.util.Collections;
@@ -32,9 +31,7 @@
import java.util.List;
import java.util.Map;
import java.util.Set;
-
import javax.naming.NamingException;
-
import org.jnode.bootlog.BootLogInstance;
import org.jnode.naming.InitialNaming;
import org.jnode.permission.JNodePermission;
@@ -294,8 +291,7 @@
}
}
final PluginPrerequisite[] prereq = descr.getPrerequisites();
- for (int i = 0; i < prereq.length; i++) {
- final PluginPrerequisite pr = prereq[i];
+ for (final PluginPrerequisite pr : prereq) {
if (!nameSet.contains(pr.getPluginId())) {
//Syslog.debug("Not in set: " + pr.getPluginId());
return false;
@@ -312,8 +308,7 @@
*/
private boolean prerequisitesExist(PluginDescriptor descr, Map<String, PluginDescriptor> all) {
final PluginPrerequisite[] prereq = descr.getPrerequisites();
- for (int i = 0; i < prereq.length; i++) {
- final PluginPrerequisite pr = prereq[i];
+ for (final PluginPrerequisite pr : prereq) {
if (!all.containsKey(pr.getPluginId())) {
return false;
}
Modified: trunk/core/src/core/org/jnode/plugin/model/ConfigurationElementModel.java
===================================================================
--- trunk/core/src/core/org/jnode/plugin/model/ConfigurationElementModel.java 2012-03-28 14:33:09 UTC (rev 5895)
+++ trunk/core/src/core/org/jnode/plugin/model/ConfigurationElementModel.java 2012-04-19 12:57:10 UTC (rev 5896)
@@ -22,7 +22,6 @@
import java.util.ArrayList;
import java.util.HashSet;
-import java.util.Iterator;
import java.util.Set;
import org.jnode.nanoxml.XMLElement;
import org.jnode.plugin.ConfigurationElement;
@@ -64,8 +63,7 @@
}
final ArrayList<ConfigurationElementModel> list = new ArrayList<ConfigurationElementModel>();
- for (Iterator<?> i = e.getChildren().iterator(); i.hasNext();) {
- final XMLElement ce = (XMLElement) i.next();
+ for (final XMLElement ce : e.getChildren()) {
list.add(new ConfigurationElementModel(plugin, ce));
}
elements = (ConfigurationElement[]) list.toArray(new ConfigurationElement[list.size()]);
Modified: trunk/core/src/core/org/jnode/plugin/model/ExtensionModel.java
===================================================================
--- trunk/core/src/core/org/jnode/plugin/model/ExtensionModel.java 2012-03-28 14:33:09 UTC (rev 5895)
+++ trunk/core/src/core/org/jnode/plugin/model/ExtensionModel.java 2012-04-19 12:57:10 UTC (rev 5896)
@@ -21,7 +21,6 @@
package org.jnode.plugin.model;
import java.util.ArrayList;
-import java.util.Iterator;
import org.jnode.nanoxml.XMLElement;
import org.jnode.plugin.ConfigurationElement;
import org.jnode.plugin.Extension;
@@ -49,8 +48,7 @@
id = getAttribute(e, "id", false);
final ArrayList<ConfigurationElementModel> list = new ArrayList<ConfigurationElementModel>();
- for (Iterator<?> i = e.getChildren().iterator(); i.hasNext();) {
- final XMLElement ce = (XMLElement) i.next();
+ for (final XMLElement ce : e.getChildren()) {
list.add(new ConfigurationElementModel(plugin, ce));
}
elements = (ConfigurationElement[]) list.toArray(new ConfigurationElement[list.size()]);
Modified: trunk/core/src/core/org/jnode/plugin/model/LibraryModel.java
===================================================================
--- trunk/core/src/core/org/jnode/plugin/model/LibraryModel.java 2012-03-28 14:33:09 UTC (rev 5895)
+++ trunk/core/src/core/org/jnode/plugin/model/LibraryModel.java 2012-04-19 12:57:10 UTC (rev 5896)
@@ -21,7 +21,6 @@
package org.jnode.plugin.model;
import java.util.ArrayList;
-import java.util.Iterator;
import org.jnode.nanoxml.XMLElement;
import org.jnode.plugin.Library;
import org.jnode.plugin.PluginException;
@@ -44,8 +43,7 @@
type = getAttribute(e, "type", false);
final ArrayList<String> list = new ArrayList<String>();
- for (Iterator<?> i = e.getChildren().iterator(); i.hasNext();) {
- final XMLElement exE = (XMLElement) i.next();
+ for (final XMLElement exE : e.getChildren()) {
if (exE.getName().equals("export")) {
list.add(getAttribute(exE, "name", true));
}
Modified: trunk/core/src/core/org/jnode/plugin/model/PluginDescriptorModel.java
===================================================================
--- trunk/core/src/core/org/jnode/plugin/model/PluginDescriptorModel.java 2012-03-28 14:33:09 UTC (rev 5895)
+++ trunk/core/src/core/org/jnode/plugin/model/PluginDescriptorModel.java 2012-04-19 12:57:10 UTC (rev 5896)
@@ -27,7 +27,6 @@
import java.security.PrivilegedActionException;
import java.security.PrivilegedExceptionAction;
import java.util.ArrayList;
-import java.util.Iterator;
import java.util.List;
import org.jnode.bootlog.BootLogInstance;
import org.jnode.nanoxml.XMLElement;
@@ -143,8 +142,7 @@
initializeRequiresList(reqList, e);
- for (Iterator<?> ci = e.getChildren().iterator(); ci.hasNext();) {
- final XMLElement childE = (XMLElement) ci.next();
+ for (final XMLElement childE : e.getChildren()) {
final String tag = childE.getName();
if (tag.equals("extension-point")) {
final ExtensionPointModel ep = new ExtensionPointModel(this,
@@ -154,9 +152,7 @@
// registry.registerExtensionPoint(ep);
// }
} else if (tag.equals("requires")) {
- for (Iterator<?> i = childE.getChildren().iterator(); i
- .hasNext();) {
- final XMLElement impE = (XMLElement) i.next();
+ for (final XMLElement impE : childE.getChildren()) {
if (impE.getName().equals("import")) {
reqList.add(new PluginPrerequisiteModel(this, impE));
} else {
@@ -631,18 +627,18 @@
// BootLogInstance.get().info("Resolve " + id);
this.registry = registry;
registry.registerPlugin(this);
- for (int i = 0; i < extensionPoints.length; i++) {
- extensionPoints[i].resolve(registry);
+ for (ExtensionPointModel extensionPoint : extensionPoints) {
+ extensionPoint.resolve(registry);
}
- for (int i = 0; i < requires.length; i++) {
- requires[i].resolve(registry);
+ for (PluginPrerequisiteModel require : requires) {
+ require.resolve(registry);
}
if (runtime != null) {
runtime.resolve(registry);
}
resolved = true;
- for (int i = 0; i < extensions.length; i++) {
- extensions[i].resolve(registry);
+ for (ExtensionModel extension : extensions) {
+ extension.resolve(registry);
}
}
}
@@ -742,14 +738,14 @@
if (runtime != null) {
runtime.unresolve(registry);
}
- for (int i = 0; i < requires.length; i++) {
- requires[i].unresolve(registry);
+ for (PluginPrerequisiteModel require : requires) {
+ require.unresolve(registry);
}
- for (int i = 0; i < extensionPoints.length; i++) {
- extensionPoints[i].unresolve(registry);
+ for (ExtensionPointModel extensionPoint : extensionPoints) {
+ extensionPoint.unresolve(registry);
}
- for (int i = 0; i < extensions.length; i++) {
- extensions[i].unresolve(registry);
+ for (ExtensionModel extension : extensions) {
+ extension.unresolve(registry);
}
registry.unregisterPlugin(this);
resolved = false;
Modified: trunk/core/src/core/org/jnode/plugin/model/PluginRegistryModel.java
===================================================================
--- trunk/core/src/core/org/jnode/plugin/model/PluginRegistryModel.java 2012-03-28 14:33:09 UTC (rev 5895)
+++ trunk/core/src/core/org/jnode/plugin/model/PluginRegistryModel.java 2012-04-19 12:57:10 UTC (rev 5896)
@@ -128,9 +128,8 @@
* Resolve all plugin descriptors.
*/
public void resolveDescriptors() throws PluginException {
- for (Iterator<PluginDescriptor> i = descriptorMap.values().iterator(); i.hasNext();) {
- final PluginDescriptorModel descr = (PluginDescriptorModel) i
- .next();
+ for (PluginDescriptor pluginDescriptor : descriptorMap.values()) {
+ final PluginDescriptorModel descr = (PluginDescriptorModel) pluginDescriptor;
descr.resolve(this);
}
}
Modified: trunk/core/src/core/org/jnode/plugin/model/RuntimeModel.java
===================================================================
--- trunk/core/src/core/org/jnode/plugin/model/RuntimeModel.java 2012-03-28 14:33:09 UTC (rev 5895)
+++ trunk/core/src/core/org/jnode/plugin/model/RuntimeModel.java 2012-04-19 12:57:10 UTC (rev 5896)
@@ -21,7 +21,6 @@
package org.jnode.plugin.model;
import java.util.ArrayList;
-import java.util.Iterator;
import org.jnode.nanoxml.XMLElement;
import org.jnode.plugin.Library;
import org.jnode.plugin.PluginException;
@@ -41,8 +40,7 @@
super(plugin);
final ArrayList<LibraryModel> list = new ArrayList<LibraryModel>();
- for (Iterator<?> i = e.getChildren().iterator(); i.hasNext();) {
- final XMLElement lE = (XMLElement) i.next();
+ for (final XMLElement lE : e.getChildren()) {
if (lE.getName().equals("library")) {
list.add(new LibraryModel(plugin, lE));
}
@@ -65,8 +63,8 @@
* @throws PluginException
*/
protected void resolve(PluginRegistryModel registry) throws PluginException {
- for (int i = 0; i < libraries.length; i++) {
- libraries[i].resolve(registry);
+ for (LibraryModel library : libraries) {
+ library.resolve(registry);
}
}
@@ -76,8 +74,8 @@
* @throws PluginException
*/
protected void unresolve(PluginRegistryModel registry) throws PluginException {
- for (int i = 0; i < libraries.length; i++) {
- libraries[i].unresolve(registry);
+ for (LibraryModel library : libraries) {
+ library.unresolve(registry);
}
}
}
Modified: trunk/core/src/core/org/jnode/vm/VmStackReader.java
===================================================================
--- trunk/core/src/core/org/jnode/vm/VmStackReader.java 2012-03-28 14:33:09 UTC (rev 5895)
+++ trunk/core/src/core/org/jnode/vm/VmStackReader.java 2012-04-19 12:57:10 UTC (rev 5896)
@@ -238,8 +238,8 @@
Unsafe.debug("Debug stacktrace:<no stack trace>\n");
} else {
Unsafe.debug("Debug stacktrace: ");
- for (int i = 0; i < frames.length; i++) {
- final VmStackFrame s = (VmStackFrame) frames[i];
+ for (VmStackFrame frame : frames) {
+ final VmStackFrame s = (VmStackFrame) frame;
Unsafe.debug(s.getMethod().getDeclaringClass().getName());
Unsafe.debug("::");
Unsafe.debug(s.getMethod().getName());
Modified: trunk/core/src/core/org/jnode/vm/bytecode/BasicBlockFinder.java
===================================================================
--- trunk/core/src/core/org/jnode/vm/bytecode/BasicBlockFinder.java 2012-03-28 14:33:09 UTC (rev 5895)
+++ trunk/core/src/core/org/jnode/vm/bytecode/BasicBlockFinder.java 2012-04-19 12:57:10 UTC (rev 5896)
@@ -296,9 +296,9 @@
*/
public void visit_tableswitch(int defValue, int lowValue, int highValue, int[] addresses) {
tstack.pop(JvmType.INT);
- for (int i = 0; i < addresses.length; i++) {
- addBranch(addresses[i], true);
- condYieldPoint(addresses[i]);
+ for (int address : addresses) {
+ addBranch(address, true);
+ condYieldPoint(address);
}
addBranch(defValue, false);
condYieldPoint(defValue);
@@ -312,9 +312,9 @@
*/
public void visit_lookupswitch(int defValue, int[] matchValues, int[] addresses) {
tstack.pop(JvmType.INT);
- for (int i = 0; i < addresses.length; i++) {
- addBranch(addresses[i], true);
- condYieldPoint(addresses[i]);
+ for (int address : addresses) {
+ addBranch(address, true);
+ condYieldPoint(address);
}
addBranch(defValue, false);
condYieldPoint(defValue);
Modified: trunk/core/src/core/org/jnode/vm/bytecode/DeadBlockFinder.java
===================================================================
--- trunk/core/src/core/org/jnode/vm/bytecode/DeadBlockFinder.java 2012-03-28 14:33:09 UTC (rev 5895)
+++ trunk/core/src/core/org/jnode/vm/bytecode/DeadBlockFinder.java 2012-04-19 12:57:10 UTC (rev 5896)
@@ -21,7 +21,6 @@
package org.jnode.vm.bytecode;
import java.util.TreeMap;
-
import org.jnode.bootlog.BootLogInstance;
import org.jnode.vm.JvmType;
import org.jnode.vm.classmgr.VmByteCode;
@@ -334,9 +333,9 @@
* @see BytecodeVisitor#visit_tableswitch(int, int, int, int[])
*/
public void visit_tableswitch(int defValue, int lowValue, int highValue, int[] addresses) {
- for (int i = 0; i < addresses.length; i++) {
- addBranch(addresses[i], true);
- condYieldPoint(addresses[i]);
+ for (int address : addresses) {
+ addBranch(address, true);
+ condYieldPoint(address);
}
addBranch(defValue, false);
condYieldPoint(defValue);
@@ -349,9 +348,9 @@
* @see BytecodeVisitor#visit_lookupswitch(int, int[], int[])
*/
public void visit_lookupswitch(int defValue, int[] matchValues, int[] addresses) {
- for (int i = 0; i < addresses.length; i++) {
- addBranch(addresses[i], true);
- condYieldPoint(addresses[i]);
+ for (int address : addresses) {
+ addBranch(address, true);
+ condYieldPoint(address);
}
addBranch(defValue, false);
condYieldPoint(defValue);
Modified: trunk/core/src/core/org/jnode/vm/classmgr/ClassDecoder.java
===================================================================
--- trunk/core/src/core/org/jnode/vm/classmgr/ClassDecoder.java 2012-03-28 14:33:09 UTC (rev 5895)
+++ trunk/core/src/core/org/jnode/vm/classmgr/ClassDecoder.java 2012-04-19 12:57:10 UTC (rev 5896)
@@ -1271,9 +1271,9 @@
final int tag = data.get() & 0xFF;
switch (tag) {
case 'B':
- return Byte.valueOf((byte) cp.getInt(data.getChar()));
+ return (byte) cp.getInt(data.getChar());
case 'C':
- return Character.valueOf((char) cp.getInt(data.getChar()));
+ return (char) cp.getInt(data.getChar());
case 'D':
return cp.getDouble(data.getChar());
case 'F':
@@ -1283,9 +1283,9 @@
case 'J':
return cp.getLong(data.getChar());
case 'S':
- return Short.valueOf((short) cp.getInt(data.getChar()));
+ return (short) cp.getInt(data.getChar());
case 'Z':
- return Boolean.valueOf(cp.getInt(data.getChar()) != 0);
+ return cp.getInt(data.getChar()) != 0;
case 's':
return cp.getAny(data.getChar());
case 'e': // enum
Modified: trunk/core/src/core/org/jnode/vm/classmgr/SelectorMap.java
===================================================================
--- trunk/core/src/core/org/jnode/vm/classmgr/SelectorMap.java 2012-03-28 14:33:09 UTC (rev 5895)
+++ trunk/core/src/core/org/jnode/vm/classmgr/SelectorMap.java 2012-04-19 12:57:10 UTC (rev 5896)
@@ -46,7 +46,7 @@
final String id = InternString.internString(name + '#' + signature);
final Integer selector = (Integer) map.get(id);
if (selector != null) {
- return selector.intValue();
+ return selector;
} else {
return getNew(id);
}
@@ -62,7 +62,7 @@
private synchronized int getNew(String id) {
Integer selector = (Integer) map.get(id);
if (selector != null) {
- return selector.intValue();
+ return selector;
} else {
final int sel = ++lastSelector;
map.put(id, sel);
Modified: trunk/core/src/core/org/jnode/vm/classmgr/Signature.java
===================================================================
--- trunk/core/src/core/org/jnode/vm/classmgr/Signature.java 2012-03-28 14:33:09 UTC (rev 5895)
+++ trunk/core/src/core/org/jnode/vm/classmgr/Signature.java 2012-04-19 12:57:10 UTC (rev 5896)
@@ -330,8 +330,8 @@
StringBuilder b = new StringBuilder();
b.append('(');
if (argTypes != null) {
- for (int i = 0; i < argTypes.length; i++) {
- b.append(toSignature(argTypes[i]));
+ for (Class argType : argTypes) {
+ b.append(toSignature(argType));
}
}
b.append(')');
@@ -393,8 +393,8 @@
StringBuilder b = new StringBuilder();
b.append('(');
if (argTypes != null) {
- for (int i = 0; i < argTypes.length; i++) {
- b.append(toSignature(argTypes[i]));
+ for (VmType argType : argTypes) {
+ b.append(toSignature(argType));
}
}
b.append(')');
Modified: trunk/core/src/core/org/jnode/vm/classmgr/TIBBuilder.java
===================================================================
--- trunk/core/src/core/org/jnode/vm/classmgr/TIBBuilder.java 2012-03-28 14:33:09 UTC (rev 5895)
+++ trunk/core/src/core/org/jnode/vm/classmgr/TIBBuilder.java 2012-04-19 12:57:10 UTC (rev 5896)
@@ -20,9 +20,9 @@
package org.jnode.vm.classmgr;
+import gnu.java.lang.VMClassHelper;
import java.util.ArrayList;
import java.util.HashMap;
-import gnu.java.lang.VMClassHelper;
/**
* @author epr
@@ -137,7 +137,7 @@
// skip index 0
final Object idx = nameSignature2Index.get(getNameSignature(name, signature));
if (idx != null) {
- return ((Integer) idx).intValue();
+ return (Integer) idx;
} else {
return -1;
}
Modified: trunk/core/src/core/org/jnode/vm/classmgr/VmAnnotation.java
===================================================================
--- trunk/core/src/core/org/jnode/vm/classmgr/VmAnnotation.java 2012-03-28 14:33:09 UTC (rev 5895)
+++ trunk/core/src/core/org/jnode/vm/classmgr/VmAnnotation.java 2012-04-19 12:57:10 UTC (rev 5896)
@@ -27,9 +27,7 @@
import java.util.HashMap;
import java.util.Map;
import java.util.Set;
-
import org.jnode.vm.objects.VmSystemObject;
-
import sun.reflect.annotation.AnnotationParser;
/**
@@ -114,8 +112,8 @@
}
- for (int i = 0; i < values.length; i++) {
- vmap.put(values[i].name, values[i].value);
+ for (ElementValue value1 : values) {
+ vmap.put(value1.name, value1.value);
}
Set<Map.Entry> set = vmap.entrySet();
Modified: trunk/core/src/core/org/jnode/vm/compiler/ir/IRBasicBlockFinder.java
===================================================================
--- trunk/core/src/core/org/jnode/vm/compiler/ir/IRBasicBlockFinder.java 2012-03-28 14:33:09 UTC (rev 5895)
+++ trunk/core/src/core/org/jnode/vm/compiler/ir/IRBasicBlockFinder.java 2012-04-19 12:57:10 UTC (rev 5896)
@@ -25,7 +25,6 @@
import java.util.Comparator;
import java.util.HashMap;
import java.util.Map;
-
import org.jnode.vm.bytecode.BytecodeFlags;
import org.jnode.vm.bytecode.BytecodeVisitorSupport;
import org.jnode.vm.classmgr.VmByteCode;
@@ -212,18 +211,18 @@
}
public void visit_tableswitch(int defValue, int lowValue, int highValue, int[] addresses) {
- for (int i = 0; i < addresses.length; i++) {
+ for (int address : addresses) {
// Next block could be successor, e.g. switch could fall through
- addBranch(addresses[i], CONDITIONAL_BRANCH);
+ addBranch(address, CONDITIONAL_BRANCH);
}
// Same for default case
addBranch(defValue, CONDITIONAL_BRANCH);
}
public void visit_lookupswitch(int defValue, int[] matchValues, int[] addresses) {
- for (int i = 0; i < addresses.length; i++) {
+ for (int address : addresses) {
// Next block could be successor, e.g. switch could fall through
- addBranch(addresses[i], CONDITIONAL_BRANCH);
+ addBranch(address, CONDITIONAL_BRANCH);
}
// Same for default case
addBranch(defValue, CONDITIONAL_BRANCH);
@@ -278,7 +277,7 @@
private final void addBranch(int target, byte flags) {
IRBasicBlock pred = this.currentBlock;
IRBasicBlock succ = startBB(target);
- branchTargets.put(new Integer(getInstructionAddress()), new Integer(target));
+ branchTargets.put(getInstructionAddress(), target);
endBB(flags);
}
Modified: trunk/core/src/core/org/jnode/vm/compiler/ir/IRControlFlowGraph.java
===================================================================
--- trunk/core/src/core/org/jnode/vm/compiler/ir/IRControlFlowGraph.java 2012-03-28 14:33:09 UTC (rev 5895)
+++ trunk/core/src/core/org/jnode/vm/compiler/ir/IRControlFlowGraph.java 2012-04-19 12:57:10 UTC (rev 5896)
@@ -250,8 +250,7 @@
public void deconstrucSSA() {
final List<PhiAssignQuad<T>> phiQuads = new BootableArrayList<PhiAssignQuad<T>>();
- for (int i = 0; i < bblocks.length; i += 1) {
- IRBasicBlock<T> b = bblocks[i];
+ for (IRBasicBlock<T> b : bblocks) {
for (Quad<T> q : b.getQuads()) {
if (q instanceof PhiAssignQuad) {
phiQuads.add((PhiAssignQuad<T>) q);
@@ -261,8 +260,7 @@
}
}
int n = phiQuads.size();
- for (int i = 0; i < n; i += 1) {
- PhiAssignQuad<T> paq = phiQuads.get(i);
+ for (PhiAssignQuad<T> paq : phiQuads) {
Variable<T> lhs = paq.getLHS();
IRBasicBlock<T> firstBlock = null;
VariableRefAssignQuad<T> firstPhiMove = null;
@@ -411,9 +409,9 @@
sb.append(bb.toString());
sb.append(":\n predecessors:");
final List<IRBasicBlock<T>> pred = bb.getPredecessors();
- for (int i = 0; i < pred.size(); i += 1) {
+ for (IRBasicBlock<T> aPred : pred) {
sb.append("\n ");
- sb.append(pred.get(i).toString());
+ sb.append(aPred.toString());
}
sb.append("\n successors:");
for (IRBasicBlock<T> succ : bb.getSuccessors()) {
Modified: trunk/core/src/core/org/jnode/vm/compiler/ir/IRTest.java
===================================================================
--- trunk/core/src/core/org/jnode/vm/compiler/ir/IRTest.java 2012-03-28 14:33:09 UTC (rev 5895)
+++ trunk/core/src/core/org/jnode/vm/compiler/ir/IRTest.java 2012-04-19 12:57:10 UTC (rev 5896)
@@ -27,7 +27,6 @@
import java.net.MalformedURLException;
import java.util.Collection;
import java.util.Map;
-
import org.jnode.assembler.x86.X86Assembler;
import org.jnode.assembler.x86.X86BinaryAssembler;
import org.jnode.assembler.x86.X86Constants;
@@ -263,8 +262,8 @@
System.out.print(" ");
Variable[] vars = quad.getBasicBlock().getVariables();
System.out.print("[");
- for (int j = 0; j < vars.length; j += 1) {
- System.out.print(vars[j]);
+ for (Variable var : vars) {
+ System.out.print(var);
System.out.print(",");
}
System.out.print("] ");
Modified: trunk/core/src/core/org/jnode/vm/compiler/ir/NativeTest.java
===================================================================
--- trunk/core/src/core/org/jnode/vm/compiler/ir/NativeTest.java 2012-03-28 14:33:09 UTC (rev 5895)
+++ trunk/core/src/core/org/jnode/vm/compiler/ir/NativeTest.java 2012-04-19 12:57:10 UTC (rev 5896)
@@ -243,8 +243,8 @@
System.out.print(" ");
Variable[] vars = quad.getBasicBlock().getVariables();
System.out.print("[");
- for (int j = 0; j < vars.length; j += 1) {
- System.out.print(vars[j]);
+ for (Variable var : vars) {
+ System.out.print(var);
System.out.print(",");
}
System.out.print("] ");
Modified: trunk/core/src/core/org/jnode/vm/facade/VmUtils.java
===================================================================
--- trunk/core/src/core/org/jnode/vm/facade/VmUtils.java 2012-03-28 14:33:09 UTC (rev 5895)
+++ trunk/core/src/core/org/jnode/vm/facade/VmUtils.java 2012-04-19 12:57:10 UTC (rev 5896)
@@ -21,9 +21,7 @@
package org.jnode.vm.facade;
import gnu.java.lang.VMClassHelper;
-
import java.io.PrintWriter;
-
import org.jnode.annotation.Inline;
import org.jnode.annotation.KernelSpace;
import org.jnode.annotation.NoInline;
@@ -69,7 +67,7 @@
allowNatives |= className.equals("org.jnode.vm." + architectureName + ".Unsafe"
+ architectureName.toUpperCase());
*/
- allowNatives |= className.indexOf("org.jnode.vm.") > -1 && className.indexOf(".Unsafe") > -1;
+ allowNatives |= className.contains("org.jnode.vm.") && className.contains(".Unsafe");
return allowNatives;
}
@@ -188,8 +186,8 @@
*/
public static void dumpStatistics(PrintWriter out) {
final Statistic[] stats = VM_INSTANCE.getStatistics();
- for (int i = 0; i < stats.length; i++) {
- out.println(stats[i]);
+ for (Statistic stat : stats) {
+ out.println(stat);
}
}
@@ -198,8 +196,7 @@
*/
public static void resetCounters() {
final Statistic[] stats = VM_INSTANCE.getStatistics();
- for (int i = 0; i < stats.length; i++) {
- final Statistic s = stats[i];
+ for (final Statistic s : stats) {
if (s instanceof Counter) {
((Counter) s).reset();
}
Modified: trunk/core/src/core/org/jnode/vm/isolate/VmIsolate.java
===================================================================
--- trunk/core/src/core/org/jnode/vm/isolate/VmIsolate.java 2012-03-28 14:33:09 UTC (rev 5895)
+++ trunk/core/src/core/org/jnode/vm/isolate/VmIsolate.java 2012-04-19 12:57:10 UTC (rev 5896)
@@ -508,7 +508,7 @@
this.exitCode = status;
}
- if (vmThread.getName().indexOf("-AWT-stopper") > -1) {
+ if (vmThread.getName().contains("-AWT-stopper")) {
doExit();
} else {
disposeAppContext(true);
@@ -1008,8 +1008,7 @@
StackTraceElement[] trace = ex.getStackTrace();
if (trace != null) {
Unsafe.debug("getStackTrace() != null\n");
- for (int i = 0; i < trace.length; i++) {
- StackTraceElement element = trace[i];
+ for (StackTraceElement element : trace) {
Unsafe.debug(element.getClassName());
Unsafe.debug('#');
Unsafe.debug(element.getMethodName());
Modified: trunk/core/src/core/org/jnode/vm/x86/VmX86Architecture.java
===================================================================
--- trunk/core/src/core/org/jnode/vm/x86/VmX86Architecture.java 2012-03-28 14:33:09 UTC (rev 5895)
+++ trunk/core/src/core/org/jnode/vm/x86/VmX86Architect...
[truncated message content] |
|
From: <ga...@us...> - 2012-04-27 06:53:45
|
Revision: 5898
http://jnode.svn.sourceforge.net/jnode/?rev=5898&view=rev
Author: galatnm
Date: 2012-04-27 06:53:38 +0000 (Fri, 27 Apr 2012)
Log Message:
-----------
Add basic unit tests for FileSystemManager.
Modified Paths:
--------------
trunk/JNode.ipr
trunk/fs/.classpath
Added Paths:
-----------
trunk/fs/src/test/org/jnode/fs/service/
trunk/fs/src/test/org/jnode/fs/service/def/
trunk/fs/src/test/org/jnode/fs/service/def/FileSystemManagerTest.java
Modified: trunk/JNode.ipr
===================================================================
--- trunk/JNode.ipr 2012-04-19 15:52:49 UTC (rev 5897)
+++ trunk/JNode.ipr 2012-04-27 06:53:38 UTC (rev 5898)
@@ -186,6 +186,7 @@
<component name="CopyrightManager" default="">
<module2copyright />
</component>
+ <component name="CppTools.Loader" reportImplicitCastToBool="false" reportNameReferencedOnce="false" warnedAboutFileOutOfSourceRoot="true" version="3" compilerSelect="AUTO" />
<component name="DependenciesAnalyzeManager">
<option name="myForwardDirection" value="false" />
</component>
@@ -364,6 +365,99 @@
</item>
</group>
</component>
+ <component name="ProjectCodeStyleSettingsManager">
+ <option name="PER_PROJECT_SETTINGS">
+ <value>
+ <option name="JAVA_INDENT_OPTIONS">
+ <value>
+ <option name="INDENT_SIZE" value="4" />
+ <option name="CONTINUATION_INDENT_SIZE" value="4" />
+ <option name="TAB_SIZE" value="4" />
+ <option name="USE_TAB_CHARACTER" value="false" />
+ <option name="SMART_TABS" value="false" />
+ <option name="LABEL_INDENT_SIZE" value="-4" />
+ <option name="LABEL_INDENT_ABSOLUTE" value="false" />
+ <option name="USE_RELATIVE_INDENTS" value="false" />
+ </value>
+ </option>
+ <option name="CLASS_COUNT_TO_USE_IMPORT_ON_DEMAND" value="100" />
+ <option name="NAMES_COUNT_TO_USE_IMPORT_ON_DEMAND" value="100" />
+ <option name="PACKAGES_TO_USE_IMPORT_ON_DEMAND">
+ <value />
+ </option>
+ <option name="IMPORT_LAYOUT_TABLE">
+ <value>
+ <package name="" withSubpackages="true" static="false" />
+ <emptyLine />
+ <package name="javax" withSubpackages="false" static="false" />
+ <package name="java" withSubpackages="false" static="false" />
+ <emptyLine />
+ <package name="" withSubpackages="true" static="true" />
+ </value>
+ </option>
+ <option name="CALL_PARAMETERS_WRAP" value="1" />
+ <option name="METHOD_PARAMETERS_WRAP" value="1" />
+ <option name="THROWS_LIST_WRAP" value="1" />
+ <option name="EXTENDS_KEYWORD_WRAP" value="1" />
+ <option name="THROWS_KEYWORD_WRAP" value="1" />
+ <option name="METHOD_CALL_CHAIN_WRAP" value="1" />
+ <option name="BINARY_OPERATION_WRAP" value="1" />
+ <option name="TERNARY_OPERATION_WRAP" value="1" />
+ <option name="ARRAY_INITIALIZER_WRAP" value="1" />
+ <option name="ASSIGNMENT_WRAP" value="1" />
+ <XML>
+ <option name="XML_LEGACY_SETTINGS_IMPORTED" value="true" />
+ </XML>
+ <ADDITIONAL_INDENT_OPTIONS fileType="gsp">
+ <option name="INDENT_SIZE" value="2" />
+ </ADDITIONAL_INDENT_OPTIONS>
+ <ADDITIONAL_INDENT_OPTIONS fileType="scala">
+ <option name="INDENT_SIZE" value="2" />
+ <option name="TAB_SIZE" value="2" />
+ </ADDITIONAL_INDENT_OPTIONS>
+ <ADDITIONAL_INDENT_OPTIONS fileType="sql">
+ <option name="INDENT_SIZE" value="2" />
+ </ADDITIONAL_INDENT_OPTIONS>
+ <ADDITIONAL_INDENT_OPTIONS fileType="yml">
+ <option name="INDENT_SIZE" value="2" />
+ </ADDITIONAL_INDENT_OPTIONS>
+ <codeStyleSettings language="Groovy">
+ <option name="CALL_PARAMETERS_WRAP" value="1" />
+ <option name="METHOD_PARAMETERS_WRAP" value="1" />
+ <option name="THROWS_LIST_WRAP" value="1" />
+ <option name="EXTENDS_KEYWORD_WRAP" value="1" />
+ <option name="THROWS_KEYWORD_WRAP" value="1" />
+ <option name="METHOD_CALL_CHAIN_WRAP" value="1" />
+ <option name="BINARY_OPERATION_WRAP" value="1" />
+ <option name="TERNARY_OPERATION_WRAP" value="1" />
+ <option name="ARRAY_INITIALIZER_WRAP" value="1" />
+ <option name="ASSIGNMENT_WRAP" value="1" />
+ <option name="PARENT_SETTINGS_INSTALLED" value="true" />
+ <indentOptions>
+ <option name="INDENT_SIZE" value="2" />
+ </indentOptions>
+ </codeStyleSettings>
+ <codeStyleSettings language="JAVA">
+ <option name="CALL_PARAMETERS_WRAP" value="1" />
+ <option name="METHOD_PARAMETERS_WRAP" value="1" />
+ <option name="THROWS_LIST_WRAP" value="1" />
+ <option name="EXTENDS_KEYWORD_WRAP" value="1" />
+ <option name="THROWS_KEYWORD_WRAP" value="1" />
+ <option name="METHOD_CALL_CHAIN_WRAP" value="1" />
+ <option name="BINARY_OPERATION_WRAP" value="1" />
+ <option name="TERNARY_OPERATION_WRAP" value="1" />
+ <option name="ARRAY_INITIALIZER_WRAP" value="1" />
+ <option name="ASSIGNMENT_WRAP" value="1" />
+ <option name="PARENT_SETTINGS_INSTALLED" value="true" />
+ <indentOptions>
+ <option name="CONTINUATION_INDENT_SIZE" value="4" />
+ <option name="LABEL_INDENT_SIZE" value="-4" />
+ </indentOptions>
+ </codeStyleSettings>
+ </value>
+ </option>
+ <option name="USE_PER_PROJECT_SETTINGS" value="true" />
+ </component>
<component name="ProjectDetails">
<option name="projectName" value="JNode" />
</component>
@@ -389,7 +483,7 @@
<component name="ProjectResources">
<default-html-doctype>http://www.w3.org/1999/xhtml</default-html-doctype>
</component>
- <component name="ProjectRootManager" version="2" languageLevel="JDK_1_6" assert-keyword="true" jdk-15="true" project-jdk-name="1.6 - jnode" project-jdk-type="JavaSDK" />
+ <component name="ProjectRootManager" version="2" languageLevel="JDK_1_6" assert-keyword="true" jdk-15="true" project-jdk-name="1.6" project-jdk-type="JavaSDK" />
<component name="ResourceManagerContainer">
<option name="myResourceBundles">
<value>
@@ -403,20 +497,6 @@
<entry key="$PROJECT_DIR$">
<value>
<SvnBranchConfiguration>
- <option name="branchMap">
- <map>
- <entry key="https://jnode.svn.sourceforge.net/svnroot/jnode/branches">
- <value>
- <list />
- </value>
- </entry>
- <entry key="https://jnode.svn.sourceforge.net/svnroot/jnode/tags">
- <value>
- <list />
- </value>
- </entry>
- </map>
- </option>
<option name="branchUrls">
<list>
<option value="https://jnode.svn.sourceforge.net/svnroot/jnode/branches" />
@@ -430,25 +510,6 @@
<entry key="$PROJECT_DIR$/distr">
<value>
<SvnBranchConfiguration>
- <option name="branchMap">
- <map>
- <entry key="https://jnode.svn.sourceforge.net/svnroot/jnode/branches">
- <value>
- <list />
- </value>
- </entry>
- <entry key="https://jnode.svn.sourceforge.net/svnroot/jnode/classlib6">
- <value>
- <list />
- </value>
- </entry>
- <entry key="https://jnode.svn.sourceforge.net/svnroot/jnode/tags">
- <value>
- <list />
- </value>
- </entry>
- </map>
- </option>
<option name="branchUrls">
<list>
<option value="https://jnode.svn.sourceforge.net/svnroot/jnode/branches" />
@@ -463,25 +524,6 @@
<entry key="$PROJECT_DIR$/gui">
<value>
<SvnBranchConfiguration>
- <option name="branchMap">
- <map>
- <entry key="https://jnode.svn.sourceforge.net/svnroot/jnode/branches">
- <value>
- <list />
- </value>
- </entry>
- <entry key="https://jnode.svn.sourceforge.net/svnroot/jnode/classlib6">
- <value>
- <list />
- </value>
- </entry>
- <entry key="https://jnode.svn.sourceforge.net/svnroot/jnode/tags">
- <value>
- <list />
- </value>
- </entry>
- </map>
- </option>
<option name="branchUrls">
<list>
<option value="https://jnode.svn.sourceforge.net/svnroot/jnode/branches" />
@@ -496,25 +538,6 @@
<entry key="$PROJECT_DIR$/net">
<value>
<SvnBranchConfiguration>
- <option name="branchMap">
- <map>
- <entry key="https://jnode.svn.sourceforge.net/svnroot/jnode/branches">
- <value>
- <list />
- </value>
- </entry>
- <entry key="https://jnode.svn.sourceforge.net/svnroot/jnode/classlib6">
- <value>
- <list />
- </value>
- </entry>
- <entry key="https://jnode.svn.sourceforge.net/svnroot/jnode/tags">
- <value>
- <list />
- </value>
- </entry>
- </map>
- </option>
<option name="branchUrls">
<list>
<option value="https://jnode.svn.sourceforge.net/svnroot/jnode/branches" />
Modified: trunk/fs/.classpath
===================================================================
--- trunk/fs/.classpath 2012-04-19 15:52:49 UTC (rev 5897)
+++ trunk/fs/.classpath 2012-04-27 06:53:38 UTC (rev 5898)
@@ -17,5 +17,6 @@
<classpathentry kind="lib" path="/core/lib/log4j-1.2.8.jar"/>
<classpathentry kind="lib" path="/core/lib/junit-4.5.jar"/>
<classpathentry kind="lib" path="/all/lib/classlib.jar" sourcepath="/all/lib/classlib-src.jar"/>
+ <classpathentry kind="lib" path="/core/lib/mockito-all-1.8.5.jar"/>
<classpathentry kind="output" path="build/classes"/>
</classpath>
Added: trunk/fs/src/test/org/jnode/fs/service/def/FileSystemManagerTest.java
===================================================================
--- trunk/fs/src/test/org/jnode/fs/service/def/FileSystemManagerTest.java (rev 0)
+++ trunk/fs/src/test/org/jnode/fs/service/def/FileSystemManagerTest.java 2012-04-27 06:53:38 UTC (rev 5898)
@@ -0,0 +1,58 @@
+package org.jnode.fs.service.def;
+
+import static junit.framework.Assert.assertEquals;
+import static junit.framework.Assert.assertNotNull;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.when;
+
+import java.util.Collection;
+
+import org.jnode.driver.Device;
+import org.jnode.fs.FileSystem;
+import org.junit.Before;
+import org.junit.Test;
+
+public class FileSystemManagerTest {
+
+ private FileSystemManager fsm;
+ private FileSystem<?> fs;
+ private Device device;
+
+ @Before
+ public void setUp() throws Exception {
+ fsm = new FileSystemManager();
+ device = mock(Device.class);
+ fs = mock(FileSystem.class);
+ when(fs.getDevice()).thenReturn(device);
+ }
+
+ @Test
+ public void testUnregisterFileSystem() throws Exception {
+ fsm.registerFileSystem(fs);
+ FileSystem<?> result = fsm.unregisterFileSystem(device);
+ assertNotNull(result);
+ }
+
+ @Test
+ public void testGetFileSystem() throws Exception {
+ fsm.registerFileSystem(fs);
+ FileSystem<?> result = fsm.getFileSystem(device);
+ assertNotNull(result);
+ }
+
+ @Test
+ public void testFileSystems() throws Exception {
+ fsm.registerFileSystem(fs);
+ Collection<FileSystem<?>> result = fsm.fileSystems();
+ assertNotNull(result);
+ assertEquals(1,result.size());
+
+ fsm.unregisterFileSystem(device);
+
+ result = fsm.fileSystems();
+ assertNotNull(result);
+ assertEquals(0,result.size());
+ }
+
+
+}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ga...@us...> - 2012-06-04 09:06:11
|
Revision: 5899
http://jnode.svn.sourceforge.net/jnode/?rev=5899&view=rev
Author: galatnm
Date: 2012-06-04 09:05:31 +0000 (Mon, 04 Jun 2012)
Log Message:
-----------
Update headers.
Modified Paths:
--------------
trunk/all/template/header.txt
trunk/builder/src/builder/org/jnode/ant/taskdefs/AnnotateTask.java
trunk/builder/src/builder/org/jnode/ant/taskdefs/Asm.java
trunk/builder/src/builder/org/jnode/ant/taskdefs/FileSetTask.java
trunk/builder/src/builder/org/jnode/ant/taskdefs/HeaderTask.java
trunk/builder/src/builder/org/jnode/ant/taskdefs/Hotswap.java
trunk/builder/src/builder/org/jnode/ant/taskdefs/Native2AsciiTask.java
trunk/builder/src/builder/org/jnode/ant/taskdefs/NativeCheckTask.java
trunk/builder/src/builder/org/jnode/ant/taskdefs/TemplateTask.java
trunk/builder/src/builder/org/jnode/ant/taskdefs/classpath/BaseDirs.java
trunk/builder/src/builder/org/jnode/ant/taskdefs/classpath/CompareTask.java
trunk/builder/src/builder/org/jnode/ant/taskdefs/classpath/Flags.java
trunk/builder/src/builder/org/jnode/ant/taskdefs/classpath/PackageDirectory.java
trunk/builder/src/builder/org/jnode/ant/taskdefs/classpath/SourceFile.java
trunk/builder/src/builder/org/jnode/ant/taskdefs/classpath/TargetedFileSet.java
trunk/builder/src/builder/org/jnode/build/AbstractAsmConstBuilder.java
trunk/builder/src/builder/org/jnode/build/AbstractBootImageBuilder.java
trunk/builder/src/builder/org/jnode/build/AbstractPluginTask.java
trunk/builder/src/builder/org/jnode/build/AbstractPluginsTask.java
trunk/builder/src/builder/org/jnode/build/AddressFinder.java
trunk/builder/src/builder/org/jnode/build/AsmSourceInfo.java
trunk/builder/src/builder/org/jnode/build/BootDiskBuilder.java
trunk/builder/src/builder/org/jnode/build/BootFloppyBuilder.java
trunk/builder/src/builder/org/jnode/build/BuildException.java
trunk/builder/src/builder/org/jnode/build/BuildObjectResolver.java
trunk/builder/src/builder/org/jnode/build/FieldInfo.java
trunk/builder/src/builder/org/jnode/build/InitJarBuilder.java
trunk/builder/src/builder/org/jnode/build/InitJarsBuilder.java
trunk/builder/src/builder/org/jnode/build/JNodeClassNotFoundException.java
trunk/builder/src/builder/org/jnode/build/ObjectEmitter.java
trunk/builder/src/builder/org/jnode/build/PluginList.java
trunk/builder/src/builder/org/jnode/build/PluginTask.java
trunk/builder/src/builder/org/jnode/build/VMwareBuilderTask.java
trunk/builder/src/builder/org/jnode/build/dependencies/BCELDependencyChecker.java
trunk/builder/src/builder/org/jnode/build/documentation/DotBuilder.java
trunk/builder/src/builder/org/jnode/build/documentation/LicenseEntry.java
trunk/builder/src/builder/org/jnode/build/documentation/PackageData.java
trunk/builder/src/builder/org/jnode/build/documentation/PluginData.java
trunk/builder/src/builder/org/jnode/build/documentation/PluginDocumentationTask.java
trunk/builder/src/builder/org/jnode/build/documentation/ToolbarEntry.java
trunk/builder/src/builder/org/jnode/build/natives/NativeStubGenerator.java
trunk/builder/src/builder/org/jnode/build/packager/MainFinder.java
trunk/builder/src/builder/org/jnode/build/packager/PackagerTask.java
trunk/builder/src/builder/org/jnode/build/packager/PluginBuilder.java
trunk/builder/src/builder/org/jnode/build/packager/PluginListInsertor.java
trunk/builder/src/builder/org/jnode/build/packager/ScriptBuilder.java
trunk/builder/src/builder/org/jnode/build/x86/AsmConstBuilder.java
trunk/builder/src/builder/org/jnode/build/x86/BootImageBuilder.java
trunk/builder/src/builder/org/jnode/build/x86/Disasm.java
trunk/builder/src/builder/org/jnode/jnasm/JNAsm.java
trunk/builder/src/builder/org/jnode/jnasm/assembler/Address.java
trunk/builder/src/builder/org/jnode/jnasm/assembler/Assembler.java
trunk/builder/src/builder/org/jnode/jnasm/assembler/AssemblerModule.java
trunk/builder/src/builder/org/jnode/jnasm/assembler/HardwareSupport.java
trunk/builder/src/builder/org/jnode/jnasm/assembler/Identifier.java
trunk/builder/src/builder/org/jnode/jnasm/assembler/Instruction.java
trunk/builder/src/builder/org/jnode/jnasm/assembler/InstructionUtils.java
trunk/builder/src/builder/org/jnode/jnasm/assembler/PseudoInstructions.java
trunk/builder/src/builder/org/jnode/jnasm/assembler/Register.java
trunk/builder/src/builder/org/jnode/jnasm/assembler/x86/AbstractX86Module.java
trunk/builder/src/builder/org/jnode/jnasm/assembler/x86/MMX.java
trunk/builder/src/builder/org/jnode/jnasm/assembler/x86/X86Core.java
trunk/builder/src/builder/org/jnode/jnasm/assembler/x86/X86Support.java
trunk/builder/src/builder/org/jnode/jnasm/preprocessor/FileResolver.java
trunk/builder/src/builder/org/jnode/jnasm/preprocessor/Macro.java
trunk/builder/src/builder/org/jnode/jnasm/preprocessor/Preprocessor.java
trunk/builder/src/builder/org/jnode/linker/Elf.java
trunk/builder/src/builder/org/jnode/linker/ElfLinker.java
trunk/builder/src/builder/org/jnode/linker/LoadUtil.java
trunk/builder/src/builder/org/jnode/linker/Reloc.java
trunk/builder/src/builder/org/jnode/linker/Reloca.java
trunk/builder/src/builder/org/jnode/linker/Section.java
trunk/builder/src/builder/org/jnode/linker/StoreUtil.java
trunk/builder/src/builder/org/jnode/linker/StrTab.java
trunk/builder/src/builder/org/jnode/linker/Symbol.java
trunk/builder/src/builder/org/jnode/pluginlist/Main.java
trunk/builder/src/builder/org/jnode/pluginlist/Plugin.java
trunk/builder/src/builder/org/jnode/pluginlist/PluginList.java
trunk/builder/src/builder/org/jnode/pluginlist/PluginListEditor.java
trunk/builder/src/builder/org/jnode/pluginlist/PluginListModel.java
trunk/builder/src/builder/org/jnode/pluginlist/PluginNode.java
trunk/builder/src/builder/org/jnode/pluginlist/PluginRepository.java
trunk/builder/src/builder/org/jnode/pluginlist/PluginTreePane.java
trunk/builder/src/builder/org/jnode/pluginlist/Project.java
trunk/builder/src/builder/org/jnode/pluginlist/ProjectNode.java
trunk/builder/src/builder/org/jnode/pluginlist/RootNode.java
trunk/builder/src/builder/org/jnode/pluginlist/Syncable.java
trunk/cli/src/commands/org/jnode/command/archive/ArchiveCommand.java
trunk/cli/src/commands/org/jnode/command/archive/BUnzipCommand.java
trunk/cli/src/commands/org/jnode/command/archive/BZCatCommand.java
trunk/cli/src/commands/org/jnode/command/archive/BZip.java
trunk/cli/src/commands/org/jnode/command/archive/BZipCommand.java
trunk/cli/src/commands/org/jnode/command/archive/GUnzipCommand.java
trunk/cli/src/commands/org/jnode/command/archive/GZip.java
trunk/cli/src/commands/org/jnode/command/archive/GZipCommand.java
trunk/cli/src/commands/org/jnode/command/archive/TarCommand.java
trunk/cli/src/commands/org/jnode/command/archive/UnzipCommand.java
trunk/cli/src/commands/org/jnode/command/archive/ZCatCommand.java
trunk/cli/src/commands/org/jnode/command/archive/Zip.java
trunk/cli/src/commands/org/jnode/command/archive/ZipCommand.java
trunk/cli/src/commands/org/jnode/command/argument/NumberListArgument.java
trunk/cli/src/commands/org/jnode/command/common/BasenameCommand.java
trunk/cli/src/commands/org/jnode/command/common/DateCommand.java
trunk/cli/src/commands/org/jnode/command/common/DirnameCommand.java
trunk/cli/src/commands/org/jnode/command/common/EchoCommand.java
trunk/cli/src/commands/org/jnode/command/common/EnvCommand.java
trunk/cli/src/commands/org/jnode/command/common/ExitCommand.java
trunk/cli/src/commands/org/jnode/command/common/ExprCommand.java
trunk/cli/src/commands/org/jnode/command/common/FalseCommand.java
trunk/cli/src/commands/org/jnode/command/common/HelpCommand.java
trunk/cli/src/commands/org/jnode/command/common/HistoryCommand.java
trunk/cli/src/commands/org/jnode/command/common/SleepCommand.java
trunk/cli/src/commands/org/jnode/command/common/TimeCommand.java
trunk/cli/src/commands/org/jnode/command/common/TrueCommand.java
trunk/cli/src/commands/org/jnode/command/common/UnixTestCommand.java
trunk/cli/src/commands/org/jnode/command/common/UptimeCommand.java
trunk/cli/src/commands/org/jnode/command/dev/CompileCommand.java
trunk/cli/src/commands/org/jnode/command/dev/DebugCommand.java
trunk/cli/src/commands/org/jnode/command/dev/DisassembleCommand.java
trunk/cli/src/commands/org/jnode/command/dev/RemoteOutputCommand.java
trunk/cli/src/commands/org/jnode/command/dev/ant/AntCommand.java
trunk/cli/src/commands/org/jnode/command/file/CatCommand.java
trunk/cli/src/commands/org/jnode/command/file/CdCommand.java
trunk/cli/src/commands/org/jnode/command/file/CmpCommand.java
trunk/cli/src/commands/org/jnode/command/file/CpCommand.java
trunk/cli/src/commands/org/jnode/command/file/CutCommand.java
trunk/cli/src/commands/org/jnode/command/file/DFCommand.java
trunk/cli/src/commands/org/jnode/command/file/DeleteCommand.java
trunk/cli/src/commands/org/jnode/command/file/DirCommand.java
trunk/cli/src/commands/org/jnode/command/file/DuCommand.java
trunk/cli/src/commands/org/jnode/command/file/FindCommand.java
trunk/cli/src/commands/org/jnode/command/file/GrepCommand.java
trunk/cli/src/commands/org/jnode/command/file/HeadCommand.java
trunk/cli/src/commands/org/jnode/command/file/HexdumpCommand.java
trunk/cli/src/commands/org/jnode/command/file/Md5SumCommand.java
trunk/cli/src/commands/org/jnode/command/file/MkdirCommand.java
trunk/cli/src/commands/org/jnode/command/file/PasteCommand.java
trunk/cli/src/commands/org/jnode/command/file/PwdCommand.java
trunk/cli/src/commands/org/jnode/command/file/SortCommand.java
trunk/cli/src/commands/org/jnode/command/file/TailCommand.java
trunk/cli/src/commands/org/jnode/command/file/TeeCommand.java
trunk/cli/src/commands/org/jnode/command/file/TouchCommand.java
trunk/cli/src/commands/org/jnode/command/file/WcCommand.java
trunk/cli/src/commands/org/jnode/command/net/ArpCommand.java
trunk/cli/src/commands/org/jnode/command/net/BootpCommand.java
trunk/cli/src/commands/org/jnode/command/net/DhcpCommand.java
trunk/cli/src/commands/org/jnode/command/net/IfconfigCommand.java
trunk/cli/src/commands/org/jnode/command/net/NetstatCommand.java
trunk/cli/src/commands/org/jnode/command/net/PingCommand.java
trunk/cli/src/commands/org/jnode/command/net/ResolverCommand.java
trunk/cli/src/commands/org/jnode/command/net/RouteCommand.java
trunk/cli/src/commands/org/jnode/command/net/RpcInfoCommand.java
trunk/cli/src/commands/org/jnode/command/net/TcpInoutCommand.java
trunk/cli/src/commands/org/jnode/command/net/TftpCommand.java
trunk/cli/src/commands/org/jnode/command/net/WLanCtlCommand.java
trunk/cli/src/commands/org/jnode/command/net/WgetCommand.java
trunk/cli/src/commands/org/jnode/command/system/AliasCommand.java
trunk/cli/src/commands/org/jnode/command/system/BindKeysCommand.java
trunk/cli/src/commands/org/jnode/command/system/ClassCommand.java
trunk/cli/src/commands/org/jnode/command/system/ClasspathCommand.java
trunk/cli/src/commands/org/jnode/command/system/CpuIDCommand.java
trunk/cli/src/commands/org/jnode/command/system/GcCommand.java
trunk/cli/src/commands/org/jnode/command/system/HaltCommand.java
trunk/cli/src/commands/org/jnode/command/system/IsolateCommand.java
trunk/cli/src/commands/org/jnode/command/system/JavaCommand.java
trunk/cli/src/commands/org/jnode/command/system/KdbCommand.java
trunk/cli/src/commands/org/jnode/command/system/KillCommand.java
trunk/cli/src/commands/org/jnode/command/system/LoadkeysCommand.java
trunk/cli/src/commands/org/jnode/command/system/LocaleCommand.java
trunk/cli/src/commands/org/jnode/command/system/Log4jCommand.java
trunk/cli/src/commands/org/jnode/command/system/LsIRQCommand.java
trunk/cli/src/commands/org/jnode/command/system/MemoryCommand.java
trunk/cli/src/commands/org/jnode/command/system/NamespaceCommand.java
trunk/cli/src/commands/org/jnode/command/system/OnHeapCommand.java
trunk/cli/src/commands/org/jnode/command/system/PageCommand.java
trunk/cli/src/commands/org/jnode/command/system/PluginCommand.java
trunk/cli/src/commands/org/jnode/command/system/PrintEnvCommand.java
trunk/cli/src/commands/org/jnode/command/system/RebootCommand.java
trunk/cli/src/commands/org/jnode/command/system/RunCommand.java
trunk/cli/src/commands/org/jnode/command/system/SetCommand.java
trunk/cli/src/commands/org/jnode/command/system/SyntaxCommand.java
trunk/cli/src/commands/org/jnode/command/system/TerminateCommand.java
trunk/cli/src/commands/org/jnode/command/system/ThreadCommand.java
trunk/cli/src/commands/org/jnode/command/system/VmInfoCommand.java
trunk/cli/src/commands/org/jnode/command/util/AbstractDirectoryWalker.java
trunk/cli/src/commands/org/jnode/command/util/IOUtils.java
trunk/cli/src/commands/org/jnode/command/util/NumberRange.java
trunk/core/src/classpath/ext/java/nio/channels/LinkChannel.java
trunk/core/src/classpath/ext/java/util/prefs/TransientPreferences.java
trunk/core/src/classpath/ext/javax/cache/Cache.java
trunk/core/src/classpath/ext/javax/cache/CacheEntry.java
trunk/core/src/classpath/ext/javax/cache/CacheException.java
trunk/core/src/classpath/ext/javax/cache/CacheFactory.java
trunk/core/src/classpath/ext/javax/cache/CacheListener.java
trunk/core/src/classpath/ext/javax/cache/CacheLoader.java
trunk/core/src/classpath/ext/javax/cache/CacheManager.java
trunk/core/src/classpath/ext/javax/cache/CacheStatistics.java
trunk/core/src/classpath/ext/javax/cache/EvictionStrategy.java
trunk/core/src/classpath/ext/javax/isolate/AbstractLinkMessageHandler.java
trunk/core/src/classpath/ext/javax/isolate/ClosedLinkException.java
trunk/core/src/classpath/ext/javax/isolate/Isolate.java
trunk/core/src/classpath/ext/javax/isolate/IsolatePermission.java
trunk/core/src/classpath/ext/javax/isolate/IsolateStartupException.java
trunk/core/src/classpath/ext/javax/isolate/IsolateStatus.java
trunk/core/src/classpath/ext/javax/isolate/Link.java
trunk/core/src/classpath/ext/javax/isolate/LinkMessage.java
trunk/core/src/classpath/ext/javax/isolate/LinkMessageDispatcher.java
trunk/core/src/classpath/ext/javax/isolate/LinkMessageHandler.java
trunk/core/src/classpath/ext/javax/isolate/StreamBindings.java
trunk/core/src/classpath/vm/gnu/classpath/NativeSystemProperties.java
trunk/core/src/classpath/vm/gnu/classpath/NativeVMStackWalker.java
trunk/core/src/classpath/vm/gnu/classpath/jdwp/JDIVirtualMachine.java
trunk/core/src/classpath/vm/gnu/classpath/jdwp/NativeVMFrame.java
trunk/core/src/classpath/vm/gnu/classpath/jdwp/NativeVMMethod.java
trunk/core/src/classpath/vm/gnu/classpath/jdwp/NativeVMVirtualMachine.java
trunk/core/src/classpath/vm/gnu/classpath/jdwp/transport/JNodeSocketTransport.java
trunk/core/src/classpath/vm/gnu/classpath/jdwp/transport/NativeTransportFactory.java
trunk/core/src/classpath/vm/gnu/java/security/action/GetEnvAction.java
trunk/core/src/classpath/vm/gnu/java/security/action/GetPolicyAction.java
trunk/core/src/classpath/vm/gnu/java/security/action/GetPropertiesAction.java
trunk/core/src/classpath/vm/gnu/java/security/action/InvokeAction.java
trunk/core/src/classpath/vm/gnu/java/security/action/SetPropertyAction.java
trunk/core/src/classpath/vm/gnu/java/security/util/SimplePermissionCollection.java
trunk/core/src/classpath/vm/java/awt/VMAwtAPI.java
trunk/core/src/classpath/vm/java/awt/image/VMImageAPI.java
trunk/core/src/classpath/vm/java/awt/image/VMImageUtils.java
trunk/core/src/classpath/vm/java/lang/NativeClassLoader.java
trunk/core/src/classpath/vm/java/lang/NativeSecurityManager.java
trunk/core/src/classpath/vm/java/lang/NativeThread.java
trunk/core/src/classpath/vm/java/lang/NativeVMClassLoader.java
trunk/core/src/classpath/vm/java/lang/ThreadHelper.java
trunk/core/src/classpath/vm/java/lang/VMRuntime.java
trunk/core/src/classpath/vm/java/lang/VMSecurityManager.java
trunk/core/src/classpath/vm/java/net/ExSocketOptions.java
trunk/core/src/classpath/vm/java/net/VMInetAddress.java
trunk/core/src/classpath/vm/java/net/VMNetAPI.java
trunk/core/src/classpath/vm/java/net/VMNetDevice.java
trunk/core/src/classpath/vm/java/net/VMNetUtils.java
trunk/core/src/classpath/vm/java/net/VMNetworkInterface.java
trunk/core/src/classpath/vm/java/nio/MemoryRawData.java
trunk/core/src/classpath/vm/java/nio/NativeVMDirectByteBuffer.java
trunk/core/src/classpath/vm/java/nio/channels/NativeVMChannels.java
trunk/core/src/classpath/vm/java/security/NativeAccessControlContext.java
trunk/core/src/classpath/vm/java/security/NativeAccessController.java
trunk/core/src/classpath/vm/java/security/VMSecureRandom.java
trunk/core/src/classpath/vm/javax/imageio/spi/NativeIIORegistry.java
trunk/core/src/core/org/jnode/assembler/BootImageNativeStream.java
trunk/core/src/core/org/jnode/assembler/Label.java
trunk/core/src/core/org/jnode/assembler/NativeStream.java
trunk/core/src/core/org/jnode/assembler/ObjectResolver.java
trunk/core/src/core/org/jnode/assembler/UnresolvedObjectRefException.java
trunk/core/src/core/org/jnode/assembler/x86/InvalidOpcodeException.java
trunk/core/src/core/org/jnode/assembler/x86/X86Assembler.java
trunk/core/src/core/org/jnode/assembler/x86/X86BinaryAssembler.java
trunk/core/src/core/org/jnode/assembler/x86/X86Constants.java
trunk/core/src/core/org/jnode/assembler/x86/X86Operation.java
trunk/core/src/core/org/jnode/assembler/x86/X86Register.java
trunk/core/src/core/org/jnode/assembler/x86/X86TextAssembler.java
trunk/core/src/core/org/jnode/assembler/x86/X86Utils.java
trunk/core/src/core/org/jnode/boot/InitJarProcessor.java
trunk/core/src/core/org/jnode/boot/Main.java
trunk/core/src/core/org/jnode/boot/MemoryResourceInputStream.java
trunk/core/src/core/org/jnode/boot/NoCloseInputStream.java
trunk/core/src/core/org/jnode/bootlog/BootLog.java
trunk/core/src/core/org/jnode/bootlog/BootLogInstance.java
trunk/core/src/core/org/jnode/debug/RemoteAppender.java
trunk/core/src/core/org/jnode/debug/RemoteReceiver.java
trunk/core/src/core/org/jnode/debug/UDPOutputStream.java
trunk/core/src/core/org/jnode/debugger/DebugState.java
trunk/core/src/core/org/jnode/debugger/Debugger.java
trunk/core/src/core/org/jnode/debugger/DebuggerPlugin.java
trunk/core/src/core/org/jnode/debugger/DebuggerUtils.java
trunk/core/src/core/org/jnode/debugger/RootState.java
trunk/core/src/core/org/jnode/debugger/ThreadListState.java
trunk/core/src/core/org/jnode/debugger/ThreadState.java
trunk/core/src/core/org/jnode/imageio/jpeg/JPEGDecoder.java
trunk/core/src/core/org/jnode/imageio/jpeg/JPEGDecoderAdapter.java
trunk/core/src/core/org/jnode/imageio/jpeg/JPEGException.java
trunk/core/src/core/org/jnode/imageio/jpeg/JPEGImageReader.java
trunk/core/src/core/org/jnode/imageio/jpeg/JPEGImageReaderSpi.java
trunk/core/src/core/org/jnode/log4j/config/JNodeSystemAppender.java
trunk/core/src/core/org/jnode/log4j/config/Log4jConfigurePlugin.java
trunk/core/src/core/org/jnode/log4j/config/UnsafeDebugAppender.java
trunk/core/src/core/org/jnode/log4j/config/VirtualConsoleAppender.java
trunk/core/src/core/org/jnode/naming/AbstractNameSpace.java
trunk/core/src/core/org/jnode/naming/InitialNaming.java
trunk/core/src/core/org/jnode/naming/NameSpace.java
trunk/core/src/core/org/jnode/naming/NameSpaceListener.java
trunk/core/src/core/org/jnode/permission/JNodePermission.java
trunk/core/src/core/org/jnode/plugin/AutoUnzipPlugin.java
trunk/core/src/core/org/jnode/plugin/ConfigurationElement.java
trunk/core/src/core/org/jnode/plugin/Extension.java
trunk/core/src/core/org/jnode/plugin/ExtensionPoint.java
trunk/core/src/core/org/jnode/plugin/ExtensionPointListener.java
trunk/core/src/core/org/jnode/plugin/FragmentDescriptor.java
trunk/core/src/core/org/jnode/plugin/Library.java
trunk/core/src/core/org/jnode/plugin/Plugin.java
trunk/core/src/core/org/jnode/plugin/PluginClassLoader.java
trunk/core/src/core/org/jnode/plugin/PluginDescriptor.java
trunk/core/src/core/org/jnode/plugin/PluginDescriptorListener.java
trunk/core/src/core/org/jnode/plugin/PluginException.java
trunk/core/src/core/org/jnode/plugin/PluginLoader.java
trunk/core/src/core/org/jnode/plugin/PluginLoaderManager.java
trunk/core/src/core/org/jnode/plugin/PluginManager.java
trunk/core/src/core/org/jnode/plugin/PluginPrerequisite.java
trunk/core/src/core/org/jnode/plugin/PluginReference.java
trunk/core/src/core/org/jnode/plugin/PluginRegistry.java
trunk/core/src/core/org/jnode/plugin/PluginSecurityConstants.java
trunk/core/src/core/org/jnode/plugin/PluginUtils.java
trunk/core/src/core/org/jnode/plugin/Runtime.java
trunk/core/src/core/org/jnode/plugin/URLPluginLoader.java
trunk/core/src/core/org/jnode/plugin/manager/DefaultPluginLoaderManager.java
trunk/core/src/core/org/jnode/plugin/manager/DefaultPluginManager.java
trunk/core/src/core/org/jnode/plugin/model/AbstractModelObject.java
trunk/core/src/core/org/jnode/plugin/model/AttributeModel.java
trunk/core/src/core/org/jnode/plugin/model/ConfigurationElementModel.java
trunk/core/src/core/org/jnode/plugin/model/EmptyPlugin.java
trunk/core/src/core/org/jnode/plugin/model/ExtensionModel.java
trunk/core/src/core/org/jnode/plugin/model/ExtensionPointModel.java
trunk/core/src/core/org/jnode/plugin/model/Factory.java
trunk/core/src/core/org/jnode/plugin/model/FragmentDescriptorModel.java
trunk/core/src/core/org/jnode/plugin/model/LibraryModel.java
trunk/core/src/core/org/jnode/plugin/model/PluginClassLoaderImpl.java
trunk/core/src/core/org/jnode/plugin/model/PluginDescriptorModel.java
trunk/core/src/core/org/jnode/plugin/model/PluginJar.java
trunk/core/src/core/org/jnode/plugin/model/PluginModelObject.java
trunk/core/src/core/org/jnode/plugin/model/PluginPrerequisiteModel.java
trunk/core/src/core/org/jnode/plugin/model/PluginRegistryModel.java
trunk/core/src/core/org/jnode/plugin/model/PluginsClassLoader.java
trunk/core/src/core/org/jnode/plugin/model/RuntimeModel.java
trunk/core/src/core/org/jnode/protocol/ProtocolHandlerFactoryPlugin.java
trunk/core/src/core/org/jnode/protocol/plugin/Handler.java
trunk/core/src/core/org/jnode/protocol/plugin/PluginURLConnection.java
trunk/core/src/core/org/jnode/protocol/system/Handler.java
trunk/core/src/core/org/jnode/protocol/system/SystemURLConnection.java
trunk/core/src/core/org/jnode/security/JNodePolicy.java
trunk/core/src/core/org/jnode/security/JNodeSecurityManager.java
trunk/core/src/core/org/jnode/security/SecurityPlugin.java
trunk/core/src/core/org/jnode/system/event/FocusEvent.java
trunk/core/src/core/org/jnode/system/event/FocusListener.java
trunk/core/src/core/org/jnode/system/event/SystemEvent.java
trunk/core/src/core/org/jnode/system/repository/Repository.java
trunk/core/src/core/org/jnode/system/repository/RepositoryPlugin.java
trunk/core/src/core/org/jnode/system/repository/RepositoryPluginLoader.java
trunk/core/src/core/org/jnode/system/repository/SystemRepository.java
trunk/core/src/core/org/jnode/system/repository/SystemRepositoryPlugin.java
trunk/core/src/core/org/jnode/system/repository/plugins/PluginLoaderPlugin.java
trunk/core/src/core/org/jnode/system/repository/spi/SystemRepositoryProvider.java
trunk/core/src/core/org/jnode/system/resource/DMAException.java
trunk/core/src/core/org/jnode/system/resource/DMAManager.java
trunk/core/src/core/org/jnode/system/resource/DMAResource.java
trunk/core/src/core/org/jnode/system/resource/IOResource.java
trunk/core/src/core/org/jnode/system/resource/IRQHandler.java
trunk/core/src/core/org/jnode/system/resource/IRQResource.java
trunk/core/src/core/org/jnode/system/resource/MemoryResource.java
trunk/core/src/core/org/jnode/system/resource/MemoryScanner.java
trunk/core/src/core/org/jnode/system/resource/MultiMediaMemoryResource.java
trunk/core/src/core/org/jnode/system/resource/Resource.java
trunk/core/src/core/org/jnode/system/resource/ResourceManager.java
trunk/core/src/core/org/jnode/system/resource/ResourceNotFreeException.java
trunk/core/src/core/org/jnode/system/resource/ResourceOwner.java
trunk/core/src/core/org/jnode/system/resource/ResourcePermission.java
trunk/core/src/core/org/jnode/system/resource/SimpleResourceOwner.java
trunk/core/src/core/org/jnode/system/x86/DMA.java
trunk/core/src/core/org/jnode/system/x86/DMAConstants.java
trunk/core/src/core/org/jnode/system/x86/DMAPlugin.java
trunk/core/src/core/org/jnode/system/x86/X86DMAChannel.java
trunk/core/src/core/org/jnode/util/AccessControllerUtils.java
trunk/core/src/core/org/jnode/util/BCDUtils.java
trunk/core/src/core/org/jnode/util/BeanUtils.java
trunk/core/src/core/org/jnode/util/BigEndian.java
trunk/core/src/core/org/jnode/util/BinaryScaleFactor.java
trunk/core/src/core/org/jnode/util/BooleanUtils.java
trunk/core/src/core/org/jnode/util/ByteBufferInputStream.java
trunk/core/src/core/org/jnode/util/ByteBufferUtils.java
trunk/core/src/core/org/jnode/util/ByteQueue.java
trunk/core/src/core/org/jnode/util/ByteQueueProcessor.java
trunk/core/src/core/org/jnode/util/ByteQueueProcessorThread.java
trunk/core/src/core/org/jnode/util/ChannelInputStream.java
trunk/core/src/core/org/jnode/util/ChannelOutputStream.java
trunk/core/src/core/org/jnode/util/Command.java
trunk/core/src/core/org/jnode/util/ConsoleStream.java
trunk/core/src/core/org/jnode/util/DecimalScaleFactor.java
trunk/core/src/core/org/jnode/util/EmptyInputStream.java
trunk/core/src/core/org/jnode/util/FileUtils.java
trunk/core/src/core/org/jnode/util/IOUtils.java
trunk/core/src/core/org/jnode/util/JarBuffer.java
trunk/core/src/core/org/jnode/util/JarConstants.java
trunk/core/src/core/org/jnode/util/LittleEndian.java
trunk/core/src/core/org/jnode/util/NumberUtils.java
trunk/core/src/core/org/jnode/util/ObjectArrayIterator.java
trunk/core/src/core/org/jnode/util/ObjectUtils.java
trunk/core/src/core/org/jnode/util/OsUtils.java
trunk/core/src/core/org/jnode/util/PipeStream.java
trunk/core/src/core/org/jnode/util/ProxyStream.java
trunk/core/src/core/org/jnode/util/ProxyStreamException.java
trunk/core/src/core/org/jnode/util/Queue.java
trunk/core/src/core/org/jnode/util/QueueProcessor.java
trunk/core/src/core/org/jnode/util/QueueProcessorThread.java
trunk/core/src/core/org/jnode/util/ReaderInputStream.java
trunk/core/src/core/org/jnode/util/ScaleFactor.java
trunk/core/src/core/org/jnode/util/SizeUnit.java
trunk/core/src/core/org/jnode/util/StopWatch.java
trunk/core/src/core/org/jnode/util/SystemInputStream.java
trunk/core/src/core/org/jnode/util/TimeUtils.java
trunk/core/src/core/org/jnode/util/TimeoutException.java
trunk/core/src/core/org/jnode/util/Token.java
trunk/core/src/core/org/jnode/util/WriterOutputStream.java
trunk/core/src/core/org/jnode/vm/AllocationBitmap.java
trunk/core/src/core/org/jnode/vm/BaseVmArchitecture.java
trunk/core/src/core/org/jnode/vm/BootLogImpl.java
trunk/core/src/core/org/jnode/vm/CpuID.java
trunk/core/src/core/org/jnode/vm/DefaultNameSpace.java
trunk/core/src/core/org/jnode/vm/HeapHelperImpl.java
trunk/core/src/core/org/jnode/vm/IOContext.java
trunk/core/src/core/org/jnode/vm/IOResourceImpl.java
trunk/core/src/core/org/jnode/vm/InternString.java
trunk/core/src/core/org/jnode/vm/JvmType.java
trunk/core/src/core/org/jnode/vm/LoadCompileService.java
trunk/core/src/core/org/jnode/vm/LoadCompileThread.java
trunk/core/src/core/org/jnode/vm/MathSupport.java
trunk/core/src/core/org/jnode/vm/MemoryBlockManager.java
trunk/core/src/core/org/jnode/vm/MemoryResourceImpl.java
trunk/core/src/core/org/jnode/vm/MemoryScannerImpl.java
trunk/core/src/core/org/jnode/vm/MultiMediaMemoryResourceImpl.java
trunk/core/src/core/org/jnode/vm/RTCService.java
trunk/core/src/core/org/jnode/vm/Region.java
trunk/core/src/core/org/jnode/vm/ResourceLoader.java
trunk/core/src/core/org/jnode/vm/ResourceManagerImpl.java
trunk/core/src/core/org/jnode/vm/SoftByteCodes.java
trunk/core/src/core/org/jnode/vm/Unsafe.java
trunk/core/src/core/org/jnode/vm/VirtualMemoryRegion.java
trunk/core/src/core/org/jnode/vm/VmAbstractClassLoader.java
trunk/core/src/core/org/jnode/vm/VmAccessControlContext.java
trunk/core/src/core/org/jnode/vm/VmAccessController.java
trunk/core/src/core/org/jnode/vm/VmAddress.java
trunk/core/src/core/org/jnode/vm/VmExit.java
trunk/core/src/core/org/jnode/vm/VmIOContext.java
trunk/core/src/core/org/jnode/vm/VmImpl.java
trunk/core/src/core/org/jnode/vm/VmJavaClassLoader.java
trunk/core/src/core/org/jnode/vm/VmJavaMultiMediaSupport.java
trunk/core/src/core/org/jnode/vm/VmMagic.java
trunk/core/src/core/org/jnode/vm/VmMultiMediaSupport.java
trunk/core/src/core/org/jnode/vm/VmProcess.java
trunk/core/src/core/org/jnode/vm/VmProcessClassLoader.java
trunk/core/src/core/org/jnode/vm/VmReflection.java
trunk/core/src/core/org/jnode/vm/VmStackFrame.java
trunk/core/src/core/org/jnode/vm/VmStackFrameEnumerator.java
trunk/core/src/core/org/jnode/vm/VmStackReader.java
trunk/core/src/core/org/jnode/vm/VmSystem.java
trunk/core/src/core/org/jnode/vm/VmSystemClassLoader.java
trunk/core/src/core/org/jnode/vm/bytecode/BasicBlock.java
trunk/core/src/core/org/jnode/vm/bytecode/BasicBlockFinder.java
trunk/core/src/core/org/jnode/vm/byte...
[truncated message content] |
|
From: <ls...@us...> - 2012-07-09 08:15:51
|
Revision: 5900
http://jnode.svn.sourceforge.net/jnode/?rev=5900&view=rev
Author: lsantha
Date: 2012-07-09 08:15:39 +0000 (Mon, 09 Jul 2012)
Log Message:
-----------
Applied patch by Francisco Rafael Del Roio: license files related to libraries used by JNode. They are included in the CD too.
Modified Paths:
--------------
trunk/all/build-x86.xml
Added Paths:
-----------
trunk/licenses/
trunk/licenses/Apache-1.1
trunk/licenses/Apache-2.0
trunk/licenses/BSD
trunk/licenses/GPL-2
trunk/licenses/GPL-3
trunk/licenses/JSCH-0.1-License
trunk/licenses/LGPL-2.1
trunk/licenses/LGPL-3
Modified: trunk/all/build-x86.xml
===================================================================
--- trunk/all/build-x86.xml 2012-06-04 09:05:31 UTC (rev 5899)
+++ trunk/all/build-x86.xml 2012-07-09 08:15:39 UTC (rev 5900)
@@ -267,12 +267,16 @@
<attribute name="destfile" />
<sequential>
<mkdir dir="@{dir}/boot/grub" />
+ <mkdir dir="@{dir}/licenses" />
<copy todir="@{dir}">
<fileset dir="${jnode.kernel.dir}" includes="jnode*.gz"/>
</copy>
<copy todir="@{dir}">
<fileset dir="${initjars.dir}" />
</copy>
+ <copy todir="@{dir}/licenses">
+ <fileset dir="${root.dir}/licenses"/>
+ </copy>
<copy file="${my-lib.dir}/eltorito.s2" todir="@{dir}/boot/grub" />
<copy file="${my-lib.dir}/fat.s15" todir="@{dir}/boot/grub" />
<copy file="${my-lib.dir}/grub.s1" todir="@{dir}/boot/grub" />
Added: trunk/licenses/Apache-1.1
===================================================================
--- trunk/licenses/Apache-1.1 (rev 0)
+++ trunk/licenses/Apache-1.1 2012-07-09 08:15:39 UTC (rev 5900)
@@ -0,0 +1,55 @@
+
+
+/* ====================================================================
+ * The Apache Software License, Version 1.1
+ *
+ * Copyright (c) 2001 The Apache Software Foundation. All rights
+ * reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. The end-user documentation included with the redistribution,
+ * if any, must include the following acknowledgment:
+ * "This product includes software developed by the
+ * Apache Software Foundation (http://www.apache.org/)."
+ * Alternately, this acknowledgment may appear in the software itself,
+ * if and wherever such third-party acknowledgments normally appear.
+ *
+ * 4. The names "Apache" and "Apache Software Foundation" and
+ * "Apache Commons" must not be used to endorse or promote products
+ * derived from this software without prior written permission. For
+ * written permission, please contact ap...@ap....
+ *
+ * 5. Products derived from this software may not be called "Apache",
+ * nor may "Apache" appear in their name, without
+ * prior written permission of the Apache Software Foundation.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ * ====================================================================
+ *
+ * This software consists of voluntary contributions made by many
+ * individuals on behalf of the Apache Software Foundation. For more
+ * information on the Apache Software Foundation, please see
+ * <http://www.apache.org/>.
+ */
Added: trunk/licenses/Apache-2.0
===================================================================
--- trunk/licenses/Apache-2.0 (rev 0)
+++ trunk/licenses/Apache-2.0 2012-07-09 08:15:39 UTC (rev 5900)
@@ -0,0 +1,202 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
Added: trunk/licenses/BSD
===================================================================
--- trunk/licenses/BSD (rev 0)
+++ trunk/licenses/BSD 2012-07-09 08:15:39 UTC (rev 5900)
@@ -0,0 +1,27 @@
+BSD License
+
+Copyright (c) 2000-2006, www.hamcrest.org
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+Redistributions of source code must retain the above copyright notice, this list of
+conditions and the following disclaimer. Redistributions in binary form must reproduce
+the above copyright notice, this list of conditions and the following disclaimer in
+the documentation and/or other materials provided with the distribution.
+
+Neither the name of Hamcrest nor the names of its contributors may be used to endorse
+or promote products derived from this software without specific prior written
+permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
+SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
+TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
+WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGE.
Added: trunk/licenses/GPL-2
===================================================================
--- trunk/licenses/GPL-2 (rev 0)
+++ trunk/licenses/GPL-2 2012-07-09 08:15:39 UTC (rev 5900)
@@ -0,0 +1,339 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Lesser General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through tha...
[truncated message content] |