Imported GNU Classpath 0.90

Imported GNU Classpath 0.90
       * scripts/makemake.tcl: Set gnu/java/awt/peer/swing to ignore.
       * gnu/classpath/jdwp/VMFrame.java (SIZE): New constant.
       * java/lang/VMCompiler.java: Use gnu.java.security.hash.MD5.
       * java/lang/Math.java: New override file.
       * java/lang/Character.java: Merged from Classpath.
       (start, end): Now 'int's.
       (canonicalName): New field.
       (CANONICAL_NAME, NO_SPACES_NAME, CONSTANT_NAME): New constants.
       (UnicodeBlock): Added argument.
       (of): New overload.
       (forName): New method.
       Updated unicode blocks.
       (sets): Updated.
       * sources.am: Regenerated.
       * Makefile.in: Likewise.

From-SVN: r111942
This commit is contained in:
Mark Wielaard 2006-03-10 21:46:48 +00:00
parent 27079765d0
commit 8aa540d2f7
1367 changed files with 188789 additions and 22762 deletions

View file

@ -41,6 +41,7 @@ package java.util.logging;
import java.beans.PropertyChangeListener;
import java.beans.PropertyChangeSupport;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.lang.ref.WeakReference;
@ -295,6 +296,28 @@ public class LogManager
if (parent != logger.getParent())
logger.setParent(parent);
// The level of the newly added logger must be specified.
// The easiest case is if there is a level for exactly this logger
// in the properties. If no such level exists the level needs to be
// searched along the hirachy. So if there is a new logger 'foo.blah.blub'
// and an existing parent logger 'foo' the properties 'foo.blah.blub.level'
// and 'foo.blah.level' need to be checked. If both do not exist in the
// properties the level of the new logger is set to 'null' (i.e. it uses the
// level of its parent 'foo').
Level logLevel = logger.getLevel();
String searchName = name;
String parentName = parent != null ? parent.getName() : "";
while (logLevel == null && ! searchName.equals(parentName))
{
logLevel = getLevelProperty(searchName + ".level", logLevel);
int index = searchName.lastIndexOf('.');
if(index > -1)
searchName = searchName.substring(0,index);
else
searchName = "";
}
logger.setLevel(logLevel);
/* It can happen that existing loggers should be children of
* the newly added logger. For example, assume that there
* already exist loggers under the names "", "foo", and "foo.bar.baz".
@ -488,23 +511,37 @@ public class LogManager
path = System.getProperty("java.util.logging.config.file");
if ((path == null) || (path.length() == 0))
{
String url = (System.getProperty("gnu.classpath.home.url")
+ "/logging.properties");
inputStream = new URL(url).openStream();
String url = (System.getProperty("gnu.classpath.home.url")
+ "/logging.properties");
try
{
inputStream = new URL(url).openStream();
}
catch (Exception e)
{
inputStream=null;
}
// If no config file could be found use a default configuration.
if(inputStream == null)
{
String defaultConfig = "handlers = java.util.logging.ConsoleHandler \n"
+ ".level=INFO \n";
inputStream = new ByteArrayInputStream(defaultConfig.getBytes());
}
}
else
inputStream = new java.io.FileInputStream(path);
try
{
readConfiguration(inputStream);
readConfiguration(inputStream);
}
finally
{
/* Close the stream in order to save
* resources such as file descriptors.
*/
inputStream.close();
// Close the stream in order to save
// resources such as file descriptors.
inputStream.close();
}
}