mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-24 04:54:40 +02:00
Merge
This commit is contained in:
commit
d30eeff9a1
178 changed files with 6630 additions and 4639 deletions
|
@ -1,5 +1,5 @@
|
||||||
#
|
#
|
||||||
# Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
|
# Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
#
|
#
|
||||||
# This code is free software; you can redistribute it and/or modify it
|
# This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -111,10 +111,10 @@ CC_OPT = $(CC_OPT/$(OPTIMIZATION_LEVEL))
|
||||||
|
|
||||||
# For all platforms, do not omit the frame pointer register usage.
|
# For all platforms, do not omit the frame pointer register usage.
|
||||||
# We need this frame pointer to make it easy to walk the stacks.
|
# We need this frame pointer to make it easy to walk the stacks.
|
||||||
# This should be the default on X86, but ia64 and amd64 may not have this
|
# This should be the default on X86, but ia64, and x86_64
|
||||||
# as the default.
|
# may not have this as the default.
|
||||||
CFLAGS_REQUIRED_amd64 += -m64 -fno-omit-frame-pointer -D_LITTLE_ENDIAN
|
CFLAGS_REQUIRED_x86_64 += -m64 -fno-omit-frame-pointer -D_LITTLE_ENDIAN
|
||||||
LDFLAGS_COMMON_amd64 += -m64
|
LDFLAGS_COMMON_x86_64 += -m64
|
||||||
CFLAGS_REQUIRED_i586 += -m32 -fno-omit-frame-pointer -D_LITTLE_ENDIAN
|
CFLAGS_REQUIRED_i586 += -m32 -fno-omit-frame-pointer -D_LITTLE_ENDIAN
|
||||||
LDFLAGS_COMMON_i586 += -m32
|
LDFLAGS_COMMON_i586 += -m32
|
||||||
CFLAGS_REQUIRED_ia64 += -m64 -fno-omit-frame-pointer -D_LITTLE_ENDIAN
|
CFLAGS_REQUIRED_ia64 += -m64 -fno-omit-frame-pointer -D_LITTLE_ENDIAN
|
||||||
|
@ -168,7 +168,7 @@ PIC_CODE_LARGE = -fPIC
|
||||||
PIC_CODE_SMALL = -fpic
|
PIC_CODE_SMALL = -fpic
|
||||||
GLOBAL_KPIC = $(PIC_CODE_LARGE)
|
GLOBAL_KPIC = $(PIC_CODE_LARGE)
|
||||||
CFLAGS_COMMON += $(GLOBAL_KPIC) $(GCC_WARNINGS)
|
CFLAGS_COMMON += $(GLOBAL_KPIC) $(GCC_WARNINGS)
|
||||||
ifeq ($(ARCH), amd64)
|
ifeq ($(ARCH), x86_64)
|
||||||
CFLAGS_COMMON += -pipe
|
CFLAGS_COMMON += -pipe
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#
|
#
|
||||||
# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
|
# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
#
|
#
|
||||||
# This code is free software; you can redistribute it and/or modify it
|
# This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -264,7 +264,7 @@ ifeq ($(PLATFORM), macosx)
|
||||||
echo sparc \
|
echo sparc \
|
||||||
;; \
|
;; \
|
||||||
x86_64) \
|
x86_64) \
|
||||||
echo amd64 \
|
echo x86_64 \
|
||||||
;; \
|
;; \
|
||||||
universal) \
|
universal) \
|
||||||
echo universal \
|
echo universal \
|
||||||
|
|
|
@ -81,6 +81,7 @@ endif
|
||||||
# SA tools
|
# SA tools
|
||||||
ifeq ($(PROGRAM),jstack)
|
ifeq ($(PROGRAM),jstack)
|
||||||
SA_TOOL=true
|
SA_TOOL=true
|
||||||
|
INFO_PLIST_FILE=Info-privileged.plist
|
||||||
endif
|
endif
|
||||||
ifeq ($(PROGRAM),jsadebugd)
|
ifeq ($(PROGRAM),jsadebugd)
|
||||||
SA_TOOL=true
|
SA_TOOL=true
|
||||||
|
|
|
@ -906,11 +906,41 @@ SetXDockArgForAWT(const char *arg)
|
||||||
{
|
{
|
||||||
char envVar[80];
|
char envVar[80];
|
||||||
if (strstr(arg, "-Xdock:name=") == arg) {
|
if (strstr(arg, "-Xdock:name=") == arg) {
|
||||||
|
/*
|
||||||
|
* The APP_NAME_<pid> environment variable is used to pass
|
||||||
|
* an application name as specified with the -Xdock:name command
|
||||||
|
* line option from Java launcher code to the AWT code in order
|
||||||
|
* to assign this name to the app's dock tile on the Mac.
|
||||||
|
* The _<pid> part is added to avoid collisions with child processes.
|
||||||
|
*
|
||||||
|
* WARNING: This environment variable is an implementation detail and
|
||||||
|
* isn't meant for use outside of the core platform. The mechanism for
|
||||||
|
* passing this information from Java launcher to other modules may
|
||||||
|
* change drastically between update release, and it may even be
|
||||||
|
* removed or replaced with another mechanism.
|
||||||
|
*
|
||||||
|
* NOTE: It is used by SWT, and JavaFX.
|
||||||
|
*/
|
||||||
snprintf(envVar, sizeof(envVar), "APP_NAME_%d", getpid());
|
snprintf(envVar, sizeof(envVar), "APP_NAME_%d", getpid());
|
||||||
setenv(envVar, (arg + 12), 1);
|
setenv(envVar, (arg + 12), 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strstr(arg, "-Xdock:icon=") == arg) {
|
if (strstr(arg, "-Xdock:icon=") == arg) {
|
||||||
|
/*
|
||||||
|
* The APP_ICON_<pid> environment variable is used to pass
|
||||||
|
* an application icon as specified with the -Xdock:icon command
|
||||||
|
* line option from Java launcher code to the AWT code in order
|
||||||
|
* to assign this icon to the app's dock tile on the Mac.
|
||||||
|
* The _<pid> part is added to avoid collisions with child processes.
|
||||||
|
*
|
||||||
|
* WARNING: This environment variable is an implementation detail and
|
||||||
|
* isn't meant for use outside of the core platform. The mechanism for
|
||||||
|
* passing this information from Java launcher to other modules may
|
||||||
|
* change drastically between update release, and it may even be
|
||||||
|
* removed or replaced with another mechanism.
|
||||||
|
*
|
||||||
|
* NOTE: It is used by SWT, and JavaFX.
|
||||||
|
*/
|
||||||
snprintf(envVar, sizeof(envVar), "APP_ICON_%d", getpid());
|
snprintf(envVar, sizeof(envVar), "APP_ICON_%d", getpid());
|
||||||
setenv(envVar, (arg + 12), 1);
|
setenv(envVar, (arg + 12), 1);
|
||||||
}
|
}
|
||||||
|
@ -931,6 +961,22 @@ SetMainClassForAWT(JNIEnv *env, jclass mainClass) {
|
||||||
NULL_CHECK(mainClassName = (*env)->GetStringUTFChars(env, mainClassString, NULL));
|
NULL_CHECK(mainClassName = (*env)->GetStringUTFChars(env, mainClassString, NULL));
|
||||||
|
|
||||||
char envVar[80];
|
char envVar[80];
|
||||||
|
/*
|
||||||
|
* The JAVA_MAIN_CLASS_<pid> environment variable is used to pass
|
||||||
|
* the name of a Java class whose main() method is invoked by
|
||||||
|
* the Java launcher code to start the application, to the AWT code
|
||||||
|
* in order to assign the name to the Apple menu bar when the app
|
||||||
|
* is active on the Mac.
|
||||||
|
* The _<pid> part is added to avoid collisions with child processes.
|
||||||
|
*
|
||||||
|
* WARNING: This environment variable is an implementation detail and
|
||||||
|
* isn't meant for use outside of the core platform. The mechanism for
|
||||||
|
* passing this information from Java launcher to other modules may
|
||||||
|
* change drastically between update release, and it may even be
|
||||||
|
* removed or replaced with another mechanism.
|
||||||
|
*
|
||||||
|
* NOTE: It is used by SWT, and JavaFX.
|
||||||
|
*/
|
||||||
snprintf(envVar, sizeof(envVar), "JAVA_MAIN_CLASS_%d", getpid());
|
snprintf(envVar, sizeof(envVar), "JAVA_MAIN_CLASS_%d", getpid());
|
||||||
setenv(envVar, mainClassName, 1);
|
setenv(envVar, mainClassName, 1);
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,6 @@ package apple.launcher;
|
||||||
|
|
||||||
import java.io.*;
|
import java.io.*;
|
||||||
import java.lang.reflect.*;
|
import java.lang.reflect.*;
|
||||||
import java.security.PrivilegedAction;
|
|
||||||
import java.text.MessageFormat;
|
import java.text.MessageFormat;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.jar.*;
|
import java.util.jar.*;
|
||||||
|
@ -36,7 +35,13 @@ import javax.swing.*;
|
||||||
|
|
||||||
class JavaAppLauncher implements Runnable {
|
class JavaAppLauncher implements Runnable {
|
||||||
static {
|
static {
|
||||||
java.security.AccessController.doPrivileged((PrivilegedAction<?>)new sun.security.action.LoadLibraryAction("osx"));
|
java.security.AccessController.doPrivileged(
|
||||||
|
new java.security.PrivilegedAction<Void>() {
|
||||||
|
public Void run() {
|
||||||
|
System.loadLibrary("osx");
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private static native <T> T nativeConvertAndRelease(final long ptr);
|
private static native <T> T nativeConvertAndRelease(final long ptr);
|
||||||
|
|
|
@ -103,7 +103,13 @@ public final class KeychainStore extends KeyStoreSpi {
|
||||||
private static final int SALT_LEN = 20;
|
private static final int SALT_LEN = 20;
|
||||||
|
|
||||||
static {
|
static {
|
||||||
java.security.AccessController.doPrivileged((PrivilegedAction<?>)new sun.security.action.LoadLibraryAction("osx"));
|
AccessController.doPrivileged(
|
||||||
|
new PrivilegedAction<Void>() {
|
||||||
|
public Void run() {
|
||||||
|
System.loadLibrary("osx");
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
});
|
||||||
try {
|
try {
|
||||||
PKCS8ShroudedKeyBag_OID = new ObjectIdentifier(keyBag);
|
PKCS8ShroudedKeyBag_OID = new ObjectIdentifier(keyBag);
|
||||||
pbeWithSHAAnd3KeyTripleDESCBC_OID = new ObjectIdentifier(pbeWithSHAAnd3KeyTripleDESCBC);
|
pbeWithSHAAnd3KeyTripleDESCBC_OID = new ObjectIdentifier(pbeWithSHAAnd3KeyTripleDESCBC);
|
||||||
|
|
|
@ -27,7 +27,13 @@ package com.apple.concurrent;
|
||||||
|
|
||||||
final class LibDispatchNative {
|
final class LibDispatchNative {
|
||||||
static {
|
static {
|
||||||
java.security.AccessController.doPrivileged((java.security.PrivilegedAction<?>)new sun.security.action.LoadLibraryAction("osx"));
|
java.security.AccessController.doPrivileged(
|
||||||
|
new java.security.PrivilegedAction<Void>() {
|
||||||
|
public Void run() {
|
||||||
|
System.loadLibrary("osx");
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
static native boolean nativeIsDispatchSupported();
|
static native boolean nativeIsDispatchSupported();
|
||||||
|
|
|
@ -28,7 +28,6 @@ package com.apple.eawt;
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
import java.awt.peer.*;
|
import java.awt.peer.*;
|
||||||
import java.beans.Beans;
|
import java.beans.Beans;
|
||||||
import java.security.PrivilegedAction;
|
|
||||||
|
|
||||||
import javax.swing.JMenuBar;
|
import javax.swing.JMenuBar;
|
||||||
|
|
||||||
|
@ -59,7 +58,13 @@ public class Application {
|
||||||
static Application sApplication = null;
|
static Application sApplication = null;
|
||||||
|
|
||||||
static {
|
static {
|
||||||
java.security.AccessController.doPrivileged((PrivilegedAction<?>)new sun.security.action.LoadLibraryAction("awt"));
|
java.security.AccessController.doPrivileged(
|
||||||
|
new java.security.PrivilegedAction<Void>() {
|
||||||
|
public Void run() {
|
||||||
|
System.loadLibrary("awt");
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
checkSecurity();
|
checkSecurity();
|
||||||
if (!Beans.isDesignTime()) {
|
if (!Beans.isDesignTime()) {
|
||||||
|
|
|
@ -55,7 +55,13 @@ import java.io.*;
|
||||||
*/
|
*/
|
||||||
public class FileManager {
|
public class FileManager {
|
||||||
static {
|
static {
|
||||||
java.security.AccessController.doPrivileged((java.security.PrivilegedAction<?>)new sun.security.action.LoadLibraryAction("osx"));
|
java.security.AccessController.doPrivileged(
|
||||||
|
new java.security.PrivilegedAction<Void>() {
|
||||||
|
public Void run() {
|
||||||
|
System.loadLibrary("osx");
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -26,7 +26,6 @@
|
||||||
package com.apple.laf;
|
package com.apple.laf;
|
||||||
|
|
||||||
import java.io.*;
|
import java.io.*;
|
||||||
import java.security.PrivilegedAction;
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.Map.Entry;
|
import java.util.Map.Entry;
|
||||||
|
|
||||||
|
@ -57,7 +56,13 @@ class AquaFileView extends FileView {
|
||||||
static final int kLSItemInfoExtensionIsHidden = 0x00100000; /* Item has a hidden extension*/
|
static final int kLSItemInfoExtensionIsHidden = 0x00100000; /* Item has a hidden extension*/
|
||||||
|
|
||||||
static {
|
static {
|
||||||
java.security.AccessController.doPrivileged((PrivilegedAction<?>)new sun.security.action.LoadLibraryAction("osxui"));
|
java.security.AccessController.doPrivileged(
|
||||||
|
new java.security.PrivilegedAction<Void>() {
|
||||||
|
public Void run() {
|
||||||
|
System.loadLibrary("osxui");
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: Un-comment this out when the native version exists
|
// TODO: Un-comment this out when the native version exists
|
||||||
|
|
|
@ -134,10 +134,16 @@ public class AquaLookAndFeel extends BasicLookAndFeel {
|
||||||
* @see UIManager#setLookAndFeel
|
* @see UIManager#setLookAndFeel
|
||||||
*/
|
*/
|
||||||
public void initialize() {
|
public void initialize() {
|
||||||
java.security.AccessController.doPrivileged((PrivilegedAction<?>)new sun.security.action.LoadLibraryAction("osxui"));
|
java.security.AccessController.doPrivileged(new PrivilegedAction<Void>() {
|
||||||
java.security.AccessController.doPrivileged(new PrivilegedAction<Object>(){
|
public Void run() {
|
||||||
|
System.loadLibrary("osxui");
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
java.security.AccessController.doPrivileged(new PrivilegedAction<Void>(){
|
||||||
@Override
|
@Override
|
||||||
public Object run() {
|
public Void run() {
|
||||||
JRSUIControl.initJRSUI();
|
JRSUIControl.initJRSUI();
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,7 +27,6 @@ package com.apple.laf;
|
||||||
|
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
import java.awt.image.BufferedImage;
|
import java.awt.image.BufferedImage;
|
||||||
import java.security.PrivilegedAction;
|
|
||||||
|
|
||||||
import javax.swing.plaf.UIResource;
|
import javax.swing.plaf.UIResource;
|
||||||
|
|
||||||
|
@ -35,7 +34,13 @@ import com.apple.laf.AquaUtils.RecyclableSingleton;
|
||||||
|
|
||||||
public class AquaNativeResources {
|
public class AquaNativeResources {
|
||||||
static {
|
static {
|
||||||
java.security.AccessController.doPrivileged((PrivilegedAction<?>)new sun.security.action.LoadLibraryAction("osxui"));
|
java.security.AccessController.doPrivileged(
|
||||||
|
new java.security.PrivilegedAction<Void>() {
|
||||||
|
public Void run() {
|
||||||
|
System.loadLibrary("osxui");
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: removing CColorPaint for now
|
// TODO: removing CColorPaint for now
|
||||||
|
|
|
@ -28,7 +28,6 @@ package com.apple.laf;
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
import java.awt.event.*;
|
import java.awt.event.*;
|
||||||
import java.awt.peer.MenuComponentPeer;
|
import java.awt.peer.MenuComponentPeer;
|
||||||
import java.security.PrivilegedAction;
|
|
||||||
import java.util.Hashtable;
|
import java.util.Hashtable;
|
||||||
|
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
|
@ -38,7 +37,13 @@ import sun.lwawt.macosx.*;
|
||||||
|
|
||||||
class ScreenMenu extends Menu implements ContainerListener, ComponentListener, ScreenMenuPropertyHandler {
|
class ScreenMenu extends Menu implements ContainerListener, ComponentListener, ScreenMenuPropertyHandler {
|
||||||
static {
|
static {
|
||||||
java.security.AccessController.doPrivileged((PrivilegedAction<?>)new sun.security.action.LoadLibraryAction("awt"));
|
java.security.AccessController.doPrivileged(
|
||||||
|
new java.security.PrivilegedAction<Void>() {
|
||||||
|
public Void run() {
|
||||||
|
System.loadLibrary("awt");
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// screen menu stuff
|
// screen menu stuff
|
||||||
|
|
|
@ -26,15 +26,19 @@
|
||||||
package com.apple.laf;
|
package com.apple.laf;
|
||||||
|
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
import java.security.PrivilegedAction;
|
|
||||||
|
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
|
|
||||||
import sun.lwawt.macosx.CPlatformWindow;
|
import sun.lwawt.macosx.CPlatformWindow;
|
||||||
|
|
||||||
class ScreenPopupFactory extends PopupFactory {
|
class ScreenPopupFactory extends PopupFactory {
|
||||||
static {
|
static {
|
||||||
java.security.AccessController.doPrivileged((PrivilegedAction<?>)new sun.security.action.LoadLibraryAction("osxui"));
|
java.security.AccessController.doPrivileged(
|
||||||
|
new java.security.PrivilegedAction<Void>() {
|
||||||
|
public Void run() {
|
||||||
|
System.loadLibrary("osxui");
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
static final Float TRANSLUCENT = new Float(248f/255f);
|
static final Float TRANSLUCENT = new Float(248f/255f);
|
||||||
|
|
|
@ -25,6 +25,8 @@
|
||||||
|
|
||||||
package java.util.prefs;
|
package java.util.prefs;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
class MacOSXPreferences extends AbstractPreferences {
|
class MacOSXPreferences extends AbstractPreferences {
|
||||||
// fixme need security checks?
|
// fixme need security checks?
|
||||||
|
|
||||||
|
@ -147,6 +149,7 @@ class MacOSXPreferences extends AbstractPreferences {
|
||||||
// AbstractPreferences implementation
|
// AbstractPreferences implementation
|
||||||
protected void removeSpi(String key)
|
protected void removeSpi(String key)
|
||||||
{
|
{
|
||||||
|
Objects.requireNonNull(key, "Specified key cannot be null");
|
||||||
file.removeKeyFromNode(path, key);
|
file.removeKeyFromNode(path, key);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -228,11 +231,17 @@ class MacOSXPreferences extends AbstractPreferences {
|
||||||
if (isRemoved())
|
if (isRemoved())
|
||||||
throw new IllegalStateException("Node has been removed");
|
throw new IllegalStateException("Node has been removed");
|
||||||
// fixme! overkill
|
// fixme! overkill
|
||||||
|
if (isUser) {
|
||||||
|
if (!MacOSXPreferencesFile.syncUser()) {
|
||||||
|
throw new BackingStoreException("Synchronization failed for node '" + path + "'");
|
||||||
|
}
|
||||||
|
} else {
|
||||||
if (!MacOSXPreferencesFile.syncWorld()) {
|
if (!MacOSXPreferencesFile.syncWorld()) {
|
||||||
throw new BackingStoreException("Synchronization failed for node '" + path + "'");
|
throw new BackingStoreException("Synchronization failed for node '" + path + "'");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// AbstractPreferences implementation
|
// AbstractPreferences implementation
|
||||||
protected void syncSpi()
|
protected void syncSpi()
|
||||||
|
|
|
@ -79,7 +79,13 @@ import java.lang.ref.WeakReference;
|
||||||
class MacOSXPreferencesFile {
|
class MacOSXPreferencesFile {
|
||||||
|
|
||||||
static {
|
static {
|
||||||
java.security.AccessController.doPrivileged(new sun.security.action.LoadLibraryAction("osx"));
|
java.security.AccessController.doPrivileged(
|
||||||
|
new java.security.PrivilegedAction<Void>() {
|
||||||
|
public Void run() {
|
||||||
|
System.loadLibrary("osx");
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private class FlushTask extends TimerTask {
|
private class FlushTask extends TimerTask {
|
||||||
|
@ -192,6 +198,39 @@ class MacOSXPreferencesFile {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Sync only current user preferences
|
||||||
|
static synchronized boolean syncUser() {
|
||||||
|
boolean ok = true;
|
||||||
|
if (cachedFiles != null && !cachedFiles.isEmpty()) {
|
||||||
|
Iterator<WeakReference> iter = cachedFiles.values().iterator();
|
||||||
|
while (iter.hasNext()) {
|
||||||
|
WeakReference ref = iter.next();
|
||||||
|
MacOSXPreferencesFile f = (MacOSXPreferencesFile)ref.get();
|
||||||
|
if (f != null && f.user == cfCurrentUser) {
|
||||||
|
if (!f.synchronize()) {
|
||||||
|
ok = false;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
iter.remove();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Remove synchronized file from changed file list. The changed files were
|
||||||
|
// guaranteed to have been in the cached file list (because there was a strong
|
||||||
|
// reference from changedFiles.
|
||||||
|
if (changedFiles != null) {
|
||||||
|
Iterator<MacOSXPreferencesFile> iterChanged = changedFiles.iterator();
|
||||||
|
while (iterChanged.hasNext()) {
|
||||||
|
MacOSXPreferencesFile f = iterChanged.next();
|
||||||
|
if (f != null && f.user == cfCurrentUser)
|
||||||
|
iterChanged.remove();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return ok;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Write all prefs changes to disk, but do not clear all cached prefs
|
// Write all prefs changes to disk, but do not clear all cached prefs
|
||||||
// values. Also kills any scheduled flush task.
|
// values. Also kills any scheduled flush task.
|
||||||
// There's no CFPreferencesFlush() (<rdar://problem/3049129>), so lots of cached prefs
|
// There's no CFPreferencesFlush() (<rdar://problem/3049129>), so lots of cached prefs
|
||||||
|
|
|
@ -58,9 +58,15 @@ public class CGraphicsEnvironment extends SunGraphicsEnvironment {
|
||||||
public static void init() { }
|
public static void init() { }
|
||||||
|
|
||||||
static {
|
static {
|
||||||
java.security.AccessController.doPrivileged(new sun.security.action.LoadLibraryAction("awt"));
|
java.security.AccessController.doPrivileged(new java.security.PrivilegedAction<Void>() {
|
||||||
java.security.AccessController.doPrivileged(new java.security.PrivilegedAction<Object>() {
|
public Void run() {
|
||||||
public Object run() {
|
System.loadLibrary("awt");
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
java.security.AccessController.doPrivileged(new java.security.PrivilegedAction<Void>() {
|
||||||
|
public Void run() {
|
||||||
if (isHeadless()) return null;
|
if (isHeadless()) return null;
|
||||||
initCocoa();
|
initCocoa();
|
||||||
return null;
|
return null;
|
||||||
|
|
|
@ -210,6 +210,15 @@ final class LWTextAreaPeer
|
||||||
super();
|
super();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void replaceSelection(String content) {
|
||||||
|
getDocument().removeDocumentListener(LWTextAreaPeer.this);
|
||||||
|
super.replaceSelection(content);
|
||||||
|
// post only one text event in this case
|
||||||
|
postTextEvent();
|
||||||
|
getDocument().addDocumentListener(LWTextAreaPeer.this);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean hasFocus() {
|
public boolean hasFocus() {
|
||||||
return getTarget().hasFocus();
|
return getTarget().hasFocus();
|
||||||
|
|
|
@ -187,7 +187,7 @@ abstract class LWTextComponentPeer<T extends TextComponent, D extends JComponent
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void sendTextEvent(final DocumentEvent e) {
|
protected final void postTextEvent() {
|
||||||
postEvent(new TextEvent(getTarget(), TextEvent.TEXT_VALUE_CHANGED));
|
postEvent(new TextEvent(getTarget(), TextEvent.TEXT_VALUE_CHANGED));
|
||||||
synchronized (getDelegateLock()) {
|
synchronized (getDelegateLock()) {
|
||||||
revalidate();
|
revalidate();
|
||||||
|
@ -196,17 +196,17 @@ abstract class LWTextComponentPeer<T extends TextComponent, D extends JComponent
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public final void changedUpdate(final DocumentEvent e) {
|
public final void changedUpdate(final DocumentEvent e) {
|
||||||
sendTextEvent(e);
|
postTextEvent();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public final void insertUpdate(final DocumentEvent e) {
|
public final void insertUpdate(final DocumentEvent e) {
|
||||||
sendTextEvent(e);
|
postTextEvent();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public final void removeUpdate(final DocumentEvent e) {
|
public final void removeUpdate(final DocumentEvent e) {
|
||||||
sendTextEvent(e);
|
postTextEvent();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -121,6 +121,15 @@ final class LWTextFieldPeer
|
||||||
super();
|
super();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void replaceSelection(String content) {
|
||||||
|
getDocument().removeDocumentListener(LWTextFieldPeer.this);
|
||||||
|
super.replaceSelection(content);
|
||||||
|
// post only one text event in this case
|
||||||
|
postTextEvent();
|
||||||
|
getDocument().addDocumentListener(LWTextFieldPeer.this);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean hasFocus() {
|
public boolean hasFocus() {
|
||||||
return getTarget().hasFocus();
|
return getTarget().hasFocus();
|
||||||
|
|
|
@ -669,6 +669,8 @@ public class LWWindowPeer
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (targetPeer != lastMouseEventPeer) {
|
if (targetPeer != lastMouseEventPeer) {
|
||||||
|
|
||||||
|
if (id != MouseEvent.MOUSE_DRAGGED || lastMouseEventPeer == null) {
|
||||||
// lastMouseEventPeer may be null if mouse was out of Java windows
|
// lastMouseEventPeer may be null if mouse was out of Java windows
|
||||||
if (lastMouseEventPeer != null && lastMouseEventPeer.isEnabled()) {
|
if (lastMouseEventPeer != null && lastMouseEventPeer.isEnabled()) {
|
||||||
// Sometimes, MOUSE_EXITED is not sent by delegate (or is sent a bit
|
// Sometimes, MOUSE_EXITED is not sent by delegate (or is sent a bit
|
||||||
|
@ -693,7 +695,6 @@ public class LWWindowPeer
|
||||||
clickCount, popupTrigger, button));
|
clickCount, popupTrigger, button));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
lastMouseEventPeer = targetPeer;
|
|
||||||
if (targetPeer != null && targetPeer.isEnabled() && id != MouseEvent.MOUSE_ENTERED) {
|
if (targetPeer != null && targetPeer.isEnabled() && id != MouseEvent.MOUSE_ENTERED) {
|
||||||
Point newp = targetPeer.windowToLocal(x, y, curWindowPeer);
|
Point newp = targetPeer.windowToLocal(x, y, curWindowPeer);
|
||||||
postEvent(new MouseEvent(targetPeer.getTarget(),
|
postEvent(new MouseEvent(targetPeer.getTarget(),
|
||||||
|
@ -703,6 +704,8 @@ public class LWWindowPeer
|
||||||
clickCount, popupTrigger, button));
|
clickCount, popupTrigger, button));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
lastMouseEventPeer = targetPeer;
|
||||||
|
}
|
||||||
// TODO: fill "bdata" member of AWTEvent
|
// TODO: fill "bdata" member of AWTEvent
|
||||||
|
|
||||||
int eventButtonMask = (button > 0)? MouseEvent.getMaskForButton(button) : 0;
|
int eventButtonMask = (button > 0)? MouseEvent.getMaskForButton(button) : 0;
|
||||||
|
|
|
@ -29,7 +29,6 @@ import java.awt.*;
|
||||||
import java.beans.*;
|
import java.beans.*;
|
||||||
import java.lang.reflect.Field;
|
import java.lang.reflect.Field;
|
||||||
import java.lang.reflect.InvocationTargetException;
|
import java.lang.reflect.InvocationTargetException;
|
||||||
import java.security.PrivilegedAction;
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.concurrent.Callable;
|
import java.util.concurrent.Callable;
|
||||||
|
|
||||||
|
@ -41,7 +40,13 @@ class CAccessibility implements PropertyChangeListener {
|
||||||
|
|
||||||
static {
|
static {
|
||||||
// Need to load the native library for this code.
|
// Need to load the native library for this code.
|
||||||
java.security.AccessController.doPrivileged((PrivilegedAction<?>)new sun.security.action.LoadLibraryAction("awt"));
|
java.security.AccessController.doPrivileged(
|
||||||
|
new java.security.PrivilegedAction<Void>() {
|
||||||
|
public Void run() {
|
||||||
|
System.loadLibrary("awt");
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
static CAccessibility sAccessibility;
|
static CAccessibility sAccessibility;
|
||||||
|
|
|
@ -36,6 +36,7 @@ final class CCursorManager extends LWCursorManager {
|
||||||
private static native Point2D nativeGetCursorPosition();
|
private static native Point2D nativeGetCursorPosition();
|
||||||
private static native void nativeSetBuiltInCursor(final int type, final String name);
|
private static native void nativeSetBuiltInCursor(final int type, final String name);
|
||||||
private static native void nativeSetCustomCursor(final long imgPtr, final double x, final double y);
|
private static native void nativeSetCustomCursor(final long imgPtr, final double x, final double y);
|
||||||
|
public static native void nativeSetAllowsCursorSetInBackground(final boolean allows);
|
||||||
|
|
||||||
private static final int NAMED_CURSOR = -1;
|
private static final int NAMED_CURSOR = -1;
|
||||||
|
|
||||||
|
|
|
@ -76,6 +76,12 @@ public class CEmbeddedFrame extends EmbeddedFrame {
|
||||||
int screenX = locationOnScreen.x + x;
|
int screenX = locationOnScreen.x + x;
|
||||||
int screenY = locationOnScreen.y + y;
|
int screenY = locationOnScreen.y + y;
|
||||||
|
|
||||||
|
if (eventType == CocoaConstants.NPCocoaEventMouseEntered) {
|
||||||
|
CCursorManager.nativeSetAllowsCursorSetInBackground(true);
|
||||||
|
} else if (eventType == CocoaConstants.NPCocoaEventMouseExited) {
|
||||||
|
CCursorManager.nativeSetAllowsCursorSetInBackground(false);
|
||||||
|
}
|
||||||
|
|
||||||
responder.handleMouseEvent(eventType, modifierFlags, buttonNumber,
|
responder.handleMouseEvent(eventType, modifierFlags, buttonNumber,
|
||||||
clickCount, x, y, screenX, screenY);
|
clickCount, x, y, screenX, screenY);
|
||||||
}
|
}
|
||||||
|
|
|
@ -61,6 +61,7 @@ public class CPlatformWindow extends CFRetainedResource implements PlatformWindo
|
||||||
private static native void nativeSetNSWindowMinimizedIcon(long nsWindowPtr, long nsImage);
|
private static native void nativeSetNSWindowMinimizedIcon(long nsWindowPtr, long nsImage);
|
||||||
private static native void nativeSetNSWindowRepresentedFilename(long nsWindowPtr, String representedFilename);
|
private static native void nativeSetNSWindowRepresentedFilename(long nsWindowPtr, String representedFilename);
|
||||||
private static native void nativeSetNSWindowSecurityWarningPositioning(long nsWindowPtr, double x, double y, float biasX, float biasY);
|
private static native void nativeSetNSWindowSecurityWarningPositioning(long nsWindowPtr, double x, double y, float biasX, float biasY);
|
||||||
|
private static native void nativeSynthesizeMouseEnteredExitedEvents(long nsWindowPtr);
|
||||||
|
|
||||||
private static native int nativeGetScreenNSWindowIsOn_AppKitThread(long nsWindowPtr);
|
private static native int nativeGetScreenNSWindowIsOn_AppKitThread(long nsWindowPtr);
|
||||||
|
|
||||||
|
@ -582,6 +583,8 @@ public class CPlatformWindow extends CFRetainedResource implements PlatformWindo
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
nativeSynthesizeMouseEnteredExitedEvents(nsWindowPtr);
|
||||||
|
|
||||||
// 6. Configure stuff #2
|
// 6. Configure stuff #2
|
||||||
updateFocusabilityForAutoRequestFocus(true);
|
updateFocusabilityForAutoRequestFocus(true);
|
||||||
|
|
||||||
|
@ -791,6 +794,8 @@ public class CPlatformWindow extends CFRetainedResource implements PlatformWindo
|
||||||
throw new RuntimeException("Unknown window state: " + windowState);
|
throw new RuntimeException("Unknown window state: " + windowState);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
nativeSynthesizeMouseEnteredExitedEvents(nsWindowPtr);
|
||||||
|
|
||||||
// NOTE: the SWP.windowState field gets updated to the newWindowState
|
// NOTE: the SWP.windowState field gets updated to the newWindowState
|
||||||
// value when the native notification comes to us
|
// value when the native notification comes to us
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -656,6 +656,14 @@ public class LWCToolkit extends LWToolkit {
|
||||||
return ((mods & (InputEvent.META_MASK | InputEvent.CTRL_MASK)) == 0);
|
return ((mods & (InputEvent.META_MASK | InputEvent.CTRL_MASK)) == 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns whether popup is allowed to be shown above the task bar.
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public boolean canPopupOverlapTaskBar() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
// Extends PeerEvent because we want to pass long an ObjC mediator object and because we want these events to be posted early
|
// Extends PeerEvent because we want to pass long an ObjC mediator object and because we want these events to be posted early
|
||||||
// Typically, rather than relying on the notifier to call notifyAll(), we use the mediator to stop the runloop
|
// Typically, rather than relying on the notifier to call notifyAll(), we use the mediator to stop the runloop
|
||||||
public static class CPeerEvent extends PeerEvent {
|
public static class CPeerEvent extends PeerEvent {
|
||||||
|
|
|
@ -52,9 +52,12 @@
|
||||||
BOOL fPAHNeedsToSelect;
|
BOOL fPAHNeedsToSelect;
|
||||||
|
|
||||||
id cglLayer; // is a sublayer of view.layer
|
id cglLayer; // is a sublayer of view.layer
|
||||||
|
|
||||||
|
BOOL mouseIsOver;
|
||||||
}
|
}
|
||||||
|
|
||||||
@property (nonatomic, retain) id cglLayer;
|
@property (nonatomic, retain) id cglLayer;
|
||||||
|
@property (nonatomic) BOOL mouseIsOver;
|
||||||
|
|
||||||
- (id) initWithRect:(NSRect) rect platformView:(jobject)cPlatformView windowLayer:(CALayer*)windowLayer;
|
- (id) initWithRect:(NSRect) rect platformView:(jobject)cPlatformView windowLayer:(CALayer*)windowLayer;
|
||||||
- (void) deliverJavaMouseEvent: (NSEvent *) event;
|
- (void) deliverJavaMouseEvent: (NSEvent *) event;
|
||||||
|
|
|
@ -61,6 +61,7 @@ static BOOL shouldUsePressAndHold() {
|
||||||
@synthesize _dropTarget;
|
@synthesize _dropTarget;
|
||||||
@synthesize _dragSource;
|
@synthesize _dragSource;
|
||||||
@synthesize cglLayer;
|
@synthesize cglLayer;
|
||||||
|
@synthesize mouseIsOver;
|
||||||
|
|
||||||
// Note: Must be called on main (AppKit) thread only
|
// Note: Must be called on main (AppKit) thread only
|
||||||
- (id) initWithRect: (NSRect) rect
|
- (id) initWithRect: (NSRect) rect
|
||||||
|
@ -81,6 +82,8 @@ AWT_ASSERT_APPKIT_THREAD;
|
||||||
fInPressAndHold = NO;
|
fInPressAndHold = NO;
|
||||||
fPAHNeedsToSelect = NO;
|
fPAHNeedsToSelect = NO;
|
||||||
|
|
||||||
|
mouseIsOver = NO;
|
||||||
|
|
||||||
if (windowLayer != nil) {
|
if (windowLayer != nil) {
|
||||||
self.cglLayer = windowLayer;
|
self.cglLayer = windowLayer;
|
||||||
[self setWantsLayer: YES];
|
[self setWantsLayer: YES];
|
||||||
|
@ -299,6 +302,16 @@ AWT_ASSERT_APPKIT_THREAD;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
-(void) deliverJavaMouseEvent: (NSEvent *) event {
|
-(void) deliverJavaMouseEvent: (NSEvent *) event {
|
||||||
|
|
||||||
|
NSEventType type = [event type];
|
||||||
|
|
||||||
|
// check synthesized mouse entered/exited events
|
||||||
|
if ((type == NSMouseEntered && mouseIsOver) || (type == NSMouseExited && !mouseIsOver)) {
|
||||||
|
return;
|
||||||
|
}else if ((type == NSMouseEntered && !mouseIsOver) || (type == NSMouseExited && mouseIsOver)) {
|
||||||
|
mouseIsOver = !mouseIsOver;
|
||||||
|
}
|
||||||
|
|
||||||
[AWTToolkit eventCountPlusPlus];
|
[AWTToolkit eventCountPlusPlus];
|
||||||
|
|
||||||
JNIEnv *env = [ThreadUtilities getJNIEnv];
|
JNIEnv *env = [ThreadUtilities getJNIEnv];
|
||||||
|
@ -306,7 +319,6 @@ AWT_ASSERT_APPKIT_THREAD;
|
||||||
NSPoint eventLocation = [event locationInWindow];
|
NSPoint eventLocation = [event locationInWindow];
|
||||||
NSPoint localPoint = [self convertPoint: eventLocation fromView: nil];
|
NSPoint localPoint = [self convertPoint: eventLocation fromView: nil];
|
||||||
NSPoint absP = [NSEvent mouseLocation];
|
NSPoint absP = [NSEvent mouseLocation];
|
||||||
NSEventType type = [event type];
|
|
||||||
|
|
||||||
// Convert global numbers between Cocoa's coordinate system and Java.
|
// Convert global numbers between Cocoa's coordinate system and Java.
|
||||||
// TODO: need consitent way for doing that both with global as well as with local coordinates.
|
// TODO: need consitent way for doing that both with global as well as with local coordinates.
|
||||||
|
|
|
@ -56,6 +56,7 @@
|
||||||
contentView:(NSView *)contentView;
|
contentView:(NSView *)contentView;
|
||||||
|
|
||||||
- (void) adjustGrowBoxWindow;
|
- (void) adjustGrowBoxWindow;
|
||||||
|
- (BOOL) isTopmostWindowUnderMouse;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
#endif _AWTWINDOW_H
|
#endif _AWTWINDOW_H
|
||||||
|
|
|
@ -170,6 +170,66 @@ AWT_ASSERT_APPKIT_THREAD;
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// checks that this window is under the mouse cursor and this point is not overlapped by others windows
|
||||||
|
- (BOOL) isTopmostWindowUnderMouse {
|
||||||
|
|
||||||
|
int currentWinID = [self windowNumber];
|
||||||
|
|
||||||
|
NSRect screenRect = [[NSScreen mainScreen] frame];
|
||||||
|
NSPoint nsMouseLocation = [NSEvent mouseLocation];
|
||||||
|
CGPoint cgMouseLocation = CGPointMake(nsMouseLocation.x, screenRect.size.height - nsMouseLocation.y);
|
||||||
|
|
||||||
|
NSMutableArray *windows = (NSMutableArray *)CGWindowListCopyWindowInfo(kCGWindowListOptionOnScreenOnly | kCGWindowListExcludeDesktopElements, kCGNullWindowID);
|
||||||
|
|
||||||
|
|
||||||
|
for (NSDictionary *window in windows) {
|
||||||
|
int layer = [[window objectForKey:(id)kCGWindowLayer] intValue];
|
||||||
|
if (layer == 0) {
|
||||||
|
int winID = [[window objectForKey:(id)kCGWindowNumber] intValue];
|
||||||
|
CGRect rect;
|
||||||
|
CGRectMakeWithDictionaryRepresentation((CFDictionaryRef)[window objectForKey:(id)kCGWindowBounds], &rect);
|
||||||
|
if (CGRectContainsPoint(rect, cgMouseLocation)) {
|
||||||
|
return currentWinID == winID;
|
||||||
|
} else if (currentWinID == winID) {
|
||||||
|
return NO;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return NO;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void) synthesizeMouseEnteredExitedEvents {
|
||||||
|
|
||||||
|
int eventType = 0;
|
||||||
|
BOOL isUnderMouse = [self isTopmostWindowUnderMouse];
|
||||||
|
BOOL mouseIsOver = [[self contentView] mouseIsOver];
|
||||||
|
|
||||||
|
if (isUnderMouse && !mouseIsOver) {
|
||||||
|
eventType = NSMouseEntered;
|
||||||
|
} else if (!isUnderMouse && mouseIsOver) {
|
||||||
|
eventType = NSMouseExited;
|
||||||
|
} else {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
NSPoint screenLocation = [NSEvent mouseLocation];
|
||||||
|
NSPoint windowLocation = [self convertScreenToBase: screenLocation];
|
||||||
|
int modifierFlags = (eventType == NSMouseEntered) ? NSMouseEnteredMask : NSMouseExitedMask;
|
||||||
|
|
||||||
|
NSEvent *mouseEvent = [NSEvent enterExitEventWithType: eventType
|
||||||
|
location: windowLocation
|
||||||
|
modifierFlags: modifierFlags
|
||||||
|
timestamp: 0
|
||||||
|
windowNumber: [self windowNumber]
|
||||||
|
context: nil
|
||||||
|
eventNumber: 0
|
||||||
|
trackingNumber: 0
|
||||||
|
userData: nil
|
||||||
|
];
|
||||||
|
|
||||||
|
[[self contentView] deliverJavaMouseEvent: mouseEvent];
|
||||||
|
}
|
||||||
|
|
||||||
- (void) dealloc {
|
- (void) dealloc {
|
||||||
AWT_ASSERT_APPKIT_THREAD;
|
AWT_ASSERT_APPKIT_THREAD;
|
||||||
|
|
||||||
|
@ -669,6 +729,8 @@ AWT_ASSERT_NOT_APPKIT_THREAD;
|
||||||
// ensure we repaint the whole window after the resize operation
|
// ensure we repaint the whole window after the resize operation
|
||||||
// (this will also re-enable screen updates, which were disabled above)
|
// (this will also re-enable screen updates, which were disabled above)
|
||||||
// TODO: send PaintEvent
|
// TODO: send PaintEvent
|
||||||
|
|
||||||
|
[window synthesizeMouseEnteredExitedEvents];
|
||||||
}];
|
}];
|
||||||
|
|
||||||
JNF_COCOA_EXIT(env);
|
JNF_COCOA_EXIT(env);
|
||||||
|
@ -897,6 +959,27 @@ AWT_ASSERT_NOT_APPKIT_THREAD;
|
||||||
JNF_COCOA_EXIT(env);
|
JNF_COCOA_EXIT(env);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Class: sun_lwawt_macosx_CPlatformWindow
|
||||||
|
* Method: nativeSynthesizeMouseEnteredExitedEvents
|
||||||
|
* Signature: (J)V
|
||||||
|
*/
|
||||||
|
JNIEXPORT void JNICALL Java_sun_lwawt_macosx_CPlatformWindow_nativeSynthesizeMouseEnteredExitedEvents
|
||||||
|
(JNIEnv *env, jclass clazz, jlong windowPtr)
|
||||||
|
{
|
||||||
|
JNF_COCOA_ENTER(env);
|
||||||
|
AWT_ASSERT_NOT_APPKIT_THREAD;
|
||||||
|
|
||||||
|
AWTWindow *window = OBJC(windowPtr);
|
||||||
|
[JNFRunLoop performOnMainThreadWaiting:NO withBlock:^(){
|
||||||
|
AWT_ASSERT_APPKIT_THREAD;
|
||||||
|
|
||||||
|
[window synthesizeMouseEnteredExitedEvents];
|
||||||
|
}];
|
||||||
|
|
||||||
|
JNF_COCOA_EXIT(env);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Class: sun_lwawt_macosx_CPlatformWindow
|
* Class: sun_lwawt_macosx_CPlatformWindow
|
||||||
* Method: nativeGetScreenNSWindowIsOn_AppKitThread
|
* Method: nativeGetScreenNSWindowIsOn_AppKitThread
|
||||||
|
|
|
@ -137,3 +137,30 @@ JNF_COCOA_EXIT(env);
|
||||||
|
|
||||||
return jpt;
|
return jpt;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
JNIEXPORT void JNICALL
|
||||||
|
Java_sun_lwawt_macosx_CCursorManager_nativeSetAllowsCursorSetInBackground
|
||||||
|
(JNIEnv *env, jclass class, jboolean allows)
|
||||||
|
{
|
||||||
|
|
||||||
|
JNF_COCOA_ENTER(env);
|
||||||
|
AWT_ASSERT_NOT_APPKIT_THREAD;
|
||||||
|
|
||||||
|
SEL allowsSetInBackground_SEL = @selector(javaSetAllowsCursorSetInBackground:);
|
||||||
|
if ([[NSCursor class] respondsToSelector:allowsSetInBackground_SEL]) {
|
||||||
|
[JNFRunLoop performOnMainThreadWaiting:YES withBlock:^(){
|
||||||
|
NSMethodSignature *allowsSetInBackground_sig =
|
||||||
|
[[NSCursor class] methodSignatureForSelector:allowsSetInBackground_SEL];
|
||||||
|
NSInvocation *invocation =
|
||||||
|
[NSInvocation invocationWithMethodSignature:allowsSetInBackground_sig];
|
||||||
|
BOOL arg = (BOOL)allows;
|
||||||
|
[invocation setSelector:allowsSetInBackground_SEL];
|
||||||
|
[invocation setArgument:&arg atIndex:2];
|
||||||
|
[invocation invokeWithTarget:[NSCursor class]];
|
||||||
|
}];
|
||||||
|
}
|
||||||
|
|
||||||
|
JNF_COCOA_EXIT(env);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
@ -27,6 +27,7 @@
|
||||||
|
|
||||||
#import "java_awt_print_Pageable.h"
|
#import "java_awt_print_Pageable.h"
|
||||||
#import "java_awt_print_Printable.h"
|
#import "java_awt_print_Printable.h"
|
||||||
|
#import "java_awt_print_PageFormat.h"
|
||||||
|
|
||||||
#import <JavaNativeFoundation/JavaNativeFoundation.h>
|
#import <JavaNativeFoundation/JavaNativeFoundation.h>
|
||||||
|
|
||||||
|
@ -35,6 +36,7 @@
|
||||||
|
|
||||||
|
|
||||||
static JNF_CLASS_CACHE(sjc_CPrinterJob, "sun/lwawt/macosx/CPrinterJob");
|
static JNF_CLASS_CACHE(sjc_CPrinterJob, "sun/lwawt/macosx/CPrinterJob");
|
||||||
|
static JNF_CLASS_CACHE(sjc_PageFormat, "java/awt/print/PageFormat");
|
||||||
|
|
||||||
@implementation PrinterView
|
@implementation PrinterView
|
||||||
|
|
||||||
|
@ -152,6 +154,7 @@ static JNF_CLASS_CACHE(sjc_CPrinterJob, "sun/lwawt/macosx/CPrinterJob");
|
||||||
|
|
||||||
static JNF_MEMBER_CACHE(jm_getPageformatPrintablePeekgraphics, sjc_CPrinterJob, "getPageformatPrintablePeekgraphics", "(I)[Ljava/lang/Object;");
|
static JNF_MEMBER_CACHE(jm_getPageformatPrintablePeekgraphics, sjc_CPrinterJob, "getPageformatPrintablePeekgraphics", "(I)[Ljava/lang/Object;");
|
||||||
static JNF_MEMBER_CACHE(jm_printAndGetPageFormatArea, sjc_CPrinterJob, "printAndGetPageFormatArea", "(Ljava/awt/print/Printable;Ljava/awt/Graphics;Ljava/awt/print/PageFormat;I)Ljava/awt/geom/Rectangle2D;");
|
static JNF_MEMBER_CACHE(jm_printAndGetPageFormatArea, sjc_CPrinterJob, "printAndGetPageFormatArea", "(Ljava/awt/print/Printable;Ljava/awt/Graphics;Ljava/awt/print/PageFormat;I)Ljava/awt/geom/Rectangle2D;");
|
||||||
|
static JNF_MEMBER_CACHE(jm_getOrientation, sjc_PageFormat, "getOrientation", "()I");
|
||||||
|
|
||||||
// Assertions removed, and corresponding JNFDeleteGlobalRefs added, for radr://3962543
|
// Assertions removed, and corresponding JNFDeleteGlobalRefs added, for radr://3962543
|
||||||
// Actual fix that will keep these assertions from being true is radr://3205462 ,
|
// Actual fix that will keep these assertions from being true is radr://3205462 ,
|
||||||
|
@ -201,6 +204,26 @@ static JNF_CLASS_CACHE(sjc_CPrinterJob, "sun/lwawt/macosx/CPrinterJob");
|
||||||
// Actually print and get the PageFormatArea
|
// Actually print and get the PageFormatArea
|
||||||
jobject pageFormatArea = JNFCallObjectMethod(env, fPrinterJob, jm_printAndGetPageFormatArea, fCurPainter, fCurPeekGraphics, fCurPageFormat, jPageNumber); // AWT_THREADING Safe (AWTRunLoopMode)
|
jobject pageFormatArea = JNFCallObjectMethod(env, fPrinterJob, jm_printAndGetPageFormatArea, fCurPainter, fCurPeekGraphics, fCurPageFormat, jPageNumber); // AWT_THREADING Safe (AWTRunLoopMode)
|
||||||
if (pageFormatArea != NULL) {
|
if (pageFormatArea != NULL) {
|
||||||
|
NSPrintingOrientation currentOrientation =
|
||||||
|
[[[NSPrintOperation currentOperation] printInfo] orientation];
|
||||||
|
// set page orientation
|
||||||
|
switch (JNFCallIntMethod(env, fCurPageFormat, jm_getOrientation)) {
|
||||||
|
case java_awt_print_PageFormat_PORTRAIT:
|
||||||
|
default:
|
||||||
|
if (currentOrientation != NSPortraitOrientation) {
|
||||||
|
[[[NSPrintOperation currentOperation] printInfo]
|
||||||
|
setOrientation:NSPortraitOrientation];
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case java_awt_print_PageFormat_LANDSCAPE:
|
||||||
|
case java_awt_print_PageFormat_REVERSE_LANDSCAPE:
|
||||||
|
if (currentOrientation != NSLandscapeOrientation) {
|
||||||
|
[[[NSPrintOperation currentOperation] printInfo]
|
||||||
|
setOrientation:NSLandscapeOrientation];
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
result = JavaToNSRect(env, pageFormatArea);
|
result = JavaToNSRect(env, pageFormatArea);
|
||||||
(*env)->DeleteLocalRef(env, pageFormatArea);
|
(*env)->DeleteLocalRef(env, pageFormatArea);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -695,6 +695,13 @@ SetClassPath(const char *s)
|
||||||
char *def;
|
char *def;
|
||||||
const char *orig = s;
|
const char *orig = s;
|
||||||
static const char format[] = "-Djava.class.path=%s";
|
static const char format[] = "-Djava.class.path=%s";
|
||||||
|
/*
|
||||||
|
* usually we should not get a null pointer, but there are cases where
|
||||||
|
* we might just get one, in which case we simply ignore it, and let the
|
||||||
|
* caller deal with it
|
||||||
|
*/
|
||||||
|
if (s == NULL)
|
||||||
|
return;
|
||||||
s = JLI_WildcardExpandClasspath(s);
|
s = JLI_WildcardExpandClasspath(s);
|
||||||
def = JLI_MemAlloc(sizeof(format)
|
def = JLI_MemAlloc(sizeof(format)
|
||||||
- 2 /* strlen("%s") */
|
- 2 /* strlen("%s") */
|
||||||
|
|
|
@ -87,7 +87,12 @@ public class JPEGImageReader extends ImageReader {
|
||||||
|
|
||||||
static {
|
static {
|
||||||
java.security.AccessController.doPrivileged(
|
java.security.AccessController.doPrivileged(
|
||||||
new sun.security.action.LoadLibraryAction("jpeg"));
|
new java.security.PrivilegedAction<Void>() {
|
||||||
|
public Void run() {
|
||||||
|
System.loadLibrary("jpeg");
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
});
|
||||||
initReaderIDs(ImageInputStream.class,
|
initReaderIDs(ImageInputStream.class,
|
||||||
JPEGQTable.class,
|
JPEGQTable.class,
|
||||||
JPEGHuffmanTable.class);
|
JPEGHuffmanTable.class);
|
||||||
|
|
|
@ -177,7 +177,12 @@ public class JPEGImageWriter extends ImageWriter {
|
||||||
|
|
||||||
static {
|
static {
|
||||||
java.security.AccessController.doPrivileged(
|
java.security.AccessController.doPrivileged(
|
||||||
new sun.security.action.LoadLibraryAction("jpeg"));
|
new java.security.PrivilegedAction<Void>() {
|
||||||
|
public Void run() {
|
||||||
|
System.loadLibrary("jpeg");
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
});
|
||||||
initWriterIDs(ImageOutputStream.class,
|
initWriterIDs(ImageOutputStream.class,
|
||||||
JPEGQTable.class,
|
JPEGQTable.class,
|
||||||
JPEGHuffmanTable.class);
|
JPEGHuffmanTable.class);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -166,6 +166,7 @@ class Attribute implements Comparable<Attribute> {
|
||||||
define(sd, ATTR_CONTEXT_CLASS, "SourceFile", "RUH");
|
define(sd, ATTR_CONTEXT_CLASS, "SourceFile", "RUH");
|
||||||
define(sd, ATTR_CONTEXT_CLASS, "EnclosingMethod", "RCHRDNH");
|
define(sd, ATTR_CONTEXT_CLASS, "EnclosingMethod", "RCHRDNH");
|
||||||
define(sd, ATTR_CONTEXT_CLASS, "InnerClasses", "NH[RCHRCNHRUNHFH]");
|
define(sd, ATTR_CONTEXT_CLASS, "InnerClasses", "NH[RCHRCNHRUNHFH]");
|
||||||
|
define(sd, ATTR_CONTEXT_CLASS, "BootstrapMethods", "NH[RMHNH[KLH]]");
|
||||||
|
|
||||||
define(sd, ATTR_CONTEXT_FIELD, "Signature", "RSH");
|
define(sd, ATTR_CONTEXT_FIELD, "Signature", "RSH");
|
||||||
define(sd, ATTR_CONTEXT_FIELD, "Synthetic", "");
|
define(sd, ATTR_CONTEXT_FIELD, "Synthetic", "");
|
||||||
|
@ -203,6 +204,8 @@ class Attribute implements Comparable<Attribute> {
|
||||||
// Their layout specs. are given here for completeness.
|
// Their layout specs. are given here for completeness.
|
||||||
// The Code spec is incomplete, in that it does not distinguish
|
// The Code spec is incomplete, in that it does not distinguish
|
||||||
// bytecode bytes or locate CP references.
|
// bytecode bytes or locate CP references.
|
||||||
|
// The BootstrapMethods attribute is also special-cased
|
||||||
|
// elsewhere as an appendix to the local constant pool.
|
||||||
}
|
}
|
||||||
|
|
||||||
// Metadata.
|
// Metadata.
|
||||||
|
@ -822,9 +825,9 @@ class Attribute implements Comparable<Attribute> {
|
||||||
reference_type:
|
reference_type:
|
||||||
( constant_ref | schema_ref | utf8_ref | untyped_ref )
|
( constant_ref | schema_ref | utf8_ref | untyped_ref )
|
||||||
constant_ref:
|
constant_ref:
|
||||||
( 'KI' | 'KJ' | 'KF' | 'KD' | 'KS' | 'KQ' )
|
( 'KI' | 'KJ' | 'KF' | 'KD' | 'KS' | 'KQ' | 'KM' | 'KT' | 'KL' )
|
||||||
schema_ref:
|
schema_ref:
|
||||||
( 'RC' | 'RS' | 'RD' | 'RF' | 'RM' | 'RI' )
|
( 'RC' | 'RS' | 'RD' | 'RF' | 'RM' | 'RI' | 'RY' | 'RB' | 'RN' )
|
||||||
utf8_ref:
|
utf8_ref:
|
||||||
'RU'
|
'RU'
|
||||||
untyped_ref:
|
untyped_ref:
|
||||||
|
@ -1012,7 +1015,12 @@ class Attribute implements Comparable<Attribute> {
|
||||||
case 'F': e.refKind = CONSTANT_Float; break;
|
case 'F': e.refKind = CONSTANT_Float; break;
|
||||||
case 'D': e.refKind = CONSTANT_Double; break;
|
case 'D': e.refKind = CONSTANT_Double; break;
|
||||||
case 'S': e.refKind = CONSTANT_String; break;
|
case 'S': e.refKind = CONSTANT_String; break;
|
||||||
case 'Q': e.refKind = CONSTANT_Literal; break;
|
case 'Q': e.refKind = CONSTANT_FieldSpecific; break;
|
||||||
|
|
||||||
|
// new in 1.7:
|
||||||
|
case 'M': e.refKind = CONSTANT_MethodHandle; break;
|
||||||
|
case 'T': e.refKind = CONSTANT_MethodType; break;
|
||||||
|
case 'L': e.refKind = CONSTANT_LoadableValue; break;
|
||||||
default: { i = -i; continue; } // fail
|
default: { i = -i; continue; } // fail
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -1029,6 +1037,11 @@ class Attribute implements Comparable<Attribute> {
|
||||||
case 'U': e.refKind = CONSTANT_Utf8; break; //utf8_ref
|
case 'U': e.refKind = CONSTANT_Utf8; break; //utf8_ref
|
||||||
case 'Q': e.refKind = CONSTANT_All; break; //untyped_ref
|
case 'Q': e.refKind = CONSTANT_All; break; //untyped_ref
|
||||||
|
|
||||||
|
// new in 1.7:
|
||||||
|
case 'Y': e.refKind = CONSTANT_InvokeDynamic; break;
|
||||||
|
case 'B': e.refKind = CONSTANT_BootstrapMethod; break;
|
||||||
|
case 'N': e.refKind = CONSTANT_AnyMember; break;
|
||||||
|
|
||||||
default: { i = -i; continue; } // fail
|
default: { i = -i; continue; } // fail
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -1279,10 +1292,12 @@ class Attribute implements Comparable<Attribute> {
|
||||||
// Cf. ClassReader.readSignatureRef.
|
// Cf. ClassReader.readSignatureRef.
|
||||||
String typeName = globalRef.stringValue();
|
String typeName = globalRef.stringValue();
|
||||||
globalRef = ConstantPool.getSignatureEntry(typeName);
|
globalRef = ConstantPool.getSignatureEntry(typeName);
|
||||||
} else if (e.refKind == CONSTANT_Literal) {
|
} else if (e.refKind == CONSTANT_FieldSpecific) {
|
||||||
assert(globalRef.getTag() >= CONSTANT_Integer);
|
assert(globalRef.getTag() >= CONSTANT_Integer);
|
||||||
assert(globalRef.getTag() <= CONSTANT_String);
|
assert(globalRef.getTag() <= CONSTANT_String ||
|
||||||
} else if (e.refKind != CONSTANT_All) {
|
globalRef.getTag() >= CONSTANT_MethodHandle);
|
||||||
|
assert(globalRef.getTag() <= CONSTANT_MethodType);
|
||||||
|
} else if (e.refKind < CONSTANT_GroupFirst) {
|
||||||
assert(e.refKind == globalRef.getTag());
|
assert(e.refKind == globalRef.getTag());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1462,27 +1477,29 @@ class Attribute implements Comparable<Attribute> {
|
||||||
"NH[PHPOHIIH]", // CharacterRangeTable
|
"NH[PHPOHIIH]", // CharacterRangeTable
|
||||||
"NH[PHHII]", // CoverageTable
|
"NH[PHHII]", // CoverageTable
|
||||||
"NH[RCHRCNHRUNHFH]", // InnerClasses
|
"NH[RCHRCNHRUNHFH]", // InnerClasses
|
||||||
|
"NH[RMHNH[KLH]]", // BootstrapMethods
|
||||||
"HHNI[B]NH[PHPOHPOHRCNH]NH[RUHNI[B]]", // Code
|
"HHNI[B]NH[PHPOHPOHRCNH]NH[RUHNI[B]]", // Code
|
||||||
"=AnnotationDefault",
|
"=AnnotationDefault",
|
||||||
// Like metadata, but with a compact tag set:
|
// Like metadata, but with a compact tag set:
|
||||||
"[NH[(1)]]"
|
"[NH[(1)]]"
|
||||||
+"[NH[(2)]]"
|
+"[NH[(1)]]"
|
||||||
+"[RSHNH[RUH(3)]]"
|
+"[RSHNH[RUH(1)]]"
|
||||||
+"[TB(0,1,3)[KIH](2)[KDH](5)[KFH](4)[KJH](7)[RSH](8)[RSHRUH](9)[RUH](10)[(2)](6)[NH[(3)]]()[]]",
|
+"[TB(0,1,3)[KIH](2)[KDH](5)[KFH](4)[KJH](7)[RSH](8)[RSHRUH](9)[RUH](10)[(-1)](6)[NH[(0)]]()[]]",
|
||||||
""
|
""
|
||||||
};
|
};
|
||||||
ap = 0;
|
ap = 0;
|
||||||
}
|
}
|
||||||
|
Utils.currentInstance.set(new PackerImpl());
|
||||||
final int[][] counts = new int[2][3]; // int bci ref
|
final int[][] counts = new int[2][3]; // int bci ref
|
||||||
final Entry[] cpMap = new Entry[maxVal+1];
|
final Entry[] cpMap = new Entry[maxVal+1];
|
||||||
for (int i = 0; i < cpMap.length; i++) {
|
for (int i = 0; i < cpMap.length; i++) {
|
||||||
if (i == 0) continue; // 0 => null
|
if (i == 0) continue; // 0 => null
|
||||||
cpMap[i] = ConstantPool.getLiteralEntry(new Integer(i));
|
cpMap[i] = ConstantPool.getLiteralEntry(new Integer(i));
|
||||||
}
|
}
|
||||||
Class cls = new Package().new Class("");
|
Package.Class cls = new Package().new Class("");
|
||||||
cls.cpMap = cpMap;
|
cls.cpMap = cpMap;
|
||||||
class TestValueStream extends ValueStream {
|
class TestValueStream extends ValueStream {
|
||||||
Random rand = new Random(0);
|
java.util.Random rand = new java.util.Random(0);
|
||||||
ArrayList history = new ArrayList();
|
ArrayList history = new ArrayList();
|
||||||
int ckidx = 0;
|
int ckidx = 0;
|
||||||
int maxVal;
|
int maxVal;
|
||||||
|
@ -1570,8 +1587,7 @@ class Attribute implements Comparable<Attribute> {
|
||||||
String layout = av[i];
|
String layout = av[i];
|
||||||
if (layout.startsWith("=")) {
|
if (layout.startsWith("=")) {
|
||||||
String name = layout.substring(1);
|
String name = layout.substring(1);
|
||||||
for (Iterator j = standardDefs.values().iterator(); j.hasNext(); ) {
|
for (Attribute a : standardDefs.values()) {
|
||||||
Attribute a = (Attribute) j.next();
|
|
||||||
if (a.name().equals(name)) {
|
if (a.name().equals(name)) {
|
||||||
layout = a.layout().layout();
|
layout = a.layout().layout();
|
||||||
break;
|
break;
|
||||||
|
@ -1604,7 +1620,7 @@ class Attribute implements Comparable<Attribute> {
|
||||||
if (verbose) {
|
if (verbose) {
|
||||||
System.out.print(" parse: {");
|
System.out.print(" parse: {");
|
||||||
}
|
}
|
||||||
self.parse(0, cls, bytes, 0, bytes.length, tts);
|
self.parse(cls, bytes, 0, bytes.length, tts);
|
||||||
if (verbose) {
|
if (verbose) {
|
||||||
System.out.println("}");
|
System.out.println("}");
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -1372,17 +1372,17 @@ class BandStructure {
|
||||||
protected long archiveSize1; // size reported in archive_header
|
protected long archiveSize1; // size reported in archive_header
|
||||||
protected int archiveNextCount; // reported in archive_header
|
protected int archiveNextCount; // reported in archive_header
|
||||||
|
|
||||||
static final int AH_LENGTH_0 = 3; //minver, majver, options
|
static final int AH_LENGTH_0 = 3; // archive_header_0 = {minver, majver, options}
|
||||||
static final int AH_ARCHIVE_SIZE_HI = 0;
|
static final int AH_LENGTH_MIN = 15; // observed in spec {header_0[3], cp_counts[8], class_counts[4]}
|
||||||
static final int AH_ARCHIVE_SIZE_LO = 1;
|
// Length contributions from optional archive size fields:
|
||||||
static final int AH_LENGTH_S = 2; //optional size hi/lo
|
static final int AH_LENGTH_S = 2; // archive_header_S = optional {size_hi, size_lo}
|
||||||
static final int AH_LENGTH = 26; // mentioned in spec
|
static final int AH_ARCHIVE_SIZE_HI = 0; // offset in archive_header_S
|
||||||
|
static final int AH_ARCHIVE_SIZE_LO = 1; // offset in archive_header_S
|
||||||
// Length contributions from optional header fields:
|
// Length contributions from optional header fields:
|
||||||
static final int AH_FILE_HEADER_LEN = 5; // sizehi/lo/next/modtime/files
|
static final int AH_FILE_HEADER_LEN = 5; // file_counts = {{size_hi, size_lo}, next, modtime, files}
|
||||||
static final int AH_SPECIAL_FORMAT_LEN = 2; // layouts/band-headers
|
static final int AH_SPECIAL_FORMAT_LEN = 2; // special_counts = {layouts, band_headers}
|
||||||
static final int AH_CP_NUMBER_LEN = 4; // int/float/long/double
|
static final int AH_CP_NUMBER_LEN = 4; // cp_number_counts = {int, float, long, double}
|
||||||
static final int AH_LENGTH_MIN = AH_LENGTH
|
static final int AH_CP_EXTRA_LEN = 4; // cp_attr_counts = {MH, MT, InDy, BSM}
|
||||||
-(AH_SPECIAL_FORMAT_LEN+AH_FILE_HEADER_LEN+AH_CP_NUMBER_LEN);
|
|
||||||
|
|
||||||
// Common structure of attribute band groups:
|
// Common structure of attribute band groups:
|
||||||
static final int AB_FLAGS_HI = 0;
|
static final int AB_FLAGS_HI = 0;
|
||||||
|
@ -1446,6 +1446,14 @@ class BandStructure {
|
||||||
CPRefBand cp_Method_desc = cp_bands.newCPRefBand("cp_Method_desc", UDELTA5, CONSTANT_NameandType);
|
CPRefBand cp_Method_desc = cp_bands.newCPRefBand("cp_Method_desc", UDELTA5, CONSTANT_NameandType);
|
||||||
CPRefBand cp_Imethod_class = cp_bands.newCPRefBand("cp_Imethod_class", CONSTANT_Class);
|
CPRefBand cp_Imethod_class = cp_bands.newCPRefBand("cp_Imethod_class", CONSTANT_Class);
|
||||||
CPRefBand cp_Imethod_desc = cp_bands.newCPRefBand("cp_Imethod_desc", UDELTA5, CONSTANT_NameandType);
|
CPRefBand cp_Imethod_desc = cp_bands.newCPRefBand("cp_Imethod_desc", UDELTA5, CONSTANT_NameandType);
|
||||||
|
IntBand cp_MethodHandle_refkind = cp_bands.newIntBand("cp_MethodHandle_refkind", DELTA5);
|
||||||
|
CPRefBand cp_MethodHandle_member = cp_bands.newCPRefBand("cp_MethodHandle_member", UDELTA5, CONSTANT_AnyMember);
|
||||||
|
CPRefBand cp_MethodType = cp_bands.newCPRefBand("cp_MethodType", UDELTA5, CONSTANT_Signature);
|
||||||
|
CPRefBand cp_BootstrapMethod_ref = cp_bands.newCPRefBand("cp_BootstrapMethod_ref", DELTA5, CONSTANT_MethodHandle);
|
||||||
|
IntBand cp_BootstrapMethod_arg_count = cp_bands.newIntBand("cp_BootstrapMethod_arg_count", UDELTA5);
|
||||||
|
CPRefBand cp_BootstrapMethod_arg = cp_bands.newCPRefBand("cp_BootstrapMethod_arg", DELTA5, CONSTANT_LoadableValue);
|
||||||
|
CPRefBand cp_InvokeDynamic_spec = cp_bands.newCPRefBand("cp_InvokeDynamic_spec", DELTA5, CONSTANT_BootstrapMethod);
|
||||||
|
CPRefBand cp_InvokeDynamic_desc = cp_bands.newCPRefBand("cp_InvokeDynamic_desc", UDELTA5, CONSTANT_NameandType);
|
||||||
|
|
||||||
// bands for carrying attribute definitions:
|
// bands for carrying attribute definitions:
|
||||||
MultiBand attr_definition_bands = all_bands.newMultiBand("(attr_definition_bands)", UNSIGNED5);
|
MultiBand attr_definition_bands = all_bands.newMultiBand("(attr_definition_bands)", UNSIGNED5);
|
||||||
|
@ -1481,7 +1489,7 @@ class BandStructure {
|
||||||
IntBand field_attr_calls = field_attr_bands.newIntBand("field_attr_calls");
|
IntBand field_attr_calls = field_attr_bands.newIntBand("field_attr_calls");
|
||||||
|
|
||||||
// bands for predefined field attributes
|
// bands for predefined field attributes
|
||||||
CPRefBand field_ConstantValue_KQ = field_attr_bands.newCPRefBand("field_ConstantValue_KQ", CONSTANT_Literal);
|
CPRefBand field_ConstantValue_KQ = field_attr_bands.newCPRefBand("field_ConstantValue_KQ", CONSTANT_FieldSpecific);
|
||||||
CPRefBand field_Signature_RS = field_attr_bands.newCPRefBand("field_Signature_RS", CONSTANT_Signature);
|
CPRefBand field_Signature_RS = field_attr_bands.newCPRefBand("field_Signature_RS", CONSTANT_Signature);
|
||||||
MultiBand field_metadata_bands = field_attr_bands.newMultiBand("(field_metadata_bands)", UNSIGNED5);
|
MultiBand field_metadata_bands = field_attr_bands.newMultiBand("(field_metadata_bands)", UNSIGNED5);
|
||||||
|
|
||||||
|
@ -1585,12 +1593,14 @@ class BandStructure {
|
||||||
CPRefBand bc_longref = bc_bands.newCPRefBand("bc_longref", DELTA5, CONSTANT_Long);
|
CPRefBand bc_longref = bc_bands.newCPRefBand("bc_longref", DELTA5, CONSTANT_Long);
|
||||||
CPRefBand bc_doubleref = bc_bands.newCPRefBand("bc_doubleref", DELTA5, CONSTANT_Double);
|
CPRefBand bc_doubleref = bc_bands.newCPRefBand("bc_doubleref", DELTA5, CONSTANT_Double);
|
||||||
CPRefBand bc_stringref = bc_bands.newCPRefBand("bc_stringref", DELTA5, CONSTANT_String);
|
CPRefBand bc_stringref = bc_bands.newCPRefBand("bc_stringref", DELTA5, CONSTANT_String);
|
||||||
|
CPRefBand bc_loadablevalueref = bc_bands.newCPRefBand("bc_loadablevalueref", DELTA5, CONSTANT_LoadableValue);
|
||||||
|
|
||||||
// nulls produced by bc_classref are taken to mean the current class
|
// nulls produced by bc_classref are taken to mean the current class
|
||||||
CPRefBand bc_classref = bc_bands.newCPRefBand("bc_classref", UNSIGNED5, CONSTANT_Class, NULL_IS_OK); // new, *anew*, c*cast, i*of, ldc
|
CPRefBand bc_classref = bc_bands.newCPRefBand("bc_classref", UNSIGNED5, CONSTANT_Class, NULL_IS_OK); // new, *anew*, c*cast, i*of, ldc
|
||||||
CPRefBand bc_fieldref = bc_bands.newCPRefBand("bc_fieldref", DELTA5, CONSTANT_Fieldref); // get*, put*
|
CPRefBand bc_fieldref = bc_bands.newCPRefBand("bc_fieldref", DELTA5, CONSTANT_Fieldref); // get*, put*
|
||||||
CPRefBand bc_methodref = bc_bands.newCPRefBand("bc_methodref", CONSTANT_Methodref); // invoke[vs]*
|
CPRefBand bc_methodref = bc_bands.newCPRefBand("bc_methodref", CONSTANT_Methodref); // invoke[vs]*
|
||||||
CPRefBand bc_imethodref = bc_bands.newCPRefBand("bc_imethodref", DELTA5, CONSTANT_InterfaceMethodref); // invokeinterface
|
CPRefBand bc_imethodref = bc_bands.newCPRefBand("bc_imethodref", DELTA5, CONSTANT_InterfaceMethodref); // invokeinterface
|
||||||
|
CPRefBand bc_indyref = bc_bands.newCPRefBand("bc_indyref", DELTA5, CONSTANT_InvokeDynamic); // invokedynamic
|
||||||
|
|
||||||
// _self_linker_op family
|
// _self_linker_op family
|
||||||
CPRefBand bc_thisfield = bc_bands.newCPRefBand("bc_thisfield", CONSTANT_None); // any field within cur. class
|
CPRefBand bc_thisfield = bc_bands.newCPRefBand("bc_thisfield", CONSTANT_None); // any field within cur. class
|
||||||
|
@ -1633,7 +1643,7 @@ class BandStructure {
|
||||||
|
|
||||||
protected void setBandIndex(CPRefBand b, byte which) {
|
protected void setBandIndex(CPRefBand b, byte which) {
|
||||||
Object[] need = { b, Byte.valueOf(which) };
|
Object[] need = { b, Byte.valueOf(which) };
|
||||||
if (which == CONSTANT_Literal) {
|
if (which == CONSTANT_FieldSpecific) {
|
||||||
// I.e., attribute layouts KQ (no null) or KQN (null ok).
|
// I.e., attribute layouts KQ (no null) or KQN (null ok).
|
||||||
allKQBands.add(b);
|
allKQBands.add(b);
|
||||||
} else if (needPredefIndex != null) {
|
} else if (needPredefIndex != null) {
|
||||||
|
@ -1856,12 +1866,20 @@ class BandStructure {
|
||||||
attrClassFileVersionMask = (1<<CLASS_ATTR_ClassFile_version);
|
attrClassFileVersionMask = (1<<CLASS_ATTR_ClassFile_version);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void adjustToMajver() {
|
private void adjustToMajver() throws IOException {
|
||||||
if (getPackageMajver() < JAVA6_PACKAGE_MAJOR_VERSION) {
|
if (getPackageMajver() < JAVA6_PACKAGE_MAJOR_VERSION) {
|
||||||
if (verbose > 0) Utils.log.fine("Legacy package version");
|
if (verbose > 0) Utils.log.fine("Legacy package version");
|
||||||
// Revoke definition of pre-1.6 attribute type.
|
// Revoke definition of pre-1.6 attribute type.
|
||||||
undefineAttribute(CODE_ATTR_StackMapTable, ATTR_CONTEXT_CODE);
|
undefineAttribute(CODE_ATTR_StackMapTable, ATTR_CONTEXT_CODE);
|
||||||
}
|
}
|
||||||
|
if (getPackageMajver() < JAVA7_PACKAGE_MAJOR_VERSION) {
|
||||||
|
if (testBit(archiveOptions, AO_HAVE_CP_EXTRAS))
|
||||||
|
// this bit was reserved for future use in previous versions
|
||||||
|
throw new IOException("Format bits for Java 7 must be zero in previous releases");
|
||||||
|
}
|
||||||
|
if (testBit(archiveOptions, AO_UNUSED_MBZ)) {
|
||||||
|
throw new IOException("High archive option bits are reserved and must be zero: "+Integer.toHexString(archiveOptions));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void initAttrIndexLimit() {
|
protected void initAttrIndexLimit() {
|
||||||
|
@ -2323,7 +2341,9 @@ class BandStructure {
|
||||||
return bc_methodref;
|
return bc_methodref;
|
||||||
case CONSTANT_InterfaceMethodref:
|
case CONSTANT_InterfaceMethodref:
|
||||||
return bc_imethodref;
|
return bc_imethodref;
|
||||||
case CONSTANT_Literal:
|
case CONSTANT_InvokeDynamic:
|
||||||
|
return bc_indyref;
|
||||||
|
case CONSTANT_LoadableValue:
|
||||||
switch (bc) {
|
switch (bc) {
|
||||||
case _ildc: case _ildc_w:
|
case _ildc: case _ildc_w:
|
||||||
return bc_intref;
|
return bc_intref;
|
||||||
|
@ -2333,10 +2353,12 @@ class BandStructure {
|
||||||
return bc_longref;
|
return bc_longref;
|
||||||
case _dldc2_w:
|
case _dldc2_w:
|
||||||
return bc_doubleref;
|
return bc_doubleref;
|
||||||
case _aldc: case _aldc_w:
|
case _sldc: case _sldc_w:
|
||||||
return bc_stringref;
|
return bc_stringref;
|
||||||
case _cldc: case _cldc_w:
|
case _cldc: case _cldc_w:
|
||||||
return bc_classref;
|
return bc_classref;
|
||||||
|
case _qldc: case _qldc_w:
|
||||||
|
return bc_loadablevalueref;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -2623,15 +2645,23 @@ class BandStructure {
|
||||||
}
|
}
|
||||||
|
|
||||||
static void printArrayTo(PrintStream ps, Entry[] cpMap, int start, int end) {
|
static void printArrayTo(PrintStream ps, Entry[] cpMap, int start, int end) {
|
||||||
|
printArrayTo(ps, cpMap, start, end, false);
|
||||||
|
}
|
||||||
|
static void printArrayTo(PrintStream ps, Entry[] cpMap, int start, int end, boolean showTags) {
|
||||||
StringBuffer buf = new StringBuffer();
|
StringBuffer buf = new StringBuffer();
|
||||||
int len = end-start;
|
int len = end-start;
|
||||||
for (int i = 0; i < len; i++) {
|
for (int i = 0; i < len; i++) {
|
||||||
String s = cpMap[start+i].stringValue();
|
Entry e = cpMap[start+i];
|
||||||
|
ps.print(start+i); ps.print("=");
|
||||||
|
if (showTags) { ps.print(e.tag); ps.print(":"); }
|
||||||
|
String s = e.stringValue();
|
||||||
buf.setLength(0);
|
buf.setLength(0);
|
||||||
for (int j = 0; j < s.length(); j++) {
|
for (int j = 0; j < s.length(); j++) {
|
||||||
char ch = s.charAt(j);
|
char ch = s.charAt(j);
|
||||||
if (!(ch < ' ' || ch > '~' || ch == '\\')) {
|
if (!(ch < ' ' || ch > '~' || ch == '\\')) {
|
||||||
buf.append(ch);
|
buf.append(ch);
|
||||||
|
} else if (ch == '\\') {
|
||||||
|
buf.append("\\\\");
|
||||||
} else if (ch == '\n') {
|
} else if (ch == '\n') {
|
||||||
buf.append("\\n");
|
buf.append("\\n");
|
||||||
} else if (ch == '\t') {
|
} else if (ch == '\t') {
|
||||||
|
@ -2639,7 +2669,8 @@ class BandStructure {
|
||||||
} else if (ch == '\r') {
|
} else if (ch == '\r') {
|
||||||
buf.append("\\r");
|
buf.append("\\r");
|
||||||
} else {
|
} else {
|
||||||
buf.append("\\x"+Integer.toHexString(ch));
|
String str = "000"+Integer.toHexString(ch);
|
||||||
|
buf.append("\\u"+str.substring(str.length()-4));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ps.println(buf);
|
ps.println(buf);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -29,6 +29,9 @@ import com.sun.java.util.jar.pack.ConstantPool.ClassEntry;
|
||||||
import com.sun.java.util.jar.pack.ConstantPool.DescriptorEntry;
|
import com.sun.java.util.jar.pack.ConstantPool.DescriptorEntry;
|
||||||
import com.sun.java.util.jar.pack.ConstantPool.Entry;
|
import com.sun.java.util.jar.pack.ConstantPool.Entry;
|
||||||
import com.sun.java.util.jar.pack.ConstantPool.SignatureEntry;
|
import com.sun.java.util.jar.pack.ConstantPool.SignatureEntry;
|
||||||
|
import com.sun.java.util.jar.pack.ConstantPool.MemberEntry;
|
||||||
|
import com.sun.java.util.jar.pack.ConstantPool.MethodHandleEntry;
|
||||||
|
import com.sun.java.util.jar.pack.ConstantPool.BootstrapMethodEntry;
|
||||||
import com.sun.java.util.jar.pack.ConstantPool.Utf8Entry;
|
import com.sun.java.util.jar.pack.ConstantPool.Utf8Entry;
|
||||||
import com.sun.java.util.jar.pack.Package.Class;
|
import com.sun.java.util.jar.pack.Package.Class;
|
||||||
import com.sun.java.util.jar.pack.Package.InnerClass;
|
import com.sun.java.util.jar.pack.Package.InnerClass;
|
||||||
|
@ -37,6 +40,7 @@ import java.io.FilterInputStream;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Arrays;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import static com.sun.java.util.jar.pack.Constants.*;
|
import static com.sun.java.util.jar.pack.Constants.*;
|
||||||
|
|
||||||
|
@ -114,6 +118,7 @@ class ClassReader {
|
||||||
private Entry readRef(byte tag) throws IOException {
|
private Entry readRef(byte tag) throws IOException {
|
||||||
Entry e = readRef();
|
Entry e = readRef();
|
||||||
assert(e != null);
|
assert(e != null);
|
||||||
|
assert(!(e instanceof UnresolvedEntry));
|
||||||
assert(e.tagMatches(tag));
|
assert(e.tagMatches(tag));
|
||||||
return e;
|
return e;
|
||||||
}
|
}
|
||||||
|
@ -151,6 +156,7 @@ class ClassReader {
|
||||||
readMembers(false); // fields
|
readMembers(false); // fields
|
||||||
readMembers(true); // methods
|
readMembers(true); // methods
|
||||||
readAttributes(ATTR_CONTEXT_CLASS, cls);
|
readAttributes(ATTR_CONTEXT_CLASS, cls);
|
||||||
|
fixUnresolvedEntries();
|
||||||
cls.finishReading();
|
cls.finishReading();
|
||||||
assert(0 >= in.read(new byte[1]));
|
assert(0 >= in.read(new byte[1]));
|
||||||
ok = true;
|
ok = true;
|
||||||
|
@ -236,6 +242,7 @@ class ClassReader {
|
||||||
// just read the refs; do not attempt to resolve while reading
|
// just read the refs; do not attempt to resolve while reading
|
||||||
case CONSTANT_Class:
|
case CONSTANT_Class:
|
||||||
case CONSTANT_String:
|
case CONSTANT_String:
|
||||||
|
case CONSTANT_MethodType:
|
||||||
fixups[fptr++] = i;
|
fixups[fptr++] = i;
|
||||||
fixups[fptr++] = tag;
|
fixups[fptr++] = tag;
|
||||||
fixups[fptr++] = in.readUnsignedShort();
|
fixups[fptr++] = in.readUnsignedShort();
|
||||||
|
@ -250,6 +257,18 @@ class ClassReader {
|
||||||
fixups[fptr++] = in.readUnsignedShort();
|
fixups[fptr++] = in.readUnsignedShort();
|
||||||
fixups[fptr++] = in.readUnsignedShort();
|
fixups[fptr++] = in.readUnsignedShort();
|
||||||
break;
|
break;
|
||||||
|
case CONSTANT_InvokeDynamic:
|
||||||
|
fixups[fptr++] = i;
|
||||||
|
fixups[fptr++] = tag;
|
||||||
|
fixups[fptr++] = -1 ^ in.readUnsignedShort(); // not a ref
|
||||||
|
fixups[fptr++] = in.readUnsignedShort();
|
||||||
|
break;
|
||||||
|
case CONSTANT_MethodHandle:
|
||||||
|
fixups[fptr++] = i;
|
||||||
|
fixups[fptr++] = tag;
|
||||||
|
fixups[fptr++] = -1 ^ in.readUnsignedByte();
|
||||||
|
fixups[fptr++] = in.readUnsignedShort();
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
throw new ClassFormatException("Bad constant pool tag " +
|
throw new ClassFormatException("Bad constant pool tag " +
|
||||||
tag + " in File: " + cls.file.nameString +
|
tag + " in File: " + cls.file.nameString +
|
||||||
|
@ -270,7 +289,7 @@ class ClassReader {
|
||||||
int ref2 = fixups[fi++];
|
int ref2 = fixups[fi++];
|
||||||
if (verbose > 3)
|
if (verbose > 3)
|
||||||
Utils.log.fine(" cp["+cpi+"] = "+ConstantPool.tagName(tag)+"{"+ref+","+ref2+"}");
|
Utils.log.fine(" cp["+cpi+"] = "+ConstantPool.tagName(tag)+"{"+ref+","+ref2+"}");
|
||||||
if (cpMap[ref] == null || ref2 >= 0 && cpMap[ref2] == null) {
|
if (ref >= 0 && cpMap[ref] == null || ref2 >= 0 && cpMap[ref2] == null) {
|
||||||
// Defer.
|
// Defer.
|
||||||
fixups[fptr++] = cpi;
|
fixups[fptr++] = cpi;
|
||||||
fixups[fptr++] = tag;
|
fixups[fptr++] = tag;
|
||||||
|
@ -297,6 +316,19 @@ class ClassReader {
|
||||||
Utf8Entry mtype = (Utf8Entry) cpMap[ref2];
|
Utf8Entry mtype = (Utf8Entry) cpMap[ref2];
|
||||||
cpMap[cpi] = ConstantPool.getDescriptorEntry(mname, mtype);
|
cpMap[cpi] = ConstantPool.getDescriptorEntry(mname, mtype);
|
||||||
break;
|
break;
|
||||||
|
case CONSTANT_MethodType:
|
||||||
|
cpMap[cpi] = ConstantPool.getMethodTypeEntry((Utf8Entry) cpMap[ref]);
|
||||||
|
break;
|
||||||
|
case CONSTANT_MethodHandle:
|
||||||
|
byte refKind = (byte)(-1 ^ ref);
|
||||||
|
MemberEntry memRef = (MemberEntry) cpMap[ref2];
|
||||||
|
cpMap[cpi] = ConstantPool.getMethodHandleEntry(refKind, memRef);
|
||||||
|
break;
|
||||||
|
case CONSTANT_InvokeDynamic:
|
||||||
|
DescriptorEntry idescr = (DescriptorEntry) cpMap[ref2];
|
||||||
|
cpMap[cpi] = new UnresolvedEntry((byte)tag, (-1 ^ ref), idescr);
|
||||||
|
// Note that ref must be resolved later, using the BootstrapMethods attribute.
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
assert(false);
|
assert(false);
|
||||||
}
|
}
|
||||||
|
@ -307,6 +339,50 @@ class ClassReader {
|
||||||
cls.cpMap = cpMap;
|
cls.cpMap = cpMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private /*non-static*/
|
||||||
|
class UnresolvedEntry extends Entry {
|
||||||
|
final Object[] refsOrIndexes;
|
||||||
|
UnresolvedEntry(byte tag, Object... refsOrIndexes) {
|
||||||
|
super(tag);
|
||||||
|
this.refsOrIndexes = refsOrIndexes;
|
||||||
|
ClassReader.this.haveUnresolvedEntry = true;
|
||||||
|
}
|
||||||
|
Entry resolve() {
|
||||||
|
Class cls = ClassReader.this.cls;
|
||||||
|
Entry res;
|
||||||
|
switch (tag) {
|
||||||
|
case CONSTANT_InvokeDynamic:
|
||||||
|
BootstrapMethodEntry iboots = cls.bootstrapMethods.get((Integer) refsOrIndexes[0]);
|
||||||
|
DescriptorEntry idescr = (DescriptorEntry) refsOrIndexes[1];
|
||||||
|
res = ConstantPool.getInvokeDynamicEntry(iboots, idescr);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
throw new AssertionError();
|
||||||
|
}
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
private void unresolved() { throw new RuntimeException("unresolved entry has no string"); }
|
||||||
|
public int compareTo(Object x) { unresolved(); return 0; }
|
||||||
|
public boolean equals(Object x) { unresolved(); return false; }
|
||||||
|
protected int computeValueHash() { unresolved(); return 0; }
|
||||||
|
public String stringValue() { unresolved(); return toString(); }
|
||||||
|
public String toString() { return "(unresolved "+ConstantPool.tagName(tag)+")"; }
|
||||||
|
}
|
||||||
|
|
||||||
|
boolean haveUnresolvedEntry;
|
||||||
|
private void fixUnresolvedEntries() {
|
||||||
|
if (!haveUnresolvedEntry) return;
|
||||||
|
Entry[] cpMap = cls.getCPMap();
|
||||||
|
for (int i = 0; i < cpMap.length; i++) {
|
||||||
|
Entry e = cpMap[i];
|
||||||
|
if (e instanceof UnresolvedEntry) {
|
||||||
|
cpMap[i] = e = ((UnresolvedEntry)e).resolve();
|
||||||
|
assert(!(e instanceof UnresolvedEntry));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
haveUnresolvedEntry = false;
|
||||||
|
}
|
||||||
|
|
||||||
void readHeader() throws IOException {
|
void readHeader() throws IOException {
|
||||||
cls.flags = readUnsignedShort();
|
cls.flags = readUnsignedShort();
|
||||||
cls.thisClass = readClassRef();
|
cls.thisClass = readClassRef();
|
||||||
|
@ -416,11 +492,9 @@ class ClassReader {
|
||||||
unknownAttrCommand);
|
unknownAttrCommand);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (a.layout() == Package.attrCodeEmpty ||
|
long pos0 = inPos; // in case we want to check it
|
||||||
a.layout() == Package.attrInnerClassesEmpty) {
|
if (a.layout() == Package.attrCodeEmpty) {
|
||||||
// These are hardwired.
|
// These are hardwired.
|
||||||
long pos0 = inPos;
|
|
||||||
if ("Code".equals(a.name())) {
|
|
||||||
Class.Method m = (Class.Method) h;
|
Class.Method m = (Class.Method) h;
|
||||||
m.code = new Code(m);
|
m.code = new Code(m);
|
||||||
try {
|
try {
|
||||||
|
@ -429,10 +503,18 @@ class ClassReader {
|
||||||
String message = iie.getMessage() + " in " + h;
|
String message = iie.getMessage() + " in " + h;
|
||||||
throw new ClassReader.ClassFormatException(message, iie);
|
throw new ClassReader.ClassFormatException(message, iie);
|
||||||
}
|
}
|
||||||
} else {
|
assert(length == inPos - pos0);
|
||||||
|
// Keep empty attribute a...
|
||||||
|
} else if (a.layout() == Package.attrBootstrapMethodsEmpty) {
|
||||||
|
assert(h == cls);
|
||||||
|
readBootstrapMethods(cls);
|
||||||
|
assert(length == inPos - pos0);
|
||||||
|
// Delete the attribute; it is logically part of the constant pool.
|
||||||
|
continue;
|
||||||
|
} else if (a.layout() == Package.attrInnerClassesEmpty) {
|
||||||
|
// These are hardwired also.
|
||||||
assert(h == cls);
|
assert(h == cls);
|
||||||
readInnerClasses(cls);
|
readInnerClasses(cls);
|
||||||
}
|
|
||||||
assert(length == inPos - pos0);
|
assert(length == inPos - pos0);
|
||||||
// Keep empty attribute a...
|
// Keep empty attribute a...
|
||||||
} else if (length > 0) {
|
} else if (length > 0) {
|
||||||
|
@ -467,6 +549,19 @@ class ClassReader {
|
||||||
readAttributes(ATTR_CONTEXT_CODE, code);
|
readAttributes(ATTR_CONTEXT_CODE, code);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void readBootstrapMethods(Class cls) throws IOException {
|
||||||
|
BootstrapMethodEntry[] bsms = new BootstrapMethodEntry[readUnsignedShort()];
|
||||||
|
for (int i = 0; i < bsms.length; i++) {
|
||||||
|
MethodHandleEntry bsmRef = (MethodHandleEntry) readRef(CONSTANT_MethodHandle);
|
||||||
|
Entry[] argRefs = new Entry[readUnsignedShort()];
|
||||||
|
for (int j = 0; j < argRefs.length; j++) {
|
||||||
|
argRefs[j] = readRef();
|
||||||
|
}
|
||||||
|
bsms[i] = ConstantPool.getBootstrapMethodEntry(bsmRef, argRefs);
|
||||||
|
}
|
||||||
|
cls.setBootstrapMethods(Arrays.asList(bsms));
|
||||||
|
}
|
||||||
|
|
||||||
void readInnerClasses(Class cls) throws IOException {
|
void readInnerClasses(Class cls) throws IOException {
|
||||||
int nc = readUnsignedShort();
|
int nc = readUnsignedShort();
|
||||||
ArrayList<InnerClass> ics = new ArrayList<>(nc);
|
ArrayList<InnerClass> ics = new ArrayList<>(nc);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -29,6 +29,8 @@ package com.sun.java.util.jar.pack;
|
||||||
import com.sun.java.util.jar.pack.ConstantPool.Entry;
|
import com.sun.java.util.jar.pack.ConstantPool.Entry;
|
||||||
import com.sun.java.util.jar.pack.ConstantPool.Index;
|
import com.sun.java.util.jar.pack.ConstantPool.Index;
|
||||||
import com.sun.java.util.jar.pack.ConstantPool.NumberEntry;
|
import com.sun.java.util.jar.pack.ConstantPool.NumberEntry;
|
||||||
|
import com.sun.java.util.jar.pack.ConstantPool.MethodHandleEntry;
|
||||||
|
import com.sun.java.util.jar.pack.ConstantPool.BootstrapMethodEntry;
|
||||||
import com.sun.java.util.jar.pack.Package.Class;
|
import com.sun.java.util.jar.pack.Package.Class;
|
||||||
import com.sun.java.util.jar.pack.Package.InnerClass;
|
import com.sun.java.util.jar.pack.Package.InnerClass;
|
||||||
import java.io.BufferedOutputStream;
|
import java.io.BufferedOutputStream;
|
||||||
|
@ -49,6 +51,7 @@ class ClassWriter {
|
||||||
Class cls;
|
Class cls;
|
||||||
DataOutputStream out;
|
DataOutputStream out;
|
||||||
Index cpIndex;
|
Index cpIndex;
|
||||||
|
Index bsmIndex;
|
||||||
|
|
||||||
ClassWriter(Class cls, OutputStream out) throws IOException {
|
ClassWriter(Class cls, OutputStream out) throws IOException {
|
||||||
this.pkg = cls.getPackage();
|
this.pkg = cls.getPackage();
|
||||||
|
@ -57,6 +60,10 @@ class ClassWriter {
|
||||||
this.out = new DataOutputStream(new BufferedOutputStream(out));
|
this.out = new DataOutputStream(new BufferedOutputStream(out));
|
||||||
this.cpIndex = ConstantPool.makeIndex(cls.toString(), cls.getCPMap());
|
this.cpIndex = ConstantPool.makeIndex(cls.toString(), cls.getCPMap());
|
||||||
this.cpIndex.flattenSigs = true;
|
this.cpIndex.flattenSigs = true;
|
||||||
|
if (cls.hasBootstrapMethods()) {
|
||||||
|
this.bsmIndex = ConstantPool.makeIndex(cpIndex.debugName+".BootstrapMethods",
|
||||||
|
cls.getBootstrapMethodMap());
|
||||||
|
}
|
||||||
if (verbose > 1)
|
if (verbose > 1)
|
||||||
Utils.log.fine("local CP="+(verbose > 2 ? cpIndex.dumpString() : cpIndex.toString()));
|
Utils.log.fine("local CP="+(verbose > 2 ? cpIndex.dumpString() : cpIndex.toString()));
|
||||||
}
|
}
|
||||||
|
@ -71,6 +78,11 @@ class ClassWriter {
|
||||||
|
|
||||||
/** Write a 2-byte int representing a CP entry, using the local cpIndex. */
|
/** Write a 2-byte int representing a CP entry, using the local cpIndex. */
|
||||||
private void writeRef(Entry e) throws IOException {
|
private void writeRef(Entry e) throws IOException {
|
||||||
|
writeRef(e, cpIndex);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Write a 2-byte int representing a CP entry, using the given cpIndex. */
|
||||||
|
private void writeRef(Entry e, Index cpIndex) throws IOException {
|
||||||
int i = (e == null) ? 0 : cpIndex.indexOf(e);
|
int i = (e == null) ? 0 : cpIndex.indexOf(e);
|
||||||
writeShort(i);
|
writeShort(i);
|
||||||
}
|
}
|
||||||
|
@ -117,8 +129,7 @@ class ClassWriter {
|
||||||
out.write(tag);
|
out.write(tag);
|
||||||
switch (tag) {
|
switch (tag) {
|
||||||
case CONSTANT_Signature:
|
case CONSTANT_Signature:
|
||||||
assert(false); // should not reach here
|
throw new AssertionError("CP should have Signatures remapped to Utf8");
|
||||||
break;
|
|
||||||
case CONSTANT_Utf8:
|
case CONSTANT_Utf8:
|
||||||
out.writeUTF(e.stringValue());
|
out.writeUTF(e.stringValue());
|
||||||
break;
|
break;
|
||||||
|
@ -138,8 +149,14 @@ class ClassWriter {
|
||||||
break;
|
break;
|
||||||
case CONSTANT_Class:
|
case CONSTANT_Class:
|
||||||
case CONSTANT_String:
|
case CONSTANT_String:
|
||||||
|
case CONSTANT_MethodType:
|
||||||
writeRef(e.getRef(0));
|
writeRef(e.getRef(0));
|
||||||
break;
|
break;
|
||||||
|
case CONSTANT_MethodHandle:
|
||||||
|
MethodHandleEntry mhe = (MethodHandleEntry) e;
|
||||||
|
out.writeByte(mhe.refKind);
|
||||||
|
writeRef(mhe.getRef(0));
|
||||||
|
break;
|
||||||
case CONSTANT_Fieldref:
|
case CONSTANT_Fieldref:
|
||||||
case CONSTANT_Methodref:
|
case CONSTANT_Methodref:
|
||||||
case CONSTANT_InterfaceMethodref:
|
case CONSTANT_InterfaceMethodref:
|
||||||
|
@ -147,6 +164,12 @@ class ClassWriter {
|
||||||
writeRef(e.getRef(0));
|
writeRef(e.getRef(0));
|
||||||
writeRef(e.getRef(1));
|
writeRef(e.getRef(1));
|
||||||
break;
|
break;
|
||||||
|
case CONSTANT_InvokeDynamic:
|
||||||
|
writeRef(e.getRef(0), bsmIndex);
|
||||||
|
writeRef(e.getRef(1));
|
||||||
|
break;
|
||||||
|
case CONSTANT_BootstrapMethod:
|
||||||
|
throw new AssertionError("CP should have BootstrapMethods moved to side-table");
|
||||||
default:
|
default:
|
||||||
throw new IOException("Bad constant pool tag "+tag);
|
throw new IOException("Bad constant pool tag "+tag);
|
||||||
}
|
}
|
||||||
|
@ -198,6 +221,7 @@ class ClassWriter {
|
||||||
a.finishRefs(cpIndex);
|
a.finishRefs(cpIndex);
|
||||||
writeRef(a.getNameRef());
|
writeRef(a.getNameRef());
|
||||||
if (a.layout() == Package.attrCodeEmpty ||
|
if (a.layout() == Package.attrCodeEmpty ||
|
||||||
|
a.layout() == Package.attrBootstrapMethodsEmpty ||
|
||||||
a.layout() == Package.attrInnerClassesEmpty) {
|
a.layout() == Package.attrInnerClassesEmpty) {
|
||||||
// These are hardwired.
|
// These are hardwired.
|
||||||
DataOutputStream savedOut = out;
|
DataOutputStream savedOut = out;
|
||||||
|
@ -207,9 +231,14 @@ class ClassWriter {
|
||||||
if ("Code".equals(a.name())) {
|
if ("Code".equals(a.name())) {
|
||||||
Class.Method m = (Class.Method) h;
|
Class.Method m = (Class.Method) h;
|
||||||
writeCode(m.code);
|
writeCode(m.code);
|
||||||
} else {
|
} else if ("BootstrapMethods".equals(a.name())) {
|
||||||
|
assert(h == cls);
|
||||||
|
writeBootstrapMethods(cls);
|
||||||
|
} else if ("InnerClasses".equals(a.name())) {
|
||||||
assert(h == cls);
|
assert(h == cls);
|
||||||
writeInnerClasses(cls);
|
writeInnerClasses(cls);
|
||||||
|
} else {
|
||||||
|
throw new AssertionError();
|
||||||
}
|
}
|
||||||
out = savedOut;
|
out = savedOut;
|
||||||
if (verbose > 2)
|
if (verbose > 2)
|
||||||
|
@ -242,6 +271,18 @@ class ClassWriter {
|
||||||
writeAttributes(ATTR_CONTEXT_CODE, code);
|
writeAttributes(ATTR_CONTEXT_CODE, code);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void writeBootstrapMethods(Class cls) throws IOException {
|
||||||
|
List<BootstrapMethodEntry> bsms = cls.getBootstrapMethods();
|
||||||
|
writeShort(bsms.size());
|
||||||
|
for (BootstrapMethodEntry e : bsms) {
|
||||||
|
writeRef(e.bsmRef);
|
||||||
|
writeShort(e.argRefs.length);
|
||||||
|
for (Entry argRef : e.argRefs) {
|
||||||
|
writeRef(argRef);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void writeInnerClasses(Class cls) throws IOException {
|
void writeInnerClasses(Class cls) throws IOException {
|
||||||
List<InnerClass> ics = cls.getInnerClasses();
|
List<InnerClass> ics = cls.getInnerClasses();
|
||||||
writeShort(ics.size());
|
writeShort(ics.size());
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -52,7 +52,7 @@ class ConstantPool {
|
||||||
* Also used to back up more complex constant pool entries, like Class.
|
* Also used to back up more complex constant pool entries, like Class.
|
||||||
*/
|
*/
|
||||||
public static synchronized Utf8Entry getUtf8Entry(String value) {
|
public static synchronized Utf8Entry getUtf8Entry(String value) {
|
||||||
Map<String, Utf8Entry> utf8Entries = Utils.getUtf8Entries();
|
Map<String, Utf8Entry> utf8Entries = Utils.getTLGlobals().getUtf8Entries();
|
||||||
Utf8Entry e = utf8Entries.get(value);
|
Utf8Entry e = utf8Entries.get(value);
|
||||||
if (e == null) {
|
if (e == null) {
|
||||||
e = new Utf8Entry(value);
|
e = new Utf8Entry(value);
|
||||||
|
@ -61,8 +61,8 @@ class ConstantPool {
|
||||||
return e;
|
return e;
|
||||||
}
|
}
|
||||||
/** Factory for Class constants. */
|
/** Factory for Class constants. */
|
||||||
public static synchronized ClassEntry getClassEntry(String name) {
|
public static ClassEntry getClassEntry(String name) {
|
||||||
Map<String, ClassEntry> classEntries = Utils.getClassEntries();
|
Map<String, ClassEntry> classEntries = Utils.getTLGlobals().getClassEntries();
|
||||||
ClassEntry e = classEntries.get(name);
|
ClassEntry e = classEntries.get(name);
|
||||||
if (e == null) {
|
if (e == null) {
|
||||||
e = new ClassEntry(getUtf8Entry(name));
|
e = new ClassEntry(getUtf8Entry(name));
|
||||||
|
@ -72,8 +72,8 @@ class ConstantPool {
|
||||||
return e;
|
return e;
|
||||||
}
|
}
|
||||||
/** Factory for literal constants (String, Integer, etc.). */
|
/** Factory for literal constants (String, Integer, etc.). */
|
||||||
public static synchronized LiteralEntry getLiteralEntry(Comparable<?> value) {
|
public static LiteralEntry getLiteralEntry(Comparable<?> value) {
|
||||||
Map<Object, LiteralEntry> literalEntries = Utils.getLiteralEntries();
|
Map<Object, LiteralEntry> literalEntries = Utils.getTLGlobals().getLiteralEntries();
|
||||||
LiteralEntry e = literalEntries.get(value);
|
LiteralEntry e = literalEntries.get(value);
|
||||||
if (e == null) {
|
if (e == null) {
|
||||||
if (value instanceof String)
|
if (value instanceof String)
|
||||||
|
@ -85,13 +85,13 @@ class ConstantPool {
|
||||||
return e;
|
return e;
|
||||||
}
|
}
|
||||||
/** Factory for literal constants (String, Integer, etc.). */
|
/** Factory for literal constants (String, Integer, etc.). */
|
||||||
public static synchronized StringEntry getStringEntry(String value) {
|
public static StringEntry getStringEntry(String value) {
|
||||||
return (StringEntry) getLiteralEntry(value);
|
return (StringEntry) getLiteralEntry(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Factory for signature (type) constants. */
|
/** Factory for signature (type) constants. */
|
||||||
public static synchronized SignatureEntry getSignatureEntry(String type) {
|
public static SignatureEntry getSignatureEntry(String type) {
|
||||||
Map<String, SignatureEntry> signatureEntries = Utils.getSignatureEntries();
|
Map<String, SignatureEntry> signatureEntries = Utils.getTLGlobals().getSignatureEntries();
|
||||||
SignatureEntry e = signatureEntries.get(type);
|
SignatureEntry e = signatureEntries.get(type);
|
||||||
if (e == null) {
|
if (e == null) {
|
||||||
e = new SignatureEntry(type);
|
e = new SignatureEntry(type);
|
||||||
|
@ -106,8 +106,8 @@ class ConstantPool {
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Factory for descriptor (name-and-type) constants. */
|
/** Factory for descriptor (name-and-type) constants. */
|
||||||
public static synchronized DescriptorEntry getDescriptorEntry(Utf8Entry nameRef, SignatureEntry typeRef) {
|
public static DescriptorEntry getDescriptorEntry(Utf8Entry nameRef, SignatureEntry typeRef) {
|
||||||
Map<String, DescriptorEntry> descriptorEntries = Utils.getDescriptorEntries();
|
Map<String, DescriptorEntry> descriptorEntries = Utils.getTLGlobals().getDescriptorEntries();
|
||||||
String key = DescriptorEntry.stringValueOf(nameRef, typeRef);
|
String key = DescriptorEntry.stringValueOf(nameRef, typeRef);
|
||||||
DescriptorEntry e = descriptorEntries.get(key);
|
DescriptorEntry e = descriptorEntries.get(key);
|
||||||
if (e == null) {
|
if (e == null) {
|
||||||
|
@ -124,8 +124,8 @@ class ConstantPool {
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Factory for member reference constants. */
|
/** Factory for member reference constants. */
|
||||||
public static synchronized MemberEntry getMemberEntry(byte tag, ClassEntry classRef, DescriptorEntry descRef) {
|
public static MemberEntry getMemberEntry(byte tag, ClassEntry classRef, DescriptorEntry descRef) {
|
||||||
Map<String, MemberEntry> memberEntries = Utils.getMemberEntries();
|
Map<String, MemberEntry> memberEntries = Utils.getTLGlobals().getMemberEntries();
|
||||||
String key = MemberEntry.stringValueOf(tag, classRef, descRef);
|
String key = MemberEntry.stringValueOf(tag, classRef, descRef);
|
||||||
MemberEntry e = memberEntries.get(key);
|
MemberEntry e = memberEntries.get(key);
|
||||||
if (e == null) {
|
if (e == null) {
|
||||||
|
@ -137,6 +137,61 @@ class ConstantPool {
|
||||||
return e;
|
return e;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Factory for MethodHandle constants. */
|
||||||
|
public static MethodHandleEntry getMethodHandleEntry(byte refKind, MemberEntry memRef) {
|
||||||
|
Map<String, MethodHandleEntry> methodHandleEntries = Utils.getTLGlobals().getMethodHandleEntries();
|
||||||
|
String key = MethodHandleEntry.stringValueOf(refKind, memRef);
|
||||||
|
MethodHandleEntry e = methodHandleEntries.get(key);
|
||||||
|
if (e == null) {
|
||||||
|
e = new MethodHandleEntry(refKind, memRef);
|
||||||
|
assert(e.stringValue().equals(key));
|
||||||
|
methodHandleEntries.put(key, e);
|
||||||
|
}
|
||||||
|
return e;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Factory for MethodType constants. */
|
||||||
|
public static MethodTypeEntry getMethodTypeEntry(SignatureEntry sigRef) {
|
||||||
|
Map<String, MethodTypeEntry> methodTypeEntries = Utils.getTLGlobals().getMethodTypeEntries();
|
||||||
|
String key = sigRef.stringValue();
|
||||||
|
MethodTypeEntry e = methodTypeEntries.get(key);
|
||||||
|
if (e == null) {
|
||||||
|
e = new MethodTypeEntry(sigRef);
|
||||||
|
assert(e.stringValue().equals(key));
|
||||||
|
methodTypeEntries.put(key, e);
|
||||||
|
}
|
||||||
|
return e;
|
||||||
|
}
|
||||||
|
public static MethodTypeEntry getMethodTypeEntry(Utf8Entry typeRef) {
|
||||||
|
return getMethodTypeEntry(getSignatureEntry(typeRef.stringValue()));
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Factory for InvokeDynamic constants. */
|
||||||
|
public static InvokeDynamicEntry getInvokeDynamicEntry(BootstrapMethodEntry bssRef, DescriptorEntry descRef) {
|
||||||
|
Map<String, InvokeDynamicEntry> invokeDynamicEntries = Utils.getTLGlobals().getInvokeDynamicEntries();
|
||||||
|
String key = InvokeDynamicEntry.stringValueOf(bssRef, descRef);
|
||||||
|
InvokeDynamicEntry e = invokeDynamicEntries.get(key);
|
||||||
|
if (e == null) {
|
||||||
|
e = new InvokeDynamicEntry(bssRef, descRef);
|
||||||
|
assert(e.stringValue().equals(key));
|
||||||
|
invokeDynamicEntries.put(key, e);
|
||||||
|
}
|
||||||
|
return e;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Factory for BootstrapMethod pseudo-constants. */
|
||||||
|
public static BootstrapMethodEntry getBootstrapMethodEntry(MethodHandleEntry bsmRef, Entry[] argRefs) {
|
||||||
|
Map<String, BootstrapMethodEntry> bootstrapMethodEntries = Utils.getTLGlobals().getBootstrapMethodEntries();
|
||||||
|
String key = BootstrapMethodEntry.stringValueOf(bsmRef, argRefs);
|
||||||
|
BootstrapMethodEntry e = bootstrapMethodEntries.get(key);
|
||||||
|
if (e == null) {
|
||||||
|
e = new BootstrapMethodEntry(bsmRef, argRefs);
|
||||||
|
assert(e.stringValue().equals(key));
|
||||||
|
bootstrapMethodEntries.put(key, e);
|
||||||
|
}
|
||||||
|
return e;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/** Entries in the constant pool. */
|
/** Entries in the constant pool. */
|
||||||
public static abstract
|
public static abstract
|
||||||
|
@ -251,6 +306,10 @@ class ConstantPool {
|
||||||
throw new RuntimeException("bad literal value "+value);
|
throw new RuntimeException("bad literal value "+value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static boolean isRefKind(byte refKind) {
|
||||||
|
return (REF_getField <= refKind && refKind <= REF_invokeInterface);
|
||||||
|
}
|
||||||
|
|
||||||
public static abstract
|
public static abstract
|
||||||
class LiteralEntry extends Entry {
|
class LiteralEntry extends Entry {
|
||||||
protected LiteralEntry(byte tag) {
|
protected LiteralEntry(byte tag) {
|
||||||
|
@ -404,7 +463,7 @@ class ConstantPool {
|
||||||
}
|
}
|
||||||
static
|
static
|
||||||
String stringValueOf(Entry nameRef, Entry typeRef) {
|
String stringValueOf(Entry nameRef, Entry typeRef) {
|
||||||
return typeRef.stringValue()+","+nameRef.stringValue();
|
return qualifiedStringValue(typeRef, nameRef);
|
||||||
}
|
}
|
||||||
|
|
||||||
public String prettyString() {
|
public String prettyString() {
|
||||||
|
@ -420,6 +479,15 @@ class ConstantPool {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static String qualifiedStringValue(Entry e1, Entry e2) {
|
||||||
|
return qualifiedStringValue(e1.stringValue(), e2.stringValue());
|
||||||
|
}
|
||||||
|
static String qualifiedStringValue(String s1, String s234) {
|
||||||
|
// Qualification by dot must decompose uniquely. Second string might already be qualified.
|
||||||
|
assert(s1.indexOf(".") < 0);
|
||||||
|
return s1+"."+s234;
|
||||||
|
}
|
||||||
|
|
||||||
public static
|
public static
|
||||||
class MemberEntry extends Entry {
|
class MemberEntry extends Entry {
|
||||||
final ClassEntry classRef;
|
final ClassEntry classRef;
|
||||||
|
@ -453,7 +521,11 @@ class ConstantPool {
|
||||||
int x = superCompareTo(o);
|
int x = superCompareTo(o);
|
||||||
if (x == 0) {
|
if (x == 0) {
|
||||||
MemberEntry that = (MemberEntry)o;
|
MemberEntry that = (MemberEntry)o;
|
||||||
|
if (Utils.SORT_MEMBERS_DESCR_MAJOR)
|
||||||
|
// descRef is transmitted as UDELTA5; sort it first?
|
||||||
|
x = this.descRef.compareTo(that.descRef);
|
||||||
// Primary key is classRef.
|
// Primary key is classRef.
|
||||||
|
if (x == 0)
|
||||||
x = this.classRef.compareTo(that.classRef);
|
x = this.classRef.compareTo(that.classRef);
|
||||||
if (x == 0)
|
if (x == 0)
|
||||||
x = this.descRef.compareTo(that.descRef);
|
x = this.descRef.compareTo(that.descRef);
|
||||||
|
@ -473,7 +545,7 @@ class ConstantPool {
|
||||||
case CONSTANT_InterfaceMethodref: pfx = "IMethod:"; break;
|
case CONSTANT_InterfaceMethodref: pfx = "IMethod:"; break;
|
||||||
default: pfx = tag+"???"; break;
|
default: pfx = tag+"???"; break;
|
||||||
}
|
}
|
||||||
return pfx+classRef.stringValue()+","+descRef.stringValue();
|
return pfx+qualifiedStringValue(classRef, descRef);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isMethod() {
|
public boolean isMethod() {
|
||||||
|
@ -581,13 +653,26 @@ class ConstantPool {
|
||||||
}
|
}
|
||||||
public byte getLiteralTag() {
|
public byte getLiteralTag() {
|
||||||
switch (formRef.stringValue().charAt(0)) {
|
switch (formRef.stringValue().charAt(0)) {
|
||||||
case 'L': return CONSTANT_String;
|
|
||||||
case 'I': return CONSTANT_Integer;
|
case 'I': return CONSTANT_Integer;
|
||||||
case 'J': return CONSTANT_Long;
|
case 'J': return CONSTANT_Long;
|
||||||
case 'F': return CONSTANT_Float;
|
case 'F': return CONSTANT_Float;
|
||||||
case 'D': return CONSTANT_Double;
|
case 'D': return CONSTANT_Double;
|
||||||
case 'B': case 'S': case 'C': case 'Z':
|
case 'B': case 'S': case 'C': case 'Z':
|
||||||
return CONSTANT_Integer;
|
return CONSTANT_Integer;
|
||||||
|
case 'L':
|
||||||
|
/*
|
||||||
|
switch (classRefs[0].stringValue()) {
|
||||||
|
case "java/lang/String":
|
||||||
|
return CONSTANT_String;
|
||||||
|
case "java/lang/invoke/MethodHandle":
|
||||||
|
return CONSTANT_MethodHandle;
|
||||||
|
case "java/lang/invoke/MethodType":
|
||||||
|
return CONSTANT_MethodType;
|
||||||
|
default: // java/lang/Object, etc.
|
||||||
|
return CONSTANT_LoadableValue;
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
return CONSTANT_String; // JDK 7 ConstantValue limited to String
|
||||||
}
|
}
|
||||||
assert(false);
|
assert(false);
|
||||||
return CONSTANT_None;
|
return CONSTANT_None;
|
||||||
|
@ -724,6 +809,218 @@ class ConstantPool {
|
||||||
return parts;
|
return parts;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** @since JDK 7, JSR 292 */
|
||||||
|
public static
|
||||||
|
class MethodHandleEntry extends Entry {
|
||||||
|
final int refKind;
|
||||||
|
final MemberEntry memRef;
|
||||||
|
public Entry getRef(int i) { return i == 0 ? memRef : null; }
|
||||||
|
|
||||||
|
protected int computeValueHash() {
|
||||||
|
int hc2 = refKind;
|
||||||
|
return (memRef.hashCode() + (hc2 << 8)) ^ hc2;
|
||||||
|
}
|
||||||
|
|
||||||
|
MethodHandleEntry(byte refKind, MemberEntry memRef) {
|
||||||
|
super(CONSTANT_MethodHandle);
|
||||||
|
assert(isRefKind(refKind));
|
||||||
|
this.refKind = refKind;
|
||||||
|
this.memRef = memRef;
|
||||||
|
hashCode(); // force computation of valueHash
|
||||||
|
}
|
||||||
|
public boolean equals(Object o) {
|
||||||
|
if (o == null || o.getClass() != MethodHandleEntry.class) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
MethodHandleEntry that = (MethodHandleEntry)o;
|
||||||
|
return this.refKind == that.refKind
|
||||||
|
&& this.memRef.eq(that.memRef);
|
||||||
|
}
|
||||||
|
public int compareTo(Object o) {
|
||||||
|
int x = superCompareTo(o);
|
||||||
|
if (x == 0) {
|
||||||
|
MethodHandleEntry that = (MethodHandleEntry)o;
|
||||||
|
if (Utils.SORT_HANDLES_KIND_MAJOR)
|
||||||
|
// Primary key could be refKind.
|
||||||
|
x = this.refKind - that.refKind;
|
||||||
|
// Primary key is memRef, which is transmitted as UDELTA5.
|
||||||
|
if (x == 0)
|
||||||
|
x = this.memRef.compareTo(that.memRef);
|
||||||
|
if (x == 0)
|
||||||
|
x = this.refKind - that.refKind;
|
||||||
|
}
|
||||||
|
return x;
|
||||||
|
}
|
||||||
|
public static String stringValueOf(int refKind, MemberEntry memRef) {
|
||||||
|
return refKindName(refKind)+":"+memRef.stringValue();
|
||||||
|
}
|
||||||
|
public String stringValue() {
|
||||||
|
return stringValueOf(refKind, memRef);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** @since JDK 7, JSR 292 */
|
||||||
|
public static
|
||||||
|
class MethodTypeEntry extends Entry {
|
||||||
|
final SignatureEntry typeRef;
|
||||||
|
public Entry getRef(int i) { return i == 0 ? typeRef : null; }
|
||||||
|
|
||||||
|
protected int computeValueHash() {
|
||||||
|
return typeRef.hashCode() + tag;
|
||||||
|
}
|
||||||
|
|
||||||
|
MethodTypeEntry(SignatureEntry typeRef) {
|
||||||
|
super(CONSTANT_MethodType);
|
||||||
|
this.typeRef = typeRef;
|
||||||
|
hashCode(); // force computation of valueHash
|
||||||
|
}
|
||||||
|
public boolean equals(Object o) {
|
||||||
|
if (o == null || o.getClass() != MethodTypeEntry.class) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
MethodTypeEntry that = (MethodTypeEntry)o;
|
||||||
|
return this.typeRef.eq(that.typeRef);
|
||||||
|
}
|
||||||
|
public int compareTo(Object o) {
|
||||||
|
int x = superCompareTo(o);
|
||||||
|
if (x == 0) {
|
||||||
|
MethodTypeEntry that = (MethodTypeEntry)o;
|
||||||
|
x = this.typeRef.compareTo(that.typeRef);
|
||||||
|
}
|
||||||
|
return x;
|
||||||
|
}
|
||||||
|
public String stringValue() {
|
||||||
|
return typeRef.stringValue();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** @since JDK 7, JSR 292 */
|
||||||
|
public static
|
||||||
|
class InvokeDynamicEntry extends Entry {
|
||||||
|
final BootstrapMethodEntry bssRef;
|
||||||
|
final DescriptorEntry descRef;
|
||||||
|
public Entry getRef(int i) {
|
||||||
|
if (i == 0) return bssRef;
|
||||||
|
if (i == 1) return descRef;
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
protected int computeValueHash() {
|
||||||
|
int hc2 = descRef.hashCode();
|
||||||
|
return (bssRef.hashCode() + (hc2 << 8)) ^ hc2;
|
||||||
|
}
|
||||||
|
|
||||||
|
InvokeDynamicEntry(BootstrapMethodEntry bssRef, DescriptorEntry descRef) {
|
||||||
|
super(CONSTANT_InvokeDynamic);
|
||||||
|
this.bssRef = bssRef;
|
||||||
|
this.descRef = descRef;
|
||||||
|
hashCode(); // force computation of valueHash
|
||||||
|
}
|
||||||
|
public boolean equals(Object o) {
|
||||||
|
if (o == null || o.getClass() != InvokeDynamicEntry.class) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
InvokeDynamicEntry that = (InvokeDynamicEntry)o;
|
||||||
|
return this.bssRef.eq(that.bssRef)
|
||||||
|
&& this.descRef.eq(that.descRef);
|
||||||
|
}
|
||||||
|
public int compareTo(Object o) {
|
||||||
|
int x = superCompareTo(o);
|
||||||
|
if (x == 0) {
|
||||||
|
InvokeDynamicEntry that = (InvokeDynamicEntry)o;
|
||||||
|
if (Utils.SORT_INDY_BSS_MAJOR)
|
||||||
|
// Primary key could be bsmRef.
|
||||||
|
x = this.bssRef.compareTo(that.bssRef);
|
||||||
|
// Primary key is descriptor, which is transmitted as UDELTA5.
|
||||||
|
if (x == 0)
|
||||||
|
x = this.descRef.compareTo(that.descRef);
|
||||||
|
if (x == 0)
|
||||||
|
x = this.bssRef.compareTo(that.bssRef);
|
||||||
|
}
|
||||||
|
return x;
|
||||||
|
}
|
||||||
|
public String stringValue() {
|
||||||
|
return stringValueOf(bssRef, descRef);
|
||||||
|
}
|
||||||
|
static
|
||||||
|
String stringValueOf(BootstrapMethodEntry bssRef, DescriptorEntry descRef) {
|
||||||
|
return "Indy:"+bssRef.stringValue()+"."+descRef.stringValue();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** @since JDK 7, JSR 292 */
|
||||||
|
public static
|
||||||
|
class BootstrapMethodEntry extends Entry {
|
||||||
|
final MethodHandleEntry bsmRef;
|
||||||
|
final Entry[] argRefs;
|
||||||
|
public Entry getRef(int i) {
|
||||||
|
if (i == 0) return bsmRef;
|
||||||
|
if (i-1 < argRefs.length) return argRefs[i-1];
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
protected int computeValueHash() {
|
||||||
|
int hc2 = bsmRef.hashCode();
|
||||||
|
return (Arrays.hashCode(argRefs) + (hc2 << 8)) ^ hc2;
|
||||||
|
}
|
||||||
|
|
||||||
|
BootstrapMethodEntry(MethodHandleEntry bsmRef, Entry[] argRefs) {
|
||||||
|
super(CONSTANT_BootstrapMethod);
|
||||||
|
this.bsmRef = bsmRef;
|
||||||
|
this.argRefs = argRefs.clone();
|
||||||
|
hashCode(); // force computation of valueHash
|
||||||
|
}
|
||||||
|
public boolean equals(Object o) {
|
||||||
|
if (o == null || o.getClass() != BootstrapMethodEntry.class) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
BootstrapMethodEntry that = (BootstrapMethodEntry)o;
|
||||||
|
return this.bsmRef.eq(that.bsmRef)
|
||||||
|
&& Arrays.equals(this.argRefs, that.argRefs);
|
||||||
|
}
|
||||||
|
public int compareTo(Object o) {
|
||||||
|
int x = superCompareTo(o);
|
||||||
|
if (x == 0) {
|
||||||
|
BootstrapMethodEntry that = (BootstrapMethodEntry)o;
|
||||||
|
if (Utils.SORT_BSS_BSM_MAJOR)
|
||||||
|
// Primary key is bsmRef.
|
||||||
|
x = this.bsmRef.compareTo(that.bsmRef);
|
||||||
|
// Primary key is args array length, which is transmitted as UDELTA5.
|
||||||
|
if (x == 0)
|
||||||
|
x = compareArgArrays(this.argRefs, that.argRefs);
|
||||||
|
if (x == 0)
|
||||||
|
x = this.bsmRef.compareTo(that.bsmRef);
|
||||||
|
}
|
||||||
|
return x;
|
||||||
|
}
|
||||||
|
public String stringValue() {
|
||||||
|
return stringValueOf(bsmRef, argRefs);
|
||||||
|
}
|
||||||
|
static
|
||||||
|
String stringValueOf(MethodHandleEntry bsmRef, Entry[] argRefs) {
|
||||||
|
StringBuffer sb = new StringBuffer(bsmRef.stringValue());
|
||||||
|
// Arguments are formatted as "<foo;bar;baz>" instead of "[foo,bar,baz]".
|
||||||
|
// This ensures there will be no confusion if "[,]" appear inside of names.
|
||||||
|
char nextSep = '<';
|
||||||
|
boolean didOne = false;
|
||||||
|
for (Entry argRef : argRefs) {
|
||||||
|
sb.append(nextSep).append(argRef.stringValue());
|
||||||
|
nextSep = ';';
|
||||||
|
}
|
||||||
|
if (nextSep == '<') sb.append(nextSep);
|
||||||
|
sb.append('>');
|
||||||
|
return sb.toString();
|
||||||
|
}
|
||||||
|
static
|
||||||
|
int compareArgArrays(Entry[] a1, Entry[] a2) {
|
||||||
|
int x = a1.length - a2.length;
|
||||||
|
if (x != 0) return x;
|
||||||
|
for (int i = 0; i < a1.length; i++) {
|
||||||
|
x = a1[i].compareTo(a2[i]);
|
||||||
|
if (x != 0) break;
|
||||||
|
}
|
||||||
|
return x;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Handy constants:
|
// Handy constants:
|
||||||
protected static final Entry[] noRefs = {};
|
protected static final Entry[] noRefs = {};
|
||||||
protected static final ClassEntry[] noClassRefs = {};
|
protected static final ClassEntry[] noClassRefs = {};
|
||||||
|
@ -964,35 +1261,51 @@ class ConstantPool {
|
||||||
/** Coherent group of constant pool indexes. */
|
/** Coherent group of constant pool indexes. */
|
||||||
public static
|
public static
|
||||||
class IndexGroup {
|
class IndexGroup {
|
||||||
private Index indexUntyped;
|
|
||||||
private Index[] indexByTag = new Index[CONSTANT_Limit];
|
private Index[] indexByTag = new Index[CONSTANT_Limit];
|
||||||
|
private Index[] indexByTagGroup;
|
||||||
private int[] untypedFirstIndexByTag;
|
private int[] untypedFirstIndexByTag;
|
||||||
private int totalSize;
|
private int totalSizeQQ;
|
||||||
private Index[][] indexByTagAndClass;
|
private Index[][] indexByTagAndClass;
|
||||||
|
|
||||||
/** Index of all CP entries of all types, in definition order. */
|
/** Index of all CP entries of all types, in definition order. */
|
||||||
public Index getUntypedIndex() {
|
private Index makeTagGroupIndex(byte tagGroupTag, byte[] tagsInGroup) {
|
||||||
if (indexUntyped == null) {
|
if (indexByTagGroup == null)
|
||||||
|
indexByTagGroup = new Index[CONSTANT_GroupLimit - CONSTANT_GroupFirst];
|
||||||
|
int which = tagGroupTag - CONSTANT_GroupFirst;
|
||||||
|
assert(indexByTagGroup[which] == null);
|
||||||
|
int fillp = 0;
|
||||||
|
Entry[] cpMap = null;
|
||||||
|
for (int pass = 1; pass <= 2; pass++) {
|
||||||
untypedIndexOf(null); // warm up untypedFirstIndexByTag
|
untypedIndexOf(null); // warm up untypedFirstIndexByTag
|
||||||
Entry[] cpMap = new Entry[totalSize];
|
for (byte tag : tagsInGroup) {
|
||||||
for (int tag = 0; tag < indexByTag.length; tag++) {
|
|
||||||
Index ix = indexByTag[tag];
|
Index ix = indexByTag[tag];
|
||||||
if (ix == null) continue;
|
if (ix == null) continue;
|
||||||
int ixLen = ix.cpMap.length;
|
int ixLen = ix.cpMap.length;
|
||||||
if (ixLen == 0) continue;
|
if (ixLen == 0) continue;
|
||||||
int fillp = untypedFirstIndexByTag[tag];
|
assert(tagGroupTag == CONSTANT_All
|
||||||
|
? fillp == untypedFirstIndexByTag[tag]
|
||||||
|
: fillp < untypedFirstIndexByTag[tag]);
|
||||||
|
if (cpMap != null) {
|
||||||
assert(cpMap[fillp] == null);
|
assert(cpMap[fillp] == null);
|
||||||
assert(cpMap[fillp+ixLen-1] == null);
|
assert(cpMap[fillp+ixLen-1] == null);
|
||||||
System.arraycopy(ix.cpMap, 0, cpMap, fillp, ixLen);
|
System.arraycopy(ix.cpMap, 0, cpMap, fillp, ixLen);
|
||||||
}
|
}
|
||||||
indexUntyped = new Index("untyped", cpMap);
|
fillp += ixLen;
|
||||||
}
|
}
|
||||||
return indexUntyped;
|
if (cpMap == null) {
|
||||||
|
assert(pass == 1);
|
||||||
|
// get ready for pass 2
|
||||||
|
cpMap = new Entry[fillp];
|
||||||
|
fillp = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
indexByTagGroup[which] = new Index(tagName(tagGroupTag), cpMap);
|
||||||
|
return indexByTagGroup[which];
|
||||||
}
|
}
|
||||||
|
|
||||||
public int untypedIndexOf(Entry e) {
|
public int untypedIndexOf(Entry e) {
|
||||||
if (untypedFirstIndexByTag == null) {
|
if (untypedFirstIndexByTag == null) {
|
||||||
untypedFirstIndexByTag = new int[CONSTANT_Limit];
|
untypedFirstIndexByTag = new int[CONSTANT_Limit+1];
|
||||||
int fillp = 0;
|
int fillp = 0;
|
||||||
for (int i = 0; i < TAGS_IN_ORDER.length; i++) {
|
for (int i = 0; i < TAGS_IN_ORDER.length; i++) {
|
||||||
byte tag = TAGS_IN_ORDER[i];
|
byte tag = TAGS_IN_ORDER[i];
|
||||||
|
@ -1002,7 +1315,7 @@ class ConstantPool {
|
||||||
untypedFirstIndexByTag[tag] = fillp;
|
untypedFirstIndexByTag[tag] = fillp;
|
||||||
fillp += ixLen;
|
fillp += ixLen;
|
||||||
}
|
}
|
||||||
totalSize = fillp;
|
untypedFirstIndexByTag[CONSTANT_Limit] = fillp;
|
||||||
}
|
}
|
||||||
if (e == null) return -1;
|
if (e == null) return -1;
|
||||||
int tag = e.tag;
|
int tag = e.tag;
|
||||||
|
@ -1028,16 +1341,15 @@ class ConstantPool {
|
||||||
indexByTag[tag] = ix;
|
indexByTag[tag] = ix;
|
||||||
// decache indexes derived from this one:
|
// decache indexes derived from this one:
|
||||||
untypedFirstIndexByTag = null;
|
untypedFirstIndexByTag = null;
|
||||||
indexUntyped = null;
|
indexByTagGroup = null;
|
||||||
if (indexByTagAndClass != null)
|
if (indexByTagAndClass != null)
|
||||||
indexByTagAndClass[tag] = null;
|
indexByTagAndClass[tag] = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Index of all CP entries of a given tag. */
|
/** Index of all CP entries of a given tag. */
|
||||||
public Index getIndexByTag(byte tag) {
|
public Index getIndexByTag(byte tag) {
|
||||||
if (tag == CONSTANT_All) {
|
if (tag >= CONSTANT_GroupFirst)
|
||||||
return getUntypedIndex();
|
return getIndexByTagGroup(tag);
|
||||||
}
|
|
||||||
Index ix = indexByTag[tag];
|
Index ix = indexByTag[tag];
|
||||||
if (ix == null) {
|
if (ix == null) {
|
||||||
// Make an empty one by default.
|
// Make an empty one by default.
|
||||||
|
@ -1047,6 +1359,26 @@ class ConstantPool {
|
||||||
return ix;
|
return ix;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private Index getIndexByTagGroup(byte tag) {
|
||||||
|
// pool groups:
|
||||||
|
if (indexByTagGroup != null) {
|
||||||
|
Index ix = indexByTagGroup[tag - CONSTANT_GroupFirst];
|
||||||
|
if (ix != null) return ix;
|
||||||
|
}
|
||||||
|
switch (tag) {
|
||||||
|
case CONSTANT_All:
|
||||||
|
return makeTagGroupIndex(CONSTANT_All, TAGS_IN_ORDER);
|
||||||
|
case CONSTANT_LoadableValue:
|
||||||
|
return makeTagGroupIndex(CONSTANT_LoadableValue, LOADABLE_VALUE_TAGS);
|
||||||
|
case CONSTANT_AnyMember:
|
||||||
|
return makeTagGroupIndex(CONSTANT_AnyMember, ANY_MEMBER_TAGS);
|
||||||
|
case CONSTANT_FieldSpecific:
|
||||||
|
// This one does not have any fixed index, since it is context-specific.
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
throw new AssertionError("bad tag group "+tag);
|
||||||
|
}
|
||||||
|
|
||||||
/** Index of all CP entries of a given tag and class. */
|
/** Index of all CP entries of a given tag and class. */
|
||||||
public Index getMemberIndex(byte tag, ClassEntry classRef) {
|
public Index getMemberIndex(byte tag, ClassEntry classRef) {
|
||||||
if (indexByTagAndClass == null)
|
if (indexByTagAndClass == null)
|
||||||
|
@ -1107,16 +1439,14 @@ class ConstantPool {
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean haveNumbers() {
|
public boolean haveNumbers() {
|
||||||
for (byte tag = CONSTANT_Integer; tag <= CONSTANT_Double; tag++) {
|
for (byte tag : NUMBER_TAGS) {
|
||||||
switch (tag) {
|
if (getIndexByTag(tag).size() > 0) return true;
|
||||||
case CONSTANT_Integer:
|
|
||||||
case CONSTANT_Float:
|
|
||||||
case CONSTANT_Long:
|
|
||||||
case CONSTANT_Double:
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
assert(false);
|
|
||||||
}
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean haveExtraTags() {
|
||||||
|
for (byte tag : EXTRA_TAGS) {
|
||||||
if (getIndexByTag(tag).size() > 0) return true;
|
if (getIndexByTag(tag).size() > 0) return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
@ -1129,8 +1459,13 @@ class ConstantPool {
|
||||||
* by their equivalent Utf8s.
|
* by their equivalent Utf8s.
|
||||||
* Also, discard null from cpRefs.
|
* Also, discard null from cpRefs.
|
||||||
*/
|
*/
|
||||||
|
public static void completeReferencesIn(Set<Entry> cpRefs, boolean flattenSigs) {
|
||||||
|
completeReferencesIn(cpRefs, flattenSigs, null);
|
||||||
|
}
|
||||||
|
|
||||||
public static
|
public static
|
||||||
void completeReferencesIn(Set<Entry> cpRefs, boolean flattenSigs) {
|
void completeReferencesIn(Set<Entry> cpRefs, boolean flattenSigs,
|
||||||
|
List<BootstrapMethodEntry>bsms) {
|
||||||
cpRefs.remove(null);
|
cpRefs.remove(null);
|
||||||
for (ListIterator<Entry> work =
|
for (ListIterator<Entry> work =
|
||||||
new ArrayList<>(cpRefs).listIterator(cpRefs.size());
|
new ArrayList<>(cpRefs).listIterator(cpRefs.size());
|
||||||
|
@ -1146,6 +1481,14 @@ class ConstantPool {
|
||||||
cpRefs.add(ue);
|
cpRefs.add(ue);
|
||||||
e = ue; // do not descend into the sig
|
e = ue; // do not descend into the sig
|
||||||
}
|
}
|
||||||
|
if (bsms != null && e.tag == CONSTANT_BootstrapMethod) {
|
||||||
|
BootstrapMethodEntry bsm = (BootstrapMethodEntry)e;
|
||||||
|
cpRefs.remove(bsm);
|
||||||
|
// move it away to the side table where it belongs
|
||||||
|
if (!bsms.contains(bsm))
|
||||||
|
bsms.add(bsm);
|
||||||
|
// fall through to recursively add refs for this entry
|
||||||
|
}
|
||||||
// Recursively add the refs of e to cpRefs:
|
// Recursively add the refs of e to cpRefs:
|
||||||
for (int i = 0; ; i++) {
|
for (int i = 0; ; i++) {
|
||||||
Entry re = e.getRef(i);
|
Entry re = e.getRef(i);
|
||||||
|
@ -1174,15 +1517,37 @@ class ConstantPool {
|
||||||
case CONSTANT_Methodref: return "Methodref";
|
case CONSTANT_Methodref: return "Methodref";
|
||||||
case CONSTANT_InterfaceMethodref: return "InterfaceMethodref";
|
case CONSTANT_InterfaceMethodref: return "InterfaceMethodref";
|
||||||
case CONSTANT_NameandType: return "NameandType";
|
case CONSTANT_NameandType: return "NameandType";
|
||||||
|
case CONSTANT_MethodHandle: return "MethodHandle";
|
||||||
|
case CONSTANT_MethodType: return "MethodType";
|
||||||
|
case CONSTANT_InvokeDynamic: return "InvokeDynamic";
|
||||||
|
|
||||||
// pseudo-tags:
|
// pseudo-tags:
|
||||||
case CONSTANT_All: return "*All";
|
case CONSTANT_All: return "**All";
|
||||||
case CONSTANT_None: return "*None";
|
case CONSTANT_None: return "**None";
|
||||||
|
case CONSTANT_LoadableValue: return "**LoadableValue";
|
||||||
|
case CONSTANT_AnyMember: return "**AnyMember";
|
||||||
|
case CONSTANT_FieldSpecific: return "*FieldSpecific";
|
||||||
case CONSTANT_Signature: return "*Signature";
|
case CONSTANT_Signature: return "*Signature";
|
||||||
|
case CONSTANT_BootstrapMethod: return "*BootstrapMethod";
|
||||||
}
|
}
|
||||||
return "tag#"+tag;
|
return "tag#"+tag;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static String refKindName(int refKind) {
|
||||||
|
switch (refKind) {
|
||||||
|
case REF_getField: return "getField";
|
||||||
|
case REF_getStatic: return "getStatic";
|
||||||
|
case REF_putField: return "putField";
|
||||||
|
case REF_putStatic: return "putStatic";
|
||||||
|
case REF_invokeVirtual: return "invokeVirtual";
|
||||||
|
case REF_invokeStatic: return "invokeStatic";
|
||||||
|
case REF_invokeSpecial: return "invokeSpecial";
|
||||||
|
case REF_newInvokeSpecial: return "newInvokeSpecial";
|
||||||
|
case REF_invokeInterface: return "invokeInterface";
|
||||||
|
}
|
||||||
|
return "refKind#"+refKind;
|
||||||
|
}
|
||||||
|
|
||||||
// archive constant pool definition order
|
// archive constant pool definition order
|
||||||
static final byte TAGS_IN_ORDER[] = {
|
static final byte TAGS_IN_ORDER[] = {
|
||||||
CONSTANT_Utf8,
|
CONSTANT_Utf8,
|
||||||
|
@ -1190,13 +1555,19 @@ class ConstantPool {
|
||||||
CONSTANT_Float,
|
CONSTANT_Float,
|
||||||
CONSTANT_Long,
|
CONSTANT_Long,
|
||||||
CONSTANT_Double,
|
CONSTANT_Double,
|
||||||
CONSTANT_String,
|
CONSTANT_String, // note that String=8 precedes Class=7
|
||||||
CONSTANT_Class,
|
CONSTANT_Class,
|
||||||
CONSTANT_Signature,
|
CONSTANT_Signature,
|
||||||
CONSTANT_NameandType, // cp_Descr
|
CONSTANT_NameandType, // cp_Descr
|
||||||
CONSTANT_Fieldref, // cp_Field
|
CONSTANT_Fieldref, // cp_Field
|
||||||
CONSTANT_Methodref, // cp_Method
|
CONSTANT_Methodref, // cp_Method
|
||||||
CONSTANT_InterfaceMethodref // cp_Imethod
|
CONSTANT_InterfaceMethodref, // cp_Imethod
|
||||||
|
|
||||||
|
// Constants defined in JDK 7 and later:
|
||||||
|
CONSTANT_MethodHandle,
|
||||||
|
CONSTANT_MethodType,
|
||||||
|
CONSTANT_BootstrapMethod, // pseudo-tag, really stored in a class attribute
|
||||||
|
CONSTANT_InvokeDynamic
|
||||||
};
|
};
|
||||||
static final byte TAG_ORDER[];
|
static final byte TAG_ORDER[];
|
||||||
static {
|
static {
|
||||||
|
@ -1211,4 +1582,45 @@ class ConstantPool {
|
||||||
System.out.println("};");
|
System.out.println("};");
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
static final byte[] NUMBER_TAGS = {
|
||||||
|
CONSTANT_Integer, CONSTANT_Float, CONSTANT_Long, CONSTANT_Double
|
||||||
|
};
|
||||||
|
static final byte[] EXTRA_TAGS = {
|
||||||
|
CONSTANT_MethodHandle, CONSTANT_MethodType,
|
||||||
|
CONSTANT_BootstrapMethod, // pseudo-tag
|
||||||
|
CONSTANT_InvokeDynamic
|
||||||
|
};
|
||||||
|
static final byte[] LOADABLE_VALUE_TAGS = { // for CONSTANT_LoadableValue
|
||||||
|
CONSTANT_Integer, CONSTANT_Float, CONSTANT_Long, CONSTANT_Double,
|
||||||
|
CONSTANT_String, CONSTANT_Class,
|
||||||
|
CONSTANT_MethodHandle, CONSTANT_MethodType
|
||||||
|
};
|
||||||
|
static final byte[] ANY_MEMBER_TAGS = { // for CONSTANT_AnyMember
|
||||||
|
CONSTANT_Fieldref, CONSTANT_Methodref, CONSTANT_InterfaceMethodref
|
||||||
|
};
|
||||||
|
static final byte[] FIELD_SPECIFIC_TAGS = { // for CONSTANT_FieldSpecific
|
||||||
|
CONSTANT_Integer, CONSTANT_Float, CONSTANT_Long, CONSTANT_Double,
|
||||||
|
CONSTANT_String
|
||||||
|
};
|
||||||
|
static {
|
||||||
|
assert(
|
||||||
|
verifyTagOrder(TAGS_IN_ORDER) &&
|
||||||
|
verifyTagOrder(NUMBER_TAGS) &&
|
||||||
|
verifyTagOrder(EXTRA_TAGS) &&
|
||||||
|
verifyTagOrder(LOADABLE_VALUE_TAGS) &&
|
||||||
|
verifyTagOrder(ANY_MEMBER_TAGS) &&
|
||||||
|
verifyTagOrder(FIELD_SPECIFIC_TAGS)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
private static boolean verifyTagOrder(byte[] tags) {
|
||||||
|
int prev = -1;
|
||||||
|
for (byte tag : tags) {
|
||||||
|
int next = TAG_ORDER[tag];
|
||||||
|
assert(next > 0) : "tag not found: "+tag;
|
||||||
|
assert(TAGS_IN_ORDER[next-1] == tag) : "tag repeated: "+tag+" => "+next+" => "+TAGS_IN_ORDER[next-1];
|
||||||
|
assert(prev < next) : "tags not in order: "+Arrays.toString(tags)+" at "+tag;
|
||||||
|
prev = next;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -65,6 +65,9 @@ class Constants {
|
||||||
public final static int JAVA6_PACKAGE_MAJOR_VERSION = 160;
|
public final static int JAVA6_PACKAGE_MAJOR_VERSION = 160;
|
||||||
public final static int JAVA6_PACKAGE_MINOR_VERSION = 1;
|
public final static int JAVA6_PACKAGE_MINOR_VERSION = 1;
|
||||||
|
|
||||||
|
public final static int JAVA7_PACKAGE_MAJOR_VERSION = 170;
|
||||||
|
public final static int JAVA7_PACKAGE_MINOR_VERSION = 1;
|
||||||
|
|
||||||
public final static int CONSTANT_POOL_INDEX_LIMIT = 0x10000;
|
public final static int CONSTANT_POOL_INDEX_LIMIT = 0x10000;
|
||||||
public final static int CONSTANT_POOL_NARROW_LIMIT = 0x00100;
|
public final static int CONSTANT_POOL_NARROW_LIMIT = 0x00100;
|
||||||
|
|
||||||
|
@ -82,14 +85,36 @@ class Constants {
|
||||||
public final static byte CONSTANT_Methodref = 10;
|
public final static byte CONSTANT_Methodref = 10;
|
||||||
public final static byte CONSTANT_InterfaceMethodref = 11;
|
public final static byte CONSTANT_InterfaceMethodref = 11;
|
||||||
public final static byte CONSTANT_NameandType = 12;
|
public final static byte CONSTANT_NameandType = 12;
|
||||||
|
public final static byte CONSTANT_unused13 = 13;
|
||||||
|
public final static byte CONSTANT_unused14 = 14;
|
||||||
|
public final static byte CONSTANT_MethodHandle = 15;
|
||||||
|
public final static byte CONSTANT_MethodType = 16;
|
||||||
|
public final static byte CONSTANT_unused17 = 17; // unused
|
||||||
|
public final static byte CONSTANT_InvokeDynamic = 18;
|
||||||
|
|
||||||
// pseudo-constants:
|
// pseudo-constants:
|
||||||
public final static byte CONSTANT_None = 0;
|
public final static byte CONSTANT_None = 0;
|
||||||
public final static byte CONSTANT_Signature = 13;
|
public final static byte CONSTANT_Signature = CONSTANT_unused13;
|
||||||
public final static byte CONSTANT_Limit = 14;
|
public final static byte CONSTANT_BootstrapMethod = CONSTANT_unused17; // used only in InvokeDynamic constants
|
||||||
|
public final static byte CONSTANT_Limit = 19;
|
||||||
|
|
||||||
public final static byte CONSTANT_All = 19; // combined global map
|
public final static byte CONSTANT_All = 50; // combined global map
|
||||||
public final static byte CONSTANT_Literal = 20; // used only for ldc fields
|
public final static byte CONSTANT_LoadableValue = 51; // used for 'KL' and qldc operands
|
||||||
|
public final static byte CONSTANT_AnyMember = 52; // union of refs to field or (interface) method
|
||||||
|
public final static byte CONSTANT_FieldSpecific = 53; // used only for 'KQ' ConstantValue attrs
|
||||||
|
public final static byte CONSTANT_GroupFirst = CONSTANT_All;
|
||||||
|
public final static byte CONSTANT_GroupLimit = CONSTANT_FieldSpecific+1;
|
||||||
|
|
||||||
|
// CONSTANT_MethodHandle reference kinds
|
||||||
|
public final static byte REF_getField = 1;
|
||||||
|
public final static byte REF_getStatic = 2;
|
||||||
|
public final static byte REF_putField = 3;
|
||||||
|
public final static byte REF_putStatic = 4;
|
||||||
|
public final static byte REF_invokeVirtual = 5;
|
||||||
|
public final static byte REF_invokeStatic = 6;
|
||||||
|
public final static byte REF_invokeSpecial = 7;
|
||||||
|
public final static byte REF_newInvokeSpecial = 8;
|
||||||
|
public final static byte REF_invokeInterface = 9;
|
||||||
|
|
||||||
// pseudo-access bits
|
// pseudo-access bits
|
||||||
public final static int ACC_IC_LONG_FORM = (1<<16); //for ic_flags
|
public final static int ACC_IC_LONG_FORM = (1<<16); //for ic_flags
|
||||||
|
@ -133,7 +158,7 @@ class Constants {
|
||||||
public static final int AO_HAVE_SPECIAL_FORMATS = 1<<0;
|
public static final int AO_HAVE_SPECIAL_FORMATS = 1<<0;
|
||||||
public static final int AO_HAVE_CP_NUMBERS = 1<<1;
|
public static final int AO_HAVE_CP_NUMBERS = 1<<1;
|
||||||
public static final int AO_HAVE_ALL_CODE_FLAGS = 1<<2;
|
public static final int AO_HAVE_ALL_CODE_FLAGS = 1<<2;
|
||||||
public static final int AO_3_UNUSED_MBZ = 1<<3;
|
public static final int AO_HAVE_CP_EXTRAS = 1<<3;
|
||||||
public static final int AO_HAVE_FILE_HEADERS = 1<<4;
|
public static final int AO_HAVE_FILE_HEADERS = 1<<4;
|
||||||
public static final int AO_DEFLATE_HINT = 1<<5;
|
public static final int AO_DEFLATE_HINT = 1<<5;
|
||||||
public static final int AO_HAVE_FILE_MODTIME = 1<<6;
|
public static final int AO_HAVE_FILE_MODTIME = 1<<6;
|
||||||
|
@ -143,6 +168,7 @@ class Constants {
|
||||||
public static final int AO_HAVE_FIELD_FLAGS_HI = 1<<10;
|
public static final int AO_HAVE_FIELD_FLAGS_HI = 1<<10;
|
||||||
public static final int AO_HAVE_METHOD_FLAGS_HI = 1<<11;
|
public static final int AO_HAVE_METHOD_FLAGS_HI = 1<<11;
|
||||||
public static final int AO_HAVE_CODE_FLAGS_HI = 1<<12;
|
public static final int AO_HAVE_CODE_FLAGS_HI = 1<<12;
|
||||||
|
public static final int AO_UNUSED_MBZ = (-1)<<13; // option bits reserved for future use
|
||||||
|
|
||||||
public static final int LG_AO_HAVE_XXX_FLAGS_HI = 9;
|
public static final int LG_AO_HAVE_XXX_FLAGS_HI = 9;
|
||||||
|
|
||||||
|
@ -357,7 +383,7 @@ class Constants {
|
||||||
_invokespecial = 183, // 0xb7
|
_invokespecial = 183, // 0xb7
|
||||||
_invokestatic = 184, // 0xb8
|
_invokestatic = 184, // 0xb8
|
||||||
_invokeinterface = 185, // 0xb9
|
_invokeinterface = 185, // 0xb9
|
||||||
_xxxunusedxxx = 186, // 0xba
|
_invokedynamic = 186, // 0xba
|
||||||
_new = 187, // 0xbb
|
_new = 187, // 0xbb
|
||||||
_newarray = 188, // 0xbc
|
_newarray = 188, // 0xbc
|
||||||
_anewarray = 189, // 0xbd
|
_anewarray = 189, // 0xbd
|
||||||
|
@ -422,15 +448,18 @@ class Constants {
|
||||||
// Ldc variants gain us only 0.007% improvement in compression ratio,
|
// Ldc variants gain us only 0.007% improvement in compression ratio,
|
||||||
// but they simplify the file format greatly.
|
// but they simplify the file format greatly.
|
||||||
public final static int _xldc_op = _invokeinit_limit;
|
public final static int _xldc_op = _invokeinit_limit;
|
||||||
public final static int _aldc = _ldc;
|
public final static int _sldc = _ldc; // previously named _aldc
|
||||||
public final static int _cldc = _xldc_op+0;
|
public final static int _cldc = _xldc_op+0;
|
||||||
public final static int _ildc = _xldc_op+1;
|
public final static int _ildc = _xldc_op+1;
|
||||||
public final static int _fldc = _xldc_op+2;
|
public final static int _fldc = _xldc_op+2;
|
||||||
public final static int _aldc_w = _ldc_w;
|
public final static int _sldc_w = _ldc_w; // previously named _aldc_w
|
||||||
public final static int _cldc_w = _xldc_op+3;
|
public final static int _cldc_w = _xldc_op+3;
|
||||||
public final static int _ildc_w = _xldc_op+4;
|
public final static int _ildc_w = _xldc_op+4;
|
||||||
public final static int _fldc_w = _xldc_op+5;
|
public final static int _fldc_w = _xldc_op+5;
|
||||||
public final static int _lldc2_w = _ldc2_w;
|
public final static int _lldc2_w = _ldc2_w;
|
||||||
public final static int _dldc2_w = _xldc_op+6;
|
public final static int _dldc2_w = _xldc_op+6;
|
||||||
public final static int _xldc_limit = _xldc_op+7;
|
// anything other than primitive, string, or class must be handled with qldc:
|
||||||
|
public final static int _qldc = _xldc_op+7;
|
||||||
|
public final static int _qldc_w = _xldc_op+8;
|
||||||
|
public final static int _xldc_limit = _xldc_op+9;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -451,7 +451,7 @@ class Instruction {
|
||||||
|
|
||||||
public static byte getCPRefOpTag(int bc) {
|
public static byte getCPRefOpTag(int bc) {
|
||||||
if (bc < BC_INDEX[0].length && BC_INDEX[0][bc] > 0) return BC_TAG[0][bc];
|
if (bc < BC_INDEX[0].length && BC_INDEX[0][bc] > 0) return BC_TAG[0][bc];
|
||||||
if (bc >= _xldc_op && bc < _xldc_limit) return CONSTANT_Literal;
|
if (bc >= _xldc_op && bc < _xldc_limit) return CONSTANT_LoadableValue;
|
||||||
return CONSTANT_None;
|
return CONSTANT_None;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -500,7 +500,7 @@ class Instruction {
|
||||||
def("bkf", _getstatic, _putfield); // pack kf (base=Field)
|
def("bkf", _getstatic, _putfield); // pack kf (base=Field)
|
||||||
def("bkm", _invokevirtual, _invokestatic); // pack kn (base=Method)
|
def("bkm", _invokevirtual, _invokestatic); // pack kn (base=Method)
|
||||||
def("bkixx", _invokeinterface); // pack ki (base=IMethod), omit xx
|
def("bkixx", _invokeinterface); // pack ki (base=IMethod), omit xx
|
||||||
def("", _xxxunusedxxx);
|
def("bkyxx", _invokedynamic); // pack ky (base=Any), omit xx
|
||||||
def("bkc", _new); // pack kc
|
def("bkc", _new); // pack kc
|
||||||
def("bx", _newarray);
|
def("bx", _newarray);
|
||||||
def("bkc", _anewarray); // pack kc
|
def("bkc", _anewarray); // pack kc
|
||||||
|
@ -515,7 +515,6 @@ class Instruction {
|
||||||
//System.out.println(i+": l="+BC_LENGTH[0][i]+" i="+BC_INDEX[0][i]);
|
//System.out.println(i+": l="+BC_LENGTH[0][i]+" i="+BC_INDEX[0][i]);
|
||||||
//assert(BC_LENGTH[0][i] != -1);
|
//assert(BC_LENGTH[0][i] != -1);
|
||||||
if (BC_LENGTH[0][i] == -1) {
|
if (BC_LENGTH[0][i] == -1) {
|
||||||
assert(i == _xxxunusedxxx);
|
|
||||||
continue; // unknown opcode
|
continue; // unknown opcode
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -543,7 +542,7 @@ class Instruction {
|
||||||
"if_icmpne if_icmplt if_icmpge if_icmpgt if_icmple if_acmpeq if_acmpne "+
|
"if_icmpne if_icmplt if_icmpge if_icmpgt if_icmple if_acmpeq if_acmpne "+
|
||||||
"goto jsr ret tableswitch lookupswitch ireturn lreturn freturn dreturn "+
|
"goto jsr ret tableswitch lookupswitch ireturn lreturn freturn dreturn "+
|
||||||
"areturn return getstatic putstatic getfield putfield invokevirtual "+
|
"areturn return getstatic putstatic getfield putfield invokevirtual "+
|
||||||
"invokespecial invokestatic invokeinterface xxxunusedxxx new newarray "+
|
"invokespecial invokestatic invokeinterface invokedynamic new newarray "+
|
||||||
"anewarray arraylength athrow checkcast instanceof monitorenter "+
|
"anewarray arraylength athrow checkcast instanceof monitorenter "+
|
||||||
"monitorexit wide multianewarray ifnull ifnonnull goto_w jsr_w ";
|
"monitorexit wide multianewarray ifnull ifnonnull goto_w jsr_w ";
|
||||||
for (int bc = 0; names.length() > 0; bc++) {
|
for (int bc = 0; names.length() > 0; bc++) {
|
||||||
|
@ -588,6 +587,8 @@ class Instruction {
|
||||||
case _dldc2_w: iname = "*dldc2_w"; break;
|
case _dldc2_w: iname = "*dldc2_w"; break;
|
||||||
case _cldc: iname = "*cldc"; break;
|
case _cldc: iname = "*cldc"; break;
|
||||||
case _cldc_w: iname = "*cldc_w"; break;
|
case _cldc_w: iname = "*cldc_w"; break;
|
||||||
|
case _qldc: iname = "*qldc"; break;
|
||||||
|
case _qldc_w: iname = "*qldc_w"; break;
|
||||||
case _byte_escape: iname = "*byte_escape"; break;
|
case _byte_escape: iname = "*byte_escape"; break;
|
||||||
case _ref_escape: iname = "*ref_escape"; break;
|
case _ref_escape: iname = "*ref_escape"; break;
|
||||||
case _end_marker: iname = "*end"; break;
|
case _end_marker: iname = "*end"; break;
|
||||||
|
@ -618,15 +619,16 @@ class Instruction {
|
||||||
if (index > 0 && index+1 < length) {
|
if (index > 0 && index+1 < length) {
|
||||||
switch (fmt.charAt(index+1)) {
|
switch (fmt.charAt(index+1)) {
|
||||||
case 'c': tag = CONSTANT_Class; break;
|
case 'c': tag = CONSTANT_Class; break;
|
||||||
case 'k': tag = CONSTANT_Literal; break;
|
case 'k': tag = CONSTANT_LoadableValue; break;
|
||||||
case 'f': tag = CONSTANT_Fieldref; break;
|
case 'f': tag = CONSTANT_Fieldref; break;
|
||||||
case 'm': tag = CONSTANT_Methodref; break;
|
case 'm': tag = CONSTANT_Methodref; break;
|
||||||
case 'i': tag = CONSTANT_InterfaceMethodref; break;
|
case 'i': tag = CONSTANT_InterfaceMethodref; break;
|
||||||
|
case 'y': tag = CONSTANT_InvokeDynamic; break;
|
||||||
}
|
}
|
||||||
assert(tag != CONSTANT_None);
|
assert(tag != CONSTANT_None);
|
||||||
} else if (index > 0 && length == 2) {
|
} else if (index > 0 && length == 2) {
|
||||||
assert(from_bc == _ldc);
|
assert(from_bc == _ldc);
|
||||||
tag = CONSTANT_Literal; // _ldc opcode only
|
tag = CONSTANT_LoadableValue; // _ldc opcode only
|
||||||
}
|
}
|
||||||
for (int bc = from_bc; bc <= to_bc; bc++) {
|
for (int bc = from_bc; bc <= to_bc; bc++) {
|
||||||
BC_FORMAT[w][bc] = fmt;
|
BC_FORMAT[w][bc] = fmt;
|
||||||
|
@ -649,7 +651,7 @@ class Instruction {
|
||||||
Instruction i = at(code, 0);
|
Instruction i = at(code, 0);
|
||||||
while (i != null) {
|
while (i != null) {
|
||||||
int opcode = i.getBC();
|
int opcode = i.getBC();
|
||||||
if (opcode == _xxxunusedxxx || opcode < _nop || opcode > _jsr_w) {
|
if (opcode < _nop || opcode > _jsr_w) {
|
||||||
String message = "illegal opcode: " + opcode + " " + i;
|
String message = "illegal opcode: " + opcode + " " + i;
|
||||||
throw new FormatException(message);
|
throw new FormatException(message);
|
||||||
}
|
}
|
||||||
|
|
|
@ -87,7 +87,12 @@ class NativeUnpack {
|
||||||
// If loading from stand alone build uncomment this.
|
// If loading from stand alone build uncomment this.
|
||||||
// System.loadLibrary("unpack");
|
// System.loadLibrary("unpack");
|
||||||
java.security.AccessController.doPrivileged(
|
java.security.AccessController.doPrivileged(
|
||||||
new sun.security.action.LoadLibraryAction("unpack"));
|
new java.security.PrivilegedAction<Void>() {
|
||||||
|
public Void run() {
|
||||||
|
System.loadLibrary("unpack");
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
});
|
||||||
initIDs();
|
initIDs();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -28,6 +28,7 @@ package com.sun.java.util.jar.pack;
|
||||||
import com.sun.java.util.jar.pack.Attribute.Layout;
|
import com.sun.java.util.jar.pack.Attribute.Layout;
|
||||||
import com.sun.java.util.jar.pack.ConstantPool.ClassEntry;
|
import com.sun.java.util.jar.pack.ConstantPool.ClassEntry;
|
||||||
import com.sun.java.util.jar.pack.ConstantPool.DescriptorEntry;
|
import com.sun.java.util.jar.pack.ConstantPool.DescriptorEntry;
|
||||||
|
import com.sun.java.util.jar.pack.ConstantPool.BootstrapMethodEntry;
|
||||||
import com.sun.java.util.jar.pack.ConstantPool.Index;
|
import com.sun.java.util.jar.pack.ConstantPool.Index;
|
||||||
import com.sun.java.util.jar.pack.ConstantPool.LiteralEntry;
|
import com.sun.java.util.jar.pack.ConstantPool.LiteralEntry;
|
||||||
import com.sun.java.util.jar.pack.ConstantPool.Utf8Entry;
|
import com.sun.java.util.jar.pack.ConstantPool.Utf8Entry;
|
||||||
|
@ -100,6 +101,8 @@ class Package {
|
||||||
classes.clear();
|
classes.clear();
|
||||||
files.clear();
|
files.clear();
|
||||||
BandStructure.nextSeqForDebug = 0;
|
BandStructure.nextSeqForDebug = 0;
|
||||||
|
package_minver = -1; // fill in later
|
||||||
|
package_majver = 0; // fill in later
|
||||||
}
|
}
|
||||||
|
|
||||||
int getPackageVersion() {
|
int getPackageVersion() {
|
||||||
|
@ -108,6 +111,7 @@ class Package {
|
||||||
|
|
||||||
// Special empty versions of Code and InnerClasses, used for markers.
|
// Special empty versions of Code and InnerClasses, used for markers.
|
||||||
public static final Attribute.Layout attrCodeEmpty;
|
public static final Attribute.Layout attrCodeEmpty;
|
||||||
|
public static final Attribute.Layout attrBootstrapMethodsEmpty;
|
||||||
public static final Attribute.Layout attrInnerClassesEmpty;
|
public static final Attribute.Layout attrInnerClassesEmpty;
|
||||||
public static final Attribute.Layout attrSourceFileSpecial;
|
public static final Attribute.Layout attrSourceFileSpecial;
|
||||||
public static final Map<Attribute.Layout, Attribute> attrDefs;
|
public static final Map<Attribute.Layout, Attribute> attrDefs;
|
||||||
|
@ -115,6 +119,8 @@ class Package {
|
||||||
Map<Layout, Attribute> ad = new HashMap<>(3);
|
Map<Layout, Attribute> ad = new HashMap<>(3);
|
||||||
attrCodeEmpty = Attribute.define(ad, ATTR_CONTEXT_METHOD,
|
attrCodeEmpty = Attribute.define(ad, ATTR_CONTEXT_METHOD,
|
||||||
"Code", "").layout();
|
"Code", "").layout();
|
||||||
|
attrBootstrapMethodsEmpty = Attribute.define(ad, ATTR_CONTEXT_CLASS,
|
||||||
|
"BootstrapMethods", "").layout();
|
||||||
attrInnerClassesEmpty = Attribute.define(ad, ATTR_CONTEXT_CLASS,
|
attrInnerClassesEmpty = Attribute.define(ad, ATTR_CONTEXT_CLASS,
|
||||||
"InnerClasses", "").layout();
|
"InnerClasses", "").layout();
|
||||||
attrSourceFileSpecial = Attribute.define(ad, ATTR_CONTEXT_CLASS,
|
attrSourceFileSpecial = Attribute.define(ad, ATTR_CONTEXT_CLASS,
|
||||||
|
@ -153,9 +159,8 @@ class Package {
|
||||||
package_minver = JAVA6_PACKAGE_MINOR_VERSION;
|
package_minver = JAVA6_PACKAGE_MINOR_VERSION;
|
||||||
} else {
|
} else {
|
||||||
// Normal case. Use the newest archive format, when available
|
// Normal case. Use the newest archive format, when available
|
||||||
// TODO: replace the following with JAVA7* when the need arises
|
package_majver = JAVA7_PACKAGE_MAJOR_VERSION;
|
||||||
package_majver = JAVA6_PACKAGE_MAJOR_VERSION;
|
package_minver = JAVA7_PACKAGE_MINOR_VERSION;
|
||||||
package_minver = JAVA6_PACKAGE_MINOR_VERSION;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -168,13 +173,22 @@ class Package {
|
||||||
String expMag = Integer.toHexString(JAVA_PACKAGE_MAGIC);
|
String expMag = Integer.toHexString(JAVA_PACKAGE_MAGIC);
|
||||||
throw new IOException("Unexpected package magic number: got "+gotMag+"; expected "+expMag);
|
throw new IOException("Unexpected package magic number: got "+gotMag+"; expected "+expMag);
|
||||||
}
|
}
|
||||||
if ((package_majver != JAVA6_PACKAGE_MAJOR_VERSION &&
|
int[] majminFound = null;
|
||||||
package_majver != JAVA5_PACKAGE_MAJOR_VERSION) ||
|
for (int[] majmin : new int[][]{
|
||||||
(package_minver != JAVA6_PACKAGE_MINOR_VERSION &&
|
{ JAVA7_PACKAGE_MAJOR_VERSION, JAVA7_PACKAGE_MINOR_VERSION },
|
||||||
package_minver != JAVA5_PACKAGE_MINOR_VERSION)) {
|
{ JAVA6_PACKAGE_MAJOR_VERSION, JAVA6_PACKAGE_MINOR_VERSION },
|
||||||
|
{ JAVA5_PACKAGE_MAJOR_VERSION, JAVA5_PACKAGE_MINOR_VERSION }
|
||||||
|
}) {
|
||||||
|
if (package_majver == majmin[0] && package_minver == majmin[1]) {
|
||||||
|
majminFound = majmin;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (majminFound == null) {
|
||||||
String gotVer = package_majver+"."+package_minver;
|
String gotVer = package_majver+"."+package_minver;
|
||||||
String expVer = JAVA6_PACKAGE_MAJOR_VERSION+"."+JAVA6_PACKAGE_MINOR_VERSION+
|
String expVer = JAVA7_PACKAGE_MAJOR_VERSION+"."+JAVA7_PACKAGE_MINOR_VERSION+
|
||||||
|
" OR "+
|
||||||
|
JAVA6_PACKAGE_MAJOR_VERSION+"."+JAVA6_PACKAGE_MINOR_VERSION+
|
||||||
" OR "+
|
" OR "+
|
||||||
JAVA5_PACKAGE_MAJOR_VERSION+"."+JAVA5_PACKAGE_MINOR_VERSION;
|
JAVA5_PACKAGE_MAJOR_VERSION+"."+JAVA5_PACKAGE_MINOR_VERSION;
|
||||||
throw new IOException("Unexpected package minor version: got "+gotVer+"; expected "+expVer);
|
throw new IOException("Unexpected package minor version: got "+gotVer+"; expected "+expVer);
|
||||||
|
@ -213,6 +227,7 @@ class Package {
|
||||||
//ArrayList attributes; // in Attribute.Holder.this.attributes
|
//ArrayList attributes; // in Attribute.Holder.this.attributes
|
||||||
// Note that InnerClasses may be collected at the package level.
|
// Note that InnerClasses may be collected at the package level.
|
||||||
ArrayList<InnerClass> innerClasses;
|
ArrayList<InnerClass> innerClasses;
|
||||||
|
ArrayList<BootstrapMethodEntry> bootstrapMethods;
|
||||||
|
|
||||||
Class(int flags, ClassEntry thisClass, ClassEntry superClass, ClassEntry[] interfaces) {
|
Class(int flags, ClassEntry thisClass, ClassEntry superClass, ClassEntry[] interfaces) {
|
||||||
this.magic = JAVA_MAGIC;
|
this.magic = JAVA_MAGIC;
|
||||||
|
@ -313,6 +328,25 @@ class Package {
|
||||||
this.cpMap = cpMap;
|
this.cpMap = cpMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
boolean hasBootstrapMethods() {
|
||||||
|
return bootstrapMethods != null && !bootstrapMethods.isEmpty();
|
||||||
|
}
|
||||||
|
|
||||||
|
List<BootstrapMethodEntry> getBootstrapMethods() {
|
||||||
|
return bootstrapMethods;
|
||||||
|
}
|
||||||
|
|
||||||
|
BootstrapMethodEntry[] getBootstrapMethodMap() {
|
||||||
|
return (hasBootstrapMethods())
|
||||||
|
? bootstrapMethods.toArray(new BootstrapMethodEntry[bootstrapMethods.size()])
|
||||||
|
: null;
|
||||||
|
}
|
||||||
|
|
||||||
|
void setBootstrapMethods(Collection<BootstrapMethodEntry> bsms) {
|
||||||
|
assert(bootstrapMethods == null); // do not do this twice
|
||||||
|
bootstrapMethods = new ArrayList<>(bsms);
|
||||||
|
}
|
||||||
|
|
||||||
boolean hasInnerClasses() {
|
boolean hasInnerClasses() {
|
||||||
return innerClasses != null;
|
return innerClasses != null;
|
||||||
}
|
}
|
||||||
|
@ -1283,7 +1317,8 @@ class Package {
|
||||||
byTagU[tag] = null; // done with it
|
byTagU[tag] = null; // done with it
|
||||||
}
|
}
|
||||||
for (int i = 0; i < byTagU.length; i++) {
|
for (int i = 0; i < byTagU.length; i++) {
|
||||||
assert(byTagU[i] == null); // all consumed
|
Index ix = byTagU[i];
|
||||||
|
assert(ix == null); // all consumed
|
||||||
}
|
}
|
||||||
for (int i = 0; i < ConstantPool.TAGS_IN_ORDER.length; i++) {
|
for (int i = 0; i < ConstantPool.TAGS_IN_ORDER.length; i++) {
|
||||||
byte tag = ConstantPool.TAGS_IN_ORDER[i];
|
byte tag = ConstantPool.TAGS_IN_ORDER[i];
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -25,13 +25,7 @@
|
||||||
|
|
||||||
package com.sun.java.util.jar.pack;
|
package com.sun.java.util.jar.pack;
|
||||||
|
|
||||||
import com.sun.java.util.jar.pack.ConstantPool.ClassEntry;
|
import com.sun.java.util.jar.pack.ConstantPool.*;
|
||||||
import com.sun.java.util.jar.pack.ConstantPool.DescriptorEntry;
|
|
||||||
import com.sun.java.util.jar.pack.ConstantPool.Entry;
|
|
||||||
import com.sun.java.util.jar.pack.ConstantPool.Index;
|
|
||||||
import com.sun.java.util.jar.pack.ConstantPool.MemberEntry;
|
|
||||||
import com.sun.java.util.jar.pack.ConstantPool.SignatureEntry;
|
|
||||||
import com.sun.java.util.jar.pack.ConstantPool.Utf8Entry;
|
|
||||||
import com.sun.java.util.jar.pack.Package.Class;
|
import com.sun.java.util.jar.pack.Package.Class;
|
||||||
import com.sun.java.util.jar.pack.Package.File;
|
import com.sun.java.util.jar.pack.Package.File;
|
||||||
import com.sun.java.util.jar.pack.Package.InnerClass;
|
import com.sun.java.util.jar.pack.Package.InnerClass;
|
||||||
|
@ -46,6 +40,7 @@ import java.util.ArrayList;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
|
import java.util.Collections;
|
||||||
import java.util.Comparator;
|
import java.util.Comparator;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
@ -266,7 +261,6 @@ class PackageReader extends BandStructure {
|
||||||
// #band_headers_size :UNSIGNED5[1]
|
// #band_headers_size :UNSIGNED5[1]
|
||||||
// #attr_definition_count :UNSIGNED5[1]
|
// #attr_definition_count :UNSIGNED5[1]
|
||||||
//
|
//
|
||||||
assert(AH_LENGTH == 8+(ConstantPool.TAGS_IN_ORDER.length)+6);
|
|
||||||
archive_header_0.expectLength(AH_LENGTH_0);
|
archive_header_0.expectLength(AH_LENGTH_0);
|
||||||
archive_header_0.readFrom(in);
|
archive_header_0.readFrom(in);
|
||||||
|
|
||||||
|
@ -282,6 +276,7 @@ class PackageReader extends BandStructure {
|
||||||
boolean haveSpecial = testBit(archiveOptions, AO_HAVE_SPECIAL_FORMATS);
|
boolean haveSpecial = testBit(archiveOptions, AO_HAVE_SPECIAL_FORMATS);
|
||||||
boolean haveFiles = testBit(archiveOptions, AO_HAVE_FILE_HEADERS);
|
boolean haveFiles = testBit(archiveOptions, AO_HAVE_FILE_HEADERS);
|
||||||
boolean haveNumbers = testBit(archiveOptions, AO_HAVE_CP_NUMBERS);
|
boolean haveNumbers = testBit(archiveOptions, AO_HAVE_CP_NUMBERS);
|
||||||
|
boolean haveCPExtra = testBit(archiveOptions, AO_HAVE_CP_EXTRAS);
|
||||||
initAttrIndexLimit();
|
initAttrIndexLimit();
|
||||||
|
|
||||||
// now we are ready to use the data:
|
// now we are ready to use the data:
|
||||||
|
@ -300,11 +295,11 @@ class PackageReader extends BandStructure {
|
||||||
archive_header_S.doneDisbursing();
|
archive_header_S.doneDisbursing();
|
||||||
archiveSize0 = in.getBytesServed();
|
archiveSize0 = in.getBytesServed();
|
||||||
|
|
||||||
int remainingHeaders = AH_LENGTH - AH_LENGTH_0 - AH_LENGTH_S;
|
int remainingHeaders = AH_LENGTH_MIN - AH_LENGTH_0 - AH_LENGTH_S;
|
||||||
if (!haveFiles) remainingHeaders -= AH_FILE_HEADER_LEN-AH_LENGTH_S;
|
if (haveFiles) remainingHeaders += AH_FILE_HEADER_LEN;
|
||||||
if (!haveSpecial) remainingHeaders -= AH_SPECIAL_FORMAT_LEN;
|
if (haveSpecial) remainingHeaders += AH_SPECIAL_FORMAT_LEN;
|
||||||
if (!haveNumbers) remainingHeaders -= AH_CP_NUMBER_LEN;
|
if (haveNumbers) remainingHeaders += AH_CP_NUMBER_LEN;
|
||||||
assert(remainingHeaders >= AH_LENGTH_MIN - AH_LENGTH_0);
|
if (haveCPExtra) remainingHeaders += AH_CP_EXTRA_LEN;
|
||||||
archive_header_1.expectLength(remainingHeaders);
|
archive_header_1.expectLength(remainingHeaders);
|
||||||
archive_header_1.readFrom(in);
|
archive_header_1.readFrom(in);
|
||||||
|
|
||||||
|
@ -325,7 +320,7 @@ class PackageReader extends BandStructure {
|
||||||
numAttrDefs = 0;
|
numAttrDefs = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
readConstantPoolCounts(haveNumbers);
|
readConstantPoolCounts(haveNumbers, haveCPExtra);
|
||||||
|
|
||||||
numInnerClasses = archive_header_1.getInt();
|
numInnerClasses = archive_header_1.getInt();
|
||||||
|
|
||||||
|
@ -351,7 +346,7 @@ class PackageReader extends BandStructure {
|
||||||
band_headers.doneDisbursing();
|
band_headers.doneDisbursing();
|
||||||
}
|
}
|
||||||
|
|
||||||
void readConstantPoolCounts(boolean haveNumbers) throws IOException {
|
void readConstantPoolCounts(boolean haveNumbers, boolean haveCPExtra) throws IOException {
|
||||||
// size the constant pools:
|
// size the constant pools:
|
||||||
for (int k = 0; k < ConstantPool.TAGS_IN_ORDER.length; k++) {
|
for (int k = 0; k < ConstantPool.TAGS_IN_ORDER.length; k++) {
|
||||||
// cp_counts:
|
// cp_counts:
|
||||||
|
@ -364,6 +359,7 @@ class PackageReader extends BandStructure {
|
||||||
// #cp_Field_count :UNSIGNED5[1]
|
// #cp_Field_count :UNSIGNED5[1]
|
||||||
// #cp_Method_count :UNSIGNED5[1]
|
// #cp_Method_count :UNSIGNED5[1]
|
||||||
// #cp_Imethod_count :UNSIGNED5[1]
|
// #cp_Imethod_count :UNSIGNED5[1]
|
||||||
|
// (cp_attr_counts) ** (#have_cp_attr_counts)
|
||||||
//
|
//
|
||||||
// cp_number_counts:
|
// cp_number_counts:
|
||||||
// #cp_Int_count :UNSIGNED5[1]
|
// #cp_Int_count :UNSIGNED5[1]
|
||||||
|
@ -371,6 +367,12 @@ class PackageReader extends BandStructure {
|
||||||
// #cp_Long_count :UNSIGNED5[1]
|
// #cp_Long_count :UNSIGNED5[1]
|
||||||
// #cp_Double_count :UNSIGNED5[1]
|
// #cp_Double_count :UNSIGNED5[1]
|
||||||
//
|
//
|
||||||
|
// cp_extra_counts:
|
||||||
|
// #cp_MethodHandle_count :UNSIGNED5[1]
|
||||||
|
// #cp_MethodType_count :UNSIGNED5[1]
|
||||||
|
// #cp_InvokeDynamic_count :UNSIGNED5[1]
|
||||||
|
// #cp_BootstrapMethod_count :UNSIGNED5[1]
|
||||||
|
//
|
||||||
byte tag = ConstantPool.TAGS_IN_ORDER[k];
|
byte tag = ConstantPool.TAGS_IN_ORDER[k];
|
||||||
if (!haveNumbers) {
|
if (!haveNumbers) {
|
||||||
// These four counts are optional.
|
// These four counts are optional.
|
||||||
|
@ -382,6 +384,16 @@ class PackageReader extends BandStructure {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (!haveCPExtra) {
|
||||||
|
// These four counts are optional.
|
||||||
|
switch (tag) {
|
||||||
|
case CONSTANT_MethodHandle:
|
||||||
|
case CONSTANT_MethodType:
|
||||||
|
case CONSTANT_InvokeDynamic:
|
||||||
|
case CONSTANT_BootstrapMethod:
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
tagCount[tag] = archive_header_1.getInt();
|
tagCount[tag] = archive_header_1.getInt();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -401,6 +413,11 @@ class PackageReader extends BandStructure {
|
||||||
return index;
|
return index;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void checkLegacy(String bandname) {
|
||||||
|
if (this.pkg.package_majver < JAVA7_PACKAGE_MAJOR_VERSION) {
|
||||||
|
throw new RuntimeException("unexpected band " + bandname);
|
||||||
|
}
|
||||||
|
}
|
||||||
void readConstantPool() throws IOException {
|
void readConstantPool() throws IOException {
|
||||||
// cp_bands:
|
// cp_bands:
|
||||||
// cp_Utf8
|
// cp_Utf8
|
||||||
|
@ -533,8 +550,82 @@ class PackageReader extends BandStructure {
|
||||||
case CONSTANT_InterfaceMethodref:
|
case CONSTANT_InterfaceMethodref:
|
||||||
readMemberRefs(tag, cpMap, cp_Imethod_class, cp_Imethod_desc);
|
readMemberRefs(tag, cpMap, cp_Imethod_class, cp_Imethod_desc);
|
||||||
break;
|
break;
|
||||||
|
case CONSTANT_MethodHandle:
|
||||||
|
if (cpMap.length > 0) {
|
||||||
|
checkLegacy(cp_MethodHandle_refkind.name());
|
||||||
|
}
|
||||||
|
cp_MethodHandle_refkind.expectLength(cpMap.length);
|
||||||
|
cp_MethodHandle_refkind.readFrom(in);
|
||||||
|
cp_MethodHandle_member.expectLength(cpMap.length);
|
||||||
|
cp_MethodHandle_member.readFrom(in);
|
||||||
|
cp_MethodHandle_member.setIndex(getCPIndex(CONSTANT_AnyMember));
|
||||||
|
for (int i = 0; i < cpMap.length; i++) {
|
||||||
|
byte refKind = (byte) cp_MethodHandle_refkind.getInt();
|
||||||
|
MemberEntry memRef = (MemberEntry) cp_MethodHandle_member.getRef();
|
||||||
|
cpMap[i] = ConstantPool.getMethodHandleEntry(refKind, memRef);
|
||||||
|
}
|
||||||
|
cp_MethodHandle_refkind.doneDisbursing();
|
||||||
|
cp_MethodHandle_member.doneDisbursing();
|
||||||
|
break;
|
||||||
|
case CONSTANT_MethodType:
|
||||||
|
if (cpMap.length > 0) {
|
||||||
|
checkLegacy(cp_MethodType.name());
|
||||||
|
}
|
||||||
|
cp_MethodType.expectLength(cpMap.length);
|
||||||
|
cp_MethodType.readFrom(in);
|
||||||
|
cp_MethodType.setIndex(getCPIndex(CONSTANT_Signature));
|
||||||
|
for (int i = 0; i < cpMap.length; i++) {
|
||||||
|
SignatureEntry typeRef = (SignatureEntry) cp_MethodType.getRef();
|
||||||
|
cpMap[i] = ConstantPool.getMethodTypeEntry(typeRef);
|
||||||
|
}
|
||||||
|
cp_MethodType.doneDisbursing();
|
||||||
|
break;
|
||||||
|
case CONSTANT_InvokeDynamic:
|
||||||
|
if (cpMap.length > 0) {
|
||||||
|
checkLegacy(cp_InvokeDynamic_spec.name());
|
||||||
|
}
|
||||||
|
cp_InvokeDynamic_spec.expectLength(cpMap.length);
|
||||||
|
cp_InvokeDynamic_spec.readFrom(in);
|
||||||
|
cp_InvokeDynamic_spec.setIndex(getCPIndex(CONSTANT_BootstrapMethod));
|
||||||
|
cp_InvokeDynamic_desc.expectLength(cpMap.length);
|
||||||
|
cp_InvokeDynamic_desc.readFrom(in);
|
||||||
|
cp_InvokeDynamic_desc.setIndex(getCPIndex(CONSTANT_NameandType));
|
||||||
|
for (int i = 0; i < cpMap.length; i++) {
|
||||||
|
BootstrapMethodEntry bss = (BootstrapMethodEntry) cp_InvokeDynamic_spec.getRef();
|
||||||
|
DescriptorEntry descr = (DescriptorEntry) cp_InvokeDynamic_desc.getRef();
|
||||||
|
cpMap[i] = ConstantPool.getInvokeDynamicEntry(bss, descr);
|
||||||
|
}
|
||||||
|
cp_InvokeDynamic_spec.doneDisbursing();
|
||||||
|
cp_InvokeDynamic_desc.doneDisbursing();
|
||||||
|
break;
|
||||||
|
case CONSTANT_BootstrapMethod:
|
||||||
|
if (cpMap.length > 0) {
|
||||||
|
checkLegacy(cp_BootstrapMethod_ref.name());
|
||||||
|
}
|
||||||
|
cp_BootstrapMethod_ref.expectLength(cpMap.length);
|
||||||
|
cp_BootstrapMethod_ref.readFrom(in);
|
||||||
|
cp_BootstrapMethod_ref.setIndex(getCPIndex(CONSTANT_MethodHandle));
|
||||||
|
cp_BootstrapMethod_arg_count.expectLength(cpMap.length);
|
||||||
|
cp_BootstrapMethod_arg_count.readFrom(in);
|
||||||
|
int totalArgCount = cp_BootstrapMethod_arg_count.getIntTotal();
|
||||||
|
cp_BootstrapMethod_arg.expectLength(totalArgCount);
|
||||||
|
cp_BootstrapMethod_arg.readFrom(in);
|
||||||
|
cp_BootstrapMethod_arg.setIndex(getCPIndex(CONSTANT_LoadableValue));
|
||||||
|
for (int i = 0; i < cpMap.length; i++) {
|
||||||
|
MethodHandleEntry bsm = (MethodHandleEntry) cp_BootstrapMethod_ref.getRef();
|
||||||
|
int argc = cp_BootstrapMethod_arg_count.getInt();
|
||||||
|
Entry[] argRefs = new Entry[argc];
|
||||||
|
for (int j = 0; j < argc; j++) {
|
||||||
|
argRefs[j] = cp_BootstrapMethod_arg.getRef();
|
||||||
|
}
|
||||||
|
cpMap[i] = ConstantPool.getBootstrapMethodEntry(bsm, argRefs);
|
||||||
|
}
|
||||||
|
cp_BootstrapMethod_ref.doneDisbursing();
|
||||||
|
cp_BootstrapMethod_arg_count.doneDisbursing();
|
||||||
|
cp_BootstrapMethod_arg.doneDisbursing();
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
assert(false);
|
throw new AssertionError("unexpected CP tag in package");
|
||||||
}
|
}
|
||||||
|
|
||||||
Index index = initCPIndex(tag, cpMap);
|
Index index = initCPIndex(tag, cpMap);
|
||||||
|
@ -548,6 +639,21 @@ class PackageReader extends BandStructure {
|
||||||
|
|
||||||
cp_bands.doneDisbursing();
|
cp_bands.doneDisbursing();
|
||||||
|
|
||||||
|
if (optDumpBands || verbose > 1) {
|
||||||
|
for (byte tag = CONSTANT_GroupFirst; tag < CONSTANT_GroupLimit; tag++) {
|
||||||
|
Index index = pkg.cp.getIndexByTag(tag);
|
||||||
|
if (index == null || index.isEmpty()) continue;
|
||||||
|
Entry[] cpMap = index.cpMap;
|
||||||
|
if (verbose > 1)
|
||||||
|
Utils.log.info("Index group "+ConstantPool.tagName(tag)+" contains "+cpMap.length+" entries.");
|
||||||
|
if (optDumpBands) {
|
||||||
|
try (PrintStream ps = new PrintStream(getDumpStream(index.debugName, tag, ".gidx", index))) {
|
||||||
|
printArrayTo(ps, cpMap, 0, cpMap.length, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
setBandIndexes();
|
setBandIndexes();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1056,8 +1162,16 @@ class PackageReader extends BandStructure {
|
||||||
// look for constant pool entries:
|
// look for constant pool entries:
|
||||||
cls.visitRefs(VRM_CLASSIC, cpRefs);
|
cls.visitRefs(VRM_CLASSIC, cpRefs);
|
||||||
|
|
||||||
|
ArrayList<BootstrapMethodEntry> bsms = new ArrayList<>();
|
||||||
|
/*
|
||||||
|
* BootstrapMethod(BSMs) are added here before InnerClasses(ICs),
|
||||||
|
* so as to ensure the order. Noting that the BSMs may be
|
||||||
|
* removed if they are not found in the CP, after the ICs expansion.
|
||||||
|
*/
|
||||||
|
cls.addAttribute(Package.attrBootstrapMethodsEmpty.canonicalInstance());
|
||||||
|
|
||||||
// flesh out the local constant pool
|
// flesh out the local constant pool
|
||||||
ConstantPool.completeReferencesIn(cpRefs, true);
|
ConstantPool.completeReferencesIn(cpRefs, true, bsms);
|
||||||
|
|
||||||
// Now that we know all our local class references,
|
// Now that we know all our local class references,
|
||||||
// compute the InnerClasses attribute.
|
// compute the InnerClasses attribute.
|
||||||
|
@ -1074,14 +1188,23 @@ class PackageReader extends BandStructure {
|
||||||
}
|
}
|
||||||
|
|
||||||
// flesh out the local constant pool, again
|
// flesh out the local constant pool, again
|
||||||
ConstantPool.completeReferencesIn(cpRefs, true);
|
ConstantPool.completeReferencesIn(cpRefs, true, bsms);
|
||||||
|
}
|
||||||
|
|
||||||
|
// remove the attr previously set, otherwise add the bsm and
|
||||||
|
// references as required
|
||||||
|
if (bsms.isEmpty()) {
|
||||||
|
cls.attributes.remove(Package.attrBootstrapMethodsEmpty.canonicalInstance());
|
||||||
|
} else {
|
||||||
|
cpRefs.add(Package.getRefString("BootstrapMethods"));
|
||||||
|
Collections.sort(bsms);
|
||||||
|
cls.setBootstrapMethods(bsms);
|
||||||
}
|
}
|
||||||
|
|
||||||
// construct a local constant pool
|
// construct a local constant pool
|
||||||
int numDoubles = 0;
|
int numDoubles = 0;
|
||||||
for (Entry e : cpRefs) {
|
for (Entry e : cpRefs) {
|
||||||
if (e.isDoubleWord()) numDoubles++;
|
if (e.isDoubleWord()) numDoubles++;
|
||||||
assert(e.tag != CONSTANT_Signature) : (e);
|
|
||||||
}
|
}
|
||||||
Entry[] cpMap = new Entry[1+numDoubles+cpRefs.size()];
|
Entry[] cpMap = new Entry[1+numDoubles+cpRefs.size()];
|
||||||
int fillp = 1;
|
int fillp = 1;
|
||||||
|
@ -1154,7 +1277,8 @@ class PackageReader extends BandStructure {
|
||||||
int totalNM = class_method_count.getIntTotal();
|
int totalNM = class_method_count.getIntTotal();
|
||||||
field_descr.expectLength(totalNF);
|
field_descr.expectLength(totalNF);
|
||||||
method_descr.expectLength(totalNM);
|
method_descr.expectLength(totalNM);
|
||||||
if (verbose > 1) Utils.log.fine("expecting #fields="+totalNF+" and #methods="+totalNM+" in #classes="+numClasses);
|
if (verbose > 1) Utils.log.fine("expecting #fields="+totalNF+
|
||||||
|
" and #methods="+totalNM+" in #classes="+numClasses);
|
||||||
|
|
||||||
List<Class.Field> fields = new ArrayList<>(totalNF);
|
List<Class.Field> fields = new ArrayList<>(totalNF);
|
||||||
field_descr.readFrom(in);
|
field_descr.readFrom(in);
|
||||||
|
@ -1393,7 +1517,8 @@ class PackageReader extends BandStructure {
|
||||||
MultiBand xxx_attr_bands = attrBands[ctype];
|
MultiBand xxx_attr_bands = attrBands[ctype];
|
||||||
long flagMask = attrFlagMask[ctype];
|
long flagMask = attrFlagMask[ctype];
|
||||||
if (verbose > 1) {
|
if (verbose > 1) {
|
||||||
Utils.log.fine("scanning flags and attrs for "+Attribute.contextName(ctype)+"["+holders.size()+"]");
|
Utils.log.fine("scanning flags and attrs for "+
|
||||||
|
Attribute.contextName(ctype)+"["+holders.size()+"]");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Fetch the attribute layout definitions which govern the bands
|
// Fetch the attribute layout definitions which govern the bands
|
||||||
|
@ -1751,8 +1876,10 @@ class PackageReader extends BandStructure {
|
||||||
bc_local, bc_label,
|
bc_local, bc_label,
|
||||||
bc_intref, bc_floatref,
|
bc_intref, bc_floatref,
|
||||||
bc_longref, bc_doubleref, bc_stringref,
|
bc_longref, bc_doubleref, bc_stringref,
|
||||||
|
bc_loadablevalueref,
|
||||||
bc_classref, bc_fieldref,
|
bc_classref, bc_fieldref,
|
||||||
bc_methodref, bc_imethodref,
|
bc_methodref, bc_imethodref,
|
||||||
|
bc_indyref,
|
||||||
bc_thisfield, bc_superfield,
|
bc_thisfield, bc_superfield,
|
||||||
bc_thismethod, bc_supermethod,
|
bc_thismethod, bc_supermethod,
|
||||||
bc_initref,
|
bc_initref,
|
||||||
|
@ -2099,7 +2226,8 @@ class PackageReader extends BandStructure {
|
||||||
case _ildc:
|
case _ildc:
|
||||||
case _cldc:
|
case _cldc:
|
||||||
case _fldc:
|
case _fldc:
|
||||||
case _aldc:
|
case _sldc:
|
||||||
|
case _qldc:
|
||||||
origBC = _ldc;
|
origBC = _ldc;
|
||||||
size = 1;
|
size = 1;
|
||||||
ldcRefSet.add(ref);
|
ldcRefSet.add(ref);
|
||||||
|
@ -2107,7 +2235,8 @@ class PackageReader extends BandStructure {
|
||||||
case _ildc_w:
|
case _ildc_w:
|
||||||
case _cldc_w:
|
case _cldc_w:
|
||||||
case _fldc_w:
|
case _fldc_w:
|
||||||
case _aldc_w:
|
case _sldc_w:
|
||||||
|
case _qldc_w:
|
||||||
origBC = _ldc_w;
|
origBC = _ldc_w;
|
||||||
break;
|
break;
|
||||||
case _lldc2_w:
|
case _lldc2_w:
|
||||||
|
@ -2136,6 +2265,9 @@ class PackageReader extends BandStructure {
|
||||||
int argSize = ((MemberEntry)ref).descRef.typeRef.computeSize(true);
|
int argSize = ((MemberEntry)ref).descRef.typeRef.computeSize(true);
|
||||||
buf[pc++] = (byte)( 1 + argSize );
|
buf[pc++] = (byte)( 1 + argSize );
|
||||||
buf[pc++] = 0;
|
buf[pc++] = 0;
|
||||||
|
} else if (origBC == _invokedynamic) {
|
||||||
|
buf[pc++] = 0;
|
||||||
|
buf[pc++] = 0;
|
||||||
}
|
}
|
||||||
assert(Instruction.opLength(origBC) == (pc - curPC));
|
assert(Instruction.opLength(origBC) == (pc - curPC));
|
||||||
continue;
|
continue;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -25,15 +25,7 @@
|
||||||
|
|
||||||
package com.sun.java.util.jar.pack;
|
package com.sun.java.util.jar.pack;
|
||||||
|
|
||||||
import com.sun.java.util.jar.pack.ConstantPool.ClassEntry;
|
import com.sun.java.util.jar.pack.ConstantPool.*;
|
||||||
import com.sun.java.util.jar.pack.ConstantPool.DescriptorEntry;
|
|
||||||
import com.sun.java.util.jar.pack.ConstantPool.Entry;
|
|
||||||
import com.sun.java.util.jar.pack.ConstantPool.Index;
|
|
||||||
import com.sun.java.util.jar.pack.ConstantPool.IndexGroup;
|
|
||||||
import com.sun.java.util.jar.pack.ConstantPool.MemberEntry;
|
|
||||||
import com.sun.java.util.jar.pack.ConstantPool.NumberEntry;
|
|
||||||
import com.sun.java.util.jar.pack.ConstantPool.SignatureEntry;
|
|
||||||
import com.sun.java.util.jar.pack.ConstantPool.StringEntry;
|
|
||||||
import com.sun.java.util.jar.pack.Package.Class;
|
import com.sun.java.util.jar.pack.Package.Class;
|
||||||
import com.sun.java.util.jar.pack.Package.File;
|
import com.sun.java.util.jar.pack.Package.File;
|
||||||
import com.sun.java.util.jar.pack.Package.InnerClass;
|
import com.sun.java.util.jar.pack.Package.InnerClass;
|
||||||
|
@ -281,7 +273,7 @@ class PackageWriter extends BandStructure {
|
||||||
|
|
||||||
void writeArchiveHeader() throws IOException {
|
void writeArchiveHeader() throws IOException {
|
||||||
// for debug only: number of words optimized away
|
// for debug only: number of words optimized away
|
||||||
int headerDiscountForDebug = 0;
|
int headerSizeForDebug = AH_LENGTH_MIN;
|
||||||
|
|
||||||
// AO_HAVE_SPECIAL_FORMATS is set if non-default
|
// AO_HAVE_SPECIAL_FORMATS is set if non-default
|
||||||
// coding techniques are used, or if there are
|
// coding techniques are used, or if there are
|
||||||
|
@ -293,8 +285,8 @@ class PackageWriter extends BandStructure {
|
||||||
if (haveSpecial)
|
if (haveSpecial)
|
||||||
archiveOptions |= AO_HAVE_SPECIAL_FORMATS;
|
archiveOptions |= AO_HAVE_SPECIAL_FORMATS;
|
||||||
}
|
}
|
||||||
if (!haveSpecial)
|
if (haveSpecial)
|
||||||
headerDiscountForDebug += AH_SPECIAL_FORMAT_LEN;
|
headerSizeForDebug += AH_SPECIAL_FORMAT_LEN;
|
||||||
|
|
||||||
// AO_HAVE_FILE_HEADERS is set if there is any
|
// AO_HAVE_FILE_HEADERS is set if there is any
|
||||||
// file or segment envelope information present.
|
// file or segment envelope information present.
|
||||||
|
@ -305,8 +297,8 @@ class PackageWriter extends BandStructure {
|
||||||
if (haveFiles)
|
if (haveFiles)
|
||||||
archiveOptions |= AO_HAVE_FILE_HEADERS;
|
archiveOptions |= AO_HAVE_FILE_HEADERS;
|
||||||
}
|
}
|
||||||
if (!haveFiles)
|
if (haveFiles)
|
||||||
headerDiscountForDebug += AH_FILE_HEADER_LEN;
|
headerSizeForDebug += AH_FILE_HEADER_LEN;
|
||||||
|
|
||||||
// AO_HAVE_CP_NUMBERS is set if there are any numbers
|
// AO_HAVE_CP_NUMBERS is set if there are any numbers
|
||||||
// in the global constant pool. (Numbers are in 15% of classes.)
|
// in the global constant pool. (Numbers are in 15% of classes.)
|
||||||
|
@ -316,8 +308,19 @@ class PackageWriter extends BandStructure {
|
||||||
if (haveNumbers)
|
if (haveNumbers)
|
||||||
archiveOptions |= AO_HAVE_CP_NUMBERS;
|
archiveOptions |= AO_HAVE_CP_NUMBERS;
|
||||||
}
|
}
|
||||||
if (!haveNumbers)
|
if (haveNumbers)
|
||||||
headerDiscountForDebug += AH_CP_NUMBER_LEN;
|
headerSizeForDebug += AH_CP_NUMBER_LEN;
|
||||||
|
|
||||||
|
// AO_HAVE_CP_EXTRAS is set if there are constant pool entries
|
||||||
|
// beyond the Java 6 version of the class file format.
|
||||||
|
boolean haveCPExtra = testBit(archiveOptions, AO_HAVE_CP_EXTRAS);
|
||||||
|
if (!haveCPExtra) {
|
||||||
|
haveCPExtra |= pkg.cp.haveExtraTags();
|
||||||
|
if (haveCPExtra)
|
||||||
|
archiveOptions |= AO_HAVE_CP_EXTRAS;
|
||||||
|
}
|
||||||
|
if (haveCPExtra)
|
||||||
|
headerSizeForDebug += AH_CP_EXTRA_LEN;
|
||||||
|
|
||||||
assert(pkg.package_majver > 0); // caller must specify!
|
assert(pkg.package_majver > 0); // caller must specify!
|
||||||
archive_header_0.putInt(pkg.package_minver);
|
archive_header_0.putInt(pkg.package_minver);
|
||||||
|
@ -355,18 +358,18 @@ class PackageWriter extends BandStructure {
|
||||||
assert(attrDefsWritten.length == 0);
|
assert(attrDefsWritten.length == 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
writeConstantPoolCounts(haveNumbers);
|
writeConstantPoolCounts(haveNumbers, haveCPExtra);
|
||||||
|
|
||||||
archive_header_1.putInt(pkg.getAllInnerClasses().size());
|
archive_header_1.putInt(pkg.getAllInnerClasses().size());
|
||||||
archive_header_1.putInt(pkg.default_class_minver);
|
archive_header_1.putInt(pkg.default_class_minver);
|
||||||
archive_header_1.putInt(pkg.default_class_majver);
|
archive_header_1.putInt(pkg.default_class_majver);
|
||||||
archive_header_1.putInt(pkg.classes.size());
|
archive_header_1.putInt(pkg.classes.size());
|
||||||
|
|
||||||
// Sanity: Make sure we came out to 26 (less optional fields):
|
// Sanity: Make sure we came out to 29 (less optional fields):
|
||||||
assert(archive_header_0.length() +
|
assert(archive_header_0.length() +
|
||||||
archive_header_S.length() +
|
archive_header_S.length() +
|
||||||
archive_header_1.length()
|
archive_header_1.length()
|
||||||
== AH_LENGTH - headerDiscountForDebug);
|
== headerSizeForDebug);
|
||||||
|
|
||||||
// Figure out all the sizes now, first cut:
|
// Figure out all the sizes now, first cut:
|
||||||
archiveSize0 = 0;
|
archiveSize0 = 0;
|
||||||
|
@ -394,9 +397,8 @@ class PackageWriter extends BandStructure {
|
||||||
assert(all_bands.outputSize() == archiveSize0+archiveSize1);
|
assert(all_bands.outputSize() == archiveSize0+archiveSize1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void writeConstantPoolCounts(boolean haveNumbers) throws IOException {
|
void writeConstantPoolCounts(boolean haveNumbers, boolean haveCPExtra) throws IOException {
|
||||||
for (int k = 0; k < ConstantPool.TAGS_IN_ORDER.length; k++) {
|
for (byte tag : ConstantPool.TAGS_IN_ORDER) {
|
||||||
byte tag = ConstantPool.TAGS_IN_ORDER[k];
|
|
||||||
int count = pkg.cp.getIndexByTag(tag).size();
|
int count = pkg.cp.getIndexByTag(tag).size();
|
||||||
switch (tag) {
|
switch (tag) {
|
||||||
case CONSTANT_Utf8:
|
case CONSTANT_Utf8:
|
||||||
|
@ -416,6 +418,17 @@ class PackageWriter extends BandStructure {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case CONSTANT_MethodHandle:
|
||||||
|
case CONSTANT_MethodType:
|
||||||
|
case CONSTANT_InvokeDynamic:
|
||||||
|
case CONSTANT_BootstrapMethod:
|
||||||
|
// Omit counts for newer entities if possible.
|
||||||
|
if (!haveCPExtra) {
|
||||||
|
assert(count == 0);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
archive_header_1.putInt(count);
|
archive_header_1.putInt(count);
|
||||||
}
|
}
|
||||||
|
@ -449,8 +462,7 @@ class PackageWriter extends BandStructure {
|
||||||
|
|
||||||
if (verbose > 0) Utils.log.info("Writing CP");
|
if (verbose > 0) Utils.log.info("Writing CP");
|
||||||
|
|
||||||
for (int k = 0; k < ConstantPool.TAGS_IN_ORDER.length; k++) {
|
for (byte tag : ConstantPool.TAGS_IN_ORDER) {
|
||||||
byte tag = ConstantPool.TAGS_IN_ORDER[k];
|
|
||||||
Index index = cp.getIndexByTag(tag);
|
Index index = cp.getIndexByTag(tag);
|
||||||
|
|
||||||
Entry[] cpMap = index.cpMap;
|
Entry[] cpMap = index.cpMap;
|
||||||
|
@ -530,8 +542,52 @@ class PackageWriter extends BandStructure {
|
||||||
case CONSTANT_InterfaceMethodref:
|
case CONSTANT_InterfaceMethodref:
|
||||||
writeMemberRefs(tag, cpMap, cp_Imethod_class, cp_Imethod_desc);
|
writeMemberRefs(tag, cpMap, cp_Imethod_class, cp_Imethod_desc);
|
||||||
break;
|
break;
|
||||||
|
case CONSTANT_MethodHandle:
|
||||||
|
for (int i = 0; i < cpMap.length; i++) {
|
||||||
|
MethodHandleEntry e = (MethodHandleEntry) cpMap[i];
|
||||||
|
cp_MethodHandle_refkind.putInt(e.refKind);
|
||||||
|
cp_MethodHandle_member.putRef(e.memRef);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case CONSTANT_MethodType:
|
||||||
|
for (int i = 0; i < cpMap.length; i++) {
|
||||||
|
MethodTypeEntry e = (MethodTypeEntry) cpMap[i];
|
||||||
|
cp_MethodType.putRef(e.typeRef);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case CONSTANT_InvokeDynamic:
|
||||||
|
for (int i = 0; i < cpMap.length; i++) {
|
||||||
|
InvokeDynamicEntry e = (InvokeDynamicEntry) cpMap[i];
|
||||||
|
cp_InvokeDynamic_spec.putRef(e.bssRef);
|
||||||
|
cp_InvokeDynamic_desc.putRef(e.descRef);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case CONSTANT_BootstrapMethod:
|
||||||
|
for (int i = 0; i < cpMap.length; i++) {
|
||||||
|
BootstrapMethodEntry e = (BootstrapMethodEntry) cpMap[i];
|
||||||
|
cp_BootstrapMethod_ref.putRef(e.bsmRef);
|
||||||
|
cp_BootstrapMethod_arg_count.putInt(e.argRefs.length);
|
||||||
|
for (Entry argRef : e.argRefs) {
|
||||||
|
cp_BootstrapMethod_arg.putRef(argRef);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
assert(false);
|
throw new AssertionError("unexpected CP tag in package");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (optDumpBands || verbose > 1) {
|
||||||
|
for (byte tag = CONSTANT_GroupFirst; tag < CONSTANT_GroupLimit; tag++) {
|
||||||
|
Index index = cp.getIndexByTag(tag);
|
||||||
|
if (index == null || index.isEmpty()) continue;
|
||||||
|
Entry[] cpMap = index.cpMap;
|
||||||
|
if (verbose > 1)
|
||||||
|
Utils.log.info("Index group "+ConstantPool.tagName(tag)+" contains "+cpMap.length+" entries.");
|
||||||
|
if (optDumpBands) {
|
||||||
|
try (PrintStream ps = new PrintStream(getDumpStream(index.debugName, tag, ".gidx", index))) {
|
||||||
|
printArrayTo(ps, cpMap, 0, cpMap.length, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -988,6 +1044,8 @@ class PackageWriter extends BandStructure {
|
||||||
for (Class cls : pkg.classes) {
|
for (Class cls : pkg.classes) {
|
||||||
// Replace "obvious" SourceFile attrs by null.
|
// Replace "obvious" SourceFile attrs by null.
|
||||||
cls.minimizeSourceFile();
|
cls.minimizeSourceFile();
|
||||||
|
// BootstrapMethods should never have been inserted.
|
||||||
|
assert(cls.getAttribute(Package.attrBootstrapMethodsEmpty) == null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1325,9 +1383,7 @@ class PackageWriter extends BandStructure {
|
||||||
// %%% Add a stress mode which issues _ref/_byte_escape.
|
// %%% Add a stress mode which issues _ref/_byte_escape.
|
||||||
if (verbose > 3) Utils.log.fine(i.toString());
|
if (verbose > 3) Utils.log.fine(i.toString());
|
||||||
|
|
||||||
if (i.isNonstandard()
|
if (i.isNonstandard()) {
|
||||||
&& (!p200.getBoolean(Utils.COM_PREFIX+"invokedynamic")
|
|
||||||
|| i.getBC() != _xxxunusedxxx)) {
|
|
||||||
// Crash and burn with a complaint if there are funny
|
// Crash and burn with a complaint if there are funny
|
||||||
// bytecodes in this class file.
|
// bytecodes in this class file.
|
||||||
String complaint = code.getMethod()
|
String complaint = code.getMethod()
|
||||||
|
@ -1427,24 +1483,6 @@ class PackageWriter extends BandStructure {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (bc) {
|
|
||||||
case _xxxunusedxxx: // %%% pretend this is invokedynamic
|
|
||||||
{
|
|
||||||
i.setNonstandardLength(3);
|
|
||||||
int refx = i.getShortAt(1);
|
|
||||||
Entry ref = (refx == 0)? null: curCPMap[refx];
|
|
||||||
// transmit the opcode, carefully:
|
|
||||||
bc_codes.putByte(_byte_escape);
|
|
||||||
bc_escsize.putInt(1); // one byte of opcode
|
|
||||||
bc_escbyte.putByte(bc); // the opcode
|
|
||||||
// transmit the CP reference, carefully:
|
|
||||||
bc_codes.putByte(_ref_escape);
|
|
||||||
bc_escrefsize.putInt(2); // two bytes of ref
|
|
||||||
bc_escref.putRef(ref); // the ref
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
int branch = i.getBranchLabel();
|
int branch = i.getBranchLabel();
|
||||||
if (branch >= 0) {
|
if (branch >= 0) {
|
||||||
bc_codes.putByte(bc);
|
bc_codes.putByte(bc);
|
||||||
|
@ -1458,7 +1496,7 @@ class PackageWriter extends BandStructure {
|
||||||
CPRefBand bc_which;
|
CPRefBand bc_which;
|
||||||
int vbc = bc;
|
int vbc = bc;
|
||||||
switch (i.getCPTag()) {
|
switch (i.getCPTag()) {
|
||||||
case CONSTANT_Literal:
|
case CONSTANT_LoadableValue:
|
||||||
switch (ref.tag) {
|
switch (ref.tag) {
|
||||||
case CONSTANT_Integer:
|
case CONSTANT_Integer:
|
||||||
bc_which = bc_intref;
|
bc_which = bc_intref;
|
||||||
|
@ -1489,8 +1527,8 @@ class PackageWriter extends BandStructure {
|
||||||
case CONSTANT_String:
|
case CONSTANT_String:
|
||||||
bc_which = bc_stringref;
|
bc_which = bc_stringref;
|
||||||
switch (bc) {
|
switch (bc) {
|
||||||
case _ldc: vbc = _aldc; break;
|
case _ldc: vbc = _sldc; break;
|
||||||
case _ldc_w: vbc = _aldc_w; break;
|
case _ldc_w: vbc = _sldc_w; break;
|
||||||
default: assert(false);
|
default: assert(false);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -1503,8 +1541,16 @@ class PackageWriter extends BandStructure {
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
bc_which = null;
|
// CONSTANT_MethodHandle, etc.
|
||||||
assert(false);
|
if (getPackageMajver() < JAVA7_PACKAGE_MAJOR_VERSION) {
|
||||||
|
throw new IOException("bad package major version for Java 7 ldc");
|
||||||
|
}
|
||||||
|
bc_which = bc_loadablevalueref;
|
||||||
|
switch (bc) {
|
||||||
|
case _ldc: vbc = _qldc; break;
|
||||||
|
case _ldc_w: vbc = _qldc_w; break;
|
||||||
|
default: assert(false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case CONSTANT_Class:
|
case CONSTANT_Class:
|
||||||
|
@ -1517,6 +1563,8 @@ class PackageWriter extends BandStructure {
|
||||||
bc_which = bc_methodref; break;
|
bc_which = bc_methodref; break;
|
||||||
case CONSTANT_InterfaceMethodref:
|
case CONSTANT_InterfaceMethodref:
|
||||||
bc_which = bc_imethodref; break;
|
bc_which = bc_imethodref; break;
|
||||||
|
case CONSTANT_InvokeDynamic:
|
||||||
|
bc_which = bc_indyref; break;
|
||||||
default:
|
default:
|
||||||
bc_which = null;
|
bc_which = null;
|
||||||
assert(false);
|
assert(false);
|
||||||
|
@ -1532,6 +1580,12 @@ class PackageWriter extends BandStructure {
|
||||||
assert(i.getLength() == 5);
|
assert(i.getLength() == 5);
|
||||||
// Make sure the discarded bytes are sane:
|
// Make sure the discarded bytes are sane:
|
||||||
assert(i.getConstant() == (1+((MemberEntry)ref).descRef.typeRef.computeSize(true)) << 8);
|
assert(i.getConstant() == (1+((MemberEntry)ref).descRef.typeRef.computeSize(true)) << 8);
|
||||||
|
} else if (bc == _invokedynamic) {
|
||||||
|
if (getPackageMajver() < JAVA7_PACKAGE_MAJOR_VERSION) {
|
||||||
|
throw new IOException("bad package major version for Java 7 invokedynamic");
|
||||||
|
}
|
||||||
|
assert(i.getLength() == 5);
|
||||||
|
assert(i.getConstant() == 0); // last 2 bytes MBZ
|
||||||
} else {
|
} else {
|
||||||
// Make sure there is nothing else to write.
|
// Make sure there is nothing else to write.
|
||||||
assert(i.getLength() == ((bc == _ldc)?2:3));
|
assert(i.getLength() == ((bc == _ldc)?2:3));
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -28,6 +28,10 @@ import com.sun.java.util.jar.pack.ConstantPool.ClassEntry;
|
||||||
import com.sun.java.util.jar.pack.ConstantPool.DescriptorEntry;
|
import com.sun.java.util.jar.pack.ConstantPool.DescriptorEntry;
|
||||||
import com.sun.java.util.jar.pack.ConstantPool.LiteralEntry;
|
import com.sun.java.util.jar.pack.ConstantPool.LiteralEntry;
|
||||||
import com.sun.java.util.jar.pack.ConstantPool.MemberEntry;
|
import com.sun.java.util.jar.pack.ConstantPool.MemberEntry;
|
||||||
|
import com.sun.java.util.jar.pack.ConstantPool.MethodHandleEntry;
|
||||||
|
import com.sun.java.util.jar.pack.ConstantPool.MethodTypeEntry;
|
||||||
|
import com.sun.java.util.jar.pack.ConstantPool.InvokeDynamicEntry;
|
||||||
|
import com.sun.java.util.jar.pack.ConstantPool.BootstrapMethodEntry;
|
||||||
import com.sun.java.util.jar.pack.ConstantPool.SignatureEntry;
|
import com.sun.java.util.jar.pack.ConstantPool.SignatureEntry;
|
||||||
import com.sun.java.util.jar.pack.ConstantPool.Utf8Entry;
|
import com.sun.java.util.jar.pack.ConstantPool.Utf8Entry;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
@ -56,6 +60,10 @@ class TLGlobals {
|
||||||
private final Map<String, SignatureEntry> signatureEntries;
|
private final Map<String, SignatureEntry> signatureEntries;
|
||||||
private final Map<String, DescriptorEntry> descriptorEntries;
|
private final Map<String, DescriptorEntry> descriptorEntries;
|
||||||
private final Map<String, MemberEntry> memberEntries;
|
private final Map<String, MemberEntry> memberEntries;
|
||||||
|
private final Map<String, MethodHandleEntry> methodHandleEntries;
|
||||||
|
private final Map<String, MethodTypeEntry> methodTypeEntries;
|
||||||
|
private final Map<String, InvokeDynamicEntry> invokeDynamicEntries;
|
||||||
|
private final Map<String, BootstrapMethodEntry> bootstrapMethodEntries;
|
||||||
|
|
||||||
TLGlobals() {
|
TLGlobals() {
|
||||||
utf8Entries = new HashMap<>();
|
utf8Entries = new HashMap<>();
|
||||||
|
@ -64,6 +72,10 @@ class TLGlobals {
|
||||||
signatureEntries = new HashMap<>();
|
signatureEntries = new HashMap<>();
|
||||||
descriptorEntries = new HashMap<>();
|
descriptorEntries = new HashMap<>();
|
||||||
memberEntries = new HashMap<>();
|
memberEntries = new HashMap<>();
|
||||||
|
methodHandleEntries = new HashMap<>();
|
||||||
|
methodTypeEntries = new HashMap<>();
|
||||||
|
invokeDynamicEntries = new HashMap<>();
|
||||||
|
bootstrapMethodEntries = new HashMap<>();
|
||||||
props = new PropMap();
|
props = new PropMap();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -94,4 +106,20 @@ class TLGlobals {
|
||||||
Map<String, MemberEntry> getMemberEntries() {
|
Map<String, MemberEntry> getMemberEntries() {
|
||||||
return memberEntries;
|
return memberEntries;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Map<String, MethodHandleEntry> getMethodHandleEntries() {
|
||||||
|
return methodHandleEntries;
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, MethodTypeEntry> getMethodTypeEntries() {
|
||||||
|
return methodTypeEntries;
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, InvokeDynamicEntry> getInvokeDynamicEntries() {
|
||||||
|
return invokeDynamicEntries;
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, BootstrapMethodEntry> getBootstrapMethodEntries() {
|
||||||
|
return bootstrapMethodEntries;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -60,7 +60,7 @@ class Utils {
|
||||||
* If >3, print tons of comments (e.g., processing of references).
|
* If >3, print tons of comments (e.g., processing of references).
|
||||||
* (installer only)
|
* (installer only)
|
||||||
*/
|
*/
|
||||||
static final String DEBUG_VERBOSE = Utils.COM_PREFIX+"verbose";
|
static final String DEBUG_VERBOSE = COM_PREFIX+"verbose";
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Disables use of native code, prefers the Java-coded implementation.
|
* Disables use of native code, prefers the Java-coded implementation.
|
||||||
|
@ -134,35 +134,11 @@ class Utils {
|
||||||
// to the engine code, especially the native code.
|
// to the engine code, especially the native code.
|
||||||
static final ThreadLocal<TLGlobals> currentInstance = new ThreadLocal<>();
|
static final ThreadLocal<TLGlobals> currentInstance = new ThreadLocal<>();
|
||||||
|
|
||||||
// convenience methods to access the TL globals
|
// convenience method to access the TL globals
|
||||||
static TLGlobals getTLGlobals() {
|
static TLGlobals getTLGlobals() {
|
||||||
return currentInstance.get();
|
return currentInstance.get();
|
||||||
}
|
}
|
||||||
|
|
||||||
static Map<String, Utf8Entry> getUtf8Entries() {
|
|
||||||
return getTLGlobals().getUtf8Entries();
|
|
||||||
}
|
|
||||||
|
|
||||||
static Map<String, ClassEntry> getClassEntries() {
|
|
||||||
return getTLGlobals().getClassEntries();
|
|
||||||
}
|
|
||||||
|
|
||||||
static Map<Object, LiteralEntry> getLiteralEntries() {
|
|
||||||
return getTLGlobals().getLiteralEntries();
|
|
||||||
}
|
|
||||||
|
|
||||||
static Map<String, DescriptorEntry> getDescriptorEntries() {
|
|
||||||
return getTLGlobals().getDescriptorEntries();
|
|
||||||
}
|
|
||||||
|
|
||||||
static Map<String, SignatureEntry> getSignatureEntries() {
|
|
||||||
return getTLGlobals().getSignatureEntries();
|
|
||||||
}
|
|
||||||
|
|
||||||
static Map<String, MemberEntry> getMemberEntries() {
|
|
||||||
return getTLGlobals().getMemberEntries();
|
|
||||||
}
|
|
||||||
|
|
||||||
static PropMap currentPropMap() {
|
static PropMap currentPropMap() {
|
||||||
Object obj = currentInstance.get();
|
Object obj = currentInstance.get();
|
||||||
if (obj instanceof PackerImpl)
|
if (obj instanceof PackerImpl)
|
||||||
|
@ -173,8 +149,19 @@ class Utils {
|
||||||
}
|
}
|
||||||
|
|
||||||
static final boolean nolog
|
static final boolean nolog
|
||||||
= Boolean.getBoolean(Utils.COM_PREFIX+"nolog");
|
= Boolean.getBoolean(COM_PREFIX+"nolog");
|
||||||
|
|
||||||
|
static final boolean SORT_MEMBERS_DESCR_MAJOR
|
||||||
|
= Boolean.getBoolean(COM_PREFIX+"sort.members.descr.major");
|
||||||
|
|
||||||
|
static final boolean SORT_HANDLES_KIND_MAJOR
|
||||||
|
= Boolean.getBoolean(COM_PREFIX+"sort.handles.kind.major");
|
||||||
|
|
||||||
|
static final boolean SORT_INDY_BSS_MAJOR
|
||||||
|
= Boolean.getBoolean(COM_PREFIX+"sort.indy.bss.major");
|
||||||
|
|
||||||
|
static final boolean SORT_BSS_BSM_MAJOR
|
||||||
|
= Boolean.getBoolean(COM_PREFIX+"sort.bss.bsm.major");
|
||||||
|
|
||||||
static class Pack200Logger {
|
static class Pack200Logger {
|
||||||
private final String name;
|
private final String name;
|
||||||
|
|
|
@ -119,7 +119,12 @@ public final class SplashScreen {
|
||||||
// SplashScreen class is now a singleton
|
// SplashScreen class is now a singleton
|
||||||
if (!wasClosed && theInstance == null) {
|
if (!wasClosed && theInstance == null) {
|
||||||
java.security.AccessController.doPrivileged(
|
java.security.AccessController.doPrivileged(
|
||||||
new sun.security.action.LoadLibraryAction("splashscreen"));
|
new java.security.PrivilegedAction<Void>() {
|
||||||
|
public Void run() {
|
||||||
|
System.loadLibrary("splashscreen");
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
});
|
||||||
long ptr = _getInstance();
|
long ptr = _getInstance();
|
||||||
if (ptr != 0 && _isVisible(ptr)) {
|
if (ptr != 0 && _isVisible(ptr)) {
|
||||||
theInstance = new SplashScreen(ptr);
|
theInstance = new SplashScreen(ptr);
|
||||||
|
|
|
@ -1646,7 +1646,12 @@ public abstract class Toolkit {
|
||||||
static void loadLibraries() {
|
static void loadLibraries() {
|
||||||
if (!loaded) {
|
if (!loaded) {
|
||||||
java.security.AccessController.doPrivileged(
|
java.security.AccessController.doPrivileged(
|
||||||
new sun.security.action.LoadLibraryAction("awt"));
|
new java.security.PrivilegedAction<Void>() {
|
||||||
|
public Void run() {
|
||||||
|
System.loadLibrary("awt");
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
});
|
||||||
loaded = true;
|
loaded = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -54,6 +54,11 @@ class NativeLibLoader {
|
||||||
*/
|
*/
|
||||||
static void loadLibraries() {
|
static void loadLibraries() {
|
||||||
java.security.AccessController.doPrivileged(
|
java.security.AccessController.doPrivileged(
|
||||||
new sun.security.action.LoadLibraryAction("awt"));
|
new java.security.PrivilegedAction<Void>() {
|
||||||
|
public Void run() {
|
||||||
|
System.loadLibrary("awt");
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -204,7 +204,12 @@ public abstract class ColorModel implements Transparency{
|
||||||
static void loadLibraries() {
|
static void loadLibraries() {
|
||||||
if (!loaded) {
|
if (!loaded) {
|
||||||
java.security.AccessController.doPrivileged(
|
java.security.AccessController.doPrivileged(
|
||||||
new sun.security.action.LoadLibraryAction("awt"));
|
new java.security.PrivilegedAction<Void>() {
|
||||||
|
public Void run() {
|
||||||
|
System.loadLibrary("awt");
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
});
|
||||||
loaded = true;
|
loaded = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1996, 2011, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1996, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -60,14 +60,19 @@ abstract class AbstractPlainDatagramSocketImpl extends DatagramSocketImpl
|
||||||
/**
|
/**
|
||||||
* flag set if the native connect() call not to be used
|
* flag set if the native connect() call not to be used
|
||||||
*/
|
*/
|
||||||
private final static boolean connectDisabled = os.startsWith("Mac OS");
|
private final static boolean connectDisabled = os.contains("OS X");
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Load net library into runtime.
|
* Load net library into runtime.
|
||||||
*/
|
*/
|
||||||
static {
|
static {
|
||||||
java.security.AccessController.doPrivileged(
|
java.security.AccessController.doPrivileged(
|
||||||
new sun.security.action.LoadLibraryAction("net"));
|
new java.security.PrivilegedAction<Void>() {
|
||||||
|
public Void run() {
|
||||||
|
System.loadLibrary("net");
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -78,7 +78,12 @@ abstract class AbstractPlainSocketImpl extends SocketImpl
|
||||||
*/
|
*/
|
||||||
static {
|
static {
|
||||||
java.security.AccessController.doPrivileged(
|
java.security.AccessController.doPrivileged(
|
||||||
new sun.security.action.LoadLibraryAction("net"));
|
new java.security.PrivilegedAction<Void>() {
|
||||||
|
public Void run() {
|
||||||
|
System.loadLibrary("net");
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -47,7 +47,12 @@ class DatagramPacket {
|
||||||
*/
|
*/
|
||||||
static {
|
static {
|
||||||
java.security.AccessController.doPrivileged(
|
java.security.AccessController.doPrivileged(
|
||||||
new sun.security.action.LoadLibraryAction("net"));
|
new java.security.PrivilegedAction<Void>() {
|
||||||
|
public Void run() {
|
||||||
|
System.loadLibrary("net");
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
});
|
||||||
init();
|
init();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -234,7 +234,13 @@ class InetAddress implements java.io.Serializable {
|
||||||
static {
|
static {
|
||||||
preferIPv6Address = java.security.AccessController.doPrivileged(
|
preferIPv6Address = java.security.AccessController.doPrivileged(
|
||||||
new GetBooleanAction("java.net.preferIPv6Addresses")).booleanValue();
|
new GetBooleanAction("java.net.preferIPv6Addresses")).booleanValue();
|
||||||
AccessController.doPrivileged(new LoadLibraryAction("net"));
|
AccessController.doPrivileged(
|
||||||
|
new java.security.PrivilegedAction<Void>() {
|
||||||
|
public Void run() {
|
||||||
|
System.loadLibrary("net");
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
});
|
||||||
init();
|
init();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -53,7 +53,14 @@ public final class NetworkInterface {
|
||||||
private static final int defaultIndex; /* index of defaultInterface */
|
private static final int defaultIndex; /* index of defaultInterface */
|
||||||
|
|
||||||
static {
|
static {
|
||||||
AccessController.doPrivileged(new LoadLibraryAction("net"));
|
AccessController.doPrivileged(
|
||||||
|
new java.security.PrivilegedAction<Void>() {
|
||||||
|
public Void run() {
|
||||||
|
System.loadLibrary("net");
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
init();
|
init();
|
||||||
defaultInterface = DefaultInterface.getDefault();
|
defaultInterface = DefaultInterface.getDefault();
|
||||||
if (defaultInterface != null) {
|
if (defaultInterface != null) {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -609,7 +609,7 @@ class Bits { // package-private
|
||||||
String arch = AccessController.doPrivileged(
|
String arch = AccessController.doPrivileged(
|
||||||
new sun.security.action.GetPropertyAction("os.arch"));
|
new sun.security.action.GetPropertyAction("os.arch"));
|
||||||
unaligned = arch.equals("i386") || arch.equals("x86")
|
unaligned = arch.equals("i386") || arch.equals("x86")
|
||||||
|| arch.equals("amd64");
|
|| arch.equals("amd64") || arch.equals("x86_64");
|
||||||
unalignedKnown = true;
|
unalignedKnown = true;
|
||||||
return unaligned;
|
return unaligned;
|
||||||
}
|
}
|
||||||
|
|
|
@ -54,7 +54,7 @@ import java.util.Iterator;
|
||||||
* resolveSibling} methods to combine paths. The {@link #relativize relativize}
|
* resolveSibling} methods to combine paths. The {@link #relativize relativize}
|
||||||
* method that can be used to construct a relative path between two paths.
|
* method that can be used to construct a relative path between two paths.
|
||||||
* Paths can be {@link #compareTo compared}, and tested against each other using
|
* Paths can be {@link #compareTo compared}, and tested against each other using
|
||||||
* the {@link #startsWith startsWith} and {@link #endsWith endWith} methods.
|
* the {@link #startsWith startsWith} and {@link #endsWith endsWith} methods.
|
||||||
*
|
*
|
||||||
* <p> This interface extends {@link Watchable} interface so that a directory
|
* <p> This interface extends {@link Watchable} interface so that a directory
|
||||||
* located by a path can be {@link #register registered} with a {@link
|
* located by a path can be {@link #register registered} with a {@link
|
||||||
|
|
|
@ -647,6 +647,8 @@ public class DateFormatSymbols implements Serializable, Cloneable {
|
||||||
private static final ConcurrentMap<Locale, SoftReference<DateFormatSymbols>> cachedInstances
|
private static final ConcurrentMap<Locale, SoftReference<DateFormatSymbols>> cachedInstances
|
||||||
= new ConcurrentHashMap<Locale, SoftReference<DateFormatSymbols>>(3);
|
= new ConcurrentHashMap<Locale, SoftReference<DateFormatSymbols>>(3);
|
||||||
|
|
||||||
|
private transient int lastZoneIndex = 0;
|
||||||
|
|
||||||
private void initializeData(Locale desiredLocale) {
|
private void initializeData(Locale desiredLocale) {
|
||||||
locale = desiredLocale;
|
locale = desiredLocale;
|
||||||
|
|
||||||
|
@ -692,12 +694,24 @@ public class DateFormatSymbols implements Serializable, Cloneable {
|
||||||
* the given time zone ID can't be located in the DateFormatSymbols object.
|
* the given time zone ID can't be located in the DateFormatSymbols object.
|
||||||
* @see java.util.SimpleTimeZone
|
* @see java.util.SimpleTimeZone
|
||||||
*/
|
*/
|
||||||
final int getZoneIndex(String ID)
|
final int getZoneIndex(String ID) {
|
||||||
{
|
|
||||||
String[][] zoneStrings = getZoneStringsWrapper();
|
String[][] zoneStrings = getZoneStringsWrapper();
|
||||||
for (int index=0; index<zoneStrings.length; index++)
|
|
||||||
{
|
/*
|
||||||
if (ID.equals(zoneStrings[index][0])) return index;
|
* getZoneIndex has been re-written for performance reasons. instead of
|
||||||
|
* traversing the zoneStrings array every time, we cache the last used zone
|
||||||
|
* index
|
||||||
|
*/
|
||||||
|
if (lastZoneIndex < zoneStrings.length && ID.equals(zoneStrings[lastZoneIndex][0])) {
|
||||||
|
return lastZoneIndex;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* slow path, search entire list */
|
||||||
|
for (int index = 0; index < zoneStrings.length; index++) {
|
||||||
|
if (ID.equals(zoneStrings[index][0])) {
|
||||||
|
lastZoneIndex = index;
|
||||||
|
return index;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return -1;
|
return -1;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2000, 2008, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -293,7 +293,7 @@ public abstract class Preferences {
|
||||||
String platformFactory;
|
String platformFactory;
|
||||||
if (osName.startsWith("Windows")) {
|
if (osName.startsWith("Windows")) {
|
||||||
platformFactory = "java.util.prefs.WindowsPreferencesFactory";
|
platformFactory = "java.util.prefs.WindowsPreferencesFactory";
|
||||||
} else if (osName.startsWith("Mac OS X")) {
|
} else if (osName.contains("OS X")) {
|
||||||
platformFactory = "java.util.prefs.MacOSXPreferencesFactory";
|
platformFactory = "java.util.prefs.MacOSXPreferencesFactory";
|
||||||
} else {
|
} else {
|
||||||
platformFactory = "java.util.prefs.FileSystemPreferencesFactory";
|
platformFactory = "java.util.prefs.FileSystemPreferencesFactory";
|
||||||
|
|
|
@ -145,7 +145,7 @@ public class SSLContext {
|
||||||
* @return the new <code>SSLContext</code> object.
|
* @return the new <code>SSLContext</code> object.
|
||||||
*
|
*
|
||||||
* @exception NoSuchAlgorithmException if no Provider supports a
|
* @exception NoSuchAlgorithmException if no Provider supports a
|
||||||
* TrustManagerFactorySpi implementation for the
|
* SSLContextSpi implementation for the
|
||||||
* specified protocol.
|
* specified protocol.
|
||||||
* @exception NullPointerException if protocol is null.
|
* @exception NullPointerException if protocol is null.
|
||||||
*
|
*
|
||||||
|
@ -222,11 +222,11 @@ public class SSLContext {
|
||||||
*
|
*
|
||||||
* @return the new <code>SSLContext</code> object.
|
* @return the new <code>SSLContext</code> object.
|
||||||
*
|
*
|
||||||
* @throws NoSuchAlgorithmException if a KeyManagerFactorySpi
|
* @throws NoSuchAlgorithmException if a SSLContextSpi
|
||||||
* implementation for the specified protocol is not available
|
* implementation for the specified protocol is not available
|
||||||
* from the specified Provider object.
|
* from the specified Provider object.
|
||||||
*
|
*
|
||||||
* @throws IllegalArgumentException if the provider name is null.
|
* @throws IllegalArgumentException if the provider is null.
|
||||||
* @throws NullPointerException if protocol is null.
|
* @throws NullPointerException if protocol is null.
|
||||||
*
|
*
|
||||||
* @see java.security.Provider
|
* @see java.security.Provider
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -2638,19 +2638,18 @@ public abstract class JComponent extends Container implements Serializable,
|
||||||
* attribute: visualUpdate true
|
* attribute: visualUpdate true
|
||||||
*/
|
*/
|
||||||
public void setVisible(boolean aFlag) {
|
public void setVisible(boolean aFlag) {
|
||||||
if(aFlag != isVisible()) {
|
if (aFlag != isVisible()) {
|
||||||
super.setVisible(aFlag);
|
super.setVisible(aFlag);
|
||||||
|
if (aFlag) {
|
||||||
Container parent = getParent();
|
Container parent = getParent();
|
||||||
if(parent != null) {
|
if (parent != null) {
|
||||||
Rectangle r = getBounds();
|
Rectangle r = getBounds();
|
||||||
parent.repaint(r.x,r.y,r.width,r.height);
|
parent.repaint(r.x, r.y, r.width, r.height);
|
||||||
}
|
}
|
||||||
// Some (all should) LayoutManagers do not consider components
|
|
||||||
// that are not visible. As such we need to revalidate when the
|
|
||||||
// visible bit changes.
|
|
||||||
revalidate();
|
revalidate();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets whether or not this component is enabled.
|
* Sets whether or not this component is enabled.
|
||||||
|
@ -5568,4 +5567,21 @@ public abstract class JComponent extends Container implements Serializable,
|
||||||
",preferredSize=" + preferredSizeString;
|
",preferredSize=" + preferredSizeString;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritDoc}
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void hide() {
|
||||||
|
boolean showing = isShowing();
|
||||||
|
super.hide();
|
||||||
|
if (showing) {
|
||||||
|
Container parent = getParent();
|
||||||
|
if (parent != null) {
|
||||||
|
Rectangle r = getBounds();
|
||||||
|
parent.repaint(r.x, r.y, r.width, r.height);
|
||||||
|
}
|
||||||
|
revalidate();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,7 +27,8 @@ package javax.swing;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Vector;
|
import java.util.Collection;
|
||||||
|
import java.util.Iterator;
|
||||||
import javax.swing.plaf.*;
|
import javax.swing.plaf.*;
|
||||||
import javax.accessibility.*;
|
import javax.accessibility.*;
|
||||||
|
|
||||||
|
@ -42,7 +43,6 @@ import java.io.IOException;
|
||||||
import java.beans.PropertyVetoException;
|
import java.beans.PropertyVetoException;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.TreeSet;
|
import java.util.TreeSet;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A container used to create a multiple-document interface or a virtual desktop.
|
* A container used to create a multiple-document interface or a virtual desktop.
|
||||||
* You create <code>JInternalFrame</code> objects and add them to the
|
* You create <code>JInternalFrame</code> objects and add them to the
|
||||||
|
@ -261,25 +261,26 @@ public class JDesktopPane extends JLayeredPane implements Accessible
|
||||||
* @return an array of <code>JInternalFrame</code> objects
|
* @return an array of <code>JInternalFrame</code> objects
|
||||||
*/
|
*/
|
||||||
public JInternalFrame[] getAllFrames() {
|
public JInternalFrame[] getAllFrames() {
|
||||||
|
return getAllFrames(this).toArray(new JInternalFrame[0]);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static Collection<JInternalFrame> getAllFrames(Container parent) {
|
||||||
int i, count;
|
int i, count;
|
||||||
JInternalFrame[] results;
|
Collection<JInternalFrame> results = new ArrayList<JInternalFrame>();
|
||||||
Vector<JInternalFrame> vResults = new Vector<JInternalFrame>(10);
|
count = parent.getComponentCount();
|
||||||
|
for (i = 0; i < count; i++) {
|
||||||
count = getComponentCount();
|
Component next = parent.getComponent(i);
|
||||||
for(i = 0; i < count; i++) {
|
if (next instanceof JInternalFrame) {
|
||||||
Component next = getComponent(i);
|
results.add((JInternalFrame) next);
|
||||||
if(next instanceof JInternalFrame)
|
} else if (next instanceof JInternalFrame.JDesktopIcon) {
|
||||||
vResults.addElement((JInternalFrame) next);
|
JInternalFrame tmp = ((JInternalFrame.JDesktopIcon) next).getInternalFrame();
|
||||||
else if(next instanceof JInternalFrame.JDesktopIcon) {
|
if (tmp != null) {
|
||||||
JInternalFrame tmp = ((JInternalFrame.JDesktopIcon)next).getInternalFrame();
|
results.add(tmp);
|
||||||
if(tmp != null)
|
}
|
||||||
vResults.addElement(tmp);
|
} else if (next instanceof Container) {
|
||||||
|
results.addAll(getAllFrames((Container) next));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
results = new JInternalFrame[vResults.size()];
|
|
||||||
vResults.copyInto(results);
|
|
||||||
|
|
||||||
return results;
|
return results;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -322,27 +323,14 @@ public class JDesktopPane extends JLayeredPane implements Accessible
|
||||||
* @see JLayeredPane
|
* @see JLayeredPane
|
||||||
*/
|
*/
|
||||||
public JInternalFrame[] getAllFramesInLayer(int layer) {
|
public JInternalFrame[] getAllFramesInLayer(int layer) {
|
||||||
int i, count;
|
Collection<JInternalFrame> allFrames = getAllFrames(this);
|
||||||
JInternalFrame[] results;
|
Iterator<JInternalFrame> iterator = allFrames.iterator();
|
||||||
Vector<JInternalFrame> vResults = new Vector<JInternalFrame>(10);
|
while (iterator.hasNext()) {
|
||||||
|
if (iterator.next().getLayer() != layer) {
|
||||||
count = getComponentCount();
|
iterator.remove();
|
||||||
for(i = 0; i < count; i++) {
|
|
||||||
Component next = getComponent(i);
|
|
||||||
if(next instanceof JInternalFrame) {
|
|
||||||
if(((JInternalFrame)next).getLayer() == layer)
|
|
||||||
vResults.addElement((JInternalFrame) next);
|
|
||||||
} else if(next instanceof JInternalFrame.JDesktopIcon) {
|
|
||||||
JInternalFrame tmp = ((JInternalFrame.JDesktopIcon)next).getInternalFrame();
|
|
||||||
if(tmp != null && tmp.getLayer() == layer)
|
|
||||||
vResults.addElement(tmp);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return allFrames.toArray(new JInternalFrame[0]);
|
||||||
results = new JInternalFrame[vResults.size()];
|
|
||||||
vResults.copyInto(results);
|
|
||||||
|
|
||||||
return results;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private List<JInternalFrame> getFrames() {
|
private List<JInternalFrame> getFrames() {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -41,6 +41,8 @@ import javax.swing.plaf.PopupMenuUI;
|
||||||
import javax.swing.plaf.ComponentUI;
|
import javax.swing.plaf.ComponentUI;
|
||||||
import javax.swing.plaf.basic.BasicComboPopup;
|
import javax.swing.plaf.basic.BasicComboPopup;
|
||||||
import javax.swing.event.*;
|
import javax.swing.event.*;
|
||||||
|
|
||||||
|
import sun.awt.SunToolkit;
|
||||||
import sun.security.util.SecurityConstants;
|
import sun.security.util.SecurityConstants;
|
||||||
|
|
||||||
import java.applet.Applet;
|
import java.applet.Applet;
|
||||||
|
@ -347,6 +349,7 @@ public class JPopupMenu extends JComponent implements Accessible,MenuElement {
|
||||||
long popupBottomY = (long)popupLocation.y + (long)popupSize.height;
|
long popupBottomY = (long)popupLocation.y + (long)popupSize.height;
|
||||||
int scrWidth = scrBounds.width;
|
int scrWidth = scrBounds.width;
|
||||||
int scrHeight = scrBounds.height;
|
int scrHeight = scrBounds.height;
|
||||||
|
|
||||||
if (!canPopupOverlapTaskBar()) {
|
if (!canPopupOverlapTaskBar()) {
|
||||||
// Insets include the task bar. Take them into account.
|
// Insets include the task bar. Take them into account.
|
||||||
Insets scrInsets = toolkit.getScreenInsets(gc);
|
Insets scrInsets = toolkit.getScreenInsets(gc);
|
||||||
|
@ -407,24 +410,18 @@ public class JPopupMenu extends JComponent implements Accessible,MenuElement {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks that there are enough security permissions
|
* Returns whether popup is allowed to be shown above the task bar.
|
||||||
* to make popup "always on top", which allows to show it above the task bar.
|
|
||||||
*/
|
*/
|
||||||
static boolean canPopupOverlapTaskBar() {
|
static boolean canPopupOverlapTaskBar() {
|
||||||
boolean result = true;
|
boolean result = true;
|
||||||
try {
|
|
||||||
SecurityManager sm = System.getSecurityManager();
|
Toolkit tk = Toolkit.getDefaultToolkit();
|
||||||
if (sm != null) {
|
if (tk instanceof SunToolkit) {
|
||||||
sm.checkPermission(
|
result = ((SunToolkit)tk).canPopupOverlapTaskBar();
|
||||||
SecurityConstants.AWT.SET_WINDOW_ALWAYS_ON_TOP_PERMISSION);
|
|
||||||
}
|
|
||||||
} catch (SecurityException se) {
|
|
||||||
// There is no permission to show popups over the task bar
|
|
||||||
result = false;
|
|
||||||
}
|
|
||||||
return result;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Factory method which creates the <code>JMenuItem</code> for
|
* Factory method which creates the <code>JMenuItem</code> for
|
||||||
|
|
|
@ -5470,7 +5470,7 @@ public class JTable extends JComponent implements TableModelListener, Scrollable
|
||||||
if (constructor.getDeclaringClass() == String.class) {
|
if (constructor.getDeclaringClass() == String.class) {
|
||||||
value = s;
|
value = s;
|
||||||
}
|
}
|
||||||
super.stopCellEditing();
|
return super.stopCellEditing();
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -54,6 +54,11 @@ class NativeLibLoader {
|
||||||
*/
|
*/
|
||||||
static void loadLibraries() {
|
static void loadLibraries() {
|
||||||
java.security.AccessController.doPrivileged(
|
java.security.AccessController.doPrivileged(
|
||||||
new sun.security.action.LoadLibraryAction("awt"));
|
new java.security.PrivilegedAction<Void>() {
|
||||||
|
public Void run() {
|
||||||
|
System.loadLibrary("awt");
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1997, 2006, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -101,7 +101,7 @@ public class OSInfo {
|
||||||
return SOLARIS;
|
return SOLARIS;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (osName.startsWith("Mac OS X")) {
|
if (osName.contains("OS X")) {
|
||||||
return MACOSX;
|
return MACOSX;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -42,6 +42,8 @@ import java.util.concurrent.TimeUnit;
|
||||||
import java.util.concurrent.locks.Condition;
|
import java.util.concurrent.locks.Condition;
|
||||||
import java.util.concurrent.locks.Lock;
|
import java.util.concurrent.locks.Lock;
|
||||||
import java.util.concurrent.locks.ReentrantLock;
|
import java.util.concurrent.locks.ReentrantLock;
|
||||||
|
|
||||||
|
import sun.security.util.SecurityConstants;
|
||||||
import sun.util.logging.PlatformLogger;
|
import sun.util.logging.PlatformLogger;
|
||||||
import sun.misc.SoftCache;
|
import sun.misc.SoftCache;
|
||||||
import sun.font.FontDesignMetrics;
|
import sun.font.FontDesignMetrics;
|
||||||
|
@ -1135,6 +1137,26 @@ public abstract class SunToolkit extends Toolkit
|
||||||
return ((mods & InputEvent.ALT_MASK) == (mods & InputEvent.CTRL_MASK));
|
return ((mods & InputEvent.ALT_MASK) == (mods & InputEvent.CTRL_MASK));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns whether popup is allowed to be shown above the task bar.
|
||||||
|
* This is a default implementation of this method, which checks
|
||||||
|
* corresponding security permission.
|
||||||
|
*/
|
||||||
|
public boolean canPopupOverlapTaskBar() {
|
||||||
|
boolean result = true;
|
||||||
|
try {
|
||||||
|
SecurityManager sm = System.getSecurityManager();
|
||||||
|
if (sm != null) {
|
||||||
|
sm.checkPermission(
|
||||||
|
SecurityConstants.AWT.SET_WINDOW_ALWAYS_ON_TOP_PERMISSION);
|
||||||
|
}
|
||||||
|
} catch (SecurityException se) {
|
||||||
|
// There is no permission to show popups over the task bar
|
||||||
|
result = false;
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a new input method window, with behavior as specified in
|
* Returns a new input method window, with behavior as specified in
|
||||||
* {@link java.awt.im.spi.InputMethodContext#createInputMethodWindow}.
|
* {@link java.awt.im.spi.InputMethodContext#createInputMethodWindow}.
|
||||||
|
|
|
@ -54,7 +54,12 @@ public class JPEGImageDecoder extends ImageDecoder {
|
||||||
|
|
||||||
static {
|
static {
|
||||||
java.security.AccessController.doPrivileged(
|
java.security.AccessController.doPrivileged(
|
||||||
new sun.security.action.LoadLibraryAction("jpeg"));
|
new java.security.PrivilegedAction<Void>() {
|
||||||
|
public Void run() {
|
||||||
|
System.loadLibrary("jpeg");
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
});
|
||||||
initIDs(InputStreamClass);
|
initIDs(InputStreamClass);
|
||||||
RGBcolormodel = new DirectColorModel(24, 0xff0000, 0xff00, 0xff);
|
RGBcolormodel = new DirectColorModel(24, 0xff0000, 0xff00, 0xff);
|
||||||
ARGBcolormodel = ColorModel.getRGBdefault();
|
ARGBcolormodel = ColorModel.getRGBdefault();
|
||||||
|
|
|
@ -53,7 +53,12 @@ class NativeLibLoader {
|
||||||
* that the name of the library is "awt". -br.
|
* that the name of the library is "awt". -br.
|
||||||
*/
|
*/
|
||||||
static void loadLibraries() {
|
static void loadLibraries() {
|
||||||
java.security.AccessController.doPrivileged
|
java.security.AccessController.doPrivileged(
|
||||||
(new sun.security.action.LoadLibraryAction("awt"));
|
new java.security.PrivilegedAction<Void>() {
|
||||||
|
public Void run() {
|
||||||
|
System.loadLibrary("awt");
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -78,7 +78,7 @@ public final class FontUtilities {
|
||||||
|
|
||||||
isLinux = osName.startsWith("Linux");
|
isLinux = osName.startsWith("Linux");
|
||||||
|
|
||||||
isMacOSX = osName.startsWith("Mac OS X"); // TODO: MacOSX
|
isMacOSX = osName.contains("OS X"); // TODO: MacOSX
|
||||||
|
|
||||||
String t2kStr = System.getProperty("sun.java2d.font.scaler");
|
String t2kStr = System.getProperty("sun.java2d.font.scaler");
|
||||||
if (t2kStr != null) {
|
if (t2kStr != null) {
|
||||||
|
|
|
@ -57,7 +57,12 @@ public class Disposer implements Runnable {
|
||||||
|
|
||||||
static {
|
static {
|
||||||
java.security.AccessController.doPrivileged(
|
java.security.AccessController.doPrivileged(
|
||||||
new sun.security.action.LoadLibraryAction("awt"));
|
new java.security.PrivilegedAction<Void>() {
|
||||||
|
public Void run() {
|
||||||
|
System.loadLibrary("awt");
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
});
|
||||||
initIDs();
|
initIDs();
|
||||||
String type = (String) java.security.AccessController.doPrivileged(
|
String type = (String) java.security.AccessController.doPrivileged(
|
||||||
new sun.security.action.GetPropertyAction("sun.java2d.reftype"));
|
new sun.security.action.GetPropertyAction("sun.java2d.reftype"));
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2007, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -381,7 +381,7 @@ public enum LauncherHelper {
|
||||||
PrintStream ostream = (printToStderr) ? System.err : System.out;
|
PrintStream ostream = (printToStderr) ? System.err : System.out;
|
||||||
ostream.println(getLocalizedMessage("java.launcher.X.usage",
|
ostream.println(getLocalizedMessage("java.launcher.X.usage",
|
||||||
File.pathSeparator));
|
File.pathSeparator));
|
||||||
if (System.getProperty("os.name").startsWith("Mac OS")) {
|
if (System.getProperty("os.name").contains("OS X")) {
|
||||||
ostream.println(getLocalizedMessage("java.launcher.X.macosx.usage",
|
ostream.println(getLocalizedMessage("java.launcher.X.macosx.usage",
|
||||||
File.pathSeparator));
|
File.pathSeparator));
|
||||||
}
|
}
|
||||||
|
|
|
@ -37,7 +37,6 @@ import javax.management.RuntimeOperationsException;
|
||||||
import java.security.AccessController;
|
import java.security.AccessController;
|
||||||
import java.security.PrivilegedActionException;
|
import java.security.PrivilegedActionException;
|
||||||
import java.security.PrivilegedExceptionAction;
|
import java.security.PrivilegedExceptionAction;
|
||||||
import sun.security.action.LoadLibraryAction;
|
|
||||||
|
|
||||||
import sun.util.logging.LoggingSupport;
|
import sun.util.logging.LoggingSupport;
|
||||||
|
|
||||||
|
@ -422,7 +421,13 @@ public class ManagementFactoryHelper {
|
||||||
}
|
}
|
||||||
|
|
||||||
static {
|
static {
|
||||||
AccessController.doPrivileged(new LoadLibraryAction("management"));
|
AccessController.doPrivileged(
|
||||||
|
new java.security.PrivilegedAction<Void>() {
|
||||||
|
public Void run() {
|
||||||
|
System.loadLibrary("management");
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
});
|
||||||
jvm = new VMManagementImpl();
|
jvm = new VMManagementImpl();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -76,6 +76,11 @@ public final class SdpSupport {
|
||||||
|
|
||||||
static {
|
static {
|
||||||
AccessController.doPrivileged(
|
AccessController.doPrivileged(
|
||||||
new sun.security.action.LoadLibraryAction("net"));
|
new java.security.PrivilegedAction<Void>() {
|
||||||
|
public Void run() {
|
||||||
|
System.loadLibrary("net");
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -95,7 +95,12 @@ public class DefaultProxySelector extends ProxySelector {
|
||||||
}});
|
}});
|
||||||
if (b != null && b.booleanValue()) {
|
if (b != null && b.booleanValue()) {
|
||||||
java.security.AccessController.doPrivileged(
|
java.security.AccessController.doPrivileged(
|
||||||
new sun.security.action.LoadLibraryAction("net"));
|
new java.security.PrivilegedAction<Void>() {
|
||||||
|
public Void run() {
|
||||||
|
System.loadLibrary("net");
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
});
|
||||||
hasSystemProxies = init();
|
hasSystemProxies = init();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -744,7 +744,8 @@ class DatagramChannelImpl
|
||||||
if (sm != null)
|
if (sm != null)
|
||||||
sm.checkConnect(isa.getAddress().getHostAddress(),
|
sm.checkConnect(isa.getAddress().getHostAddress(),
|
||||||
isa.getPort());
|
isa.getPort());
|
||||||
disconnect0(fd);
|
boolean isIPv6 = (family == StandardProtocolFamily.INET6);
|
||||||
|
disconnect0(fd, isIPv6);
|
||||||
remoteAddress = null;
|
remoteAddress = null;
|
||||||
state = ST_UNCONNECTED;
|
state = ST_UNCONNECTED;
|
||||||
|
|
||||||
|
@ -1079,7 +1080,7 @@ class DatagramChannelImpl
|
||||||
|
|
||||||
private static native void initIDs();
|
private static native void initIDs();
|
||||||
|
|
||||||
private static native void disconnect0(FileDescriptor fd)
|
private static native void disconnect0(FileDescriptor fd, boolean isIPv6)
|
||||||
throws IOException;
|
throws IOException;
|
||||||
|
|
||||||
private native int receive0(FileDescriptor fd, long address, int len,
|
private native int receive0(FileDescriptor fd, long address, int len,
|
||||||
|
|
|
@ -472,10 +472,15 @@ public class Util {
|
||||||
if (loaded)
|
if (loaded)
|
||||||
return;
|
return;
|
||||||
loaded = true;
|
loaded = true;
|
||||||
java.security.AccessController
|
java.security.AccessController.doPrivileged(
|
||||||
.doPrivileged(new sun.security.action.LoadLibraryAction("net"));
|
new java.security.PrivilegedAction<Void>() {
|
||||||
java.security.AccessController
|
public Void run() {
|
||||||
.doPrivileged(new sun.security.action.LoadLibraryAction("nio"));
|
System.loadLibrary("net");
|
||||||
|
System.loadLibrary("nio");
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
// IOUtil must be initialized; Its native methods are called from
|
// IOUtil must be initialized; Its native methods are called from
|
||||||
// other places in native nio code so they must be set up.
|
// other places in native nio code so they must be set up.
|
||||||
IOUtil.initIDs();
|
IOUtil.initIDs();
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2002, 2011, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -1280,7 +1280,7 @@ public class ExtendedCharsets
|
||||||
String osName = AccessController.doPrivileged(
|
String osName = AccessController.doPrivileged(
|
||||||
new GetPropertyAction("os.name"));
|
new GetPropertyAction("os.name"));
|
||||||
if ("SunOS".equals(osName) || "Linux".equals(osName)
|
if ("SunOS".equals(osName) || "Linux".equals(osName)
|
||||||
|| osName.startsWith("Mac OS")) {
|
|| osName.contains("OS X")) {
|
||||||
charset("x-COMPOUND_TEXT", "COMPOUND_TEXT",
|
charset("x-COMPOUND_TEXT", "COMPOUND_TEXT",
|
||||||
new String[] {
|
new String[] {
|
||||||
"COMPOUND_TEXT", // JDK historical
|
"COMPOUND_TEXT", // JDK historical
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1998, 2008, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -1567,7 +1567,7 @@ public class PSPrinterJob extends RasterPrinterJob {
|
||||||
}
|
}
|
||||||
|
|
||||||
String osname = System.getProperty("os.name");
|
String osname = System.getProperty("os.name");
|
||||||
if (osname.equals("Linux") || osname.startsWith("Mac OS X")) {
|
if (osname.equals("Linux") || osname.contains("OS X")) {
|
||||||
execCmd = new String[ncomps];
|
execCmd = new String[ncomps];
|
||||||
execCmd[n++] = "/usr/bin/lpr";
|
execCmd[n++] = "/usr/bin/lpr";
|
||||||
if ((pFlags & PRINTER) != 0) {
|
if ((pFlags & PRINTER) != 0) {
|
||||||
|
|
|
@ -72,6 +72,7 @@ import javax.swing.text.NumberFormatter;
|
||||||
import sun.print.SunPageSelection;
|
import sun.print.SunPageSelection;
|
||||||
import java.awt.event.KeyEvent;
|
import java.awt.event.KeyEvent;
|
||||||
import java.net.URISyntaxException;
|
import java.net.URISyntaxException;
|
||||||
|
import java.lang.reflect.Field;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -479,20 +480,45 @@ public class ServiceDialog extends JDialog implements ActionListener {
|
||||||
*/
|
*/
|
||||||
public static String getMsg(String key) {
|
public static String getMsg(String key) {
|
||||||
try {
|
try {
|
||||||
return messageRB.getString(key);
|
return removeMnemonics(messageRB.getString(key));
|
||||||
} catch (java.util.MissingResourceException e) {
|
} catch (java.util.MissingResourceException e) {
|
||||||
throw new Error("Fatal: Resource for ServiceUI is broken; " +
|
throw new Error("Fatal: Resource for ServiceUI is broken; " +
|
||||||
"there is no " + key + " key in resource");
|
"there is no " + key + " key in resource");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static String removeMnemonics(String s) {
|
||||||
|
int i = s.indexOf('&');
|
||||||
|
int len = s.length();
|
||||||
|
if (i < 0 || i == (len - 1)) {
|
||||||
|
return s;
|
||||||
|
}
|
||||||
|
int j = s.indexOf('&', i+1);
|
||||||
|
if (j == i+1) {
|
||||||
|
if (j+1 == len) {
|
||||||
|
return s.substring(0, i+1); // string ends with &&
|
||||||
|
} else {
|
||||||
|
return s.substring(0, i+1) + removeMnemonics(s.substring(j+1));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// ok first & not double &&
|
||||||
|
if (i == 0) {
|
||||||
|
return removeMnemonics(s.substring(1));
|
||||||
|
} else {
|
||||||
|
return (s.substring(0, i) + removeMnemonics(s.substring(i+1)));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns mnemonic character from resource
|
* Returns mnemonic character from resource
|
||||||
*/
|
*/
|
||||||
private static char getMnemonic(String key) {
|
private static char getMnemonic(String key) {
|
||||||
String str = getMsg(key + ".mnemonic");
|
String str = messageRB.getString(key).replace("&&", "");
|
||||||
if ((str != null) && (str.length() > 0)) {
|
int index = str.indexOf('&');
|
||||||
return str.charAt(0);
|
if (0 <= index && index < str.length() - 1) {
|
||||||
|
char c = str.charAt(index + 1);
|
||||||
|
return Character.toUpperCase(c);
|
||||||
} else {
|
} else {
|
||||||
return (char)0;
|
return (char)0;
|
||||||
}
|
}
|
||||||
|
@ -501,12 +527,23 @@ public class ServiceDialog extends JDialog implements ActionListener {
|
||||||
/**
|
/**
|
||||||
* Returns the mnemonic as a KeyEvent.VK constant from the resource.
|
* Returns the mnemonic as a KeyEvent.VK constant from the resource.
|
||||||
*/
|
*/
|
||||||
|
static Class _keyEventClazz = null;
|
||||||
private static int getVKMnemonic(String key) {
|
private static int getVKMnemonic(String key) {
|
||||||
String str = getMsg(key + ".vkMnemonic");
|
String s = String.valueOf(getMnemonic(key));
|
||||||
if ((str != null) && (str.length() > 0)) {
|
if ( s == null || s.length() != 1) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
String vkString = "VK_" + s.toUpperCase();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
return Integer.parseInt(str);
|
if (_keyEventClazz == null) {
|
||||||
} catch (NumberFormatException nfe) {}
|
_keyEventClazz= Class.forName("java.awt.event.KeyEvent",
|
||||||
|
true, (ServiceDialog.class).getClassLoader());
|
||||||
|
}
|
||||||
|
Field field = _keyEventClazz.getDeclaredField(vkString);
|
||||||
|
int value = field.getInt(null);
|
||||||
|
return value;
|
||||||
|
} catch (Exception e) {
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,15 +14,11 @@ border.margins=Margins
|
||||||
button.cancel=Cancel
|
button.cancel=Cancel
|
||||||
button.ok=OK
|
button.ok=OK
|
||||||
button.print=Print
|
button.print=Print
|
||||||
button.properties=Properties...
|
button.properties=P&roperties...
|
||||||
button.properties.mnemonic=R
|
|
||||||
#
|
#
|
||||||
checkbox.collate=Collate
|
checkbox.collate=&Collate
|
||||||
checkbox.collate.mnemonic=C
|
checkbox.jobsheets=&Banner Page
|
||||||
checkbox.jobsheets=Banner Page
|
checkbox.printtofile=Print To &File
|
||||||
checkbox.jobsheets.mnemonic=B
|
|
||||||
checkbox.printtofile=Print To File
|
|
||||||
checkbox.printtofile.mnemonic=F
|
|
||||||
#
|
#
|
||||||
dialog.printtitle=Print
|
dialog.printtitle=Print
|
||||||
dialog.pstitle=Page Setup
|
dialog.pstitle=Page Setup
|
||||||
|
@ -33,70 +29,42 @@ dialog.noprintermsg=No print service found.
|
||||||
dialog.writeerror=Cannot write to file:
|
dialog.writeerror=Cannot write to file:
|
||||||
#
|
#
|
||||||
label.info=Info:
|
label.info=Info:
|
||||||
label.jobname=Job Name:
|
label.jobname=&Job Name:
|
||||||
label.jobname.mnemonic=J
|
label.numcopies=Number &of copies:
|
||||||
label.numcopies=Number of copies:
|
label.priority=P&riority:
|
||||||
label.numcopies.mnemonic=O
|
label.psname=&Name:
|
||||||
label.priority=Priority:
|
|
||||||
label.priority.mnemonic=R
|
|
||||||
label.psname=Name:
|
|
||||||
label.psname.mnemonic=N
|
|
||||||
label.pstype=Type:
|
label.pstype=Type:
|
||||||
label.rangeto=To
|
label.rangeto=To
|
||||||
label.size=Size:
|
label.size=Si&ze:
|
||||||
label.size.mnemonic=Z
|
label.source=Sour&ce:
|
||||||
label.source=Source:
|
|
||||||
label.source.mnemonic=C
|
|
||||||
label.status=Status:
|
label.status=Status:
|
||||||
label.username=User Name:
|
label.username=&User Name:
|
||||||
label.username.mnemonic=U
|
|
||||||
label.millimetres=(mm)
|
label.millimetres=(mm)
|
||||||
label.inches=(in)
|
label.inches=(in)
|
||||||
label.topmargin=top
|
label.topmargin=&top
|
||||||
label.topmargin.mnemonic=T
|
label.bottommargin=&bottom
|
||||||
label.bottommargin=bottom
|
label.leftmargin=le&ft
|
||||||
label.bottommargin.mnemonic=B
|
label.rightmargin=&right
|
||||||
label.leftmargin=left
|
|
||||||
label.leftmargin.mnemonic=F
|
|
||||||
label.rightmargin=right
|
|
||||||
label.rightmargin.mnemonic=R
|
|
||||||
#
|
#
|
||||||
radiobutton.color=Color
|
radiobutton.color=&Color
|
||||||
radiobutton.color.mnemonic=C
|
radiobutton.draftq=Dra&ft
|
||||||
radiobutton.draftq=Draft
|
radiobutton.duplex=&Duplex
|
||||||
radiobutton.draftq.mnemonic=F
|
radiobutton.highq=&High
|
||||||
radiobutton.duplex=Duplex
|
radiobutton.landscape=&Landscape
|
||||||
radiobutton.duplex.mnemonic=D
|
radiobutton.monochrome=&Monochrome
|
||||||
radiobutton.highq=High
|
radiobutton.normalq=&Normal
|
||||||
radiobutton.highq.mnemonic=H
|
radiobutton.oneside=&One Side
|
||||||
radiobutton.landscape=Landscape
|
radiobutton.portrait=&Portrait
|
||||||
radiobutton.landscape.mnemonic=L
|
radiobutton.rangeall=A&ll
|
||||||
radiobutton.monochrome=Monochrome
|
radiobutton.rangepages=Pag&es
|
||||||
radiobutton.monochrome.mnemonic=M
|
radiobutton.revlandscape=Reverse La&ndscape
|
||||||
radiobutton.normalq=Normal
|
radiobutton.revportrait=Reverse Portra&it
|
||||||
radiobutton.normalq.mnemonic=N
|
radiobutton.tumble=&Tumble
|
||||||
radiobutton.oneside=One Side
|
|
||||||
radiobutton.oneside.mnemonic=O
|
|
||||||
radiobutton.portrait=Portrait
|
|
||||||
radiobutton.portrait.mnemonic=P
|
|
||||||
radiobutton.rangeall=All
|
|
||||||
radiobutton.rangeall.mnemonic=L
|
|
||||||
radiobutton.rangepages=Pages
|
|
||||||
radiobutton.rangepages.mnemonic=E
|
|
||||||
radiobutton.revlandscape=Reverse Landscape
|
|
||||||
radiobutton.revlandscape.mnemonic=N
|
|
||||||
radiobutton.revportrait=Reverse Portrait
|
|
||||||
radiobutton.revportrait.mnemonic=I
|
|
||||||
radiobutton.tumble=Tumble
|
|
||||||
radiobutton.tumble.mnemonic=T
|
|
||||||
# The vkMnemonics correspond with the constants defined in KeyEvent, eg
|
# The vkMnemonics correspond with the constants defined in KeyEvent, eg
|
||||||
# 65 = KeyEvent.VK_A
|
# 65 = KeyEvent.VK_A
|
||||||
tab.appearance=Appearance
|
tab.appearance=&Appearance
|
||||||
tab.appearance.vkMnemonic=65
|
tab.general=&General
|
||||||
tab.general=General
|
tab.pagesetup=Page &Setup
|
||||||
tab.general.vkMnemonic=71
|
|
||||||
tab.pagesetup=Page Setup
|
|
||||||
tab.pagesetup.vkMnemonic=83
|
|
||||||
#
|
#
|
||||||
error.pagerange=Invalid page range; please re-enter values (e.g. 1-3,5,7-10)
|
error.pagerange=Invalid page range; please re-enter values (e.g. 1-3,5,7-10)
|
||||||
error.destination=Invalid filename; please try again
|
error.destination=Invalid filename; please try again
|
||||||
|
|
|
@ -14,15 +14,11 @@ border.margins=R\u00E4nder
|
||||||
button.cancel=Abbrechen
|
button.cancel=Abbrechen
|
||||||
button.ok=OK
|
button.ok=OK
|
||||||
button.print=Drucken
|
button.print=Drucken
|
||||||
button.properties=Eigenschaften...
|
button.properties=E&igenschaften...
|
||||||
button.properties.mnemonic=I
|
|
||||||
#
|
#
|
||||||
checkbox.collate=Sortieren
|
checkbox.collate=So&rtieren
|
||||||
checkbox.collate.mnemonic=R
|
checkbox.jobsheets=&Bannerseite
|
||||||
checkbox.jobsheets=Bannerseite
|
checkbox.printtofile=A&usgabe in Datei
|
||||||
checkbox.jobsheets.mnemonic=B
|
|
||||||
checkbox.printtofile=Ausgabe in Datei
|
|
||||||
checkbox.printtofile.mnemonic=U
|
|
||||||
#
|
#
|
||||||
dialog.printtitle=Drucken
|
dialog.printtitle=Drucken
|
||||||
dialog.pstitle=Seite einrichten
|
dialog.pstitle=Seite einrichten
|
||||||
|
@ -33,70 +29,42 @@ dialog.noprintermsg=Kein Druckservice gefunden.
|
||||||
dialog.writeerror=Schreiben in Datei nicht m\u00F6glich:
|
dialog.writeerror=Schreiben in Datei nicht m\u00F6glich:
|
||||||
#
|
#
|
||||||
label.info=Info:
|
label.info=Info:
|
||||||
label.jobname=Job-Name:
|
label.jobname=&Job-Name:
|
||||||
label.jobname.mnemonic=J
|
label.numcopies=Anzahl &Kopien:
|
||||||
label.numcopies=Anzahl Kopien:
|
label.priority=P&riorit\u00E4t:
|
||||||
label.numcopies.mnemonic=K
|
label.psname=&Name:
|
||||||
label.priority=Priorit\u00E4t:
|
|
||||||
label.priority.mnemonic=R
|
|
||||||
label.psname=Name:
|
|
||||||
label.psname.mnemonic=N
|
|
||||||
label.pstype=Typ:
|
label.pstype=Typ:
|
||||||
label.rangeto=Bis
|
label.rangeto=Bis
|
||||||
label.size=Gr\u00F6\u00DFe:
|
label.size=Gr\u00F6\u00DF&e:
|
||||||
label.size.mnemonic=E
|
label.source=Q&uelle:
|
||||||
label.source=Quelle:
|
|
||||||
label.source.mnemonic=U
|
|
||||||
label.status=Status:
|
label.status=Status:
|
||||||
label.username=Benutzername:
|
label.username=Ben&utzername:
|
||||||
label.username.mnemonic=U
|
|
||||||
label.millimetres=(mm)
|
label.millimetres=(mm)
|
||||||
label.inches=(Zoll)
|
label.inches=(Zoll)
|
||||||
label.topmargin=oben
|
label.topmargin=&oben
|
||||||
label.topmargin.mnemonic=O
|
label.bottommargin=u&nten
|
||||||
label.bottommargin=unten
|
label.leftmargin=&links
|
||||||
label.bottommargin.mnemonic=N
|
label.rightmargin=&rechts
|
||||||
label.leftmargin=links
|
|
||||||
label.leftmargin.mnemonic=L
|
|
||||||
label.rightmargin=rechts
|
|
||||||
label.rightmargin.mnemonic=R
|
|
||||||
#
|
#
|
||||||
radiobutton.color=Farbe
|
radiobutton.color=&Farbe
|
||||||
radiobutton.color.mnemonic=F
|
radiobutton.draftq=Ent&wurf
|
||||||
radiobutton.draftq=Entwurf
|
radiobutton.duplex=Du&plex
|
||||||
radiobutton.draftq.mnemonic=W
|
radiobutton.highq=&Hoch
|
||||||
radiobutton.duplex=Duplex
|
radiobutton.landscape=&Querformat
|
||||||
radiobutton.duplex.mnemonic=P
|
radiobutton.monochrome=&Monochrom
|
||||||
radiobutton.highq=Hoch
|
radiobutton.normalq=&Normal
|
||||||
radiobutton.highq.mnemonic=H
|
radiobutton.oneside=&Einseitig
|
||||||
radiobutton.landscape=Querformat
|
radiobutton.portrait=&Hochformat
|
||||||
radiobutton.landscape.mnemonic=Q
|
radiobutton.rangeall=A&lle
|
||||||
radiobutton.monochrome=Monochrom
|
radiobutton.rangepages=S&eiten
|
||||||
radiobutton.monochrome.mnemonic=M
|
radiobutton.revlandscape=U&mgekehrtes Querformat
|
||||||
radiobutton.normalq=Normal
|
radiobutton.revportrait=Umge&kehrtes Hochformat
|
||||||
radiobutton.normalq.mnemonic=N
|
radiobutton.tumble=&Kalenderdruck
|
||||||
radiobutton.oneside=Einseitig
|
|
||||||
radiobutton.oneside.mnemonic=E
|
|
||||||
radiobutton.portrait=Hochformat
|
|
||||||
radiobutton.portrait.mnemonic=H
|
|
||||||
radiobutton.rangeall=Alle
|
|
||||||
radiobutton.rangeall.mnemonic=L
|
|
||||||
radiobutton.rangepages=Seiten
|
|
||||||
radiobutton.rangepages.mnemonic=E
|
|
||||||
radiobutton.revlandscape=Umgekehrtes Querformat
|
|
||||||
radiobutton.revlandscape.mnemonic=M
|
|
||||||
radiobutton.revportrait=Umgekehrtes Hochformat
|
|
||||||
radiobutton.revportrait.mnemonic=K
|
|
||||||
radiobutton.tumble=Kalenderdruck
|
|
||||||
radiobutton.tumble.mnemonic=K
|
|
||||||
# The vkMnemonics correspond with the constants defined in KeyEvent, eg
|
# The vkMnemonics correspond with the constants defined in KeyEvent, eg
|
||||||
# 65 = KeyEvent.VK_A
|
# 65 = KeyEvent.VK_A
|
||||||
tab.appearance=Darstellung
|
tab.appearance=&Darstellung
|
||||||
tab.appearance.vkMnemonic=68
|
tab.general=&Allgemein
|
||||||
tab.general=Allgemein
|
tab.pagesetup=&Seite einrichten
|
||||||
tab.general.vkMnemonic=65
|
|
||||||
tab.pagesetup=Seite einrichten
|
|
||||||
tab.pagesetup.vkMnemonic=83
|
|
||||||
#
|
#
|
||||||
error.pagerange=Ung\u00FCltiger Seitenbereich. Geben Sie die Werte erneut ein (Beispiel: 1-3,5,7-10)
|
error.pagerange=Ung\u00FCltiger Seitenbereich. Geben Sie die Werte erneut ein (Beispiel: 1-3,5,7-10)
|
||||||
error.destination=Ung\u00FCltiger Dateiname. Wiederholen Sie den Vorgang
|
error.destination=Ung\u00FCltiger Dateiname. Wiederholen Sie den Vorgang
|
||||||
|
|
|
@ -14,15 +14,11 @@ border.margins=M\u00E1rgenes
|
||||||
button.cancel=Cancelar
|
button.cancel=Cancelar
|
||||||
button.ok=Aceptar
|
button.ok=Aceptar
|
||||||
button.print=Imprimir
|
button.print=Imprimir
|
||||||
button.properties=Propiedades...
|
button.properties=P&ropiedades...
|
||||||
button.properties.mnemonic=R
|
|
||||||
#
|
#
|
||||||
checkbox.collate=Intercalar
|
checkbox.collate=Inter&calar
|
||||||
checkbox.collate.mnemonic=C
|
checkbox.jobsheets=P\u00E1gina d&e R\u00F3tulo
|
||||||
checkbox.jobsheets=P\u00E1gina de R\u00F3tulo
|
checkbox.printtofile=I&mprimir en Archivo
|
||||||
checkbox.jobsheets.mnemonic=E
|
|
||||||
checkbox.printtofile=Imprimir en Archivo
|
|
||||||
checkbox.printtofile.mnemonic=M
|
|
||||||
#
|
#
|
||||||
dialog.printtitle=Imprimir
|
dialog.printtitle=Imprimir
|
||||||
dialog.pstitle=Preparar P\u00E1gina
|
dialog.pstitle=Preparar P\u00E1gina
|
||||||
|
@ -33,70 +29,42 @@ dialog.noprintermsg=No se ha encontrado el servicio de impresi\u00F3n.
|
||||||
dialog.writeerror=No se puede escribir en el archivo:
|
dialog.writeerror=No se puede escribir en el archivo:
|
||||||
#
|
#
|
||||||
label.info=Informaci\u00F3n:
|
label.info=Informaci\u00F3n:
|
||||||
label.jobname=Nombre del Trabajo:
|
label.jobname=Nombre del &Trabajo:
|
||||||
label.jobname.mnemonic=T
|
label.numcopies=N\u00FAmer&o de Copias:
|
||||||
label.numcopies=N\u00FAmero de Copias:
|
label.priority=Pr&ioridad:
|
||||||
label.numcopies.mnemonic=O
|
label.psname=&Nombre:
|
||||||
label.priority=Prioridad:
|
|
||||||
label.priority.mnemonic=I
|
|
||||||
label.psname=Nombre:
|
|
||||||
label.psname.mnemonic=N
|
|
||||||
label.pstype=Tipo:
|
label.pstype=Tipo:
|
||||||
label.rangeto=A
|
label.rangeto=A
|
||||||
label.size=Tama\u00F1o:
|
label.size=&Tama\u00F1o:
|
||||||
label.size.mnemonic=T
|
|
||||||
label.source=Origen:
|
label.source=Origen:
|
||||||
label.source.mnemonic=O
|
|
||||||
label.status=Estado:
|
label.status=Estado:
|
||||||
label.username=Usuario:
|
label.username=U&suario:
|
||||||
label.username.mnemonic=S
|
|
||||||
label.millimetres=(mm)
|
label.millimetres=(mm)
|
||||||
label.inches=(pulg.)
|
label.inches=(pulg.)
|
||||||
label.topmargin=superior
|
label.topmargin=superior
|
||||||
label.topmargin.mnemonic=S
|
label.bottommargin=in&ferior
|
||||||
label.bottommargin=inferior
|
label.leftmargin=iz&quierdo
|
||||||
label.bottommargin.mnemonic=F
|
label.rightmargin=d&erecho
|
||||||
label.leftmargin=izquierdo
|
|
||||||
label.leftmargin.mnemonic=Q
|
|
||||||
label.rightmargin=derecho
|
|
||||||
label.rightmargin.mnemonic=E
|
|
||||||
#
|
#
|
||||||
radiobutton.color=Color
|
radiobutton.color=&Color
|
||||||
radiobutton.color.mnemonic=C
|
radiobutton.draftq=Bo&rrador
|
||||||
radiobutton.draftq=Borrador
|
radiobutton.duplex=&D\u00FAplex
|
||||||
radiobutton.draftq.mnemonic=R
|
radiobutton.highq=A<a
|
||||||
radiobutton.duplex=D\u00FAplex
|
radiobutton.landscape=Hori&zontal
|
||||||
radiobutton.duplex.mnemonic=D
|
radiobutton.monochrome=&Monocromo
|
||||||
radiobutton.highq=Alta
|
radiobutton.normalq=&Normal
|
||||||
radiobutton.highq.mnemonic=L
|
radiobutton.oneside=&Una Cara
|
||||||
radiobutton.landscape=Horizontal
|
radiobutton.portrait=&Vertical
|
||||||
radiobutton.landscape.mnemonic=Z
|
radiobutton.rangeall=&Todo
|
||||||
radiobutton.monochrome=Monocromo
|
radiobutton.rangepages=P\u00E1&ginas
|
||||||
radiobutton.monochrome.mnemonic=M
|
radiobutton.revlandscape=&Horizontal Inverso
|
||||||
radiobutton.normalq=Normal
|
radiobutton.revportrait=Ve&rtical Inverso
|
||||||
radiobutton.normalq.mnemonic=N
|
radiobutton.tumble=Cam&bio de Cara
|
||||||
radiobutton.oneside=Una Cara
|
|
||||||
radiobutton.oneside.mnemonic=U
|
|
||||||
radiobutton.portrait=Vertical
|
|
||||||
radiobutton.portrait.mnemonic=V
|
|
||||||
radiobutton.rangeall=Todo
|
|
||||||
radiobutton.rangeall.mnemonic=T
|
|
||||||
radiobutton.rangepages=P\u00E1ginas
|
|
||||||
radiobutton.rangepages.mnemonic=G
|
|
||||||
radiobutton.revlandscape=Horizontal Inverso
|
|
||||||
radiobutton.revlandscape.mnemonic=H
|
|
||||||
radiobutton.revportrait=Vertical Inverso
|
|
||||||
radiobutton.revportrait.mnemonic=R
|
|
||||||
radiobutton.tumble=Cambio de Cara
|
|
||||||
radiobutton.tumble.mnemonic=B
|
|
||||||
# The vkMnemonics correspond with the constants defined in KeyEvent, eg
|
# The vkMnemonics correspond with the constants defined in KeyEvent, eg
|
||||||
# 65 = KeyEvent.VK_A
|
# 65 = KeyEvent.VK_A
|
||||||
tab.appearance=Apariencia
|
tab.appearance=&Apariencia
|
||||||
tab.appearance.vkMnemonic=65
|
tab.general=&General
|
||||||
tab.general=General
|
tab.pagesetup=&Preparar P\u00E1gina
|
||||||
tab.general.vkMnemonic=71
|
|
||||||
tab.pagesetup=Preparar P\u00E1gina
|
|
||||||
tab.pagesetup.vkMnemonic=80
|
|
||||||
#
|
#
|
||||||
error.pagerange=Rango de p\u00E1ginas no v\u00E1lido; vuelva a introducir los valores (por ejemplo, 1-3, 5, 7-10)
|
error.pagerange=Rango de p\u00E1ginas no v\u00E1lido; vuelva a introducir los valores (por ejemplo, 1-3, 5, 7-10)
|
||||||
error.destination=Nombre de archivo no v\u00E1lido; int\u00E9ntelo de nuevo
|
error.destination=Nombre de archivo no v\u00E1lido; int\u00E9ntelo de nuevo
|
||||||
|
|
|
@ -14,15 +14,11 @@ border.margins=Marges
|
||||||
button.cancel=Annuler
|
button.cancel=Annuler
|
||||||
button.ok=OK
|
button.ok=OK
|
||||||
button.print=Imprimer
|
button.print=Imprimer
|
||||||
button.properties=Propri\u00E9t\u00E9s...
|
button.properties=P&ropri\u00E9t\u00E9s...
|
||||||
button.properties.mnemonic=R
|
|
||||||
#
|
#
|
||||||
checkbox.collate=Collationner
|
checkbox.collate=&Collationner
|
||||||
checkbox.collate.mnemonic=C
|
checkbox.jobsheets=Page de &banni\u00E8re
|
||||||
checkbox.jobsheets=Page de banni\u00E8re
|
checkbox.printtofile=Imprimer dans un &fichier
|
||||||
checkbox.jobsheets.mnemonic=B
|
|
||||||
checkbox.printtofile=Imprimer dans un fichier
|
|
||||||
checkbox.printtofile.mnemonic=F
|
|
||||||
#
|
#
|
||||||
dialog.printtitle=Imprimer
|
dialog.printtitle=Imprimer
|
||||||
dialog.pstitle=Mise en page
|
dialog.pstitle=Mise en page
|
||||||
|
@ -33,70 +29,42 @@ dialog.noprintermsg=Service d'impression introuvable.
|
||||||
dialog.writeerror=Impossible d'\u00E9crire dans le fichier :
|
dialog.writeerror=Impossible d'\u00E9crire dans le fichier :
|
||||||
#
|
#
|
||||||
label.info=Infos :
|
label.info=Infos :
|
||||||
label.jobname=Nom du travail :
|
label.jobname=Nom du &travail :
|
||||||
label.jobname.mnemonic=T
|
label.numcopies=N&ombre de copies :
|
||||||
label.numcopies=Nombre de copies :
|
label.priority=P&riorit\u00E9 :
|
||||||
label.numcopies.mnemonic=O
|
label.psname=&Nom :
|
||||||
label.priority=Priorit\u00E9 :
|
|
||||||
label.priority.mnemonic=R
|
|
||||||
label.psname=Nom :
|
|
||||||
label.psname.mnemonic=N
|
|
||||||
label.pstype=Type :
|
label.pstype=Type :
|
||||||
label.rangeto=A
|
label.rangeto=A
|
||||||
label.size=Taille :
|
label.size=Tai&lle :
|
||||||
label.size.mnemonic=L
|
label.source=Sour&ce :
|
||||||
label.source=Source :
|
|
||||||
label.source.mnemonic=C
|
|
||||||
label.status=Statut :
|
label.status=Statut :
|
||||||
label.username=Nom utilisateur :
|
label.username=N&om utilisateur :
|
||||||
label.username.mnemonic=O
|
|
||||||
label.millimetres=(mm)
|
label.millimetres=(mm)
|
||||||
label.inches=(po)
|
label.inches=(po)
|
||||||
label.topmargin=haut
|
label.topmargin=&haut
|
||||||
label.topmargin.mnemonic=H
|
label.bottommargin=&bas
|
||||||
label.bottommargin=bas
|
label.leftmargin=&gauche
|
||||||
label.bottommargin.mnemonic=B
|
label.rightmargin=&droite
|
||||||
label.leftmargin=gauche
|
|
||||||
label.leftmargin.mnemonic=G
|
|
||||||
label.rightmargin=droite
|
|
||||||
label.rightmargin.mnemonic=D
|
|
||||||
#
|
#
|
||||||
radiobutton.color=Couleur
|
radiobutton.color=&Couleur
|
||||||
radiobutton.color.mnemonic=C
|
radiobutton.draftq=Broui&llon
|
||||||
radiobutton.draftq=Brouillon
|
radiobutton.duplex=&Duplex
|
||||||
radiobutton.draftq.mnemonic=L
|
radiobutton.highq=Ma&x.
|
||||||
radiobutton.duplex=Duplex
|
radiobutton.landscape=Pa&ysage
|
||||||
radiobutton.duplex.mnemonic=D
|
radiobutton.monochrome=&Monochrome
|
||||||
radiobutton.highq=Max.
|
radiobutton.normalq=&Normal
|
||||||
radiobutton.highq.mnemonic=X
|
radiobutton.oneside=&Un c\u00F4t\u00E9
|
||||||
radiobutton.landscape=Paysage
|
radiobutton.portrait=&Portrait
|
||||||
radiobutton.landscape.mnemonic=Y
|
radiobutton.rangeall=&Tout
|
||||||
radiobutton.monochrome=Monochrome
|
radiobutton.rangepages=Pag&es
|
||||||
radiobutton.monochrome.mnemonic=M
|
radiobutton.revlandscape=Paysage i&nvers\u00E9
|
||||||
radiobutton.normalq=Normal
|
radiobutton.revportrait=Portra&it invers\u00E9
|
||||||
radiobutton.normalq.mnemonic=N
|
radiobutton.tumble=&T\u00EAte-b\u00EAche
|
||||||
radiobutton.oneside=Un c\u00F4t\u00E9
|
|
||||||
radiobutton.oneside.mnemonic=U
|
|
||||||
radiobutton.portrait=Portrait
|
|
||||||
radiobutton.portrait.mnemonic=P
|
|
||||||
radiobutton.rangeall=Tout
|
|
||||||
radiobutton.rangeall.mnemonic=T
|
|
||||||
radiobutton.rangepages=Pages
|
|
||||||
radiobutton.rangepages.mnemonic=E
|
|
||||||
radiobutton.revlandscape=Paysage invers\u00E9
|
|
||||||
radiobutton.revlandscape.mnemonic=N
|
|
||||||
radiobutton.revportrait=Portrait invers\u00E9
|
|
||||||
radiobutton.revportrait.mnemonic=I
|
|
||||||
radiobutton.tumble=T\u00EAte-b\u00EAche
|
|
||||||
radiobutton.tumble.mnemonic=T
|
|
||||||
# The vkMnemonics correspond with the constants defined in KeyEvent, eg
|
# The vkMnemonics correspond with the constants defined in KeyEvent, eg
|
||||||
# 65 = KeyEvent.VK_A
|
# 65 = KeyEvent.VK_A
|
||||||
tab.appearance=Apparence
|
tab.appearance=&Apparence
|
||||||
tab.appearance.vkMnemonic=65
|
tab.general=&G\u00E9n\u00E9ral
|
||||||
tab.general=G\u00E9n\u00E9ral
|
tab.pagesetup=Mi&se en page
|
||||||
tab.general.vkMnemonic=71
|
|
||||||
tab.pagesetup=Mise en page
|
|
||||||
tab.pagesetup.vkMnemonic=83
|
|
||||||
#
|
#
|
||||||
error.pagerange=Plage de pages non valide. Sp\u00E9cifiez les valeurs de nouveau (ex. : 1-3,5,7-10)
|
error.pagerange=Plage de pages non valide. Sp\u00E9cifiez les valeurs de nouveau (ex. : 1-3,5,7-10)
|
||||||
error.destination=Nom de fichier non valide ; recommencez
|
error.destination=Nom de fichier non valide ; recommencez
|
||||||
|
|
|
@ -14,15 +14,11 @@ border.margins=Margini
|
||||||
button.cancel=Annulla
|
button.cancel=Annulla
|
||||||
button.ok=OK
|
button.ok=OK
|
||||||
button.print=Stampa
|
button.print=Stampa
|
||||||
button.properties=Propriet\u00E0...
|
button.properties=P&ropriet\u00E0...
|
||||||
button.properties.mnemonic=R
|
|
||||||
#
|
#
|
||||||
checkbox.collate=Fascicola
|
checkbox.collate=Fascico&la
|
||||||
checkbox.collate.mnemonic=L
|
checkbox.jobsheets=&Pagina banner
|
||||||
checkbox.jobsheets=Pagina banner
|
checkbox.printtofile=Stampa su &file
|
||||||
checkbox.jobsheets.mnemonic=P
|
|
||||||
checkbox.printtofile=Stampa su file
|
|
||||||
checkbox.printtofile.mnemonic=F
|
|
||||||
#
|
#
|
||||||
dialog.printtitle=Stampa
|
dialog.printtitle=Stampa
|
||||||
dialog.pstitle=Imposta pagina
|
dialog.pstitle=Imposta pagina
|
||||||
|
@ -33,70 +29,42 @@ dialog.noprintermsg=Nessun servizio di stampa trovato
|
||||||
dialog.writeerror=Impossibile scrivere nel file:
|
dialog.writeerror=Impossibile scrivere nel file:
|
||||||
#
|
#
|
||||||
label.info=Informazioni:
|
label.info=Informazioni:
|
||||||
label.jobname=Nome job:
|
label.jobname=Nome &job:
|
||||||
label.jobname.mnemonic=J
|
label.numcopies=Numer&o di copie:
|
||||||
label.numcopies=Numero di copie:
|
label.priority=Pr&iorit\u00E0:
|
||||||
label.numcopies.mnemonic=O
|
label.psname=&Nome:
|
||||||
label.priority=Priorit\u00E0:
|
|
||||||
label.priority.mnemonic=I
|
|
||||||
label.psname=Nome:
|
|
||||||
label.psname.mnemonic=N
|
|
||||||
label.pstype=Tipo:
|
label.pstype=Tipo:
|
||||||
label.rangeto=A
|
label.rangeto=A
|
||||||
label.size=Dimensioni:
|
label.size=Di&mensioni:
|
||||||
label.size.mnemonic=M
|
label.source=O&rigine:
|
||||||
label.source=Origine:
|
|
||||||
label.source.mnemonic=R
|
|
||||||
label.status=Stato:
|
label.status=Stato:
|
||||||
label.username=Nome utente:
|
label.username=Nome &utente:
|
||||||
label.username.mnemonic=U
|
|
||||||
label.millimetres=(mm)
|
label.millimetres=(mm)
|
||||||
label.inches=(poll.)
|
label.inches=(poll.)
|
||||||
label.topmargin=superiore
|
label.topmargin=su&periore
|
||||||
label.topmargin.mnemonic=P
|
label.bottommargin=in&feriore
|
||||||
label.bottommargin=inferiore
|
label.leftmargin=sinis&tro
|
||||||
label.bottommargin.mnemonic=F
|
label.rightmargin=&destro
|
||||||
label.leftmargin=sinistro
|
|
||||||
label.leftmargin.mnemonic=T
|
|
||||||
label.rightmargin=destro
|
|
||||||
label.rightmargin.mnemonic=D
|
|
||||||
#
|
#
|
||||||
radiobutton.color=Colore
|
radiobutton.color=&Colore
|
||||||
radiobutton.color.mnemonic=C
|
radiobutton.draftq=&Bozza
|
||||||
radiobutton.draftq=Bozza
|
radiobutton.duplex=F&ronte retro
|
||||||
radiobutton.draftq.mnemonic=B
|
radiobutton.highq=A<a
|
||||||
radiobutton.duplex=Fronte retro
|
radiobutton.landscape=Orizzonta&le
|
||||||
radiobutton.duplex.mnemonic=R
|
radiobutton.monochrome=&Monocromatico
|
||||||
radiobutton.highq=Alta
|
radiobutton.normalq=&Normale
|
||||||
radiobutton.highq.mnemonic=L
|
radiobutton.oneside=Un lat&o
|
||||||
radiobutton.landscape=Orizzontale
|
radiobutton.portrait=&Verticale
|
||||||
radiobutton.landscape.mnemonic=L
|
radiobutton.rangeall=T&utto
|
||||||
radiobutton.monochrome=Monocromatico
|
radiobutton.rangepages=Pagin&e
|
||||||
radiobutton.monochrome.mnemonic=M
|
radiobutton.revlandscape=Orizzo&ntale capovolto
|
||||||
radiobutton.normalq=Normale
|
radiobutton.revportrait=Vert&icale capovolto
|
||||||
radiobutton.normalq.mnemonic=N
|
radiobutton.tumble=La&to corto
|
||||||
radiobutton.oneside=Un lato
|
|
||||||
radiobutton.oneside.mnemonic=O
|
|
||||||
radiobutton.portrait=Verticale
|
|
||||||
radiobutton.portrait.mnemonic=V
|
|
||||||
radiobutton.rangeall=Tutto
|
|
||||||
radiobutton.rangeall.mnemonic=U
|
|
||||||
radiobutton.rangepages=Pagine
|
|
||||||
radiobutton.rangepages.mnemonic=E
|
|
||||||
radiobutton.revlandscape=Orizzontale capovolto
|
|
||||||
radiobutton.revlandscape.mnemonic=N
|
|
||||||
radiobutton.revportrait=Verticale capovolto
|
|
||||||
radiobutton.revportrait.mnemonic=I
|
|
||||||
radiobutton.tumble=Lato corto
|
|
||||||
radiobutton.tumble.mnemonic=T
|
|
||||||
# The vkMnemonics correspond with the constants defined in KeyEvent, eg
|
# The vkMnemonics correspond with the constants defined in KeyEvent, eg
|
||||||
# 65 = KeyEvent.VK_A
|
# 65 = KeyEvent.VK_A
|
||||||
tab.appearance=Aspetto
|
tab.appearance=&Aspetto
|
||||||
tab.appearance.vkMnemonic=65
|
tab.general=&Generale
|
||||||
tab.general=Generale
|
tab.pagesetup=Impo&sta pagina
|
||||||
tab.general.vkMnemonic=71
|
|
||||||
tab.pagesetup=Imposta pagina
|
|
||||||
tab.pagesetup.vkMnemonic=83
|
|
||||||
#
|
#
|
||||||
error.pagerange=Intervallo pagine non valido; immettere nuovamente i valori (ad es. 1-3,5,7-10)
|
error.pagerange=Intervallo pagine non valido; immettere nuovamente i valori (ad es. 1-3,5,7-10)
|
||||||
error.destination=Nome file non valido; riprovare
|
error.destination=Nome file non valido; riprovare
|
||||||
|
|
|
@ -14,15 +14,11 @@ border.margins=\u30DE\u30FC\u30B8\u30F3
|
||||||
button.cancel=\u53D6\u6D88
|
button.cancel=\u53D6\u6D88
|
||||||
button.ok=OK
|
button.ok=OK
|
||||||
button.print=\u5370\u5237
|
button.print=\u5370\u5237
|
||||||
button.properties=\u30D7\u30ED\u30D1\u30C6\u30A3(R)...
|
button.properties=\u30D7\u30ED\u30D1\u30C6\u30A3(&R)...
|
||||||
button.properties.mnemonic=R
|
|
||||||
#
|
#
|
||||||
checkbox.collate=\u4E01\u5408\u3044(C)
|
checkbox.collate=\u4E01\u5408\u3044(&C)
|
||||||
checkbox.collate.mnemonic=C
|
checkbox.jobsheets=\u30D0\u30CA\u30FC\u30FB\u30DA\u30FC\u30B8(&B)
|
||||||
checkbox.jobsheets=\u30D0\u30CA\u30FC\u30FB\u30DA\u30FC\u30B8(B)
|
checkbox.printtofile=\u30D5\u30A1\u30A4\u30EB\u306B\u51FA\u529B(&F)
|
||||||
checkbox.jobsheets.mnemonic=B
|
|
||||||
checkbox.printtofile=\u30D5\u30A1\u30A4\u30EB\u306B\u51FA\u529B(F)
|
|
||||||
checkbox.printtofile.mnemonic=F
|
|
||||||
#
|
#
|
||||||
dialog.printtitle=\u5370\u5237
|
dialog.printtitle=\u5370\u5237
|
||||||
dialog.pstitle=\u30DA\u30FC\u30B8\u8A2D\u5B9A
|
dialog.pstitle=\u30DA\u30FC\u30B8\u8A2D\u5B9A
|
||||||
|
@ -33,70 +29,42 @@ dialog.noprintermsg=\u5370\u5237\u30B5\u30FC\u30D3\u30B9\u304C\u898B\u3064\u304B
|
||||||
dialog.writeerror=\u30D5\u30A1\u30A4\u30EB\u306B\u66F8\u304D\u8FBC\u3081\u307E\u305B\u3093:
|
dialog.writeerror=\u30D5\u30A1\u30A4\u30EB\u306B\u66F8\u304D\u8FBC\u3081\u307E\u305B\u3093:
|
||||||
#
|
#
|
||||||
label.info=\u60C5\u5831:
|
label.info=\u60C5\u5831:
|
||||||
label.jobname=\u30B8\u30E7\u30D6\u540D(J):
|
label.jobname=\u30B8\u30E7\u30D6\u540D(&J):
|
||||||
label.jobname.mnemonic=J
|
label.numcopies=\u5370\u5237\u90E8\u6570(&O):
|
||||||
label.numcopies=\u5370\u5237\u90E8\u6570(O):
|
label.priority=\u512A\u5148\u5EA6(&R):
|
||||||
label.numcopies.mnemonic=O
|
label.psname=\u540D\u524D(&N):
|
||||||
label.priority=\u512A\u5148\u5EA6(R):
|
|
||||||
label.priority.mnemonic=R
|
|
||||||
label.psname=\u540D\u524D(N):
|
|
||||||
label.psname.mnemonic=N
|
|
||||||
label.pstype=\u30BF\u30A4\u30D7:
|
label.pstype=\u30BF\u30A4\u30D7:
|
||||||
label.rangeto=\u5370\u5237\u7BC4\u56F2
|
label.rangeto=\u5370\u5237\u7BC4\u56F2
|
||||||
label.size=\u30B5\u30A4\u30BA(Z):
|
label.size=\u30B5\u30A4\u30BA(&Z):
|
||||||
label.size.mnemonic=Z
|
label.source=\u30BD\u30FC\u30B9(&C):
|
||||||
label.source=\u30BD\u30FC\u30B9(C):
|
|
||||||
label.source.mnemonic=C
|
|
||||||
label.status=\u72B6\u614B:
|
label.status=\u72B6\u614B:
|
||||||
label.username=\u30E6\u30FC\u30B6\u30FC\u540D(U):
|
label.username=\u30E6\u30FC\u30B6\u30FC\u540D(&U):
|
||||||
label.username.mnemonic=U
|
|
||||||
label.millimetres=(mm)
|
label.millimetres=(mm)
|
||||||
label.inches=(in)
|
label.inches=(in)
|
||||||
label.topmargin=\u4E0A(T)
|
label.topmargin=\u4E0A(&T)
|
||||||
label.topmargin.mnemonic=T
|
label.bottommargin=\u4E0B(&B)
|
||||||
label.bottommargin=\u4E0B(B)
|
label.leftmargin=\u5DE6(&F)
|
||||||
label.bottommargin.mnemonic=B
|
label.rightmargin=\u53F3(&R)
|
||||||
label.leftmargin=\u5DE6(F)
|
|
||||||
label.leftmargin.mnemonic=F
|
|
||||||
label.rightmargin=\u53F3(R)
|
|
||||||
label.rightmargin.mnemonic=R
|
|
||||||
#
|
#
|
||||||
radiobutton.color=\u30AB\u30E9\u30FC(C)
|
radiobutton.color=\u30AB\u30E9\u30FC(&C)
|
||||||
radiobutton.color.mnemonic=C
|
radiobutton.draftq=\u30C9\u30E9\u30D5\u30C8(&F)
|
||||||
radiobutton.draftq=\u30C9\u30E9\u30D5\u30C8(F)
|
radiobutton.duplex=\u4E21\u9762(&D)
|
||||||
radiobutton.draftq.mnemonic=F
|
radiobutton.highq=\u9AD8(&H)
|
||||||
radiobutton.duplex=\u4E21\u9762(D)
|
radiobutton.landscape=\u6A2A(&L)
|
||||||
radiobutton.duplex.mnemonic=D
|
radiobutton.monochrome=\u30E2\u30CE\u30AF\u30ED(&M)
|
||||||
radiobutton.highq=\u9AD8(H)
|
radiobutton.normalq=\u6A19\u6E96(&N)
|
||||||
radiobutton.highq.mnemonic=H
|
radiobutton.oneside=\u7247\u9762(&O)
|
||||||
radiobutton.landscape=\u6A2A(L)
|
radiobutton.portrait=\u7E26(&P)
|
||||||
radiobutton.landscape.mnemonic=L
|
radiobutton.rangeall=\u3059\u3079\u3066(&L)
|
||||||
radiobutton.monochrome=\u30E2\u30CE\u30AF\u30ED(M)
|
radiobutton.rangepages=\u30DA\u30FC\u30B8(&E)
|
||||||
radiobutton.monochrome.mnemonic=M
|
radiobutton.revlandscape=\u30E9\u30F3\u30C9\u30B9\u30B1\u30FC\u30D7(\u53CD\u8EE2)(&N)
|
||||||
radiobutton.normalq=\u6A19\u6E96(N)
|
radiobutton.revportrait=\u30DD\u30FC\u30C8\u30EC\u30A4\u30C8(\u53CD\u8EE2)(&I)
|
||||||
radiobutton.normalq.mnemonic=N
|
radiobutton.tumble=\u53CD\u8EE2(&T)
|
||||||
radiobutton.oneside=\u7247\u9762(O)
|
|
||||||
radiobutton.oneside.mnemonic=O
|
|
||||||
radiobutton.portrait=\u7E26(P)
|
|
||||||
radiobutton.portrait.mnemonic=P
|
|
||||||
radiobutton.rangeall=\u3059\u3079\u3066(L)
|
|
||||||
radiobutton.rangeall.mnemonic=L
|
|
||||||
radiobutton.rangepages=\u30DA\u30FC\u30B8(E)
|
|
||||||
radiobutton.rangepages.mnemonic=E
|
|
||||||
radiobutton.revlandscape=\u30E9\u30F3\u30C9\u30B9\u30B1\u30FC\u30D7(\u53CD\u8EE2)(N)
|
|
||||||
radiobutton.revlandscape.mnemonic=N
|
|
||||||
radiobutton.revportrait=\u30DD\u30FC\u30C8\u30EC\u30A4\u30C8(\u53CD\u8EE2)(I)
|
|
||||||
radiobutton.revportrait.mnemonic=I
|
|
||||||
radiobutton.tumble=\u53CD\u8EE2(T)
|
|
||||||
radiobutton.tumble.mnemonic=T
|
|
||||||
# The vkMnemonics correspond with the constants defined in KeyEvent, eg
|
# The vkMnemonics correspond with the constants defined in KeyEvent, eg
|
||||||
# 65 = KeyEvent.VK_A
|
# 65 = KeyEvent.VK_A
|
||||||
tab.appearance=\u5916\u89B3(A)
|
tab.appearance=\u5916\u89B3(&A)
|
||||||
tab.appearance.vkMnemonic=65
|
tab.general=\u4E00\u822C(&G)
|
||||||
tab.general=\u4E00\u822C(G)
|
tab.pagesetup=\u30DA\u30FC\u30B8\u8A2D\u5B9A(&S)
|
||||||
tab.general.vkMnemonic=71
|
|
||||||
tab.pagesetup=\u30DA\u30FC\u30B8\u8A2D\u5B9A(S)
|
|
||||||
tab.pagesetup.vkMnemonic=83
|
|
||||||
#
|
#
|
||||||
error.pagerange=\u7121\u52B9\u306A\u30DA\u30FC\u30B8\u7BC4\u56F2\u3002\u5024\u3092\u518D\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044(\u4F8B\u30011-3,5,7-10)
|
error.pagerange=\u7121\u52B9\u306A\u30DA\u30FC\u30B8\u7BC4\u56F2\u3002\u5024\u3092\u518D\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044(\u4F8B\u30011-3,5,7-10)
|
||||||
error.destination=\u7121\u52B9\u306A\u30D5\u30A1\u30A4\u30EB\u540D\u3002\u30D5\u30A1\u30A4\u30EB\u540D\u3092\u518D\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044
|
error.destination=\u7121\u52B9\u306A\u30D5\u30A1\u30A4\u30EB\u540D\u3002\u30D5\u30A1\u30A4\u30EB\u540D\u3092\u518D\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044
|
||||||
|
|
|
@ -14,15 +14,11 @@ border.margins=\uC5EC\uBC31
|
||||||
button.cancel=\uCDE8\uC18C
|
button.cancel=\uCDE8\uC18C
|
||||||
button.ok=\uD655\uC778
|
button.ok=\uD655\uC778
|
||||||
button.print=\uC778\uC1C4
|
button.print=\uC778\uC1C4
|
||||||
button.properties=\uC18D\uC131(R)...
|
button.properties=\uC18D\uC131(&R)...
|
||||||
button.properties.mnemonic=R
|
|
||||||
#
|
#
|
||||||
checkbox.collate=\uD55C \uBD80\uC529 \uC778\uC1C4(C)
|
checkbox.collate=\uD55C \uBD80\uC529 \uC778\uC1C4(&C)
|
||||||
checkbox.collate.mnemonic=C
|
checkbox.jobsheets=\uBC30\uB108 \uD398\uC774\uC9C0(&B)
|
||||||
checkbox.jobsheets=\uBC30\uB108 \uD398\uC774\uC9C0(B)
|
checkbox.printtofile=\uD30C\uC77C\uB85C \uC778\uC1C4(&F)
|
||||||
checkbox.jobsheets.mnemonic=B
|
|
||||||
checkbox.printtofile=\uD30C\uC77C\uB85C \uC778\uC1C4(F)
|
|
||||||
checkbox.printtofile.mnemonic=F
|
|
||||||
#
|
#
|
||||||
dialog.printtitle=\uC778\uC1C4
|
dialog.printtitle=\uC778\uC1C4
|
||||||
dialog.pstitle=\uD398\uC774\uC9C0 \uC124\uC815
|
dialog.pstitle=\uD398\uC774\uC9C0 \uC124\uC815
|
||||||
|
@ -33,70 +29,42 @@ dialog.noprintermsg=\uC778\uC1C4 \uC11C\uBE44\uC2A4\uB97C \uCC3E\uC744 \uC218 \u
|
||||||
dialog.writeerror=\uD30C\uC77C\uC5D0 \uC4F8 \uC218 \uC5C6\uC74C:
|
dialog.writeerror=\uD30C\uC77C\uC5D0 \uC4F8 \uC218 \uC5C6\uC74C:
|
||||||
#
|
#
|
||||||
label.info=\uC815\uBCF4:
|
label.info=\uC815\uBCF4:
|
||||||
label.jobname=\uC791\uC5C5 \uC774\uB984(J):
|
label.jobname=\uC791\uC5C5 \uC774\uB984(&J):
|
||||||
label.jobname.mnemonic=J
|
label.numcopies=\uB9E4\uC218(&O):
|
||||||
label.numcopies=\uB9E4\uC218(O):
|
label.priority=\uC6B0\uC120\uC21C\uC704(&R):
|
||||||
label.numcopies.mnemonic=O
|
label.psname=\uC774\uB984(&N):
|
||||||
label.priority=\uC6B0\uC120\uC21C\uC704(R):
|
|
||||||
label.priority.mnemonic=R
|
|
||||||
label.psname=\uC774\uB984(N):
|
|
||||||
label.psname.mnemonic=N
|
|
||||||
label.pstype=\uC720\uD615:
|
label.pstype=\uC720\uD615:
|
||||||
label.rangeto=\uC885\uB8CC
|
label.rangeto=\uC885\uB8CC
|
||||||
label.size=\uD06C\uAE30(Z):
|
label.size=\uD06C\uAE30(&Z):
|
||||||
label.size.mnemonic=Z
|
label.source=\uC18C\uC2A4(&C):
|
||||||
label.source=\uC18C\uC2A4(C):
|
|
||||||
label.source.mnemonic=C
|
|
||||||
label.status=\uC0C1\uD0DC:
|
label.status=\uC0C1\uD0DC:
|
||||||
label.username=\uC0AC\uC6A9\uC790 \uC774\uB984(U):
|
label.username=\uC0AC\uC6A9\uC790 \uC774\uB984(&U):
|
||||||
label.username.mnemonic=U
|
|
||||||
label.millimetres=(mm)
|
label.millimetres=(mm)
|
||||||
label.inches=(\uC778\uCE58)
|
label.inches=(\uC778\uCE58)
|
||||||
label.topmargin=\uC704\uCABD(T)
|
label.topmargin=\uC704\uCABD(&T)
|
||||||
label.topmargin.mnemonic=T
|
label.bottommargin=\uC544\uB798\uCABD(&B)
|
||||||
label.bottommargin=\uC544\uB798\uCABD(B)
|
label.leftmargin=\uC67C\uCABD(&F)
|
||||||
label.bottommargin.mnemonic=B
|
label.rightmargin=\uC624\uB978\uCABD(&R)
|
||||||
label.leftmargin=\uC67C\uCABD(F)
|
|
||||||
label.leftmargin.mnemonic=F
|
|
||||||
label.rightmargin=\uC624\uB978\uCABD(R)
|
|
||||||
label.rightmargin.mnemonic=R
|
|
||||||
#
|
#
|
||||||
radiobutton.color=\uC0C9\uC0C1(C)
|
radiobutton.color=\uC0C9\uC0C1(&C)
|
||||||
radiobutton.color.mnemonic=C
|
radiobutton.draftq=\uCD08\uC548(&F)
|
||||||
radiobutton.draftq=\uCD08\uC548(F)
|
radiobutton.duplex=\uC591\uBA74(&D)
|
||||||
radiobutton.draftq.mnemonic=F
|
radiobutton.highq=\uB192\uC74C(&H)
|
||||||
radiobutton.duplex=\uC591\uBA74(D)
|
radiobutton.landscape=\uAC00\uB85C(&L)
|
||||||
radiobutton.duplex.mnemonic=D
|
radiobutton.monochrome=\uB2E8\uC0C9(&M)
|
||||||
radiobutton.highq=\uB192\uC74C(H)
|
radiobutton.normalq=\uBCF4\uD1B5(&N)
|
||||||
radiobutton.highq.mnemonic=H
|
radiobutton.oneside=\uB2E8\uBA74(&O)
|
||||||
radiobutton.landscape=\uAC00\uB85C(L)
|
radiobutton.portrait=\uC138\uB85C(&P)
|
||||||
radiobutton.landscape.mnemonic=L
|
radiobutton.rangeall=\uC804\uCCB4(&L)
|
||||||
radiobutton.monochrome=\uB2E8\uC0C9(M)
|
radiobutton.rangepages=\uD398\uC774\uC9C0(&E)
|
||||||
radiobutton.monochrome.mnemonic=M
|
radiobutton.revlandscape=\uAC00\uB85C \uBC18\uC804(&N)
|
||||||
radiobutton.normalq=\uBCF4\uD1B5(N)
|
radiobutton.revportrait=\uC138\uB85C \uBC18\uC804(&I)
|
||||||
radiobutton.normalq.mnemonic=N
|
radiobutton.tumble=\uD68C\uC804\uC2DD(&T)
|
||||||
radiobutton.oneside=\uB2E8\uBA74(O)
|
|
||||||
radiobutton.oneside.mnemonic=O
|
|
||||||
radiobutton.portrait=\uC138\uB85C(P)
|
|
||||||
radiobutton.portrait.mnemonic=P
|
|
||||||
radiobutton.rangeall=\uC804\uCCB4(L)
|
|
||||||
radiobutton.rangeall.mnemonic=L
|
|
||||||
radiobutton.rangepages=\uD398\uC774\uC9C0(E)
|
|
||||||
radiobutton.rangepages.mnemonic=E
|
|
||||||
radiobutton.revlandscape=\uAC00\uB85C \uBC18\uC804(N)
|
|
||||||
radiobutton.revlandscape.mnemonic=N
|
|
||||||
radiobutton.revportrait=\uC138\uB85C \uBC18\uC804(I)
|
|
||||||
radiobutton.revportrait.mnemonic=I
|
|
||||||
radiobutton.tumble=\uD68C\uC804\uC2DD(T)
|
|
||||||
radiobutton.tumble.mnemonic=T
|
|
||||||
# The vkMnemonics correspond with the constants defined in KeyEvent, eg
|
# The vkMnemonics correspond with the constants defined in KeyEvent, eg
|
||||||
# 65 = KeyEvent.VK_A
|
# 65 = KeyEvent.VK_A
|
||||||
tab.appearance=\uBAA8\uC591(A)
|
tab.appearance=\uBAA8\uC591(&A)
|
||||||
tab.appearance.vkMnemonic=65
|
tab.general=\uC77C\uBC18 \uC0AC\uD56D(&G)
|
||||||
tab.general=\uC77C\uBC18 \uC0AC\uD56D(G)
|
tab.pagesetup=\uD398\uC774\uC9C0 \uC124\uC815(&S)
|
||||||
tab.general.vkMnemonic=71
|
|
||||||
tab.pagesetup=\uD398\uC774\uC9C0 \uC124\uC815(S)
|
|
||||||
tab.pagesetup.vkMnemonic=83
|
|
||||||
#
|
#
|
||||||
error.pagerange=\uBD80\uC801\uD569\uD55C \uD398\uC774\uC9C0 \uBC94\uC704: \uAC12\uC744 \uB2E4\uC2DC \uC785\uB825\uD558\uC2ED\uC2DC\uC624(\uC608: 1-3,5,7-10).
|
error.pagerange=\uBD80\uC801\uD569\uD55C \uD398\uC774\uC9C0 \uBC94\uC704: \uAC12\uC744 \uB2E4\uC2DC \uC785\uB825\uD558\uC2ED\uC2DC\uC624(\uC608: 1-3,5,7-10).
|
||||||
error.destination=\uBD80\uC801\uD569\uD55C \uD30C\uC77C \uC774\uB984: \uB2E4\uC2DC \uC2DC\uB3C4\uD558\uC2ED\uC2DC\uC624.
|
error.destination=\uBD80\uC801\uD569\uD55C \uD30C\uC77C \uC774\uB984: \uB2E4\uC2DC \uC2DC\uB3C4\uD558\uC2ED\uC2DC\uC624.
|
||||||
|
|
|
@ -14,15 +14,11 @@ border.margins=Margens
|
||||||
button.cancel=Cancelar
|
button.cancel=Cancelar
|
||||||
button.ok=OK
|
button.ok=OK
|
||||||
button.print=Imprimir
|
button.print=Imprimir
|
||||||
button.properties=Propriedades...
|
button.properties=Proprie&dades...
|
||||||
button.properties.mnemonic=D
|
|
||||||
#
|
#
|
||||||
checkbox.collate=Agrupar
|
checkbox.collate=Ag&rupar
|
||||||
checkbox.collate.mnemonic=R
|
checkbox.jobsheets=P\u00E1gina com &Banner
|
||||||
checkbox.jobsheets=P\u00E1gina com Banner
|
checkbox.printtofile=&Imprimir em Arquivo
|
||||||
checkbox.jobsheets.mnemonic=B
|
|
||||||
checkbox.printtofile=Imprimir em Arquivo
|
|
||||||
checkbox.printtofile.mnemonic=I
|
|
||||||
#
|
#
|
||||||
dialog.printtitle=Imprimir
|
dialog.printtitle=Imprimir
|
||||||
dialog.pstitle=Configura\u00E7\u00E3o da P\u00E1gina
|
dialog.pstitle=Configura\u00E7\u00E3o da P\u00E1gina
|
||||||
|
@ -33,70 +29,42 @@ dialog.noprintermsg=Nenhum servi\u00E7o de impress\u00E3o encontrado.
|
||||||
dialog.writeerror=N\u00E3o \u00E9 poss\u00EDvel gravar no arquivo:
|
dialog.writeerror=N\u00E3o \u00E9 poss\u00EDvel gravar no arquivo:
|
||||||
#
|
#
|
||||||
label.info=Informa\u00E7\u00F5es:
|
label.info=Informa\u00E7\u00F5es:
|
||||||
label.jobname=Nome do Job:
|
label.jobname=Nome do &Job:
|
||||||
label.jobname.mnemonic=J
|
label.numcopies=N\u00FAmer&o de c\u00F3pias:
|
||||||
label.numcopies=N\u00FAmero de c\u00F3pias:
|
label.priority=&Prioridade:
|
||||||
label.numcopies.mnemonic=O
|
label.psname=&Nome:
|
||||||
label.priority=Prioridade:
|
|
||||||
label.priority.mnemonic=P
|
|
||||||
label.psname=Nome:
|
|
||||||
label.psname.mnemonic=N
|
|
||||||
label.pstype=Tipo:
|
label.pstype=Tipo:
|
||||||
label.rangeto=At\u00E9
|
label.rangeto=At\u00E9
|
||||||
label.size=Tamanho:
|
label.size=Ta&manho:
|
||||||
label.size.mnemonic=M
|
label.source=&Origem:
|
||||||
label.source=Origem:
|
|
||||||
label.source.mnemonic=O
|
|
||||||
label.status=Status:
|
label.status=Status:
|
||||||
label.username=Nome do Usu\u00E1rio:
|
label.username=Nome do &Usu\u00E1rio:
|
||||||
label.username.mnemonic=U
|
|
||||||
label.millimetres=(mm)
|
label.millimetres=(mm)
|
||||||
label.inches=(pol)
|
label.inches=(pol)
|
||||||
label.topmargin=superior
|
label.topmargin=&superior
|
||||||
label.topmargin.mnemonic=S
|
label.bottommargin=&inferior
|
||||||
label.bottommargin=inferior
|
label.leftmargin=es&querda:
|
||||||
label.bottommargin.mnemonic=I
|
label.rightmargin=&direita
|
||||||
label.leftmargin=esquerda:
|
|
||||||
label.leftmargin.mnemonic=Q
|
|
||||||
label.rightmargin=direita
|
|
||||||
label.rightmargin.mnemonic=D
|
|
||||||
#
|
#
|
||||||
radiobutton.color=Cor
|
radiobutton.color=C&or
|
||||||
radiobutton.color.mnemonic=O
|
radiobutton.draftq=&Rascunho
|
||||||
radiobutton.draftq=Rascunho
|
radiobutton.duplex=&Duplex
|
||||||
radiobutton.draftq.mnemonic=R
|
radiobutton.highq=Al&ta
|
||||||
radiobutton.duplex=Duplex
|
radiobutton.landscape=&Paisagem
|
||||||
radiobutton.duplex.mnemonic=D
|
radiobutton.monochrome=&Monocrom\u00E1tico
|
||||||
radiobutton.highq=Alta
|
radiobutton.normalq=&Normal
|
||||||
radiobutton.highq.mnemonic=T
|
radiobutton.oneside=Um &Lado
|
||||||
radiobutton.landscape=Paisagem
|
radiobutton.portrait=&Retrato
|
||||||
radiobutton.landscape.mnemonic=P
|
radiobutton.rangeall=T&udo
|
||||||
radiobutton.monochrome=Monocrom\u00E1tico
|
radiobutton.rangepages=&P\u00E1ginas
|
||||||
radiobutton.monochrome.mnemonic=M
|
radiobutton.revlandscape=Paisagem I&nvertida
|
||||||
radiobutton.normalq=Normal
|
radiobutton.revportrait=R&etrato Invertido
|
||||||
radiobutton.normalq.mnemonic=N
|
radiobutton.tumble=&Virar
|
||||||
radiobutton.oneside=Um Lado
|
|
||||||
radiobutton.oneside.mnemonic=L
|
|
||||||
radiobutton.portrait=Retrato
|
|
||||||
radiobutton.portrait.mnemonic=R
|
|
||||||
radiobutton.rangeall=Tudo
|
|
||||||
radiobutton.rangeall.mnemonic=U
|
|
||||||
radiobutton.rangepages=P\u00E1ginas
|
|
||||||
radiobutton.rangepages.mnemonic=P
|
|
||||||
radiobutton.revlandscape=Paisagem Invertida
|
|
||||||
radiobutton.revlandscape.mnemonic=N
|
|
||||||
radiobutton.revportrait=Retrato Invertido
|
|
||||||
radiobutton.revportrait.mnemonic=E
|
|
||||||
radiobutton.tumble=Virar
|
|
||||||
radiobutton.tumble.mnemonic=V
|
|
||||||
# The vkMnemonics correspond with the constants defined in KeyEvent, eg
|
# The vkMnemonics correspond with the constants defined in KeyEvent, eg
|
||||||
# 65 = KeyEvent.VK_A
|
# 65 = KeyEvent.VK_A
|
||||||
tab.appearance=Apar\u00EAncia
|
tab.appearance=&Apar\u00EAncia
|
||||||
tab.appearance.vkMnemonic=65
|
tab.general=&Geral
|
||||||
tab.general=Geral
|
tab.pagesetup=&Configura\u00E7\u00E3o de P\u00E1gina
|
||||||
tab.general.vkMnemonic=71
|
|
||||||
tab.pagesetup=Configura\u00E7\u00E3o de P\u00E1gina
|
|
||||||
tab.pagesetup.vkMnemonic=67
|
|
||||||
#
|
#
|
||||||
error.pagerange=Faixa de p\u00E1ginas inv\u00E1lida; insira novamente os valores (por exemplo, 1-3,5,7-10)
|
error.pagerange=Faixa de p\u00E1ginas inv\u00E1lida; insira novamente os valores (por exemplo, 1-3,5,7-10)
|
||||||
error.destination=Nome de arquivo inv\u00E1lido; tente novamente
|
error.destination=Nome de arquivo inv\u00E1lido; tente novamente
|
||||||
|
|
|
@ -14,15 +14,11 @@ border.margins=Marginaler
|
||||||
button.cancel=Avbryt
|
button.cancel=Avbryt
|
||||||
button.ok=OK
|
button.ok=OK
|
||||||
button.print=Skriv ut
|
button.print=Skriv ut
|
||||||
button.properties=Egenskaper...
|
button.properties=Egenskape&r...
|
||||||
button.properties.mnemonic=R
|
|
||||||
#
|
#
|
||||||
checkbox.collate=Sortera
|
checkbox.collate=Sor&tera
|
||||||
checkbox.collate.mnemonic=T
|
checkbox.jobsheets=F\u00F6&rs\u00E4ttsblad
|
||||||
checkbox.jobsheets=F\u00F6rs\u00E4ttsblad
|
checkbox.printtofile=S&kriv ut till fil
|
||||||
checkbox.jobsheets.mnemonic=R
|
|
||||||
checkbox.printtofile=Skriv ut till fil
|
|
||||||
checkbox.printtofile.mnemonic=K
|
|
||||||
#
|
#
|
||||||
dialog.printtitle=Skriv ut
|
dialog.printtitle=Skriv ut
|
||||||
dialog.pstitle=Utskriftsformat
|
dialog.pstitle=Utskriftsformat
|
||||||
|
@ -33,70 +29,42 @@ dialog.noprintermsg=Hittade ingen utskriftstj\u00E4nst.
|
||||||
dialog.writeerror=Kan inte skriva till filen:
|
dialog.writeerror=Kan inte skriva till filen:
|
||||||
#
|
#
|
||||||
label.info=Information:
|
label.info=Information:
|
||||||
label.jobname=Utskrift:
|
label.jobname=&Utskrift:
|
||||||
label.jobname.mnemonic=U
|
label.numcopies=Antal &exemplar:
|
||||||
label.numcopies=Antal exemplar:
|
label.priority=P&rioritet:
|
||||||
label.numcopies.mnemonic=E
|
label.psname=&Namn:
|
||||||
label.priority=Prioritet:
|
|
||||||
label.priority.mnemonic=R
|
|
||||||
label.psname=Namn:
|
|
||||||
label.psname.mnemonic=N
|
|
||||||
label.pstype=Typ:
|
label.pstype=Typ:
|
||||||
label.rangeto=Till
|
label.rangeto=Till
|
||||||
label.size=Storlek:
|
label.size=St&orlek:
|
||||||
label.size.mnemonic=O
|
label.source=&K\u00E4lla:
|
||||||
label.source=K\u00E4lla:
|
|
||||||
label.source.mnemonic=K
|
|
||||||
label.status=Status:
|
label.status=Status:
|
||||||
label.username=Anv\u00E4ndarnamn:
|
label.username=A&nv\u00E4ndarnamn:
|
||||||
label.username.mnemonic=N
|
|
||||||
label.millimetres=(mm)
|
label.millimetres=(mm)
|
||||||
label.inches=(tum)
|
label.inches=(tum)
|
||||||
label.topmargin=\u00F6verkant
|
label.topmargin=\u00F6ve&rkant
|
||||||
label.topmargin.mnemonic=R
|
label.bottommargin=&nederkant
|
||||||
label.bottommargin=nederkant
|
label.leftmargin=&v\u00E4nster
|
||||||
label.bottommargin.mnemonic=N
|
label.rightmargin=&h\u00F6ger
|
||||||
label.leftmargin=v\u00E4nster
|
|
||||||
label.leftmargin.mnemonic=V
|
|
||||||
label.rightmargin=h\u00F6ger
|
|
||||||
label.rightmargin.mnemonic=H
|
|
||||||
#
|
#
|
||||||
radiobutton.color=F\u00E4rg
|
radiobutton.color=F\u00E4r&g
|
||||||
radiobutton.color.mnemonic=G
|
radiobutton.draftq=Ut&kast
|
||||||
radiobutton.draftq=Utkast
|
radiobutton.duplex=&Dubbelsidig
|
||||||
radiobutton.draftq.mnemonic=K
|
radiobutton.highq=&H\u00F6g
|
||||||
radiobutton.duplex=Dubbelsidig
|
radiobutton.landscape=&Liggande
|
||||||
radiobutton.duplex.mnemonic=D
|
radiobutton.monochrome=&Monokrom
|
||||||
radiobutton.highq=H\u00F6g
|
radiobutton.normalq=N&ormal
|
||||||
radiobutton.highq.mnemonic=H
|
radiobutton.oneside=&Ensidig
|
||||||
radiobutton.landscape=Liggande
|
radiobutton.portrait=St\u00E5en&de
|
||||||
radiobutton.landscape.mnemonic=L
|
radiobutton.rangeall=A&lla
|
||||||
radiobutton.monochrome=Monokrom
|
radiobutton.rangepages=Si&dor
|
||||||
radiobutton.monochrome.mnemonic=M
|
radiobutton.revlandscape=Omv\u00E4nt li&ggande
|
||||||
radiobutton.normalq=Normal
|
radiobutton.revportrait=O&mv\u00E4nt st\u00E5ende
|
||||||
radiobutton.normalq.mnemonic=O
|
radiobutton.tumble=&V\u00E4nd
|
||||||
radiobutton.oneside=Ensidig
|
|
||||||
radiobutton.oneside.mnemonic=E
|
|
||||||
radiobutton.portrait=St\u00E5ende
|
|
||||||
radiobutton.portrait.mnemonic=D
|
|
||||||
radiobutton.rangeall=Alla
|
|
||||||
radiobutton.rangeall.mnemonic=L
|
|
||||||
radiobutton.rangepages=Sidor
|
|
||||||
radiobutton.rangepages.mnemonic=D
|
|
||||||
radiobutton.revlandscape=Omv\u00E4nt liggande
|
|
||||||
radiobutton.revlandscape.mnemonic=G
|
|
||||||
radiobutton.revportrait=Omv\u00E4nt st\u00E5ende
|
|
||||||
radiobutton.revportrait.mnemonic=M
|
|
||||||
radiobutton.tumble=V\u00E4nd
|
|
||||||
radiobutton.tumble.mnemonic=V
|
|
||||||
# The vkMnemonics correspond with the constants defined in KeyEvent, eg
|
# The vkMnemonics correspond with the constants defined in KeyEvent, eg
|
||||||
# 65 = KeyEvent.VK_A
|
# 65 = KeyEvent.VK_A
|
||||||
tab.appearance=Format
|
tab.appearance=&Format
|
||||||
tab.appearance.vkMnemonic=70
|
tab.general=&Allm\u00E4nt
|
||||||
tab.general=Allm\u00E4nt
|
tab.pagesetup=Ut&skriftsformat
|
||||||
tab.general.vkMnemonic=65
|
|
||||||
tab.pagesetup=Utskriftsformat
|
|
||||||
tab.pagesetup.vkMnemonic=83
|
|
||||||
#
|
#
|
||||||
error.pagerange=Ogiltigt sidintervall. Skriv in v\u00E4rdena igen (t ex 1-3,5,7-10)
|
error.pagerange=Ogiltigt sidintervall. Skriv in v\u00E4rdena igen (t ex 1-3,5,7-10)
|
||||||
error.destination=Ogiltigt filnamn. F\u00F6rs\u00F6k igen.
|
error.destination=Ogiltigt filnamn. F\u00F6rs\u00F6k igen.
|
||||||
|
|
|
@ -14,15 +14,11 @@ border.margins=\u8FB9\u8DDD
|
||||||
button.cancel=\u53D6\u6D88
|
button.cancel=\u53D6\u6D88
|
||||||
button.ok=\u786E\u5B9A
|
button.ok=\u786E\u5B9A
|
||||||
button.print=\u6253\u5370
|
button.print=\u6253\u5370
|
||||||
button.properties=\u5C5E\u6027(R)...
|
button.properties=\u5C5E\u6027(&R)...
|
||||||
button.properties.mnemonic=R
|
|
||||||
#
|
#
|
||||||
checkbox.collate=\u9010\u4EFD\u6253\u5370(C)
|
checkbox.collate=\u9010\u4EFD\u6253\u5370(&C)
|
||||||
checkbox.collate.mnemonic=C
|
checkbox.jobsheets=\u6807\u5E1C\u9875(&B)
|
||||||
checkbox.jobsheets=\u6807\u5E1C\u9875(B)
|
checkbox.printtofile=\u6253\u5370\u5230\u6587\u4EF6(&F)
|
||||||
checkbox.jobsheets.mnemonic=B
|
|
||||||
checkbox.printtofile=\u6253\u5370\u5230\u6587\u4EF6(F)
|
|
||||||
checkbox.printtofile.mnemonic=F
|
|
||||||
#
|
#
|
||||||
dialog.printtitle=\u6253\u5370
|
dialog.printtitle=\u6253\u5370
|
||||||
dialog.pstitle=\u9875\u9762\u8BBE\u7F6E
|
dialog.pstitle=\u9875\u9762\u8BBE\u7F6E
|
||||||
|
@ -33,70 +29,42 @@ dialog.noprintermsg=\u627E\u4E0D\u5230\u6253\u5370\u670D\u52A1\u3002
|
||||||
dialog.writeerror=\u65E0\u6CD5\u5199\u5165\u6587\u4EF6:
|
dialog.writeerror=\u65E0\u6CD5\u5199\u5165\u6587\u4EF6:
|
||||||
#
|
#
|
||||||
label.info=\u4FE1\u606F:
|
label.info=\u4FE1\u606F:
|
||||||
label.jobname=\u4F5C\u4E1A\u540D(J):
|
label.jobname=\u4F5C\u4E1A\u540D(&J):
|
||||||
label.jobname.mnemonic=J
|
label.numcopies=\u6253\u5370\u4EFD\u6570(&O):
|
||||||
label.numcopies=\u6253\u5370\u4EFD\u6570(O):
|
label.priority=\u4F18\u5148\u7EA7(&R):
|
||||||
label.numcopies.mnemonic=O
|
label.psname=\u540D\u79F0(&N):
|
||||||
label.priority=\u4F18\u5148\u7EA7(R):
|
|
||||||
label.priority.mnemonic=R
|
|
||||||
label.psname=\u540D\u79F0(N):
|
|
||||||
label.psname.mnemonic=N
|
|
||||||
label.pstype=\u7C7B\u578B:
|
label.pstype=\u7C7B\u578B:
|
||||||
label.rangeto=\u81F3
|
label.rangeto=\u81F3
|
||||||
label.size=\u5927\u5C0F(Z):
|
label.size=\u5927\u5C0F(&Z):
|
||||||
label.size.mnemonic=Z
|
label.source=\u6765\u6E90(&C):
|
||||||
label.source=\u6765\u6E90(C):
|
|
||||||
label.source.mnemonic=C
|
|
||||||
label.status=\u72B6\u6001:
|
label.status=\u72B6\u6001:
|
||||||
label.username=\u7528\u6237\u540D(U):
|
label.username=\u7528\u6237\u540D(&U):
|
||||||
label.username.mnemonic=U
|
|
||||||
label.millimetres=(\u6BEB\u7C73)
|
label.millimetres=(\u6BEB\u7C73)
|
||||||
label.inches=(\u82F1\u5BF8)
|
label.inches=(\u82F1\u5BF8)
|
||||||
label.topmargin=\u4E0A\u8FB9\u8DDD(T)
|
label.topmargin=\u4E0A\u8FB9\u8DDD(&T)
|
||||||
label.topmargin.mnemonic=T
|
label.bottommargin=\u4E0B\u8FB9\u8DDD(&B)
|
||||||
label.bottommargin=\u4E0B\u8FB9\u8DDD(B)
|
label.leftmargin=\u5DE6\u8FB9\u8DDD(&F)
|
||||||
label.bottommargin.mnemonic=B
|
label.rightmargin=\u53F3\u8FB9\u8DDD(&R)
|
||||||
label.leftmargin=\u5DE6\u8FB9\u8DDD(F)
|
|
||||||
label.leftmargin.mnemonic=F
|
|
||||||
label.rightmargin=\u53F3\u8FB9\u8DDD(R)
|
|
||||||
label.rightmargin.mnemonic=R
|
|
||||||
#
|
#
|
||||||
radiobutton.color=\u989C\u8272(C)
|
radiobutton.color=\u989C\u8272(&C)
|
||||||
radiobutton.color.mnemonic=C
|
radiobutton.draftq=\u8349\u56FE(&F)
|
||||||
radiobutton.draftq=\u8349\u56FE(F)
|
radiobutton.duplex=\u53CC\u9762\u6253\u5370(&D)
|
||||||
radiobutton.draftq.mnemonic=F
|
radiobutton.highq=\u9AD8(&H)
|
||||||
radiobutton.duplex=\u53CC\u9762\u6253\u5370(D)
|
radiobutton.landscape=\u6A2A\u5411(&L)
|
||||||
radiobutton.duplex.mnemonic=D
|
radiobutton.monochrome=\u5355\u8272(&M)
|
||||||
radiobutton.highq=\u9AD8(H)
|
radiobutton.normalq=\u6B63\u5E38(&N)
|
||||||
radiobutton.highq.mnemonic=H
|
radiobutton.oneside=\u5355\u9762(&O)
|
||||||
radiobutton.landscape=\u6A2A\u5411(L)
|
radiobutton.portrait=\u7EB5\u5411(&P)
|
||||||
radiobutton.landscape.mnemonic=L
|
radiobutton.rangeall=\u5168\u90E8(&L)
|
||||||
radiobutton.monochrome=\u5355\u8272(M)
|
radiobutton.rangepages=\u9875\u7801\u8303\u56F4(&E)
|
||||||
radiobutton.monochrome.mnemonic=M
|
radiobutton.revlandscape=\u6A2A\u5411\u53CD\u9762\u6253\u5370(&N)
|
||||||
radiobutton.normalq=\u6B63\u5E38(N)
|
radiobutton.revportrait=\u7EB5\u5411\u53CD\u9762\u6253\u5370(&I)
|
||||||
radiobutton.normalq.mnemonic=N
|
radiobutton.tumble=\u7FFB\u8F6C(&T)
|
||||||
radiobutton.oneside=\u5355\u9762(O)
|
|
||||||
radiobutton.oneside.mnemonic=O
|
|
||||||
radiobutton.portrait=\u7EB5\u5411(P)
|
|
||||||
radiobutton.portrait.mnemonic=P
|
|
||||||
radiobutton.rangeall=\u5168\u90E8(L)
|
|
||||||
radiobutton.rangeall.mnemonic=L
|
|
||||||
radiobutton.rangepages=\u9875\u7801\u8303\u56F4(E)
|
|
||||||
radiobutton.rangepages.mnemonic=E
|
|
||||||
radiobutton.revlandscape=\u6A2A\u5411\u53CD\u9762\u6253\u5370(N)
|
|
||||||
radiobutton.revlandscape.mnemonic=N
|
|
||||||
radiobutton.revportrait=\u7EB5\u5411\u53CD\u9762\u6253\u5370(I)
|
|
||||||
radiobutton.revportrait.mnemonic=I
|
|
||||||
radiobutton.tumble=\u7FFB\u8F6C(T)
|
|
||||||
radiobutton.tumble.mnemonic=T
|
|
||||||
# The vkMnemonics correspond with the constants defined in KeyEvent, eg
|
# The vkMnemonics correspond with the constants defined in KeyEvent, eg
|
||||||
# 65 = KeyEvent.VK_A
|
# 65 = KeyEvent.VK_A
|
||||||
tab.appearance=\u5916\u89C2(A)
|
tab.appearance=\u5916\u89C2(&A)
|
||||||
tab.appearance.vkMnemonic=65
|
tab.general=\u4E00\u822C\u4FE1\u606F(&G)
|
||||||
tab.general=\u4E00\u822C\u4FE1\u606F(G)
|
tab.pagesetup=\u9875\u9762\u8BBE\u7F6E(&S)
|
||||||
tab.general.vkMnemonic=71
|
|
||||||
tab.pagesetup=\u9875\u9762\u8BBE\u7F6E(S)
|
|
||||||
tab.pagesetup.vkMnemonic=83
|
|
||||||
#
|
#
|
||||||
error.pagerange=\u65E0\u6548\u7684\u9875\u9762\u8303\u56F4; \u8BF7\u91CD\u65B0\u8F93\u5165\u6570\u503C (\u4F8B\u5982 1-3,5,7-10)
|
error.pagerange=\u65E0\u6548\u7684\u9875\u9762\u8303\u56F4; \u8BF7\u91CD\u65B0\u8F93\u5165\u6570\u503C (\u4F8B\u5982 1-3,5,7-10)
|
||||||
error.destination=\u65E0\u6548\u7684\u6587\u4EF6\u540D; \u8BF7\u91CD\u8BD5
|
error.destination=\u65E0\u6548\u7684\u6587\u4EF6\u540D; \u8BF7\u91CD\u8BD5
|
||||||
|
|
|
@ -14,15 +14,11 @@ border.margins=\u908A\u8DDD
|
||||||
button.cancel=\u53D6\u6D88
|
button.cancel=\u53D6\u6D88
|
||||||
button.ok=\u78BA\u5B9A
|
button.ok=\u78BA\u5B9A
|
||||||
button.print=\u5217\u5370
|
button.print=\u5217\u5370
|
||||||
button.properties=\u7279\u6027(R)...
|
button.properties=\u7279\u6027(&R)...
|
||||||
button.properties.mnemonic=R
|
|
||||||
#
|
#
|
||||||
checkbox.collate=\u7406\u5E8F(C)
|
checkbox.collate=\u7406\u5E8F(&C)
|
||||||
checkbox.collate.mnemonic=C
|
checkbox.jobsheets=\u6A19\u984C\u9801(&B)
|
||||||
checkbox.jobsheets=\u6A19\u984C\u9801(B)
|
checkbox.printtofile=\u5217\u5370\u81F3\u6A94\u6848(&F)
|
||||||
checkbox.jobsheets.mnemonic=B
|
|
||||||
checkbox.printtofile=\u5217\u5370\u81F3\u6A94\u6848(F)
|
|
||||||
checkbox.printtofile.mnemonic=F
|
|
||||||
#
|
#
|
||||||
dialog.printtitle=\u5217\u5370
|
dialog.printtitle=\u5217\u5370
|
||||||
dialog.pstitle=\u9801\u9762\u8A2D\u5B9A
|
dialog.pstitle=\u9801\u9762\u8A2D\u5B9A
|
||||||
|
@ -33,70 +29,42 @@ dialog.noprintermsg=\u627E\u4E0D\u5230\u5217\u5370\u670D\u52D9\u3002
|
||||||
dialog.writeerror=\u7121\u6CD5\u5BEB\u5165\u81F3\u6A94\u6848:
|
dialog.writeerror=\u7121\u6CD5\u5BEB\u5165\u81F3\u6A94\u6848:
|
||||||
#
|
#
|
||||||
label.info=\u8CC7\u8A0A:
|
label.info=\u8CC7\u8A0A:
|
||||||
label.jobname=\u5DE5\u4F5C\u540D\u7A31(J):
|
label.jobname=\u5DE5\u4F5C\u540D\u7A31(&J):
|
||||||
label.jobname.mnemonic=J
|
label.numcopies=\u5217\u5370\u4EFD\u6578(&O):
|
||||||
label.numcopies=\u5217\u5370\u4EFD\u6578(O):
|
label.priority=\u512A\u5148\u6B0A(&R):
|
||||||
label.numcopies.mnemonic=O
|
label.psname=\u540D\u7A31(&N):
|
||||||
label.priority=\u512A\u5148\u6B0A(R):
|
|
||||||
label.priority.mnemonic=R
|
|
||||||
label.psname=\u540D\u7A31(N):
|
|
||||||
label.psname.mnemonic=N
|
|
||||||
label.pstype=\u985E\u578B:
|
label.pstype=\u985E\u578B:
|
||||||
label.rangeto=\u81F3
|
label.rangeto=\u81F3
|
||||||
label.size=\u5927\u5C0F(Z):
|
label.size=\u5927\u5C0F(&Z):
|
||||||
label.size.mnemonic=Z
|
label.source=\u4F86\u6E90(&C):
|
||||||
label.source=\u4F86\u6E90(C):
|
|
||||||
label.source.mnemonic=C
|
|
||||||
label.status=\u72C0\u614B:
|
label.status=\u72C0\u614B:
|
||||||
label.username=\u4F7F\u7528\u8005\u540D\u7A31(U):
|
label.username=\u4F7F\u7528\u8005\u540D\u7A31(&U):
|
||||||
label.username.mnemonic=U
|
|
||||||
label.millimetres=(mm)
|
label.millimetres=(mm)
|
||||||
label.inches=(in)
|
label.inches=(in)
|
||||||
label.topmargin=\u9802\u7AEF\u908A\u8DDD(T)
|
label.topmargin=\u9802\u7AEF\u908A\u8DDD(&T)
|
||||||
label.topmargin.mnemonic=T
|
label.bottommargin=\u5E95\u90E8\u908A\u8DDD(&B)
|
||||||
label.bottommargin=\u5E95\u90E8\u908A\u8DDD(B)
|
label.leftmargin=\u5DE6\u908A\u8DDD(&F)
|
||||||
label.bottommargin.mnemonic=B
|
label.rightmargin=\u53F3\u908A\u8DDD(&R)
|
||||||
label.leftmargin=\u5DE6\u908A\u8DDD(F)
|
|
||||||
label.leftmargin.mnemonic=F
|
|
||||||
label.rightmargin=\u53F3\u908A\u8DDD(R)
|
|
||||||
label.rightmargin.mnemonic=R
|
|
||||||
#
|
#
|
||||||
radiobutton.color=\u984F\u8272(C)
|
radiobutton.color=\u984F\u8272(&C)
|
||||||
radiobutton.color.mnemonic=C
|
radiobutton.draftq=\u8349\u7A3F(&F)
|
||||||
radiobutton.draftq=\u8349\u7A3F(F)
|
radiobutton.duplex=\u96D9\u9762\u5217\u5370(&D)
|
||||||
radiobutton.draftq.mnemonic=F
|
radiobutton.highq=\u9AD8(&H)
|
||||||
radiobutton.duplex=\u96D9\u9762\u5217\u5370(D)
|
radiobutton.landscape=\u6A6B\u5411(&L)
|
||||||
radiobutton.duplex.mnemonic=D
|
radiobutton.monochrome=\u55AE\u8272(&M)
|
||||||
radiobutton.highq=\u9AD8(H)
|
radiobutton.normalq=\u6B63\u5E38(&N)
|
||||||
radiobutton.highq.mnemonic=H
|
radiobutton.oneside=\u55AE\u9762(&O)
|
||||||
radiobutton.landscape=\u6A6B\u5411(L)
|
radiobutton.portrait=\u76F4\u5411(&P)
|
||||||
radiobutton.landscape.mnemonic=L
|
radiobutton.rangeall=\u5168\u90E8(&L)
|
||||||
radiobutton.monochrome=\u55AE\u8272(M)
|
radiobutton.rangepages=\u9801\u9762(&E)
|
||||||
radiobutton.monochrome.mnemonic=M
|
radiobutton.revlandscape=\u53CD\u5411\u6A6B\u5370(&N)
|
||||||
radiobutton.normalq=\u6B63\u5E38(N)
|
radiobutton.revportrait=\u53CD\u5411\u76F4\u5370(&I)
|
||||||
radiobutton.normalq.mnemonic=N
|
radiobutton.tumble=\u7FFB\u8F49(&T)
|
||||||
radiobutton.oneside=\u55AE\u9762(O)
|
|
||||||
radiobutton.oneside.mnemonic=O
|
|
||||||
radiobutton.portrait=\u76F4\u5411(P)
|
|
||||||
radiobutton.portrait.mnemonic=P
|
|
||||||
radiobutton.rangeall=\u5168\u90E8(L)
|
|
||||||
radiobutton.rangeall.mnemonic=L
|
|
||||||
radiobutton.rangepages=\u9801\u9762(E)
|
|
||||||
radiobutton.rangepages.mnemonic=E
|
|
||||||
radiobutton.revlandscape=\u53CD\u5411\u6A6B\u5370(N)
|
|
||||||
radiobutton.revlandscape.mnemonic=N
|
|
||||||
radiobutton.revportrait=\u53CD\u5411\u76F4\u5370(I)
|
|
||||||
radiobutton.revportrait.mnemonic=I
|
|
||||||
radiobutton.tumble=\u7FFB\u8F49(T)
|
|
||||||
radiobutton.tumble.mnemonic=T
|
|
||||||
# The vkMnemonics correspond with the constants defined in KeyEvent, eg
|
# The vkMnemonics correspond with the constants defined in KeyEvent, eg
|
||||||
# 65 = KeyEvent.VK_A
|
# 65 = KeyEvent.VK_A
|
||||||
tab.appearance=\u5916\u89C0(A)
|
tab.appearance=\u5916\u89C0(&A)
|
||||||
tab.appearance.vkMnemonic=65
|
tab.general=\u4E00\u822C(&G)
|
||||||
tab.general=\u4E00\u822C(G)
|
tab.pagesetup=\u9801\u9762\u8A2D\u5B9A(&S)
|
||||||
tab.general.vkMnemonic=71
|
|
||||||
tab.pagesetup=\u9801\u9762\u8A2D\u5B9A(S)
|
|
||||||
tab.pagesetup.vkMnemonic=83
|
|
||||||
#
|
#
|
||||||
error.pagerange=\u7121\u6548\u7684\u9801\u9762\u7BC4\u570D; \u8ACB\u91CD\u65B0\u8F38\u5165\u6578\u503C (\u4F8B\u5982 1-3,5,7-10)
|
error.pagerange=\u7121\u6548\u7684\u9801\u9762\u7BC4\u570D; \u8ACB\u91CD\u65B0\u8F38\u5165\u6578\u503C (\u4F8B\u5982 1-3,5,7-10)
|
||||||
error.destination=\u7121\u6548\u7684\u6A94\u540D; \u8ACB\u518D\u8A66\u4E00\u6B21
|
error.destination=\u7121\u6548\u7684\u6A94\u540D; \u8ACB\u518D\u8A66\u4E00\u6B21
|
||||||
|
|
|
@ -1,70 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (c) 1998, 2006, Oracle and/or its affiliates. All rights reserved.
|
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
||||||
*
|
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
|
||||||
* under the terms of the GNU General Public License version 2 only, as
|
|
||||||
* published by the Free Software Foundation. Oracle designates this
|
|
||||||
* particular file as subject to the "Classpath" exception as provided
|
|
||||||
* by Oracle in the LICENSE file that accompanied this code.
|
|
||||||
*
|
|
||||||
* This code 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 General Public License
|
|
||||||
* version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
* accompanied this code).
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License version
|
|
||||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
*
|
|
||||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
* or visit www.oracle.com if you need additional information or have any
|
|
||||||
* questions.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package sun.security.action;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* A convenience class for loading a system library as a privileged action.
|
|
||||||
*
|
|
||||||
* <p>An instance of this class can be used as the argument of
|
|
||||||
* <code>AccessController.doPrivileged</code>.
|
|
||||||
*
|
|
||||||
* <p>The following code attempts to load the system library named
|
|
||||||
* <code>"lib"</code> as a privileged action: <p>
|
|
||||||
*
|
|
||||||
* <pre>
|
|
||||||
* java.security.AccessController.doPrivileged(new LoadLibraryAction("lib"));
|
|
||||||
* </pre>
|
|
||||||
*
|
|
||||||
* @author Roland Schemers
|
|
||||||
* @see java.security.PrivilegedAction
|
|
||||||
* @see java.security.AccessController
|
|
||||||
* @since 1.2
|
|
||||||
*/
|
|
||||||
|
|
||||||
public class LoadLibraryAction implements java.security.PrivilegedAction<Void> {
|
|
||||||
private String theLib;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor that takes the name of the system library that needs to be
|
|
||||||
* loaded.
|
|
||||||
*
|
|
||||||
* <p>The manner in which a library name is mapped to the
|
|
||||||
* actual system library is system dependent.
|
|
||||||
*
|
|
||||||
* @param theLib the name of the library.
|
|
||||||
*/
|
|
||||||
public LoadLibraryAction(String theLib) {
|
|
||||||
this.theLib = theLib;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Loads the system library whose name was specified in the constructor.
|
|
||||||
*/
|
|
||||||
public Void run() {
|
|
||||||
System.loadLibrary(theLib);
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -90,7 +90,7 @@ public final class SunNativeProvider extends Provider {
|
||||||
"libgssapi_krb5.so",
|
"libgssapi_krb5.so",
|
||||||
"libgssapi_krb5.so.2",
|
"libgssapi_krb5.so.2",
|
||||||
};
|
};
|
||||||
} else if (osname.startsWith("Mac OS X")) {
|
} else if (osname.contains("OS X")) {
|
||||||
gssLibs = new String[]{
|
gssLibs = new String[]{
|
||||||
"/usr/lib/sasl2/libgssapiv2.2.so",
|
"/usr/lib/sasl2/libgssapiv2.2.so",
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -737,7 +737,7 @@ public class Config {
|
||||||
}
|
}
|
||||||
} else if (osname.startsWith("SunOS")) {
|
} else if (osname.startsWith("SunOS")) {
|
||||||
name = "/etc/krb5/krb5.conf";
|
name = "/etc/krb5/krb5.conf";
|
||||||
} else if (osname.startsWith("Mac")) {
|
} else if (osname.contains("OS X")) {
|
||||||
if (isMacosLionOrBetter()) return "";
|
if (isMacosLionOrBetter()) return "";
|
||||||
name = findMacosConfigFile();
|
name = findMacosConfigFile();
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -289,7 +289,7 @@ public class Credentials {
|
||||||
String os = java.security.AccessController.doPrivileged(
|
String os = java.security.AccessController.doPrivileged(
|
||||||
new sun.security.action.GetPropertyAction("os.name"));
|
new sun.security.action.GetPropertyAction("os.name"));
|
||||||
if (os.toUpperCase(Locale.ENGLISH).startsWith("WINDOWS") ||
|
if (os.toUpperCase(Locale.ENGLISH).startsWith("WINDOWS") ||
|
||||||
os.toUpperCase(Locale.ENGLISH).startsWith("MAC")) {
|
os.toUpperCase(Locale.ENGLISH).contains("OS X")) {
|
||||||
Credentials creds = acquireDefaultCreds();
|
Credentials creds = acquireDefaultCreds();
|
||||||
if (creds == null) {
|
if (creds == null) {
|
||||||
if (DEBUG) {
|
if (DEBUG) {
|
||||||
|
@ -478,7 +478,7 @@ public class Credentials {
|
||||||
java.security.AccessController.doPrivileged(
|
java.security.AccessController.doPrivileged(
|
||||||
new java.security.PrivilegedAction<Void> () {
|
new java.security.PrivilegedAction<Void> () {
|
||||||
public Void run() {
|
public Void run() {
|
||||||
if (System.getProperty("os.name").startsWith("Mac")) {
|
if (System.getProperty("os.name").contains("OS X")) {
|
||||||
System.loadLibrary("osxkrb5");
|
System.loadLibrary("osxkrb5");
|
||||||
} else {
|
} else {
|
||||||
System.loadLibrary("w2k_lsa_auth");
|
System.loadLibrary("w2k_lsa_auth");
|
||||||
|
|
|
@ -36,7 +36,13 @@ public class SCDynamicStoreConfig {
|
||||||
private static native Hashtable<String, Object> getKerberosConfig();
|
private static native Hashtable<String, Object> getKerberosConfig();
|
||||||
|
|
||||||
static {
|
static {
|
||||||
java.security.AccessController.doPrivileged(new sun.security.action.LoadLibraryAction("osx"));
|
java.security.AccessController.doPrivileged(
|
||||||
|
new java.security.PrivilegedAction<Void>() {
|
||||||
|
public Void run() {
|
||||||
|
System.loadLibrary("osx");
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
});
|
||||||
installNotificationCallback();
|
installNotificationCallback();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2006, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -95,7 +95,8 @@ final class ByteArrayAccess {
|
||||||
private static boolean unaligned() {
|
private static boolean unaligned() {
|
||||||
String arch = java.security.AccessController.doPrivileged
|
String arch = java.security.AccessController.doPrivileged
|
||||||
(new sun.security.action.GetPropertyAction("os.arch", ""));
|
(new sun.security.action.GetPropertyAction("os.arch", ""));
|
||||||
return arch.equals("i386") || arch.equals("x86") || arch.equals("amd64");
|
return arch.equals("i386") || arch.equals("x86") || arch.equals("amd64")
|
||||||
|
|| arch.equals("x86_64");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue