mirror of
https://github.com/corda/corda.git
synced 2025-02-02 01:08:09 +00:00
Merge remote branch 'oss/master' into jdk7
This commit is contained in:
commit
a61c1aba60
2
.gitignore
vendored
2
.gitignore
vendored
@ -5,3 +5,5 @@ build
|
|||||||
.project
|
.project
|
||||||
.settings
|
.settings
|
||||||
bin
|
bin
|
||||||
|
/lib
|
||||||
|
/distrib
|
||||||
|
26
classpath/avian/http/Handler.java
Normal file
26
classpath/avian/http/Handler.java
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
/* Copyright (c) 2012, Avian Contributors
|
||||||
|
|
||||||
|
Permission to use, copy, modify, and/or distribute this software
|
||||||
|
for any purpose with or without fee is hereby granted, provided
|
||||||
|
that the above copyright notice and this permission notice appear
|
||||||
|
in all copies.
|
||||||
|
|
||||||
|
There is NO WARRANTY for this software. See license.txt for
|
||||||
|
details. */
|
||||||
|
|
||||||
|
package avian.http;
|
||||||
|
|
||||||
|
import java.net.URL;
|
||||||
|
import java.net.URLStreamHandler;
|
||||||
|
import java.net.URLConnection;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.io.FileNotFoundException;
|
||||||
|
import java.io.File;
|
||||||
|
import java.io.FileInputStream;
|
||||||
|
import java.io.InputStream;
|
||||||
|
|
||||||
|
public class Handler extends URLStreamHandler {
|
||||||
|
protected URLConnection openConnection(URL url) {
|
||||||
|
throw new UnsupportedOperationException();
|
||||||
|
}
|
||||||
|
}
|
@ -184,7 +184,8 @@ inline Mapping*
|
|||||||
map(JNIEnv* e, string_t path)
|
map(JNIEnv* e, string_t path)
|
||||||
{
|
{
|
||||||
Mapping* result = 0;
|
Mapping* result = 0;
|
||||||
HANDLE file = CreateFileW(path, FILE_READ_DATA, FILE_SHARE_READ, 0,
|
HANDLE file = CreateFileW(path, FILE_READ_DATA,
|
||||||
|
FILE_SHARE_READ | FILE_SHARE_WRITE, 0,
|
||||||
OPEN_EXISTING, 0, 0);
|
OPEN_EXISTING, 0, 0);
|
||||||
if (file != INVALID_HANDLE_VALUE) {
|
if (file != INVALID_HANDLE_VALUE) {
|
||||||
unsigned size = GetFileSize(file, 0);
|
unsigned size = GetFileSize(file, 0);
|
||||||
|
@ -81,7 +81,9 @@ public final class URL {
|
|||||||
private static URLStreamHandler findHandler(String protocol)
|
private static URLStreamHandler findHandler(String protocol)
|
||||||
throws MalformedURLException
|
throws MalformedURLException
|
||||||
{
|
{
|
||||||
if ("resource".equals(protocol)) {
|
if ("http".equals(protocol) || "https".equals(protocol)) {
|
||||||
|
return new avian.http.Handler();
|
||||||
|
} else if ("resource".equals(protocol)) {
|
||||||
return new avian.resource.Handler();
|
return new avian.resource.Handler();
|
||||||
} else if ("file".equals(protocol)) {
|
} else if ("file".equals(protocol)) {
|
||||||
return new avian.file.Handler();
|
return new avian.file.Handler();
|
||||||
|
@ -38,7 +38,7 @@ public abstract class URLStreamHandler {
|
|||||||
host = s.substring(0, slash);
|
host = s.substring(0, slash);
|
||||||
} else {
|
} else {
|
||||||
host = s.substring(0, colon);
|
host = s.substring(0, colon);
|
||||||
port = Integer.parseInt(s.substring(colon + 1), slash);
|
port = Integer.parseInt(s.substring(colon + 1, slash));
|
||||||
}
|
}
|
||||||
s = s.substring(slash);
|
s = s.substring(slash);
|
||||||
}
|
}
|
||||||
|
12
makefile
12
makefile
@ -51,6 +51,8 @@ test-build = $(build)/test
|
|||||||
src = src
|
src = src
|
||||||
classpath-src = classpath
|
classpath-src = classpath
|
||||||
test = test
|
test = test
|
||||||
|
win32 ?= $(root)/win32
|
||||||
|
win64 ?= $(root)/win64
|
||||||
|
|
||||||
classpath = avian
|
classpath = avian
|
||||||
|
|
||||||
@ -361,8 +363,8 @@ endif
|
|||||||
ifeq ($(platform),windows)
|
ifeq ($(platform),windows)
|
||||||
bootimage-cflags += -DTARGET_PLATFORM_WINDOWS
|
bootimage-cflags += -DTARGET_PLATFORM_WINDOWS
|
||||||
|
|
||||||
inc = "$(root)/win32/include"
|
inc = "$(win32)/include"
|
||||||
lib = "$(root)/win32/lib"
|
lib = "$(win32)/lib"
|
||||||
|
|
||||||
embed-prefix = c:/avian-embedded
|
embed-prefix = c:/avian-embedded
|
||||||
|
|
||||||
@ -411,8 +413,8 @@ ifeq ($(platform),windows)
|
|||||||
ar = x86_64-w64-mingw32-ar
|
ar = x86_64-w64-mingw32-ar
|
||||||
ranlib = x86_64-w64-mingw32-ranlib
|
ranlib = x86_64-w64-mingw32-ranlib
|
||||||
strip = x86_64-w64-mingw32-strip
|
strip = x86_64-w64-mingw32-strip
|
||||||
inc = "$(root)/win64/include"
|
inc = "$(win64)/include"
|
||||||
lib = "$(root)/win64/lib"
|
lib = "$(win64)/lib"
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@ -469,7 +471,7 @@ build-ld := $(build-cc)
|
|||||||
|
|
||||||
ifdef msvc
|
ifdef msvc
|
||||||
windows-java-home := $(shell cygpath -m "$(JAVA_HOME)")
|
windows-java-home := $(shell cygpath -m "$(JAVA_HOME)")
|
||||||
zlib := $(shell cygpath -m "$(root)/win32/msvc")
|
zlib := $(shell cygpath -m "$(win32)/msvc")
|
||||||
cxx = "$(msvc)/BIN/cl.exe"
|
cxx = "$(msvc)/BIN/cl.exe"
|
||||||
cc = $(cxx)
|
cc = $(cxx)
|
||||||
ld = "$(msvc)/BIN/link.exe"
|
ld = "$(msvc)/BIN/link.exe"
|
||||||
|
@ -869,9 +869,10 @@ parsePoolEntry(Thread* t, Stream& s, uint32_t* index, object pool, unsigned i)
|
|||||||
|
|
||||||
parsePoolEntry(t, s, index, pool, ci);
|
parsePoolEntry(t, s, index, pool, ci);
|
||||||
parsePoolEntry(t, s, index, pool, nti);
|
parsePoolEntry(t, s, index, pool, nti);
|
||||||
|
|
||||||
object class_ = referenceName(t, singletonObject(t, pool, ci));
|
object class_ = referenceName(t, singletonObject(t, pool, ci));
|
||||||
object nameAndType = singletonObject(t, pool, nti);
|
object nameAndType = singletonObject(t, pool, nti);
|
||||||
|
|
||||||
object value = makeReference
|
object value = makeReference
|
||||||
(t, class_, pairFirst(t, nameAndType), pairSecond(t, nameAndType));
|
(t, class_, pairFirst(t, nameAndType), pairSecond(t, nameAndType));
|
||||||
set(t, pool, SingletonBody + (i * BytesPerWord), value);
|
set(t, pool, SingletonBody + (i * BytesPerWord), value);
|
||||||
@ -3228,7 +3229,9 @@ isAssignableFrom(Thread* t, object a, object b)
|
|||||||
return isAssignableFrom
|
return isAssignableFrom
|
||||||
(t, classStaticTable(t, a), classStaticTable(t, b));
|
(t, classStaticTable(t, a), classStaticTable(t, b));
|
||||||
}
|
}
|
||||||
} else {
|
} else if ((classVmFlags(t, a) & PrimitiveFlag)
|
||||||
|
== (classVmFlags(t, b) & PrimitiveFlag))
|
||||||
|
{
|
||||||
for (; b; b = classSuper(t, b)) {
|
for (; b; b = classSuper(t, b)) {
|
||||||
if (b == a) {
|
if (b == a) {
|
||||||
return true;
|
return true;
|
||||||
|
@ -2164,6 +2164,8 @@ hashTaken(Thread*, object o)
|
|||||||
inline unsigned
|
inline unsigned
|
||||||
baseSize(Thread* t, object o, object class_)
|
baseSize(Thread* t, object o, object class_)
|
||||||
{
|
{
|
||||||
|
assert(t, classFixedSize(t, class_) >= BytesPerWord);
|
||||||
|
|
||||||
return ceiling(classFixedSize(t, class_), BytesPerWord)
|
return ceiling(classFixedSize(t, class_), BytesPerWord)
|
||||||
+ ceiling(classArrayElementSize(t, class_)
|
+ ceiling(classArrayElementSize(t, class_)
|
||||||
* cast<uintptr_t>(o, classFixedSize(t, class_) - BytesPerWord),
|
* cast<uintptr_t>(o, classFixedSize(t, class_) - BytesPerWord),
|
||||||
|
@ -235,5 +235,7 @@ public class Misc {
|
|||||||
System.out.println(75.62);
|
System.out.println(75.62);
|
||||||
System.out.println(75.62d);
|
System.out.println(75.62d);
|
||||||
System.out.println(new char[] { 'h', 'i' });
|
System.out.println(new char[] { 'h', 'i' });
|
||||||
|
|
||||||
|
expect(! (((Object) new int[0]) instanceof Object[]));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user