mirror of
https://github.com/corda/corda.git
synced 2025-01-22 04:18:31 +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
|
||||
.settings
|
||||
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)
|
||||
{
|
||||
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);
|
||||
if (file != INVALID_HANDLE_VALUE) {
|
||||
unsigned size = GetFileSize(file, 0);
|
||||
|
@ -81,7 +81,9 @@ public final class URL {
|
||||
private static URLStreamHandler findHandler(String protocol)
|
||||
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();
|
||||
} else if ("file".equals(protocol)) {
|
||||
return new avian.file.Handler();
|
||||
|
@ -38,7 +38,7 @@ public abstract class URLStreamHandler {
|
||||
host = s.substring(0, slash);
|
||||
} else {
|
||||
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);
|
||||
}
|
||||
|
12
makefile
12
makefile
@ -51,6 +51,8 @@ test-build = $(build)/test
|
||||
src = src
|
||||
classpath-src = classpath
|
||||
test = test
|
||||
win32 ?= $(root)/win32
|
||||
win64 ?= $(root)/win64
|
||||
|
||||
classpath = avian
|
||||
|
||||
@ -361,8 +363,8 @@ endif
|
||||
ifeq ($(platform),windows)
|
||||
bootimage-cflags += -DTARGET_PLATFORM_WINDOWS
|
||||
|
||||
inc = "$(root)/win32/include"
|
||||
lib = "$(root)/win32/lib"
|
||||
inc = "$(win32)/include"
|
||||
lib = "$(win32)/lib"
|
||||
|
||||
embed-prefix = c:/avian-embedded
|
||||
|
||||
@ -411,8 +413,8 @@ ifeq ($(platform),windows)
|
||||
ar = x86_64-w64-mingw32-ar
|
||||
ranlib = x86_64-w64-mingw32-ranlib
|
||||
strip = x86_64-w64-mingw32-strip
|
||||
inc = "$(root)/win64/include"
|
||||
lib = "$(root)/win64/lib"
|
||||
inc = "$(win64)/include"
|
||||
lib = "$(win64)/lib"
|
||||
endif
|
||||
endif
|
||||
|
||||
@ -469,7 +471,7 @@ build-ld := $(build-cc)
|
||||
|
||||
ifdef msvc
|
||||
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"
|
||||
cc = $(cxx)
|
||||
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, nti);
|
||||
|
||||
|
||||
object class_ = referenceName(t, singletonObject(t, pool, ci));
|
||||
object nameAndType = singletonObject(t, pool, nti);
|
||||
|
||||
object value = makeReference
|
||||
(t, class_, pairFirst(t, nameAndType), pairSecond(t, nameAndType));
|
||||
set(t, pool, SingletonBody + (i * BytesPerWord), value);
|
||||
@ -3228,7 +3229,9 @@ isAssignableFrom(Thread* t, object a, object b)
|
||||
return isAssignableFrom
|
||||
(t, classStaticTable(t, a), classStaticTable(t, b));
|
||||
}
|
||||
} else {
|
||||
} else if ((classVmFlags(t, a) & PrimitiveFlag)
|
||||
== (classVmFlags(t, b) & PrimitiveFlag))
|
||||
{
|
||||
for (; b; b = classSuper(t, b)) {
|
||||
if (b == a) {
|
||||
return true;
|
||||
|
@ -2164,6 +2164,8 @@ hashTaken(Thread*, object o)
|
||||
inline unsigned
|
||||
baseSize(Thread* t, object o, object class_)
|
||||
{
|
||||
assert(t, classFixedSize(t, class_) >= BytesPerWord);
|
||||
|
||||
return ceiling(classFixedSize(t, class_), BytesPerWord)
|
||||
+ ceiling(classArrayElementSize(t, class_)
|
||||
* cast<uintptr_t>(o, classFixedSize(t, class_) - BytesPerWord),
|
||||
|
@ -235,5 +235,7 @@ public class Misc {
|
||||
System.out.println(75.62);
|
||||
System.out.println(75.62d);
|
||||
System.out.println(new char[] { 'h', 'i' });
|
||||
|
||||
expect(! (((Object) new int[0]) instanceof Object[]));
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user