提交 c09c4b30 编写于 作者: L lana

Merge

...@@ -127,3 +127,10 @@ f097ca2434b1412b12ab4a5c2397ce271bf681e7 jdk7-b147 ...@@ -127,3 +127,10 @@ f097ca2434b1412b12ab4a5c2397ce271bf681e7 jdk7-b147
7989ee9fe673a87f4db3917fa6a005732a6a9b85 jdk8-b03 7989ee9fe673a87f4db3917fa6a005732a6a9b85 jdk8-b03
fc569517f3cf242f90ce3503b743eb5553938946 jdk8-b04 fc569517f3cf242f90ce3503b743eb5553938946 jdk8-b04
0b32369b83d81c226a2e79e730f3a8c0d2595e92 jdk8-b05 0b32369b83d81c226a2e79e730f3a8c0d2595e92 jdk8-b05
bdb870cc269ef8b221d17a217be89092400b59d2 jdk8-b06
19f0a3db863cc491affc78b48c4a81a6679b2433 jdk8-b07
1c023bcd0c5a01ac07bc7eea728aafbb0d8991e9 jdk8-b08
f1ec21b8142168ff40f3278d2f6b5fe4bd5f3b26 jdk8-b09
4788745572ef2bde34924ef34e7e4d55ba07e979 jdk8-b10
7ab0d613cd1a271a9763ffb894dc1f0a5b95a7e4 jdk8-b11
09fd2067f715e4505c44b01c301258a4e8f8964e jdk8-b12
# #
# Copyright (c) 2005, 2007, Oracle and/or its affiliates. All rights reserved. # Copyright (c) 2005, 2011, 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
...@@ -26,6 +26,8 @@ ...@@ -26,6 +26,8 @@
BUILDDIR = ../../../.. BUILDDIR = ../../../..
PACKAGE = com.sun.net.httpserver PACKAGE = com.sun.net.httpserver
PRODUCT = sun PRODUCT = sun
JAVAC_MAX_WARNINGS = true
JAVAC_WARNINGS_FATAL = true
include $(BUILDDIR)/common/Defs.gmk include $(BUILDDIR)/common/Defs.gmk
# #
......
...@@ -26,6 +26,9 @@ ...@@ -26,6 +26,9 @@
BUILDDIR = ../../../.. BUILDDIR = ../../../..
PACKAGE = com.sun.net.ssl PACKAGE = com.sun.net.ssl
PRODUCT = sun PRODUCT = sun
JAVAC_LINT_OPTIONS=-Xlint:all,-deprecation
JAVAC_MAX_WARNINGS = true
JAVAC_WARNINGS_FATAL = true
include $(BUILDDIR)/common/Defs.gmk include $(BUILDDIR)/common/Defs.gmk
# #
......
...@@ -30,6 +30,8 @@ ...@@ -30,6 +30,8 @@
BUILDDIR = ../../../../.. BUILDDIR = ../../../../..
PACKAGE = com.sun.org.apache.xml PACKAGE = com.sun.org.apache.xml
PRODUCT = xml PRODUCT = xml
JAVAC_MAX_WARNINGS = true
JAVAC_WARNINGS_FATAL = true
include $(BUILDDIR)/common/Defs.gmk include $(BUILDDIR)/common/Defs.gmk
# #
......
...@@ -78,7 +78,3 @@ endif # linux ...@@ -78,7 +78,3 @@ endif # linux
# #
include $(BUILDDIR)/common/Library.gmk include $(BUILDDIR)/common/Library.gmk
#
# JVMDI implementation lives in the VM.
#
OTHER_LDLIBS = $(JVMLIB)
...@@ -74,6 +74,57 @@ SCRIPT_SUFFIX = ...@@ -74,6 +74,57 @@ SCRIPT_SUFFIX =
CC_OBJECT_OUTPUT_FLAG = -o #trailing blank required! CC_OBJECT_OUTPUT_FLAG = -o #trailing blank required!
CC_PROGRAM_OUTPUT_FLAG = -o #trailing blank required! CC_PROGRAM_OUTPUT_FLAG = -o #trailing blank required!
# Default OBJCOPY comes from GNU Binutils on Linux:
DEF_OBJCOPY=/usr/bin/objcopy
ifdef CROSS_COMPILE_ARCH
# don't try to generate .debuginfo files when cross compiling
_JUNK_ := $(shell \
echo >&2 "INFO: cross compiling for ARCH $(CROSS_COMPILE_ARCH)," \
"skipping .debuginfo generation.")
OBJCOPY=
else
OBJCOPY=$(shell test -x $(DEF_OBJCOPY) && echo $(DEF_OBJCOPY))
ifneq ($(ALT_OBJCOPY),)
_JUNK_ := $(shell echo >&2 "INFO: ALT_OBJCOPY=$(ALT_OBJCOPY)")
# disable .debuginfo support by setting ALT_OBJCOPY to a non-existent path
OBJCOPY=$(shell test -x $(ALT_OBJCOPY) && echo $(ALT_OBJCOPY))
endif
endif
ifdef LIBRARY_SUPPORTS_FULL_DEBUG_SYMBOLS
# The setting of OBJCOPY above enables the JDK build to import
# .debuginfo files from the HotSpot build. However, adding FDS
# support to the JDK build will occur in phases so a different
# make variable is used to indicate that a particular library
# supports FDS.
ifeq ($(OBJCOPY),)
_JUNK_ := $(shell \
echo >&2 "INFO: no objcopy cmd found so cannot create .debuginfo files.")
else
_JUNK_ := $(shell \
echo >&2 "INFO: $(OBJCOPY) cmd found so will create .debuginfo files.")
# Library stripping policies for .debuginfo configs:
# all_strip - strips everything from the library
# min_strip - strips most stuff from the library; leaves minimum symbols
# no_strip - does not strip the library at all
#
# Oracle security policy requires "all_strip". A waiver was granted on
# 2011.09.01 that permits using "min_strip" in the Java JDK and Java JRE.
#
DEF_STRIP_POLICY="min_strip"
ifeq ($(ALT_STRIP_POLICY),)
STRIP_POLICY=$(DEF_STRIP_POLICY)
else
STRIP_POLICY=$(ALT_STRIP_POLICY)
endif
_JUNK_ := $(shell \
echo >&2 "INFO: STRIP_POLICY=$(STRIP_POLICY)")
endif
endif
# #
# Default optimization # Default optimization
# #
...@@ -322,6 +373,7 @@ endif ...@@ -322,6 +373,7 @@ endif
override LIBPOSIX4 = override LIBPOSIX4 =
override LIBSOCKET = override LIBSOCKET =
override LIBNSL = override LIBNSL =
override LIBSCF =
override LIBTHREAD = override LIBTHREAD =
override MOOT_PRIORITIES = true override MOOT_PRIORITIES = true
override NO_INTERRUPTIBLE_IO = true override NO_INTERRUPTIBLE_IO = true
...@@ -359,6 +411,7 @@ JA_TARGET_ENCODINGS = UTF-8 ...@@ -359,6 +411,7 @@ JA_TARGET_ENCODINGS = UTF-8
# Settings for the JDI - Serviceability Agent binding. # Settings for the JDI - Serviceability Agent binding.
HOTSPOT_SALIB_PATH = $(HOTSPOT_IMPORT_PATH)/jre/lib/$(LIBARCH) HOTSPOT_SALIB_PATH = $(HOTSPOT_IMPORT_PATH)/jre/lib/$(LIBARCH)
SALIB_NAME = $(LIB_PREFIX)saproc.$(LIBRARY_SUFFIX) SALIB_NAME = $(LIB_PREFIX)saproc.$(LIBRARY_SUFFIX)
SA_DEBUGINFO_NAME = $(LIB_PREFIX)saproc.debuginfo
# The JDI - Serviceability Agent binding is not currently supported # The JDI - Serviceability Agent binding is not currently supported
# on Linux-ia64. # on Linux-ia64.
......
...@@ -74,6 +74,69 @@ SCRIPT_SUFFIX = ...@@ -74,6 +74,69 @@ SCRIPT_SUFFIX =
CC_OBJECT_OUTPUT_FLAG = -o #trailing blank required! CC_OBJECT_OUTPUT_FLAG = -o #trailing blank required!
CC_PROGRAM_OUTPUT_FLAG = -o #trailing blank required! CC_PROGRAM_OUTPUT_FLAG = -o #trailing blank required!
ifdef ENABLE_FULL_DEBUG_SYMBOLS
# Only check for Full Debug Symbols support on Solaris if it is
# specifically enabled. Hopefully, it can be enabled by default
# once the .debuginfo size issues are worked out.
# Default OBJCOPY comes from the SUNWbinutils package:
DEF_OBJCOPY=/usr/sfw/bin/gobjcopy
ifeq ($(PLATFORM)-$(LIBARCH), solaris-amd64)
# On Solaris AMD64/X64, gobjcopy is not happy and fails:
#
# usr/sfw/bin/gobjcopy --add-gnu-debuglink=<lib>.debuginfo <lib>.so
# BFD: stKPaiop: Not enough room for program headers, try linking with -N
# /usr/sfw/bin/gobjcopy: stKPaiop: Bad value
# BFD: stKPaiop: Not enough room for program headers, try linking with -N
# /usr/sfw/bin/gobjcopy: libsaproc.debuginfo: Bad value
# BFD: stKPaiop: Not enough room for program headers, try linking with -N
# /usr/sfw/bin/gobjcopy: stKPaiop: Bad value
_JUNK_ := $(shell \
echo >&2 "INFO: $(DEF_OBJCOPY) is not working on Solaris AMD64/X64")
OBJCOPY=
else
OBJCOPY=$(shell test -x $(DEF_OBJCOPY) && echo $(DEF_OBJCOPY))
ifneq ($(ALT_OBJCOPY),)
_JUNK_ := $(shell echo >&2 "INFO: ALT_OBJCOPY=$(ALT_OBJCOPY)")
# disable .debuginfo support by setting ALT_OBJCOPY to a non-existent path
OBJCOPY=$(shell test -x $(ALT_OBJCOPY) && echo $(ALT_OBJCOPY))
endif
endif
ifdef LIBRARY_SUPPORTS_FULL_DEBUG_SYMBOLS
# The setting of OBJCOPY above enables the JDK build to import
# .debuginfo files from the HotSpot build. However, adding FDS
# support to the JDK build will occur in phases so a different
# make variable is used to indicate that a particular library
# supports FDS.
ifeq ($(OBJCOPY),)
_JUNK_ := $(shell \
echo >&2 "INFO: no objcopy cmd found so cannot create .debuginfo files.")
else
_JUNK_ := $(shell \
echo >&2 "INFO: $(OBJCOPY) cmd found so will create .debuginfo files.")
# Library stripping policies for .debuginfo configs:
# all_strip - strips everything from the library
# min_strip - strips most stuff from the library; leaves minimum symbols
# no_strip - does not strip the library at all
#
# Oracle security policy requires "all_strip". A waiver was granted on
# 2011.09.01 that permits using "min_strip" in the Java JDK and Java JRE.
#
DEF_STRIP_POLICY="min_strip"
ifeq ($(ALT_STRIP_POLICY),)
STRIP_POLICY=$(DEF_STRIP_POLICY)
else
STRIP_POLICY=$(ALT_STRIP_POLICY)
endif
_JUNK_ := $(shell \
echo >&2 "INFO: STRIP_POLICY=$(STRIP_POLICY)")
endif
endif
endif
# #
# Java default optimization (-x04/-O2) etc. Applies to the VM. # Java default optimization (-x04/-O2) etc. Applies to the VM.
# #
...@@ -648,6 +711,9 @@ LIBSOCKET = -lsocket ...@@ -648,6 +711,9 @@ LIBSOCKET = -lsocket
# Network Services library # Network Services library
LIBNSL = -lnsl LIBNSL = -lnsl
# service configuration facility library
LIBSCF = -lscf
# GLOBAL_KPIC: If set means all libraries are PIC, position independent code # GLOBAL_KPIC: If set means all libraries are PIC, position independent code
# EXCEPT for select compiles # EXCEPT for select compiles
# If a .o file is compiled non-PIC then it should be forced # If a .o file is compiled non-PIC then it should be forced
...@@ -684,5 +750,6 @@ JA_TARGET_ENCODINGS = eucJP UTF-8 PCK ...@@ -684,5 +750,6 @@ JA_TARGET_ENCODINGS = eucJP UTF-8 PCK
# Settings for the JDI - Serviceability Agent binding. # Settings for the JDI - Serviceability Agent binding.
HOTSPOT_SALIB_PATH = $(HOTSPOT_IMPORT_PATH)/jre/lib/$(LIBARCH) HOTSPOT_SALIB_PATH = $(HOTSPOT_IMPORT_PATH)/jre/lib/$(LIBARCH)
SALIB_NAME = $(LIB_PREFIX)saproc.$(LIBRARY_SUFFIX) SALIB_NAME = $(LIB_PREFIX)saproc.$(LIBRARY_SUFFIX)
SA_DEBUGINFO_NAME = $(LIB_PREFIX)saproc.debuginfo
INCLUDE_SA=true INCLUDE_SA=true
...@@ -220,14 +220,30 @@ JDK_LOCALES = ja zh_CN ...@@ -220,14 +220,30 @@ JDK_LOCALES = ja zh_CN
JRE_NONEXIST_LOCALES = en en_US de_DE es_ES fr_FR it_IT ja_JP ko_KR sv_SE zh JRE_NONEXIST_LOCALES = en en_US de_DE es_ES fr_FR it_IT ja_JP ko_KR sv_SE zh
# #
# All libraries except libjava and libjvm itself link against libjvm and # For now, most libraries except libjava and libjvm itself link against libjvm
# libjava, the latter for its exported common utilities. libjava only links # and libjava, the latter for its exported common utilities. libjava only
# against libjvm. Programs' makefiles take their own responsibility for # links against libjvm. Programs' makefiles take their own responsibility for
# adding other libs. # adding other libs.
# #
# The makefiles for these packages do not link against libjvm and libjava.
# This list will eventually go away and each Programs' makefiles
# will have to explicitly declare that they want to link to libjava/libjvm
#
NO_JAVALIB_PKGS = \
sun.security.mscapi \
sun.security.krb5 \
sun.security.pkcs11 \
sun.security.jgss \
sun.security.jgss.wrapper \
sun.security.ec \
sun.security.smartcardio \
com.sun.security.auth.module
ifdef PACKAGE ifdef PACKAGE
# put JAVALIB first, but do not lose any platform specific values.... # put JAVALIB first, but do not lose any platform specific values....
LDLIBS_COMMON = $(JAVALIB) ifeq (,$(findstring $(PACKAGE),$(NO_JAVALIB_PKGS)))
LDLIBS_COMMON = $(JAVALIB)
endif
endif # PACKAGE endif # PACKAGE
# #
......
...@@ -165,7 +165,7 @@ $(ACTUAL_LIBRARY):: $(OBJDIR)/$(LIBRARY).lcf ...@@ -165,7 +165,7 @@ $(ACTUAL_LIBRARY):: $(OBJDIR)/$(LIBRARY).lcf
$(LINK) -dll -out:$(OBJDIR)/$(@F) \ $(LINK) -dll -out:$(OBJDIR)/$(@F) \
-map:$(OBJDIR)/$(LIBRARY).map \ -map:$(OBJDIR)/$(LIBRARY).map \
$(LFLAGS) @$(OBJDIR)/$(LIBRARY).lcf \ $(LFLAGS) @$(OBJDIR)/$(LIBRARY).lcf \
$(OTHER_LCF) $(JAVALIB) $(LDLIBS) $(OTHER_LCF) $(LDLIBS)
$(CP) $(OBJDIR)/$(@F) $@ $(CP) $(OBJDIR)/$(@F) $@
@$(call binary_file_verification,$@) @$(call binary_file_verification,$@)
$(CP) $(OBJDIR)/$(LIBRARY).map $(@D) $(CP) $(OBJDIR)/$(LIBRARY).map $(@D)
......
...@@ -208,7 +208,6 @@ JAVA_JAVA_java = \ ...@@ -208,7 +208,6 @@ JAVA_JAVA_java = \
java/util/Observable.java \ java/util/Observable.java \
java/util/Observer.java \ java/util/Observer.java \
java/util/Properties.java \ java/util/Properties.java \
java/util/XMLUtils.java \
java/util/InvalidPropertiesFormatException.java \ java/util/InvalidPropertiesFormatException.java \
java/util/PropertyPermission.java \ java/util/PropertyPermission.java \
java/util/PropertyResourceBundle.java \ java/util/PropertyResourceBundle.java \
......
...@@ -208,7 +208,7 @@ OTHER_LDLIBS += $(JVMLIB) -libpath:$(OBJDIR)/../../../fdlibm/$(OBJDIRNAME) fdlib ...@@ -208,7 +208,7 @@ OTHER_LDLIBS += $(JVMLIB) -libpath:$(OBJDIR)/../../../fdlibm/$(OBJDIRNAME) fdlib
-libpath:$(OBJDIR)/../../../verify/$(OBJDIRNAME) verify.lib \ -libpath:$(OBJDIR)/../../../verify/$(OBJDIRNAME) verify.lib \
shell32.lib delayimp.lib /DELAYLOAD:shell32.dll shell32.lib delayimp.lib /DELAYLOAD:shell32.dll
else else
OTHER_LDLIBS += $(JVMLIB) -lverify $(LIBSOCKET) $(LIBNSL) -ldl \ OTHER_LDLIBS += $(JVMLIB) -lverify $(LIBSOCKET) $(LIBNSL) $(LIBSCF) -ldl \
-L$(OBJDIR)/../../../fdlibm/$(OBJDIRNAME) -lfdlibm.$(ARCH) -L$(OBJDIR)/../../../fdlibm/$(OBJDIRNAME) -lfdlibm.$(ARCH)
endif endif
......
...@@ -90,7 +90,6 @@ SUNWprivate_1.1 { ...@@ -90,7 +90,6 @@ SUNWprivate_1.1 {
Java_java_io_FileSystem_getFileSystem; Java_java_io_FileSystem_getFileSystem;
Java_java_io_ObjectInputStream_bytesToDoubles; Java_java_io_ObjectInputStream_bytesToDoubles;
Java_java_io_ObjectInputStream_bytesToFloats; Java_java_io_ObjectInputStream_bytesToFloats;
Java_java_io_ObjectInputStream_latestUserDefinedLoader;
Java_java_io_ObjectOutputStream_doublesToBytes; Java_java_io_ObjectOutputStream_doublesToBytes;
Java_java_io_ObjectOutputStream_floatsToBytes; Java_java_io_ObjectOutputStream_floatsToBytes;
Java_java_io_ObjectStreamClass_hasStaticInitializer; Java_java_io_ObjectStreamClass_hasStaticInitializer;
...@@ -275,6 +274,7 @@ SUNWprivate_1.1 { ...@@ -275,6 +274,7 @@ SUNWprivate_1.1 {
Java_sun_misc_Version_getJvmVersionInfo; Java_sun_misc_Version_getJvmVersionInfo;
Java_sun_misc_Version_getJvmSpecialVersion; Java_sun_misc_Version_getJvmSpecialVersion;
Java_sun_misc_VM_getThreadStateValues; Java_sun_misc_VM_getThreadStateValues;
Java_sun_misc_VM_latestUserDefinedLoader;
Java_sun_misc_VM_initialize; Java_sun_misc_VM_initialize;
Java_sun_misc_VMSupport_initAgentProperties; Java_sun_misc_VMSupport_initAgentProperties;
......
...@@ -27,6 +27,9 @@ BUILDDIR = ../.. ...@@ -27,6 +27,9 @@ BUILDDIR = ../..
PACKAGE = java.net PACKAGE = java.net
LIBRARY = net LIBRARY = net
PRODUCT = sun PRODUCT = sun
JAVAC_MAX_WARNINGS = true
JAVAC_WARNINGS_FATAL = true
JAVAC_LINT_OPTIONS = -Xlint:all,-deprecation
include $(BUILDDIR)/common/Defs.gmk include $(BUILDDIR)/common/Defs.gmk
# #
......
...@@ -206,7 +206,6 @@ FILES_java += \ ...@@ -206,7 +206,6 @@ FILES_java += \
sun/nio/fs/LinuxUserDefinedFileAttributeView.java \ sun/nio/fs/LinuxUserDefinedFileAttributeView.java \
sun/nio/fs/LinuxNativeDispatcher.java \ sun/nio/fs/LinuxNativeDispatcher.java \
sun/nio/fs/LinuxWatchService.java \ sun/nio/fs/LinuxWatchService.java \
sun/nio/fs/PollingWatchService.java \
sun/nio/fs/UnixChannelFactory.java \ sun/nio/fs/UnixChannelFactory.java \
sun/nio/fs/UnixCopyFile.java \ sun/nio/fs/UnixCopyFile.java \
sun/nio/fs/UnixDirectoryStream.java \ sun/nio/fs/UnixDirectoryStream.java \
......
...@@ -58,6 +58,11 @@ LIBJSIG_NAME = $(LIB_PREFIX)jsig.$(LIBRARY_SUFFIX) ...@@ -58,6 +58,11 @@ LIBJSIG_NAME = $(LIB_PREFIX)jsig.$(LIBRARY_SUFFIX)
JVMDB_NAME = $(LIB_PREFIX)jvm$(DB_SUFFIX).$(LIBRARY_SUFFIX) JVMDB_NAME = $(LIB_PREFIX)jvm$(DB_SUFFIX).$(LIBRARY_SUFFIX)
JVMDTRACE_NAME = $(LIB_PREFIX)jvm$(DTRACE_SUFFIX).$(LIBRARY_SUFFIX) JVMDTRACE_NAME = $(LIB_PREFIX)jvm$(DTRACE_SUFFIX).$(LIBRARY_SUFFIX)
JVM_DEBUGINFO_NAME = $(LIB_PREFIX)jvm.debuginfo
LIBJSIG_DEBUGINFO_NAME = $(LIB_PREFIX)jsig.debuginfo
JVMDB_DEBUGINFO_NAME = $(LIB_PREFIX)jvm$(DB_SUFFIX).debuginfo
JVMDTRACE_DEBUGINFO_NAME = $(LIB_PREFIX)jvm$(DTRACE_SUFFIX).debuginfo
CLASSSHARINGDATA_DIR = $(BUILDDIR)/tools/sharing CLASSSHARINGDATA_DIR = $(BUILDDIR)/tools/sharing
# Needed to do file copy # Needed to do file copy
...@@ -79,6 +84,12 @@ INTERNAL_IMPORT_LIST = $(LIBDIR)/classlist ...@@ -79,6 +84,12 @@ INTERNAL_IMPORT_LIST = $(LIBDIR)/classlist
ifndef BUILD_CLIENT_ONLY ifndef BUILD_CLIENT_ONLY
IMPORT_LIST = $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVM_NAME) \ IMPORT_LIST = $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVM_NAME) \
$(LIB_LOCATION)/$(SERVER_LOCATION)/Xusage.txt $(LIB_LOCATION)/$(SERVER_LOCATION)/Xusage.txt
ifneq ($(OBJCOPY),)
# the import JDK may not contain .debuginfo files
ifneq ($(wildcard $(HOTSPOT_SERVER_PATH)/$(JVM_DEBUGINFO_NAME)),)
IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVM_DEBUGINFO_NAME)
endif
endif
else else
IMPORT_LIST = IMPORT_LIST =
endif endif
...@@ -88,6 +99,12 @@ ifneq ($(ZERO_BUILD), true) ...@@ -88,6 +99,12 @@ ifneq ($(ZERO_BUILD), true)
ifeq ($(ARCH_DATA_MODEL), 32) ifeq ($(ARCH_DATA_MODEL), 32)
IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVM_NAME) \ IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVM_NAME) \
$(LIB_LOCATION)/$(CLIENT_LOCATION)/Xusage.txt $(LIB_LOCATION)/$(CLIENT_LOCATION)/Xusage.txt
ifneq ($(OBJCOPY),)
# the import JDK may not contain .debuginfo files
ifneq ($(wildcard $(HOTSPOT_CLIENT_PATH)/$(JVM_DEBUGINFO_NAME)),)
IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVM_DEBUGINFO_NAME)
endif
endif
endif endif
endif endif
...@@ -157,16 +174,40 @@ else # PLATFORM ...@@ -157,16 +174,40 @@ else # PLATFORM
# NOT Windows vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv NOT Windows # NOT Windows vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv NOT Windows
IMPORT_LIST += $(LIB_LOCATION)/$(LIBJSIG_NAME) IMPORT_LIST += $(LIB_LOCATION)/$(LIBJSIG_NAME)
ifneq ($(OBJCOPY),)
# the import JDK may not contain .debuginfo files
ifneq ($(wildcard $(HOTSPOT_IMPORT_PATH)/$(ARCH_VM_SUBDIR)/$(LIBJSIG_DEBUGINFO_NAME)),)
IMPORT_LIST += $(LIB_LOCATION)/$(LIBJSIG_DEBUGINFO_NAME)
endif
endif
ifndef BUILD_CLIENT_ONLY ifndef BUILD_CLIENT_ONLY
IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/$(LIBJSIG_NAME) IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/$(LIBJSIG_NAME)
ifneq ($(OBJCOPY),)
# the import JDK may not contain the target of the symlink
ifneq ($(wildcard $(HOTSPOT_IMPORT_PATH)/$(ARCH_VM_SUBDIR)/$(LIBJSIG_DEBUGINFO_NAME)),)
IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/$(LIBJSIG_DEBUGINFO_NAME)
endif
endif
endif endif
ifeq ($(PLATFORM), solaris) ifeq ($(PLATFORM), solaris)
ifndef BUILD_CLIENT_ONLY ifndef BUILD_CLIENT_ONLY
IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMDB_NAME) IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMDB_NAME)
ifneq ($(OBJCOPY),)
# the import JDK may not contain .debuginfo files
ifneq ($(wildcard $(HOTSPOT_SERVER_PATH)/$(JVMDB_DEBUGINFO_NAME)),)
IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMDB_DEBUGINFO_NAME)
endif
endif
# The conditional can be removed when import JDKs contain these files. # The conditional can be removed when import JDKs contain these files.
ifneq ($(wildcard $(HOTSPOT_SERVER_PATH)/$(JVMDTRACE_NAME)),) ifneq ($(wildcard $(HOTSPOT_SERVER_PATH)/$(JVMDTRACE_NAME)),)
IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMDTRACE_NAME) IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMDTRACE_NAME)
ifneq ($(OBJCOPY),)
# the import JDK may not contain .debuginfo files
ifneq ($(wildcard $(HOTSPOT_SERVER_PATH)/$(JVMDTRACE_DEBUGINFO_NAME)),)
IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMDTRACE_DEBUGINFO_NAME)
endif
endif
else else
$(warning WARNING: $(HOTSPOT_SERVER_PATH)/$(JVMDB_NAME) not found!) $(warning WARNING: $(HOTSPOT_SERVER_PATH)/$(JVMDB_NAME) not found!)
endif endif
...@@ -177,17 +218,37 @@ ifneq ($(ZERO_BUILD), true) ...@@ -177,17 +218,37 @@ ifneq ($(ZERO_BUILD), true)
ifeq ($(ARCH_DATA_MODEL), 32) ifeq ($(ARCH_DATA_MODEL), 32)
IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(LIBJSIG_NAME) IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(LIBJSIG_NAME)
ifneq ($(OBJCOPY),)
# the import JDK may not contain the target of the symlink
ifneq ($(wildcard $(HOTSPOT_IMPORT_PATH)/$(ARCH_VM_SUBDIR)/$(LIBJSIG_DEBUGINFO_NAME)),)
IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(LIBJSIG_DEBUGINFO_NAME)
endif
endif
ifeq ($(PLATFORM), solaris) ifeq ($(PLATFORM), solaris)
# solaris vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv solaris # solaris vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv solaris
IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVMDB_NAME) IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVMDB_NAME)
ifneq ($(OBJCOPY),)
# the import JDK may not contain .debuginfo files
ifneq ($(wildcard $(HOTSPOT_CLIENT_PATH)/$(JVMDB_DEBUGINFO_NAME)),)
IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVMDB_DEBUGINFO_NAME)
endif
endif
# The conditional can be removed when import JDKs contain these files. # The conditional can be removed when import JDKs contain these files.
ifneq ($(wildcard $(HOTSPOT_CLIENT_PATH)/$(JVMDTRACE_NAME)),) ifneq ($(wildcard $(HOTSPOT_CLIENT_PATH)/$(JVMDTRACE_NAME)),)
IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVMDTRACE_NAME) IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVMDTRACE_NAME)
IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/64/$(JVMDB_NAME) IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/64/$(JVMDB_NAME)
IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/64/$(JVMDTRACE_NAME) IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/64/$(JVMDTRACE_NAME)
ifneq ($(OBJCOPY),)
# the import JDK may not contain .debuginfo files
ifneq ($(wildcard $(HOTSPOT_CLIENT_PATH)/$(JVMDTRACE_DEBUGINFO_NAME)),)
IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVMDTRACE_DEBUGINFO_NAME)
IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/64/$(JVMDB_DEBUGINFO_NAME)
IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/64/$(JVMDTRACE_DEBUGINFO_NAME)
endif
endif
else else
$(warning WARNING: $(HOTSPOT_CLIENT_PATH)/$(JVMDTRACE_NAME) not found!) $(warning WARNING: $(HOTSPOT_CLIENT_PATH)/$(JVMDTRACE_NAME) not found!)
endif endif
...@@ -196,6 +257,12 @@ ifndef BUILD_CLIENT_ONLY ...@@ -196,6 +257,12 @@ ifndef BUILD_CLIENT_ONLY
# The conditional can be removed when import JDKs contain these files. # The conditional can be removed when import JDKs contain these files.
ifneq ($(wildcard $(HOTSPOT_SERVER_PATH)/64/$(JVMDB_NAME)),) ifneq ($(wildcard $(HOTSPOT_SERVER_PATH)/64/$(JVMDB_NAME)),)
IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/64/$(JVMDB_NAME) IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/64/$(JVMDB_NAME)
ifneq ($(OBJCOPY),)
# the import JDK may not contain .debuginfo files
ifneq ($(wildcard $(HOTSPOT_SERVER_PATH)/64/$(JVMDB_DEBUGINFO_NAME)),)
IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/64/$(JVMDB_DEBUGINFO_NAME)
endif
endif
else else
$(warning WARNING: $(HOTSPOT_SERVER_PATH)/64/$(JVMDB_NAME) not found!) $(warning WARNING: $(HOTSPOT_SERVER_PATH)/64/$(JVMDB_NAME) not found!)
endif endif
...@@ -203,6 +270,12 @@ ifndef BUILD_CLIENT_ONLY ...@@ -203,6 +270,12 @@ ifndef BUILD_CLIENT_ONLY
# The conditional can be removed when import JDKs contain these files. # The conditional can be removed when import JDKs contain these files.
ifneq ($(wildcard $(HOTSPOT_SERVER_PATH)/64/$(JVMDTRACE_NAME)),) ifneq ($(wildcard $(HOTSPOT_SERVER_PATH)/64/$(JVMDTRACE_NAME)),)
IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/64/$(JVMDTRACE_NAME) IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/64/$(JVMDTRACE_NAME)
ifneq ($(OBJCOPY),)
# the import JDK may not contain .debuginfo files
ifneq ($(wildcard $(HOTSPOT_SERVER_PATH)/64/$(JVMDTRACE_DEBUGINFO_NAME)),)
IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/64/$(JVMDTRACE_DEBUGINFO_NAME)
endif
endif
else else
$(warning WARNING: $(HOTSPOT_SERVER_PATH)/64/$(JVMDTRACE_NAME) not found!) $(warning WARNING: $(HOTSPOT_SERVER_PATH)/64/$(JVMDTRACE_NAME) not found!)
endif endif
...@@ -229,6 +302,11 @@ $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVM_NAME): $(HOTSPOT_CLIENT_PATH)/$(JVM_NAM ...@@ -229,6 +302,11 @@ $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVM_NAME): $(HOTSPOT_CLIENT_PATH)/$(JVM_NAM
$(install-import-file) $(install-import-file)
@$(call binary_file_verification,$@) @$(call binary_file_verification,$@)
ifneq ($(OBJCOPY),)
$(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVM_DEBUGINFO_NAME): $(HOTSPOT_CLIENT_PATH)/$(JVM_DEBUGINFO_NAME)
$(install-import-file)
endif
$(LIB_LOCATION)/$(KERNEL_LOCATION)/$(JVM_NAME): $(HOTSPOT_KERNEL_PATH)/$(JVM_NAME) $(LIB_LOCATION)/$(KERNEL_LOCATION)/$(JVM_NAME): $(HOTSPOT_KERNEL_PATH)/$(JVM_NAME)
$(install-file) $(install-file)
@$(call binary_file_verification,$@) @$(call binary_file_verification,$@)
...@@ -237,15 +315,33 @@ $(LIB_LOCATION)/$(LIBJSIG_NAME): $(HOTSPOT_IMPORT_PATH)/$(ARCH_VM_SUBDIR)/$(LIBJ ...@@ -237,15 +315,33 @@ $(LIB_LOCATION)/$(LIBJSIG_NAME): $(HOTSPOT_IMPORT_PATH)/$(ARCH_VM_SUBDIR)/$(LIBJ
$(install-import-file) $(install-import-file)
@$(call binary_file_verification,$@) @$(call binary_file_verification,$@)
ifneq ($(OBJCOPY),)
$(LIB_LOCATION)/$(LIBJSIG_DEBUGINFO_NAME): $(HOTSPOT_IMPORT_PATH)/$(ARCH_VM_SUBDIR)/$(LIBJSIG_DEBUGINFO_NAME)
$(install-import-file)
endif
ifndef BUILD_CLIENT_ONLY ifndef BUILD_CLIENT_ONLY
$(LIB_LOCATION)/$(CLIENT_LOCATION)/$(LIBJSIG_NAME) \ $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(LIBJSIG_NAME) \
$(LIB_LOCATION)/$(SERVER_LOCATION)/$(LIBJSIG_NAME): $(LIB_LOCATION)/$(SERVER_LOCATION)/$(LIBJSIG_NAME):
@$(prep-target) @$(prep-target)
$(call install-sym-link, ../$(LIBJSIG_NAME)) $(call install-sym-link, ../$(LIBJSIG_NAME))
ifneq ($(OBJCOPY),)
$(LIB_LOCATION)/$(CLIENT_LOCATION)/$(LIBJSIG_DEBUGINFO_NAME) \
$(LIB_LOCATION)/$(SERVER_LOCATION)/$(LIBJSIG_DEBUGINFO_NAME):
@$(prep-target)
$(call install-sym-link, ../$(LIBJSIG_DEBUGINFO_NAME))
endif
else else
$(LIB_LOCATION)/$(CLIENT_LOCATION)/$(LIBJSIG_NAME): $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(LIBJSIG_NAME):
@$(prep-target) @$(prep-target)
$(call install-sym-link, ../$(LIBJSIG_NAME)) $(call install-sym-link, ../$(LIBJSIG_NAME))
ifneq ($(OBJCOPY),)
$(LIB_LOCATION)/$(CLIENT_LOCATION)/$(LIBJSIG_DEBUGINFO_NAME):
@$(prep-target)
$(call install-sym-link, ../$(LIBJSIG_DEBUGINFO_NAME))
endif
endif endif
$(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVMDB_NAME): $(HOTSPOT_CLIENT_PATH)/$(JVMDB_NAME) $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVMDB_NAME): $(HOTSPOT_CLIENT_PATH)/$(JVMDB_NAME)
...@@ -256,6 +352,14 @@ $(LIB_LOCATION)/$(CLIENT_LOCATION)/64/$(JVMDB_NAME): $(HOTSPOT_CLIENT_PATH)/64/$ ...@@ -256,6 +352,14 @@ $(LIB_LOCATION)/$(CLIENT_LOCATION)/64/$(JVMDB_NAME): $(HOTSPOT_CLIENT_PATH)/64/$
$(install-import-file) $(install-import-file)
@$(call binary_file_verification,$@) @$(call binary_file_verification,$@)
ifneq ($(OBJCOPY),)
$(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVMDB_DEBUGINFO_NAME): $(HOTSPOT_CLIENT_PATH)/$(JVMDB_DEBUGINFO_NAME)
$(install-import-file)
$(LIB_LOCATION)/$(CLIENT_LOCATION)/64/$(JVMDB_DEBUGINFO_NAME): $(HOTSPOT_CLIENT_PATH)/64/$(JVMDB_DEBUGINFO_NAME)
$(install-import-file)
endif
ifndef BUILD_CLIENT_ONLY ifndef BUILD_CLIENT_ONLY
$(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMDB_NAME): $(HOTSPOT_SERVER_PATH)/$(JVMDB_NAME) $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMDB_NAME): $(HOTSPOT_SERVER_PATH)/$(JVMDB_NAME)
$(install-import-file) $(install-import-file)
...@@ -264,6 +368,14 @@ $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMDB_NAME): $(HOTSPOT_SERVER_PATH)/$(JVMDB ...@@ -264,6 +368,14 @@ $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMDB_NAME): $(HOTSPOT_SERVER_PATH)/$(JVMDB
$(LIB_LOCATION)/$(SERVER_LOCATION)/64/$(JVMDB_NAME): $(HOTSPOT_SERVER_PATH)/64/$(JVMDB_NAME) $(LIB_LOCATION)/$(SERVER_LOCATION)/64/$(JVMDB_NAME): $(HOTSPOT_SERVER_PATH)/64/$(JVMDB_NAME)
$(install-import-file) $(install-import-file)
@$(call binary_file_verification,$@) @$(call binary_file_verification,$@)
ifneq ($(OBJCOPY),)
$(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMDB_DEBUGINFO_NAME): $(HOTSPOT_SERVER_PATH)/$(JVMDB_DEBUGINFO_NAME)
$(install-import-file)
$(LIB_LOCATION)/$(SERVER_LOCATION)/64/$(JVMDB_DEBUGINFO_NAME): $(HOTSPOT_SERVER_PATH)/64/$(JVMDB_DEBUGINFO_NAME)
$(install-import-file)
endif
endif endif
$(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVMDTRACE_NAME): $(HOTSPOT_CLIENT_PATH)/$(JVMDTRACE_NAME) $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVMDTRACE_NAME): $(HOTSPOT_CLIENT_PATH)/$(JVMDTRACE_NAME)
...@@ -274,6 +386,14 @@ $(LIB_LOCATION)/$(CLIENT_LOCATION)/64/$(JVMDTRACE_NAME): $(HOTSPOT_CLIENT_PATH)/ ...@@ -274,6 +386,14 @@ $(LIB_LOCATION)/$(CLIENT_LOCATION)/64/$(JVMDTRACE_NAME): $(HOTSPOT_CLIENT_PATH)/
$(install-import-file) $(install-import-file)
@$(call binary_file_verification,$@) @$(call binary_file_verification,$@)
ifneq ($(OBJCOPY),)
$(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVMDTRACE_DEBUGINFO_NAME): $(HOTSPOT_CLIENT_PATH)/$(JVMDTRACE_DEBUGINFO_NAME)
$(install-import-file)
$(LIB_LOCATION)/$(CLIENT_LOCATION)/64/$(JVMDTRACE_DEBUGINFO_NAME): $(HOTSPOT_CLIENT_PATH)/64/$(JVMDTRACE_DEBUGINFO_NAME)
$(install-import-file)
endif
ifndef BUILD_CLIENT_ONLY ifndef BUILD_CLIENT_ONLY
$(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMDTRACE_NAME): $(HOTSPOT_SERVER_PATH)/$(JVMDTRACE_NAME) $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMDTRACE_NAME): $(HOTSPOT_SERVER_PATH)/$(JVMDTRACE_NAME)
$(install-import-file) $(install-import-file)
...@@ -287,6 +407,17 @@ $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVM_NAME): $(HOTSPOT_SERVER_PATH)/$(JVM_NAM ...@@ -287,6 +407,17 @@ $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVM_NAME): $(HOTSPOT_SERVER_PATH)/$(JVM_NAM
$(install-import-file) $(install-import-file)
@$(call binary_file_verification,$@) @$(call binary_file_verification,$@)
ifneq ($(OBJCOPY),)
$(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMDTRACE_DEBUGINFO_NAME): $(HOTSPOT_SERVER_PATH)/$(JVMDTRACE_DEBUGINFO_NAME)
$(install-import-file)
$(LIB_LOCATION)/$(SERVER_LOCATION)/64/$(JVMDTRACE_DEBUGINFO_NAME): $(HOTSPOT_SERVER_PATH)/64/$(JVMDTRACE_DEBUGINFO_NAME)
$(install-import-file)
$(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVM_DEBUGINFO_NAME): $(HOTSPOT_SERVER_PATH)/$(JVM_DEBUGINFO_NAME)
$(install-import-file)
endif
$(LIB_LOCATION)/$(SERVER_LOCATION)/Xusage.txt : $(HOTSPOT_SERVER_PATH)/Xusage.txt $(LIB_LOCATION)/$(SERVER_LOCATION)/Xusage.txt : $(HOTSPOT_SERVER_PATH)/Xusage.txt
$(install-import-file) $(install-import-file)
endif endif
......
...@@ -56,6 +56,12 @@ ifeq ($(INCLUDE_SA), true) ...@@ -56,6 +56,12 @@ ifeq ($(INCLUDE_SA), true)
IMPORT_LIST += $(LIB_LOCATION)/$(SAMAP_NAME) \ IMPORT_LIST += $(LIB_LOCATION)/$(SAMAP_NAME) \
$(LIB_LOCATION)/$(SAPDB_NAME) $(LIB_LOCATION)/$(SAPDB_NAME)
endif endif
ifneq ($(OBJCOPY),)
# the import JDK may not contain .debuginfo files
ifneq ($(wildcard $(HOTSPOT_IMPORT_PATH)/$(ARCH_VM_SUBDIR)/$(SA_DEBUGINFO_NAME)),)
IMPORT_LIST += $(LIB_LOCATION)/$(SA_DEBUGINFO_NAME)
endif
endif
endif # INCLUDE_SA endif # INCLUDE_SA
...@@ -79,6 +85,11 @@ $(LIB_LOCATION)/$(SAPDB_NAME): $(HOTSPOT_SALIB_PATH)/$(SAPDB_NAME) ...@@ -79,6 +85,11 @@ $(LIB_LOCATION)/$(SAPDB_NAME): $(HOTSPOT_SALIB_PATH)/$(SAPDB_NAME)
$(LIB_LOCATION)/$(SAMAP_NAME): $(HOTSPOT_SALIB_PATH)/$(SAMAP_NAME) $(LIB_LOCATION)/$(SAMAP_NAME): $(HOTSPOT_SALIB_PATH)/$(SAMAP_NAME)
$(install-import-file) $(install-import-file)
endif # windows endif # windows
ifneq ($(OBJCOPY),)
$(LIB_LOCATION)/$(SA_DEBUGINFO_NAME): $(HOTSPOT_SALIB_PATH)/$(SA_DEBUGINFO_NAME)
$(install-import-file)
endif
endif # INCLUDE_SA endif # INCLUDE_SA
all: $(IMPORT_LIST) all: $(IMPORT_LIST)
......
...@@ -26,8 +26,8 @@ ...@@ -26,8 +26,8 @@
BUILDDIR = ../.. BUILDDIR = ../..
PACKAGE = java.security PACKAGE = java.security
PRODUCT = sun PRODUCT = sun
JAVAC_MAX_WARNINGS = false JAVAC_MAX_WARNINGS = true
JAVAC_LINT_OPTIONS = -Xlint:all,-deprecation JAVAC_LINT_OPTIONS = -Xlint:all
JAVAC_WARNINGS_FATAL = true JAVAC_WARNINGS_FATAL = true
include $(BUILDDIR)/common/Defs.gmk include $(BUILDDIR)/common/Defs.gmk
......
# #
# Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved. # Copyright (c) 1998, 2011, 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
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
BUILDDIR = .. BUILDDIR = ..
include $(BUILDDIR)/common/Defs.gmk include $(BUILDDIR)/common/Defs.gmk
SUBDIRS = others SUBDIRS = others security
SUBDIRS_management = management SUBDIRS_management = management
......
...@@ -28,7 +28,6 @@ ...@@ -28,7 +28,6 @@
# #
BUILDDIR = ../.. BUILDDIR = ../..
JAVAC_MAX_WARNINGS = true
include $(BUILDDIR)/common/Defs.gmk include $(BUILDDIR)/common/Defs.gmk
# #
...@@ -39,10 +38,6 @@ AUTO_FILES_JAVA_DIRS = \ ...@@ -39,10 +38,6 @@ AUTO_FILES_JAVA_DIRS = \
com/sun/naming/internal \ com/sun/naming/internal \
javax/net \ javax/net \
javax/script \ javax/script \
javax/security/auth \
javax/security/cert \
javax/security/sasl \
javax/smartcardio \
javax/tools \ javax/tools \
javax/xml javax/xml
......
#
# Copyright (c) 2011, 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.
#
#
# Makefile for building javax (security classes)
#
BUILDDIR = ../..
JAVAC_MAX_WARNINGS = true
JAVAC_WARNINGS_FATAL = true
include $(BUILDDIR)/common/Defs.gmk
#
# Files to compile
#
AUTO_FILES_JAVA_DIRS = \
javax/security/auth \
javax/security/cert \
javax/security/sasl \
javax/smartcardio
#
# Rules
#
include $(BUILDDIR)/common/Classes.gmk
...@@ -5,7 +5,7 @@ Working on OpenJDK using NetBeans ...@@ -5,7 +5,7 @@ Working on OpenJDK using NetBeans
Getting Started Getting Started
In addition to the source bundle for Open JDK, you'll need to download In addition to the source bundle for Open JDK, you'll need to download
and install copies of the JDK and of NetBeans 6. And if you want to run and install copies of the JDK and of NetBeans. And if you want to run
tests on the JDK (you do want to run tests, right?), you'll need to tests on the JDK (you do want to run tests, right?), you'll need to
install the jtreg test harness. install the jtreg test harness.
...@@ -20,30 +20,28 @@ Getting Started ...@@ -20,30 +20,28 @@ Getting Started
Downloading the JDK Downloading the JDK
You've probably done this a million times. Download and install it You've probably done this a million times. Download and install it
from http://java.sun.com/javase from http://www.oracle.com/technetwork/java/javase/overview/index.html
Downloading the OpenJDK sources Downloading the OpenJDK sources
Since you're reading this, d you've already downloaded the OpenJDK Since you're reading this, d you've already downloaded the OpenJDK
source bundle. Later in this document we'll refer to the location source bundle. Later in this document we'll refer to the location
where you installed the Open JDK sources as *install-dir*. where you installed the Open JDK sources as *install-dir*.
Downloading a pre-built, JDK 7 Downloading a pre-built, JDK 8
This will be necessary to do builds of some of the projects. In This will be necessary to do builds of some of the projects. In
general, you want to download and install a pre-built JDK that general, you want to download and install a pre-built JDK that
corresponds to the OpenJDK sources you download. Building the entire corresponds to the OpenJDK sources you download. Building the entire
OpenJDK depends on a few parts of the pre-built JDK. Get this from OpenJDK depends on a few parts of the pre-built JDK. Get this from
http://download.java.net/jdk7/binaries http://download.java.net/jdk8/binaries
Note: For working on certain projects, like JMX and JConsole, you Note: For working on certain projects, like JMX and JConsole, you
may find convenient to use a pre-built version of JDK 7 (or may find convenient to use a pre-built version of JDK 8 (or
OpenJDK) rather than building your own. This will allow you OpenJDK) rather than building your own. This will allow you
to build only that part of the OpenJDK sources which correspond to build only that part of the OpenJDK sources which correspond
to that project. to that project.
NetBeans 6 NetBeans 7.0 or later
Yep, NetBeans *6*. Nope, not FCS'd yet. We're on the edge here, Older versions may also work but are unsupported.
enjoy it! Get the latest working development build of NetBeans 6
from http://netbeans.org
jtreg jtreg
"jtreg" is the test harness for running OpenJDK's regression tests. "jtreg" is the test harness for running OpenJDK's regression tests.
...@@ -51,7 +49,7 @@ Getting Started ...@@ -51,7 +49,7 @@ Getting Started
Ant Ant
NetBeans comes with ant, but if you use a separately-installed copy NetBeans comes with ant, but if you use a separately-installed copy
please make sure that it is at least version 1.7.0. please make sure that it is at least version 1.8.1.
Configuring Configuring
Building OpenJDK is hard and complex. No, strike that. While it's not Building OpenJDK is hard and complex. No, strike that. While it's not
...@@ -92,8 +90,8 @@ Configuring ...@@ -92,8 +90,8 @@ Configuring
situation: situation:
make.options=\ make.options=\
ALT_BOOTDIR=/home/me/bin/jdk1.6.0 \ ALT_BOOTDIR=/home/me/bin/jdk1.7.0 \
ALT_JDK_IMPORT_PATH=/home/me/bin/jdk1.7.0 \ ALT_JDK_IMPORT_PATH=/home/me/bin/jdk1.8.0 \
OPENJDK=true OPENJDK=true
The trailing '\' are important, so that make gets the above as a The trailing '\' are important, so that make gets the above as a
...@@ -107,7 +105,7 @@ Configuring ...@@ -107,7 +105,7 @@ Configuring
Windows-specific configuration Windows-specific configuration
First, please note that the entire JDK cannot currently be built on First, please note that the entire JDK cannot currently be built on
Windows platforms. This will likely limit your ability to build Windows platforms. This will likely limit your ability to build
make-based projects. See make-based projects. See
*install-dir*/jdk/make/README-builds.html *install-dir*/jdk/make/README-builds.html
for full information on issues with building on the Windows platform. for full information on issues with building on the Windows platform.
...@@ -141,7 +139,7 @@ Configuring ...@@ -141,7 +139,7 @@ Configuring
editor. editor.
Locale Requirements Locale Requirements
To build the Open JDK sources, be certain that you are using the "C" To build the OpenJDK sources, be certain that you are using the "C"
locale on Unix (R) platforms, or "English (United States)" locale on locale on Unix (R) platforms, or "English (United States)" locale on
Windows. Windows.
...@@ -220,13 +218,13 @@ Provided NetBeans projects ...@@ -220,13 +218,13 @@ Provided NetBeans projects
running and debugging JConsole. running and debugging JConsole.
This ant-based project does *not* require that you build the jdk This ant-based project does *not* require that you build the jdk
project first, provided that you use a pre-built version of JDK 7. project first, provided that you use a pre-built version of JDK 7.
Java (TM) Management Extensions (JMX(TM)) API (directory "jmx") Java (TM) Management Extensions (JMX(TM)) API (directory "jmx")
For working on JMX source code. Creates ../dist/lib/jmx.jar. For working on JMX source code. Creates ../dist/lib/jmx.jar.
This ant-based project does *not* require that you build the jdk This ant-based project does *not* require that you build the jdk
project first, provided that you use a pre-built version of JDK 7. project first, provided that you use a pre-built version of JDK 7.
Jar & Zip (directory "jarzip") Jar & Zip (directory "jarzip")
For working on jar & zip. It builds the zip library (including For working on jar & zip. It builds the zip library (including
...@@ -242,12 +240,12 @@ Provided NetBeans projects ...@@ -242,12 +240,12 @@ Provided NetBeans projects
running and debugging the SampleTree demo. running and debugging the SampleTree demo.
This ant-based project does *not* require that you build the jdk This ant-based project does *not* require that you build the jdk
project first, provided that you use a pre-built version of JDK 7. project first, provided that you use a pre-built version of JDK 7.
In addition, there are projects for building the compiler, javadoc, In addition, there are projects for building the compiler, javadoc,
and related tools, in the OpenJDK langtools component. These and related tools, in the OpenJDK langtools component. These
projects are separate from those described here, and have their projects are separate from those described here, and have their
own set of guidelines and conventions. For more details, see the own set of guidelines and conventions. For more details, see the
README files in make/netbeans in the OpenJDK langtools component. README files in make/netbeans in the OpenJDK langtools component.
Running Tests Running Tests
...@@ -603,13 +601,6 @@ Appendix 1: Customizations ...@@ -603,13 +601,6 @@ Appendix 1: Customizations
* -clean-make * -clean-make
Known Issues Known Issues
Tests won't run: waiting for lock
Occasionally when running tests, there will be a delay, followed by a
message like this:
Waiting to lock test result cache for
/tmp/jdk/build/linux-i586/jtreg/jconsole/JTwork for 20 seconds
The workaround is to stop the tests, rm -rf the offending jtreg/<project>
directory by hand, and re-run the tests.
Can't run nor debug a single test in the JConsole test Can't run nor debug a single test in the JConsole test
In most projects, you can run a single test by opening it in the editor, In most projects, you can run a single test by opening it in the editor,
......
...@@ -31,8 +31,8 @@ ...@@ -31,8 +31,8 @@
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--> -->
<source-folder style="packages"> <source-folder style="tree">
<label>Closed-Source Packages</label> <label>Closed Sources</label>
<location>${root}/src/closed/share/classes</location> <location>${root}/src/closed/share/classes</location>
<includes>${includes}</includes> <includes>${includes}</includes>
<excludes>${excludes}</excludes> <excludes>${excludes}</excludes>
......
...@@ -38,7 +38,12 @@ ...@@ -38,7 +38,12 @@
<package-root>${root}/src/solaris/classes</package-root> <package-root>${root}/src/solaris/classes</package-root>
<classpath mode="boot">${bootstrap.jdk}/jre/lib/rt.jar</classpath> <classpath mode="boot">${bootstrap.jdk}/jre/lib/rt.jar</classpath>
<built-to>${root}/build/${platform}-${arch}/classes</built-to> <built-to>${root}/build/${platform}-${arch}/classes</built-to>
<javadoc-built-to>${root}/build/javadoc/${name}</javadoc-built-to> <javadoc-built-to>${root}/build/${platform}-${arch}/docs/api</javadoc-built-to>
<source-level>1.7</source-level>
</compilation-unit>
<compilation-unit>
<package-root>${root}/test</package-root>
<unit-tests/>
<source-level>1.7</source-level> <source-level>1.7</source-level>
</compilation-unit> </compilation-unit>
</java-data> </java-data>
...@@ -36,7 +36,12 @@ ...@@ -36,7 +36,12 @@
<package-root>${root}/src/share/classes</package-root> <package-root>${root}/src/share/classes</package-root>
<classpath mode="boot">${bootstrap.jdk}/jre/lib/rt.jar</classpath> <classpath mode="boot">${bootstrap.jdk}/jre/lib/rt.jar</classpath>
<built-to>${root}/build/${platform}-${arch}/classes</built-to> <built-to>${root}/build/${platform}-${arch}/classes</built-to>
<javadoc-built-to>${root}/build/javadoc/${name}</javadoc-built-to> <javadoc-built-to>${root}/build/${platform}-${arch}/docs/api</javadoc-built-to>
<source-level>1.7</source-level>
</compilation-unit>
<compilation-unit>
<package-root>${root}/test</package-root>
<unit-tests/>
<source-level>1.7</source-level> <source-level>1.7</source-level>
</compilation-unit> </compilation-unit>
</java-data> </java-data>
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--> -->
<source-folder style="packages"> <source-folder style="tree">
<label>Tests</label> <label>Tests</label>
<location>${root}/test</location> <location>${root}/test</location>
<includes>${jtreg.tests}</includes> <includes>${jtreg.tests}</includes>
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--> -->
<source-folder style="packages"> <source-folder style="tree">
<label>Samples</label> <label>Samples</label>
<location>${root}/src/share/sample</location> <location>${root}/src/share/sample</location>
<includes>${samples}</includes> <includes>${samples}</includes>
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--> -->
<source-folder style="packages"> <source-folder style="tree">
<label>Sources for All Platforms</label> <label>Sources for All Platforms</label>
<location>${root}/src/share/classes</location> <location>${root}/src/share/classes</location>
<includes>${includes}</includes> <includes>${includes}</includes>
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
UNIX is a registered trademark in the United States and other countries, UNIX is a registered trademark in the United States and other countries,
exclusively licensed through X/Open Company, Ltd. exclusively licensed through X/Open Company, Ltd.
--> -->
<source-folder style="packages"> <source-folder style="tree">
<label>Sources for Unix® Platform</label> <label>Sources for Unix® Platform</label>
<location>${root}/src/solaris/classes</location> <location>${root}/src/solaris/classes</location>
<includes>${includes}</includes> <includes>${includes}</includes>
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--> -->
<source-folder style="packages"> <source-folder style="tree">
<label>Sources for Windows Platform</label> <label>Sources for Windows Platform</label>
<location>${root}/src/windows/classes</location> <location>${root}/src/windows/classes</location>
<includes>${includes}</includes> <includes>${includes}</includes>
......
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!-- <!--
Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved. Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved.
Redistribution and use in source and binary forms, with or without Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions modification, are permitted provided that the following conditions
...@@ -36,11 +36,13 @@ ...@@ -36,11 +36,13 @@
<!ENTITY share-sources SYSTEM "../../common/share-sources.ent"> <!ENTITY share-sources SYSTEM "../../common/share-sources.ent">
<!ENTITY unix-sources SYSTEM "../../common/unix-sources.ent"> <!ENTITY unix-sources SYSTEM "../../common/unix-sources.ent">
<!ENTITY windows-sources SYSTEM "../../common/windows-sources.ent"> <!ENTITY windows-sources SYSTEM "../../common/windows-sources.ent">
<!ENTITY jtreg-sources SYSTEM "../../common/jtreg-sources.ent">
<!ENTITY build-folder SYSTEM "../../common/build-folder.ent"> <!ENTITY build-folder SYSTEM "../../common/build-folder.ent">
<!ENTITY standard-bindings SYSTEM "../../common/standard-bindings.ent"> <!ENTITY standard-bindings SYSTEM "../../common/standard-bindings.ent">
<!ENTITY share-view SYSTEM "../../common/share-view.ent"> <!ENTITY share-view SYSTEM "../../common/share-view.ent">
<!ENTITY unix-view SYSTEM "../../common/unix-view.ent"> <!ENTITY unix-view SYSTEM "../../common/unix-view.ent">
<!ENTITY windows-view SYSTEM "../../common/windows-view.ent"> <!ENTITY windows-view SYSTEM "../../common/windows-view.ent">
<!ENTITY jtreg-view SYSTEM "../../common/jtreg-view.ent">
<!ENTITY file-view SYSTEM "../../common/file-view.ent"> <!ENTITY file-view SYSTEM "../../common/file-view.ent">
<!ENTITY standard-actions SYSTEM "../../common/standard-actions.ent"> <!ENTITY standard-actions SYSTEM "../../common/standard-actions.ent">
<!ENTITY java-data-native SYSTEM "../../common/java-data-native.ent"> <!ENTITY java-data-native SYSTEM "../../common/java-data-native.ent">
...@@ -59,6 +61,7 @@ ...@@ -59,6 +61,7 @@
&unix-sources; &unix-sources;
&windows-sources; &windows-sources;
&build-folder; &build-folder;
&jtreg-sources;
</folders> </folders>
<ide-actions> <ide-actions>
<action name="build"> <action name="build">
...@@ -82,6 +85,7 @@ ...@@ -82,6 +85,7 @@
&share-view; &share-view;
&unix-view; &unix-view;
&windows-view; &windows-view;
&jtreg-view;
&file-view; &file-view;
</items> </items>
<context-menu> <context-menu>
......
...@@ -26,6 +26,8 @@ ...@@ -26,6 +26,8 @@
BUILDDIR = ../../.. BUILDDIR = ../../..
PACKAGE = org.ietf.jgss PACKAGE = org.ietf.jgss
PRODUCT = sun PRODUCT = sun
JAVAC_MAX_WARNINGS = true
JAVAC_WARNINGS_FATAL = true
include $(BUILDDIR)/common/Defs.gmk include $(BUILDDIR)/common/Defs.gmk
# #
......
...@@ -68,7 +68,7 @@ else ...@@ -68,7 +68,7 @@ else
endif endif
# nio need to be compiled before awt to have all charsets ready # nio need to be compiled before awt to have all charsets ready
SUBDIRS = jar security javazic misc net nio text launcher SUBDIRS = jar security javazic misc net nio text util launcher
ifdef BUILD_HEADLESS_ONLY ifdef BUILD_HEADLESS_ONLY
DISPLAY_LIBS = awt $(HEADLESS_SUBDIR) DISPLAY_LIBS = awt $(HEADLESS_SUBDIR)
......
...@@ -21,4 +21,4 @@ ...@@ -21,4 +21,4 @@
# or visit www.oracle.com if you need additional information or have any # or visit www.oracle.com if you need additional information or have any
# questions. # questions.
# #
tzdata2011g tzdata2011l
...@@ -80,7 +80,7 @@ ...@@ -80,7 +80,7 @@
# I invented the following abbreviations; corrections are welcome! # I invented the following abbreviations; corrections are welcome!
# 2:00 WAST West Africa Summer Time # 2:00 WAST West Africa Summer Time
# 2:30 BEAT British East Africa Time (no longer used) # 2:30 BEAT British East Africa Time (no longer used)
# 2:44:45 BEAUT British East Africa Unified Time (no longer used) # 2:45 BEAUT British East Africa Unified Time (no longer used)
# 3:00 CAST Central Africa Summer Time (no longer used) # 3:00 CAST Central Africa Summer Time (no longer used)
# 3:00 SAST South Africa Summer Time (no longer used) # 3:00 SAST South Africa Summer Time (no longer used)
# 3:00 EAT East Africa Time # 3:00 EAT East Africa Time
...@@ -418,7 +418,7 @@ Zone Africa/Bissau -1:02:20 - LMT 1911 May 26 ...@@ -418,7 +418,7 @@ Zone Africa/Bissau -1:02:20 - LMT 1911 May 26
Zone Africa/Nairobi 2:27:16 - LMT 1928 Jul Zone Africa/Nairobi 2:27:16 - LMT 1928 Jul
3:00 - EAT 1930 3:00 - EAT 1930
2:30 - BEAT 1940 2:30 - BEAT 1940
2:44:45 - BEAUT 1960 2:45 - BEAUT 1960
3:00 - EAT 3:00 - EAT
# Lesotho # Lesotho
...@@ -979,6 +979,11 @@ Zone Africa/Khartoum 2:10:08 - LMT 1931 ...@@ -979,6 +979,11 @@ Zone Africa/Khartoum 2:10:08 - LMT 1931
2:00 Sudan CA%sT 2000 Jan 15 12:00 2:00 Sudan CA%sT 2000 Jan 15 12:00
3:00 - EAT 3:00 - EAT
# South Sudan
Zone Africa/Juba 2:06:24 - LMT 1931
2:00 Sudan CA%sT 2000 Jan 15 12:00
3:00 - EAT
# Swaziland # Swaziland
# Zone NAME GMTOFF RULES FORMAT [UNTIL] # Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone Africa/Mbabane 2:04:24 - LMT 1903 Mar Zone Africa/Mbabane 2:04:24 - LMT 1903 Mar
...@@ -988,7 +993,7 @@ Zone Africa/Mbabane 2:04:24 - LMT 1903 Mar ...@@ -988,7 +993,7 @@ Zone Africa/Mbabane 2:04:24 - LMT 1903 Mar
# Zone NAME GMTOFF RULES FORMAT [UNTIL] # Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone Africa/Dar_es_Salaam 2:37:08 - LMT 1931 Zone Africa/Dar_es_Salaam 2:37:08 - LMT 1931
3:00 - EAT 1948 3:00 - EAT 1948
2:44:45 - BEAUT 1961 2:45 - BEAUT 1961
3:00 - EAT 3:00 - EAT
# Togo # Togo
...@@ -1114,7 +1119,7 @@ Zone Africa/Tunis 0:40:44 - LMT 1881 May 12 ...@@ -1114,7 +1119,7 @@ Zone Africa/Tunis 0:40:44 - LMT 1881 May 12
Zone Africa/Kampala 2:09:40 - LMT 1928 Jul Zone Africa/Kampala 2:09:40 - LMT 1928 Jul
3:00 - EAT 1930 3:00 - EAT 1930
2:30 - BEAT 1948 2:30 - BEAT 1948
2:44:45 - BEAUT 1957 2:45 - BEAUT 1957
3:00 - EAT 3:00 - EAT
# Zambia # Zambia
......
...@@ -41,18 +41,6 @@ ...@@ -41,18 +41,6 @@
# I made up all time zone abbreviations mentioned here; corrections welcome! # I made up all time zone abbreviations mentioned here; corrections welcome!
# FORMAT is `zzz' and GMTOFF is 0 for locations while uninhabited. # FORMAT is `zzz' and GMTOFF is 0 for locations while uninhabited.
# These rules are stolen from the `europe' file.
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
Rule RussAQ 1981 1984 - Apr 1 0:00 1:00 S
Rule RussAQ 1981 1983 - Oct 1 0:00 0 -
Rule RussAQ 1984 1991 - Sep lastSun 2:00s 0 -
Rule RussAQ 1985 1991 - Mar lastSun 2:00s 1:00 S
Rule RussAQ 1992 only - Mar lastSat 23:00 1:00 S
Rule RussAQ 1992 only - Sep lastSat 23:00 0 -
Rule RussAQ 1993 max - Mar lastSun 2:00s 1:00 S
Rule RussAQ 1993 1995 - Sep lastSun 2:00s 0 -
Rule RussAQ 1996 max - Oct lastSun 2:00s 0 -
# These rules are stolen from the `southamerica' file. # These rules are stolen from the `southamerica' file.
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
Rule ArgAQ 1964 1966 - Mar 1 0:00 0 - Rule ArgAQ 1964 1966 - Mar 1 0:00 0 -
......
...@@ -99,6 +99,10 @@ Rule RussiaAsia 1993 max - Mar lastSun 2:00s 1:00 S ...@@ -99,6 +99,10 @@ Rule RussiaAsia 1993 max - Mar lastSun 2:00s 1:00 S
Rule RussiaAsia 1993 1995 - Sep lastSun 2:00s 0 - Rule RussiaAsia 1993 1995 - Sep lastSun 2:00s 0 -
Rule RussiaAsia 1996 max - Oct lastSun 2:00s 0 - Rule RussiaAsia 1996 max - Oct lastSun 2:00s 0 -
# From Arthur David Olson (2011-06-15):
# While Russia abandoned DST in 2011, Armenia may choose to
# follow Russia's "old" rules.
# Afghanistan # Afghanistan
# Zone NAME GMTOFF RULES FORMAT [UNTIL] # Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone Asia/Kabul 4:36:48 - LMT 1890 Zone Asia/Kabul 4:36:48 - LMT 1890
...@@ -2212,7 +2216,47 @@ Zone Asia/Karachi 4:28:12 - LMT 1907 ...@@ -2212,7 +2216,47 @@ Zone Asia/Karachi 4:28:12 - LMT 1907
# http://www.timeanddate.com/news/time/westbank-gaza-end-dst-2010.html # http://www.timeanddate.com/news/time/westbank-gaza-end-dst-2010.html
# </a> # </a>
# From Steffen Thorsen (2011-08-26):
# Gaza and the West Bank did go back to standard time in the beginning of
# August, and will now enter daylight saving time again on 2011-08-30
# 00:00 (so two periods of DST in 2011). The pause was because of
# Ramadan.
#
# <a href="http://www.maannews.net/eng/ViewDetails.aspx?ID=416217">
# http://www.maannews.net/eng/ViewDetails.aspx?ID=416217
# </a>
# Additional info:
# <a href="http://www.timeanddate.com/news/time/palestine-dst-2011.html">
# http://www.timeanddate.com/news/time/palestine-dst-2011.html
# </a>
# From Alexander Krivenyshev (2011-08-27):
# According to the article in The Jerusalem Post:
# "...Earlier this month, the Palestinian government in the West Bank decided to
# move to standard time for 30 days, during Ramadan. The Palestinians in the
# Gaza Strip accepted the change and also moved their clocks one hour back.
# The Hamas government said on Saturday that it won't observe summertime after
# the Muslim feast of Id al-Fitr, which begins on Tuesday..."
# ...
# <a href="http://www.jpost.com/MiddleEast/Article.aspx?id=235650">
# http://www.jpost.com/MiddleEast/Article.aspx?id=235650
# </a>
# or
# <a href="http://www.worldtimezone.com/dst_news/dst_news_gazastrip05.html">
# http://www.worldtimezone.com/dst_news/dst_news_gazastrip05.html
# </a>
# The rules for Egypt are stolen from the `africa' file. # The rules for Egypt are stolen from the `africa' file.
# From Steffen Thorsen (2011-09-30):
# West Bank did end Daylight Saving Time this morning/midnight (2011-09-30
# 00:00).
# So West Bank and Gaza now have the same time again.
#
# Many sources, including:
# <a href="http://www.maannews.net/eng/ViewDetails.aspx?ID=424808">
# http://www.maannews.net/eng/ViewDetails.aspx?ID=424808
# </a>
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
Rule EgyptAsia 1957 only - May 10 0:00 1:00 S Rule EgyptAsia 1957 only - May 10 0:00 1:00 S
Rule EgyptAsia 1957 1958 - Oct 1 0:00 0 - Rule EgyptAsia 1957 1958 - Oct 1 0:00 0 -
...@@ -2228,19 +2272,37 @@ Rule Palestine 2005 only - Oct 4 2:00 0 - ...@@ -2228,19 +2272,37 @@ Rule Palestine 2005 only - Oct 4 2:00 0 -
Rule Palestine 2006 2008 - Apr 1 0:00 1:00 S Rule Palestine 2006 2008 - Apr 1 0:00 1:00 S
Rule Palestine 2006 only - Sep 22 0:00 0 - Rule Palestine 2006 only - Sep 22 0:00 0 -
Rule Palestine 2007 only - Sep Thu>=8 2:00 0 - Rule Palestine 2007 only - Sep Thu>=8 2:00 0 -
Rule Palestine 2008 only - Aug lastFri 2:00 0 - Rule Palestine 2008 only - Aug lastFri 0:00 0 -
Rule Palestine 2009 only - Mar lastFri 0:00 1:00 S Rule Palestine 2009 only - Mar lastFri 0:00 1:00 S
Rule Palestine 2010 max - Mar lastSat 0:01 1:00 S Rule Palestine 2009 only - Sep Fri>=1 2:00 0 -
Rule Palestine 2009 max - Sep Fri>=1 2:00 0 - Rule Palestine 2010 only - Mar lastSat 0:01 1:00 S
Rule Palestine 2010 only - Aug 11 0:00 0 - Rule Palestine 2010 only - Aug 11 0:00 0 -
# From Arthur David Olson (2011-09-20):
# 2011 transitions per http://www.timeanddate.com as of 2011-09-20.
# Zone NAME GMTOFF RULES FORMAT [UNTIL] # Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone Asia/Gaza 2:17:52 - LMT 1900 Oct Zone Asia/Gaza 2:17:52 - LMT 1900 Oct
2:00 Zion EET 1948 May 15 2:00 Zion EET 1948 May 15
2:00 EgyptAsia EE%sT 1967 Jun 5 2:00 EgyptAsia EE%sT 1967 Jun 5
2:00 Zion I%sT 1996 2:00 Zion I%sT 1996
2:00 Jordan EE%sT 1999 2:00 Jordan EE%sT 1999
2:00 Palestine EE%sT 2:00 Palestine EE%sT 2011 Apr 2 12:01
2:00 1:00 EEST 2011 Aug 1
2:00 - EET
Zone Asia/Hebron 2:20:23 - LMT 1900 Oct
2:00 Zion EET 1948 May 15
2:00 EgyptAsia EE%sT 1967 Jun 5
2:00 Zion I%sT 1996
2:00 Jordan EE%sT 1999
2:00 Palestine EE%sT 2008 Aug
2:00 1:00 EEST 2008 Sep
2:00 Palestine EE%sT 2011 Apr 1 12:01
2:00 1:00 EEST 2011 Aug 1
2:00 - EET 2011 Aug 30
2:00 1:00 EEST 2011 Sep 30 3:00
2:00 - EET
# Paracel Is # Paracel Is
# no information # no information
......
...@@ -318,6 +318,18 @@ Zone Indian/Cocos 6:27:40 - LMT 1900 ...@@ -318,6 +318,18 @@ Zone Indian/Cocos 6:27:40 - LMT 1900
# http://www.worldtimezone.com/dst_news/dst_news_fiji04.html # http://www.worldtimezone.com/dst_news/dst_news_fiji04.html
# </a> # </a>
# From Steffen Thorsen (2011-10-03):
# Now the dates have been confirmed, and at least our start date
# assumption was correct (end date was one week wrong).
#
# <a href="http://www.fiji.gov.fj/index.php?option=com_content&view=article&id=4966:daylight-saving-starts-in-fiji&catid=71:press-releases&Itemid=155">
# www.fiji.gov.fj/index.php?option=com_content&view=article&id=4966:daylight-saving-starts-in-fiji&catid=71:press-releases&Itemid=155
# </a>
# which says
# Members of the public are reminded to change their time to one hour in
# advance at 2am to 3am on October 23, 2011 and one hour back at 3am to
# 2am on February 26 next year.
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
Rule Fiji 1998 1999 - Nov Sun>=1 2:00 1:00 S Rule Fiji 1998 1999 - Nov Sun>=1 2:00 1:00 S
Rule Fiji 1999 2000 - Feb lastSun 3:00 0 - Rule Fiji 1999 2000 - Feb lastSun 3:00 0 -
...@@ -325,6 +337,8 @@ Rule Fiji 2009 only - Nov 29 2:00 1:00 S ...@@ -325,6 +337,8 @@ Rule Fiji 2009 only - Nov 29 2:00 1:00 S
Rule Fiji 2010 only - Mar lastSun 3:00 0 - Rule Fiji 2010 only - Mar lastSun 3:00 0 -
Rule Fiji 2010 only - Oct 24 2:00 1:00 S Rule Fiji 2010 only - Oct 24 2:00 1:00 S
Rule Fiji 2011 only - Mar Sun>=1 3:00 0 - Rule Fiji 2011 only - Mar Sun>=1 3:00 0 -
Rule Fiji 2011 only - Oct 23 2:00 1:00 S
Rule Fiji 2012 only - Feb 26 3:00 0 -
# Zone NAME GMTOFF RULES FORMAT [UNTIL] # Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone Pacific/Fiji 11:53:40 - LMT 1915 Oct 26 # Suva Zone Pacific/Fiji 11:53:40 - LMT 1915 Oct 26 # Suva
12:00 Fiji FJ%sT # Fiji Time 12:00 Fiji FJ%sT # Fiji Time
...@@ -521,7 +535,7 @@ Zone Pacific/Pago_Pago 12:37:12 - LMT 1879 Jul 5 ...@@ -521,7 +535,7 @@ Zone Pacific/Pago_Pago 12:37:12 - LMT 1879 Jul 5
# http://www.parliament.gov.ws/documents/acts/Daylight%20Saving%20Act%20%202009%20%28English%29%20-%20Final%207-7-091.pdf # http://www.parliament.gov.ws/documents/acts/Daylight%20Saving%20Act%20%202009%20%28English%29%20-%20Final%207-7-091.pdf
# </a> # </a>
# From Raymond Hughes (2010-10-07): # From Laupue Raymond Hughes (2010-10-07):
# Please see # Please see
# <a href="http://www.mcil.gov.ws"> # <a href="http://www.mcil.gov.ws">
# http://www.mcil.gov.ws # http://www.mcil.gov.ws
...@@ -531,7 +545,7 @@ Zone Pacific/Pago_Pago 12:37:12 - LMT 1879 Jul 5 ...@@ -531,7 +545,7 @@ Zone Pacific/Pago_Pago 12:37:12 - LMT 1879 Jul 5
# to 01:00am and First Sunday April 2011 (03/04/11) - adjust clocks # to 01:00am and First Sunday April 2011 (03/04/11) - adjust clocks
# backwards from 1:00am to 12:00am" # backwards from 1:00am to 12:00am"
# From Raymond Hughes (2011-03-07) # From Laupue Raymond Hughes (2011-03-07):
# I believe this will be posted shortly on the website # I believe this will be posted shortly on the website
# <a href="http://www.mcil.gov.ws"> # <a href="http://www.mcil.gov.ws">
# www.mcil.gov.ws # www.mcil.gov.ws
...@@ -551,12 +565,74 @@ Zone Pacific/Pago_Pago 12:37:12 - LMT 1879 Jul 5 ...@@ -551,12 +565,74 @@ Zone Pacific/Pago_Pago 12:37:12 - LMT 1879 Jul 5
# Margaret Fruean ACTING CHIEF EXECUTIVE OFFICER MINISTRY OF COMMERCE, # Margaret Fruean ACTING CHIEF EXECUTIVE OFFICER MINISTRY OF COMMERCE,
# INDUSTRY AND LABOUR 28th February 2011 # INDUSTRY AND LABOUR 28th February 2011
# From David Zuelke (2011-05-09):
# Subject: Samoa to move timezone from east to west of international date line
#
# <a href="http://www.morningstar.co.uk/uk/markets/newsfeeditem.aspx?id=138501958347963">
# http://www.morningstar.co.uk/uk/markets/newsfeeditem.aspx?id=138501958347963
# </a>
# From Mark Sim-Smith (2011-08-17):
# I have been in contact with Leilani Tuala Warren from the Samoa Law
# Reform Commission, and she has sent me a copy of the Bill that she
# confirmed has been passed...Most of the sections are about maps rather
# than the time zone change, but I'll paste the relevant bits below. But
# the essence is that at midnight 29 Dec (UTC-11 I suppose), Samoa
# changes from UTC-11 to UTC+13:
#
# International Date Line Bill 2011
#
# AN ACT to provide for the change to standard time in Samoa and to make
# consequential amendments to the position of the International Date
# Line, and for related purposes.
#
# BE IT ENACTED by the Legislative Assembly of Samoa in Parliament
# assembled as follows:
#
# 1. Short title and commencement-(1) This Act may be cited as the
# International Date Line Act 2011. (2) Except for section 5(3) this Act
# commences at 12 o'clock midnight, on Thursday 29th December 2011. (3)
# Section 5(3) commences on the date of assent by the Head of State.
#
# [snip]
#
# 3. Interpretation - [snip] "Samoa standard time" in this Act and any
# other statute of Samoa which refers to 'Samoa standard time' means the
# time 13 hours in advance of Co-ordinated Universal Time.
#
# 4. Samoa standard time - (1) Upon the commencement of this Act, Samoa
# standard time shall be set at 13 hours in advance of Co-ordinated
# Universal Time for the whole of Samoa. (2) All references to Samoa's
# time zone and to Samoa standard time in Samoa in all legislation and
# instruments after the commencement of this Act shall be references to
# Samoa standard time as provided for in this Act. (3) Nothing in this
# Act affects the provisions of the Daylight Saving Act 2009, except that
# it defines Samoa standard time....
# From Laupue Raymond Hughes (2011-09-02):
# <a href="http://www.mcil.gov.ws/mcil_publications.html">
# http://www.mcil.gov.ws/mcil_publications.html
# </a>
#
# here is the official website publication for Samoa DST and dateline change
#
# DST
# Year End Time Start Time
# 2011 - - - - - - 24 September 3:00am to 4:00am
# 2012 01 April 4:00am to 3:00am - - - - - -
#
# Dateline Change skip Friday 30th Dec 2011
# Thursday 29th December 2011 23:59:59 Hours
# Saturday 31st December 2011 00:00:00 Hours
Zone Pacific/Apia 12:33:04 - LMT 1879 Jul 5 Zone Pacific/Apia 12:33:04 - LMT 1879 Jul 5
-11:26:56 - LMT 1911 -11:26:56 - LMT 1911
-11:30 - SAMT 1950 # Samoa Time -11:30 - SAMT 1950 # Samoa Time
-11:00 - WST 2010 Sep 26 -11:00 - WST 2010 Sep 26
-11:00 1:00 WSDT 2011 Apr 2 4:00 -11:00 1:00 WSDT 2011 Apr 2 4:00
-11:00 - WST -11:00 - WST 2011 Sep 24 3:00
-11:00 1:00 WSDT 2011 Dec 30
13:00 1:00 WSDT 2012 Apr 1 4:00
13:00 - WST
# Solomon Is # Solomon Is
# excludes Bougainville, for which see Papua New Guinea # excludes Bougainville, for which see Papua New Guinea
...@@ -1228,7 +1304,7 @@ Zone Pacific/Wallis 12:15:20 - LMT 1901 ...@@ -1228,7 +1304,7 @@ Zone Pacific/Wallis 12:15:20 - LMT 1901
# Lord Howe Island Board (controlling authority for the Island) is # Lord Howe Island Board (controlling authority for the Island) is
# seeking the community's views on various options for summer time # seeking the community's views on various options for summer time
# arrangements on the Island, e.g. advance clocks by 1 full hour # arrangements on the Island, e.g. advance clocks by 1 full hour
# instead of only 30 minutes. Dependant on the wishes of residents # instead of only 30 minutes. [Dependent] on the wishes of residents
# the Board may approach the NSW government to change the existing # the Board may approach the NSW government to change the existing
# arrangements. The starting date for summer time on the Island will # arrangements. The starting date for summer time on the Island will
# however always coincide with the rest of NSW. # however always coincide with the rest of NSW.
...@@ -1354,7 +1430,7 @@ Zone Pacific/Wallis 12:15:20 - LMT 1901 ...@@ -1354,7 +1430,7 @@ Zone Pacific/Wallis 12:15:20 - LMT 1901
# From Paul Eggert (1996-01-22): # From Paul Eggert (1996-01-22):
# Today's _Wall Street Journal_ (page 1) reports that Kiribati # Today's _Wall Street Journal_ (page 1) reports that Kiribati
# ``declared it the same day throught the country as of Jan. 1, 1995'' # ``declared it the same day [throughout] the country as of Jan. 1, 1995''
# as part of the competition to be first into the 21st century. # as part of the competition to be first into the 21st century.
......
...@@ -583,9 +583,28 @@ Rule Russia 1985 1991 - Mar lastSun 2:00s 1:00 S ...@@ -583,9 +583,28 @@ Rule Russia 1985 1991 - Mar lastSun 2:00s 1:00 S
# #
Rule Russia 1992 only - Mar lastSat 23:00 1:00 S Rule Russia 1992 only - Mar lastSat 23:00 1:00 S
Rule Russia 1992 only - Sep lastSat 23:00 0 - Rule Russia 1992 only - Sep lastSat 23:00 0 -
Rule Russia 1993 max - Mar lastSun 2:00s 1:00 S Rule Russia 1993 2010 - Mar lastSun 2:00s 1:00 S
Rule Russia 1993 1995 - Sep lastSun 2:00s 0 - Rule Russia 1993 1995 - Sep lastSun 2:00s 0 -
Rule Russia 1996 max - Oct lastSun 2:00s 0 - Rule Russia 1996 2010 - Oct lastSun 2:00s 0 -
# From Alexander Krivenyshev (2011-06-14):
# According to Kremlin press service, Russian President Dmitry Medvedev
# signed a federal law "On calculation of time" on June 9, 2011.
# According to the law Russia is abolishing daylight saving time.
#
# Medvedev signed a law "On the Calculation of Time" (in russian):
# <a href="http://bmockbe.ru/events/?ID=7583">
# http://bmockbe.ru/events/?ID=7583
# </a>
#
# Medvedev signed a law on the calculation of the time (in russian):
# <a href="http://www.regnum.ru/news/polit/1413906.html">
# http://www.regnum.ru/news/polit/1413906.html
# </a>
# From Arthur David Olson (2011-06-15):
# Take "abolishing daylight saving time" to mean that time is now considered
# to be standard.
# These are for backward compatibility with older versions. # These are for backward compatibility with older versions.
...@@ -691,6 +710,23 @@ Zone Europe/Vienna 1:05:20 - LMT 1893 Apr ...@@ -691,6 +710,23 @@ Zone Europe/Vienna 1:05:20 - LMT 1893 Apr
1:00 EU CE%sT 1:00 EU CE%sT
# Belarus # Belarus
# From Yauhen Kharuzhy (2011-09-16):
# By latest Belarus government act Europe/Minsk timezone was changed to
# GMT+3 without DST (was GMT+2 with DST).
#
# Sources (Russian language):
# 1.
# <a href="http://www.belta.by/ru/all_news/society/V-Belarusi-otmenjaetsja-perexod-na-sezonnoe-vremja_i_572952.html">
# http://www.belta.by/ru/all_news/society/V-Belarusi-otmenjaetsja-perexod-na-sezonnoe-vremja_i_572952.html
# </a>
# 2.
# <a href="http://naviny.by/rubrics/society/2011/09/16/ic_articles_116_175144/">
# http://naviny.by/rubrics/society/2011/09/16/ic_articles_116_175144/
# </a>
# 3.
# <a href="http://news.tut.by/society/250578.html">
# http://news.tut.by/society/250578.html
# </a>
# Zone NAME GMTOFF RULES FORMAT [UNTIL] # Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone Europe/Minsk 1:50:16 - LMT 1880 Zone Europe/Minsk 1:50:16 - LMT 1880
1:50 - MMT 1924 May 2 # Minsk Mean Time 1:50 - MMT 1924 May 2 # Minsk Mean Time
...@@ -702,7 +738,8 @@ Zone Europe/Minsk 1:50:16 - LMT 1880 ...@@ -702,7 +738,8 @@ Zone Europe/Minsk 1:50:16 - LMT 1880
2:00 1:00 EEST 1991 Sep 29 2:00s 2:00 1:00 EEST 1991 Sep 29 2:00s
2:00 - EET 1992 Mar 29 0:00s 2:00 - EET 1992 Mar 29 0:00s
2:00 1:00 EEST 1992 Sep 27 0:00s 2:00 1:00 EEST 1992 Sep 27 0:00s
2:00 Russia EE%sT 2:00 Russia EE%sT 2011 Mar 27 2:00s
3:00 - FET # Further-eastern European Time
# Belgium # Belgium
# #
...@@ -2035,7 +2072,8 @@ Zone Europe/Kaliningrad 1:22:00 - LMT 1893 Apr ...@@ -2035,7 +2072,8 @@ Zone Europe/Kaliningrad 1:22:00 - LMT 1893 Apr
1:00 C-Eur CE%sT 1945 1:00 C-Eur CE%sT 1945
2:00 Poland CE%sT 1946 2:00 Poland CE%sT 1946
3:00 Russia MSK/MSD 1991 Mar 31 2:00s 3:00 Russia MSK/MSD 1991 Mar 31 2:00s
2:00 Russia EE%sT 2:00 Russia EE%sT 2011 Mar 27 2:00s
3:00 - FET # Further-eastern European Time
# #
# From Oscar van Vlijmen (2001-08-25): [This region consists of] # From Oscar van Vlijmen (2001-08-25): [This region consists of]
# Respublika Adygeya, Arkhangel'skaya oblast', # Respublika Adygeya, Arkhangel'skaya oblast',
...@@ -2064,7 +2102,8 @@ Zone Europe/Moscow 2:30:20 - LMT 1880 ...@@ -2064,7 +2102,8 @@ Zone Europe/Moscow 2:30:20 - LMT 1880
2:00 - EET 1930 Jun 21 2:00 - EET 1930 Jun 21
3:00 Russia MSK/MSD 1991 Mar 31 2:00s 3:00 Russia MSK/MSD 1991 Mar 31 2:00s
2:00 Russia EE%sT 1992 Jan 19 2:00s 2:00 Russia EE%sT 1992 Jan 19 2:00s
3:00 Russia MSK/MSD 3:00 Russia MSK/MSD 2011 Mar 27 2:00s
4:00 - MSK
# #
# Astrakhanskaya oblast', Kirovskaya oblast', Saratovskaya oblast', # Astrakhanskaya oblast', Kirovskaya oblast', Saratovskaya oblast',
# Volgogradskaya oblast'. Shanks & Pottenger say Kirov is still at +0400 # Volgogradskaya oblast'. Shanks & Pottenger say Kirov is still at +0400
...@@ -2077,7 +2116,8 @@ Zone Europe/Volgograd 2:57:40 - LMT 1920 Jan 3 ...@@ -2077,7 +2116,8 @@ Zone Europe/Volgograd 2:57:40 - LMT 1920 Jan 3
4:00 Russia VOL%sT 1989 Mar 26 2:00s # Volgograd T 4:00 Russia VOL%sT 1989 Mar 26 2:00s # Volgograd T
3:00 Russia VOL%sT 1991 Mar 31 2:00s 3:00 Russia VOL%sT 1991 Mar 31 2:00s
4:00 - VOLT 1992 Mar 29 2:00s 4:00 - VOLT 1992 Mar 29 2:00s
3:00 Russia VOL%sT 3:00 Russia VOL%sT 2011 Mar 27 2:00s
4:00 - VOLT
# #
# From Oscar van Vlijmen (2001-08-25): [This region consists of] # From Oscar van Vlijmen (2001-08-25): [This region consists of]
# Samarskaya oblast', Udmyrtskaya respublika # Samarskaya oblast', Udmyrtskaya respublika
...@@ -2089,7 +2129,8 @@ Zone Europe/Samara 3:20:36 - LMT 1919 Jul 1 2:00 ...@@ -2089,7 +2129,8 @@ Zone Europe/Samara 3:20:36 - LMT 1919 Jul 1 2:00
2:00 Russia KUY%sT 1991 Sep 29 2:00s 2:00 Russia KUY%sT 1991 Sep 29 2:00s
3:00 - KUYT 1991 Oct 20 3:00 3:00 - KUYT 1991 Oct 20 3:00
4:00 Russia SAM%sT 2010 Mar 28 2:00s # Samara Time 4:00 Russia SAM%sT 2010 Mar 28 2:00s # Samara Time
3:00 Russia SAM%sT 3:00 Russia SAM%sT 2011 Mar 27 2:00s
4:00 - SAMT
# #
# From Oscar van Vlijmen (2001-08-25): [This region consists of] # From Oscar van Vlijmen (2001-08-25): [This region consists of]
...@@ -2102,7 +2143,8 @@ Zone Asia/Yekaterinburg 4:02:24 - LMT 1919 Jul 15 4:00 ...@@ -2102,7 +2143,8 @@ Zone Asia/Yekaterinburg 4:02:24 - LMT 1919 Jul 15 4:00
4:00 - SVET 1930 Jun 21 # Sverdlovsk Time 4:00 - SVET 1930 Jun 21 # Sverdlovsk Time
5:00 Russia SVE%sT 1991 Mar 31 2:00s 5:00 Russia SVE%sT 1991 Mar 31 2:00s
4:00 Russia SVE%sT 1992 Jan 19 2:00s 4:00 Russia SVE%sT 1992 Jan 19 2:00s
5:00 Russia YEK%sT # Yekaterinburg Time 5:00 Russia YEK%sT 2011 Mar 27 2:00s
6:00 - YEKT # Yekaterinburg Time
# #
# From Oscar van Vlijmen (2001-08-25): [This region consists of] # From Oscar van Vlijmen (2001-08-25): [This region consists of]
# Respublika Altaj, Altajskij kraj, Omskaya oblast'. # Respublika Altaj, Altajskij kraj, Omskaya oblast'.
...@@ -2110,7 +2152,8 @@ Zone Asia/Omsk 4:53:36 - LMT 1919 Nov 14 ...@@ -2110,7 +2152,8 @@ Zone Asia/Omsk 4:53:36 - LMT 1919 Nov 14
5:00 - OMST 1930 Jun 21 # Omsk TIme 5:00 - OMST 1930 Jun 21 # Omsk TIme
6:00 Russia OMS%sT 1991 Mar 31 2:00s 6:00 Russia OMS%sT 1991 Mar 31 2:00s
5:00 Russia OMS%sT 1992 Jan 19 2:00s 5:00 Russia OMS%sT 1992 Jan 19 2:00s
6:00 Russia OMS%sT 6:00 Russia OMS%sT 2011 Mar 27 2:00s
7:00 - OMST
# #
# From Paul Eggert (2006-08-19): I'm guessing about Tomsk here; it's # From Paul Eggert (2006-08-19): I'm guessing about Tomsk here; it's
# not clear when it switched from +7 to +6. # not clear when it switched from +7 to +6.
...@@ -2120,7 +2163,8 @@ Zone Asia/Novosibirsk 5:31:40 - LMT 1919 Dec 14 6:00 ...@@ -2120,7 +2163,8 @@ Zone Asia/Novosibirsk 5:31:40 - LMT 1919 Dec 14 6:00
7:00 Russia NOV%sT 1991 Mar 31 2:00s 7:00 Russia NOV%sT 1991 Mar 31 2:00s
6:00 Russia NOV%sT 1992 Jan 19 2:00s 6:00 Russia NOV%sT 1992 Jan 19 2:00s
7:00 Russia NOV%sT 1993 May 23 # say Shanks & P. 7:00 Russia NOV%sT 1993 May 23 # say Shanks & P.
6:00 Russia NOV%sT 6:00 Russia NOV%sT 2011 Mar 27 2:00s
7:00 - NOVT
# From Alexander Krivenyshev (2009-10-13): # From Alexander Krivenyshev (2009-10-13):
# Kemerovo oblast' (Kemerovo region) in Russia will change current time zone on # Kemerovo oblast' (Kemerovo region) in Russia will change current time zone on
...@@ -2153,7 +2197,8 @@ Zone Asia/Novokuznetsk 5:48:48 - NMT 1920 Jan 6 ...@@ -2153,7 +2197,8 @@ Zone Asia/Novokuznetsk 5:48:48 - NMT 1920 Jan 6
7:00 Russia KRA%sT 1991 Mar 31 2:00s 7:00 Russia KRA%sT 1991 Mar 31 2:00s
6:00 Russia KRA%sT 1992 Jan 19 2:00s 6:00 Russia KRA%sT 1992 Jan 19 2:00s
7:00 Russia KRA%sT 2010 Mar 28 2:00s 7:00 Russia KRA%sT 2010 Mar 28 2:00s
6:00 Russia NOV%sT # Novosibirsk/Novokuznetsk Time 6:00 Russia NOV%sT 2011 Mar 27 2:00s
7:00 - NOVT # Novosibirsk/Novokuznetsk Time
# #
# From Oscar van Vlijmen (2001-08-25): [This region consists of] # From Oscar van Vlijmen (2001-08-25): [This region consists of]
...@@ -2164,7 +2209,8 @@ Zone Asia/Krasnoyarsk 6:11:20 - LMT 1920 Jan 6 ...@@ -2164,7 +2209,8 @@ Zone Asia/Krasnoyarsk 6:11:20 - LMT 1920 Jan 6
6:00 - KRAT 1930 Jun 21 # Krasnoyarsk Time 6:00 - KRAT 1930 Jun 21 # Krasnoyarsk Time
7:00 Russia KRA%sT 1991 Mar 31 2:00s 7:00 Russia KRA%sT 1991 Mar 31 2:00s
6:00 Russia KRA%sT 1992 Jan 19 2:00s 6:00 Russia KRA%sT 1992 Jan 19 2:00s
7:00 Russia KRA%sT 7:00 Russia KRA%sT 2011 Mar 27 2:00s
8:00 - KRAT
# #
# From Oscar van Vlijmen (2001-08-25): [This region consists of] # From Oscar van Vlijmen (2001-08-25): [This region consists of]
# Respublika Buryatiya, Irkutskaya oblast', # Respublika Buryatiya, Irkutskaya oblast',
...@@ -2174,14 +2220,15 @@ Zone Asia/Irkutsk 6:57:20 - LMT 1880 ...@@ -2174,14 +2220,15 @@ Zone Asia/Irkutsk 6:57:20 - LMT 1880
7:00 - IRKT 1930 Jun 21 # Irkutsk Time 7:00 - IRKT 1930 Jun 21 # Irkutsk Time
8:00 Russia IRK%sT 1991 Mar 31 2:00s 8:00 Russia IRK%sT 1991 Mar 31 2:00s
7:00 Russia IRK%sT 1992 Jan 19 2:00s 7:00 Russia IRK%sT 1992 Jan 19 2:00s
8:00 Russia IRK%sT 8:00 Russia IRK%sT 2011 Mar 27 2:00s
9:00 - IRKT
# #
# From Oscar van Vlijmen (2003-10-18): [This region consists of] # From Oscar van Vlijmen (2003-10-18): [This region consists of]
# Aginskij Buryatskij avtonomnyj okrug, Amurskaya oblast', # Aginskij Buryatskij avtonomnyj okrug, Amurskaya oblast',
# [parts of] Respublika Sakha (Yakutiya), Chitinskaya oblast'. # [parts of] Respublika Sakha (Yakutiya), Chitinskaya oblast'.
# From Oscar van Vlijmen (2009-11-29): # From Oscar van Vlijmen (2009-11-29):
# ...some regions of RUssia were merged with others since 2005... # ...some regions of [Russia] were merged with others since 2005...
# Some names were changed, no big deal, except for one instance: a new name. # Some names were changed, no big deal, except for one instance: a new name.
# YAK/YAKST: UTC+9 Zabajkal'skij kraj. # YAK/YAKST: UTC+9 Zabajkal'skij kraj.
...@@ -2197,7 +2244,8 @@ Zone Asia/Yakutsk 8:38:40 - LMT 1919 Dec 15 ...@@ -2197,7 +2244,8 @@ Zone Asia/Yakutsk 8:38:40 - LMT 1919 Dec 15
8:00 - YAKT 1930 Jun 21 # Yakutsk Time 8:00 - YAKT 1930 Jun 21 # Yakutsk Time
9:00 Russia YAK%sT 1991 Mar 31 2:00s 9:00 Russia YAK%sT 1991 Mar 31 2:00s
8:00 Russia YAK%sT 1992 Jan 19 2:00s 8:00 Russia YAK%sT 1992 Jan 19 2:00s
9:00 Russia YAK%sT 9:00 Russia YAK%sT 2011 Mar 27 2:00s
10:00 - YAKT
# #
# From Oscar van Vlijmen (2003-10-18): [This region consists of] # From Oscar van Vlijmen (2003-10-18): [This region consists of]
# Evrejskaya avtonomnaya oblast', Khabarovskij kraj, Primorskij kraj, # Evrejskaya avtonomnaya oblast', Khabarovskij kraj, Primorskij kraj,
...@@ -2210,7 +2258,8 @@ Zone Asia/Vladivostok 8:47:44 - LMT 1922 Nov 15 ...@@ -2210,7 +2258,8 @@ Zone Asia/Vladivostok 8:47:44 - LMT 1922 Nov 15
9:00 - VLAT 1930 Jun 21 # Vladivostok Time 9:00 - VLAT 1930 Jun 21 # Vladivostok Time
10:00 Russia VLA%sT 1991 Mar 31 2:00s 10:00 Russia VLA%sT 1991 Mar 31 2:00s
9:00 Russia VLA%sST 1992 Jan 19 2:00s 9:00 Russia VLA%sST 1992 Jan 19 2:00s
10:00 Russia VLA%sT 10:00 Russia VLA%sT 2011 Mar 27 2:00s
11:00 - VLAT
# #
# Sakhalinskaya oblast'. # Sakhalinskaya oblast'.
# The Zone name should be Yuzhno-Sakhalinsk, but that's too long. # The Zone name should be Yuzhno-Sakhalinsk, but that's too long.
...@@ -2220,7 +2269,8 @@ Zone Asia/Sakhalin 9:30:48 - LMT 1905 Aug 23 ...@@ -2220,7 +2269,8 @@ Zone Asia/Sakhalin 9:30:48 - LMT 1905 Aug 23
11:00 Russia SAK%sT 1991 Mar 31 2:00s # Sakhalin T. 11:00 Russia SAK%sT 1991 Mar 31 2:00s # Sakhalin T.
10:00 Russia SAK%sT 1992 Jan 19 2:00s 10:00 Russia SAK%sT 1992 Jan 19 2:00s
11:00 Russia SAK%sT 1997 Mar lastSun 2:00s 11:00 Russia SAK%sT 1997 Mar lastSun 2:00s
10:00 Russia SAK%sT 10:00 Russia SAK%sT 2011 Mar 27 2:00s
11:00 - SAKT
# #
# From Oscar van Vlijmen (2003-10-18): [This region consists of] # From Oscar van Vlijmen (2003-10-18): [This region consists of]
# Magadanskaya oblast', Respublika Sakha (Yakutiya). # Magadanskaya oblast', Respublika Sakha (Yakutiya).
...@@ -2233,7 +2283,8 @@ Zone Asia/Magadan 10:03:12 - LMT 1924 May 2 ...@@ -2233,7 +2283,8 @@ Zone Asia/Magadan 10:03:12 - LMT 1924 May 2
10:00 - MAGT 1930 Jun 21 # Magadan Time 10:00 - MAGT 1930 Jun 21 # Magadan Time
11:00 Russia MAG%sT 1991 Mar 31 2:00s 11:00 Russia MAG%sT 1991 Mar 31 2:00s
10:00 Russia MAG%sT 1992 Jan 19 2:00s 10:00 Russia MAG%sT 1992 Jan 19 2:00s
11:00 Russia MAG%sT 11:00 Russia MAG%sT 2011 Mar 27 2:00s
12:00 - MAGT
# #
# From Oscar van Vlijmen (2001-08-25): [This region consists of] # From Oscar van Vlijmen (2001-08-25): [This region consists of]
# Kamchatskaya oblast', Koryakskij avtonomnyj okrug. # Kamchatskaya oblast', Koryakskij avtonomnyj okrug.
...@@ -2244,7 +2295,8 @@ Zone Asia/Kamchatka 10:34:36 - LMT 1922 Nov 10 ...@@ -2244,7 +2295,8 @@ Zone Asia/Kamchatka 10:34:36 - LMT 1922 Nov 10
12:00 Russia PET%sT 1991 Mar 31 2:00s 12:00 Russia PET%sT 1991 Mar 31 2:00s
11:00 Russia PET%sT 1992 Jan 19 2:00s 11:00 Russia PET%sT 1992 Jan 19 2:00s
12:00 Russia PET%sT 2010 Mar 28 2:00s 12:00 Russia PET%sT 2010 Mar 28 2:00s
11:00 Russia PET%sT 11:00 Russia PET%sT 2011 Mar 27 2:00s
12:00 - PETT
# #
# Chukotskij avtonomnyj okrug # Chukotskij avtonomnyj okrug
Zone Asia/Anadyr 11:49:56 - LMT 1924 May 2 Zone Asia/Anadyr 11:49:56 - LMT 1924 May 2
...@@ -2253,7 +2305,8 @@ Zone Asia/Anadyr 11:49:56 - LMT 1924 May 2 ...@@ -2253,7 +2305,8 @@ Zone Asia/Anadyr 11:49:56 - LMT 1924 May 2
12:00 Russia ANA%sT 1991 Mar 31 2:00s 12:00 Russia ANA%sT 1991 Mar 31 2:00s
11:00 Russia ANA%sT 1992 Jan 19 2:00s 11:00 Russia ANA%sT 1992 Jan 19 2:00s
12:00 Russia ANA%sT 2010 Mar 28 2:00s 12:00 Russia ANA%sT 2010 Mar 28 2:00s
11:00 Russia ANA%sT 11:00 Russia ANA%sT 2011 Mar 27 2:00s
12:00 - ANAT
# Serbia # Serbia
# Zone NAME GMTOFF RULES FORMAT [UNTIL] # Zone NAME GMTOFF RULES FORMAT [UNTIL]
...@@ -2599,6 +2652,28 @@ Link Europe/Istanbul Asia/Istanbul # Istanbul is in both continents. ...@@ -2599,6 +2652,28 @@ Link Europe/Istanbul Asia/Istanbul # Istanbul is in both continents.
# of March at 3am the time is changing to 4am and each last Sunday of # of March at 3am the time is changing to 4am and each last Sunday of
# October the time at 4am is changing to 3am" # October the time at 4am is changing to 3am"
# From Alexander Krivenyshev (2011-09-20):
# On September 20, 2011 the deputies of the Verkhovna Rada agreed to
# abolish the transfer clock to winter time.
#
# Bill number 8330 of MP from the Party of Regions Oleg Nadoshi got
# approval from 266 deputies.
#
# Ukraine abolishes transter back to the winter time (in Russian)
# <a href="http://news.mail.ru/politics/6861560/">
# http://news.mail.ru/politics/6861560/
# </a>
#
# The Ukrainians will no longer change the clock (in Russian)
# <a href="http://www.segodnya.ua/news/14290482.html">
# http://www.segodnya.ua/news/14290482.html
# </a>
#
# Deputies cancelled the winter time (in Russian)
# <a href="http://www.pravda.com.ua/rus/news/2011/09/20/6600616/">
# http://www.pravda.com.ua/rus/news/2011/09/20/6600616/
# </a>
# Zone NAME GMTOFF RULES FORMAT [UNTIL] # Zone NAME GMTOFF RULES FORMAT [UNTIL]
# Most of Ukraine since 1970 has been like Kiev. # Most of Ukraine since 1970 has been like Kiev.
# "Kyiv" is the transliteration of the Ukrainian name, but # "Kyiv" is the transliteration of the Ukrainian name, but
...@@ -2612,7 +2687,8 @@ Zone Europe/Kiev 2:02:04 - LMT 1880 ...@@ -2612,7 +2687,8 @@ Zone Europe/Kiev 2:02:04 - LMT 1880
3:00 - MSK 1990 Jul 1 2:00 3:00 - MSK 1990 Jul 1 2:00
2:00 - EET 1992 2:00 - EET 1992
2:00 E-Eur EE%sT 1995 2:00 E-Eur EE%sT 1995
2:00 EU EE%sT 2:00 EU EE%sT 2011 Mar lastSun 1:00u
3:00 - FET # Further-eastern European Time
# Ruthenia used CET 1990/1991. # Ruthenia used CET 1990/1991.
# "Uzhhorod" is the transliteration of the Ukrainian name, but # "Uzhhorod" is the transliteration of the Ukrainian name, but
# "Uzhgorod" is more common in English. # "Uzhgorod" is more common in English.
...@@ -2626,7 +2702,8 @@ Zone Europe/Uzhgorod 1:29:12 - LMT 1890 Oct ...@@ -2626,7 +2702,8 @@ Zone Europe/Uzhgorod 1:29:12 - LMT 1890 Oct
1:00 - CET 1991 Mar 31 3:00 1:00 - CET 1991 Mar 31 3:00
2:00 - EET 1992 2:00 - EET 1992
2:00 E-Eur EE%sT 1995 2:00 E-Eur EE%sT 1995
2:00 EU EE%sT 2:00 EU EE%sT 2011 Mar lastSun 1:00u
3:00 - FET # Further-eastern European Time
# Zaporozh'ye and eastern Lugansk oblasts observed DST 1990/1991. # Zaporozh'ye and eastern Lugansk oblasts observed DST 1990/1991.
# "Zaporizhia" is the transliteration of the Ukrainian name, but # "Zaporizhia" is the transliteration of the Ukrainian name, but
# "Zaporozh'ye" is more common in English. Use the common English # "Zaporozh'ye" is more common in English. Use the common English
...@@ -2639,7 +2716,8 @@ Zone Europe/Zaporozhye 2:20:40 - LMT 1880 ...@@ -2639,7 +2716,8 @@ Zone Europe/Zaporozhye 2:20:40 - LMT 1880
1:00 C-Eur CE%sT 1943 Oct 25 1:00 C-Eur CE%sT 1943 Oct 25
3:00 Russia MSK/MSD 1991 Mar 31 2:00 3:00 Russia MSK/MSD 1991 Mar 31 2:00
2:00 E-Eur EE%sT 1995 2:00 E-Eur EE%sT 1995
2:00 EU EE%sT 2:00 EU EE%sT 2011 Mar lastSun 1:00u
3:00 - FET # Further-eastern European Time
# Central Crimea used Moscow time 1994/1997. # Central Crimea used Moscow time 1994/1997.
Zone Europe/Simferopol 2:16:24 - LMT 1880 Zone Europe/Simferopol 2:16:24 - LMT 1880
2:16 - SMT 1924 May 2 # Simferopol Mean T 2:16 - SMT 1924 May 2 # Simferopol Mean T
...@@ -2664,7 +2742,8 @@ Zone Europe/Simferopol 2:16:24 - LMT 1880 ...@@ -2664,7 +2742,8 @@ Zone Europe/Simferopol 2:16:24 - LMT 1880
# Assume it happened in March by not changing the clocks. # Assume it happened in March by not changing the clocks.
3:00 Russia MSK/MSD 1997 3:00 Russia MSK/MSD 1997
3:00 - MSK 1997 Mar lastSun 1:00u 3:00 - MSK 1997 Mar lastSun 1:00u
2:00 EU EE%sT 2:00 EU EE%sT 2011 Mar lastSun 1:00u
3:00 - FET # Further-eastern European Time
############################################################################### ###############################################################################
......
...@@ -43,6 +43,9 @@ ...@@ -43,6 +43,9 @@
# #
# Lines beginning with `#' are comments. # Lines beginning with `#' are comments.
# #
# From Arthur David Olson (2011-08-17):
# Resynchronized today with the ISO 3166 site (adding SS for South Sudan).
#
#country- #country-
#code country name #code country name
AD Andorra AD Andorra
...@@ -52,7 +55,6 @@ AG Antigua & Barbuda ...@@ -52,7 +55,6 @@ AG Antigua & Barbuda
AI Anguilla AI Anguilla
AL Albania AL Albania
AM Armenia AM Armenia
AN Netherlands Antilles
AO Angola AO Angola
AQ Antarctica AQ Antarctica
AR Argentina AR Argentina
...@@ -75,6 +77,7 @@ BL St Barthelemy ...@@ -75,6 +77,7 @@ BL St Barthelemy
BM Bermuda BM Bermuda
BN Brunei BN Brunei
BO Bolivia BO Bolivia
BQ Bonaire Sint Eustatius & Saba
BR Brazil BR Brazil
BS Bahamas BS Bahamas
BT Bhutan BT Bhutan
...@@ -97,6 +100,7 @@ CO Colombia ...@@ -97,6 +100,7 @@ CO Colombia
CR Costa Rica CR Costa Rica
CU Cuba CU Cuba
CV Cape Verde CV Cape Verde
CW Curacao
CX Christmas Island CX Christmas Island
CY Cyprus CY Cyprus
CZ Czech Republic CZ Czech Republic
...@@ -251,8 +255,10 @@ SM San Marino ...@@ -251,8 +255,10 @@ SM San Marino
SN Senegal SN Senegal
SO Somalia SO Somalia
SR Suriname SR Suriname
SS South Sudan
ST Sao Tome & Principe ST Sao Tome & Principe
SV El Salvador SV El Salvador
SX Sint Maarten
SY Syria SY Syria
SZ Swaziland SZ Swaziland
TC Turks & Caicos Is TC Turks & Caicos Is
......
...@@ -490,6 +490,10 @@ Zone America/Los_Angeles -7:52:58 - LMT 1883 Nov 18 12:07:02 ...@@ -490,6 +490,10 @@ Zone America/Los_Angeles -7:52:58 - LMT 1883 Nov 18 12:07:02
# own time. I asked about daylight saving; they said it wasn't used. I # own time. I asked about daylight saving; they said it wasn't used. I
# did not inquire about practices in the past. # did not inquire about practices in the past.
# From Arthur David Olson (2011-08-17):
# For lack of better information, assume that Metlakatla's
# abandonment of use of daylight saving resulted from the 1983 vote.
# Zone NAME GMTOFF RULES FORMAT [UNTIL] # Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone America/Juneau 15:02:19 - LMT 1867 Oct 18 Zone America/Juneau 15:02:19 - LMT 1867 Oct 18
-8:57:41 - LMT 1900 Aug 20 12:00 -8:57:41 - LMT 1900 Aug 20 12:00
...@@ -501,7 +505,7 @@ Zone America/Juneau 15:02:19 - LMT 1867 Oct 18 ...@@ -501,7 +505,7 @@ Zone America/Juneau 15:02:19 - LMT 1867 Oct 18
-8:00 US P%sT 1983 Oct 30 2:00 -8:00 US P%sT 1983 Oct 30 2:00
-9:00 US Y%sT 1983 Nov 30 -9:00 US Y%sT 1983 Nov 30
-9:00 US AK%sT -9:00 US AK%sT
Zone America/Sitka -14:58:47 - LMT 1867 Oct 18 Zone America/Sitka 14:58:47 - LMT 1867 Oct 18
-9:01:13 - LMT 1900 Aug 20 12:00 -9:01:13 - LMT 1900 Aug 20 12:00
-8:00 - PST 1942 -8:00 - PST 1942
-8:00 US P%sT 1946 -8:00 US P%sT 1946
...@@ -515,7 +519,7 @@ Zone America/Metlakatla 15:13:42 - LMT 1867 Oct 18 ...@@ -515,7 +519,7 @@ Zone America/Metlakatla 15:13:42 - LMT 1867 Oct 18
-8:00 US P%sT 1946 -8:00 US P%sT 1946
-8:00 - PST 1969 -8:00 - PST 1969
-8:00 US P%sT 1983 Oct 30 2:00 -8:00 US P%sT 1983 Oct 30 2:00
-8:00 US MeST -8:00 - MeST
Zone America/Yakutat 14:41:05 - LMT 1867 Oct 18 Zone America/Yakutat 14:41:05 - LMT 1867 Oct 18
-9:18:55 - LMT 1900 Aug 20 12:00 -9:18:55 - LMT 1900 Aug 20 12:00
-9:00 - YST 1942 -9:00 - YST 1942
...@@ -615,8 +619,8 @@ Zone Pacific/Honolulu -10:31:26 - LMT 1896 Jan 13 12:00 #Schmitt&Cox ...@@ -615,8 +619,8 @@ Zone Pacific/Honolulu -10:31:26 - LMT 1896 Jan 13 12:00 #Schmitt&Cox
-10:30 - HST 1933 Apr 30 2:00 #Laws 1933 -10:30 - HST 1933 Apr 30 2:00 #Laws 1933
-10:30 1:00 HDT 1933 May 21 12:00 #Laws 1933+12 -10:30 1:00 HDT 1933 May 21 12:00 #Laws 1933+12
-10:30 - HST 1942 Feb 09 2:00 #Schmitt&Cox+2 -10:30 - HST 1942 Feb 09 2:00 #Schmitt&Cox+2
-10:30 1:00 HDT 1945 Sep 30 2:00 #Schmitt&Fox+2 -10:30 1:00 HDT 1945 Sep 30 2:00 #Schmitt&Cox+2
-10:30 US H%sT 1947 Jun 8 2:00 #Schmitt&Fox+2 -10:30 - HST 1947 Jun 8 2:00 #Schmitt&Cox+2
-10:00 - HST -10:00 - HST
# Now we turn to US areas that have diverged from the consensus since 1970. # Now we turn to US areas that have diverged from the consensus since 1970.
...@@ -1185,12 +1189,29 @@ Rule StJohns 1960 1986 - Oct lastSun 2:00 0 S ...@@ -1185,12 +1189,29 @@ Rule StJohns 1960 1986 - Oct lastSun 2:00 0 S
# From Paul Eggert (2000-10-02): # From Paul Eggert (2000-10-02):
# INMS (2000-09-12) says that, since 1988 at least, Newfoundland switches # INMS (2000-09-12) says that, since 1988 at least, Newfoundland switches
# at 00:01 local time. For now, assume it started in 1987. # at 00:01 local time. For now, assume it started in 1987.
# From Michael Pelley (2011-09-12):
# We received today, Monday, September 12, 2011, notification that the
# changes to the Newfoundland Standard Time Act have been proclaimed.
# The change in the Act stipulates that the change from Daylight Savings
# Time to Standard Time and from Standard Time to Daylight Savings Time
# now occurs at 2:00AM.
# ...
# <a href="http://www.assembly.nl.ca/legislation/sr/annualstatutes/2011/1106.chp.htm">
# http://www.assembly.nl.ca/legislation/sr/annualstatutes/2011/1106.chp.htm
# </a>
# ...
# MICHAEL PELLEY | Manager of Enterprise Architecture - Solution Delivery
# Office of the Chief Information Officer
# Executive Council
# Government of Newfoundland & Labrador
Rule StJohns 1987 only - Apr Sun>=1 0:01 1:00 D Rule StJohns 1987 only - Apr Sun>=1 0:01 1:00 D
Rule StJohns 1987 2006 - Oct lastSun 0:01 0 S Rule StJohns 1987 2006 - Oct lastSun 0:01 0 S
Rule StJohns 1988 only - Apr Sun>=1 0:01 2:00 DD Rule StJohns 1988 only - Apr Sun>=1 0:01 2:00 DD
Rule StJohns 1989 2006 - Apr Sun>=1 0:01 1:00 D Rule StJohns 1989 2006 - Apr Sun>=1 0:01 1:00 D
Rule StJohns 2007 max - Mar Sun>=8 0:01 1:00 D Rule StJohns 2007 2011 - Mar Sun>=8 0:01 1:00 D
Rule StJohns 2007 max - Nov Sun>=1 0:01 0 S Rule StJohns 2007 2010 - Nov Sun>=1 0:01 0 S
# #
# St John's has an apostrophe, but Posix file names can't have apostrophes. # St John's has an apostrophe, but Posix file names can't have apostrophes.
# Zone NAME GMTOFF RULES FORMAT [UNTIL] # Zone NAME GMTOFF RULES FORMAT [UNTIL]
...@@ -1200,7 +1221,8 @@ Zone America/St_Johns -3:30:52 - LMT 1884 ...@@ -1200,7 +1221,8 @@ Zone America/St_Johns -3:30:52 - LMT 1884
-3:30:52 StJohns N%sT 1935 Mar 30 -3:30:52 StJohns N%sT 1935 Mar 30
-3:30 StJohns N%sT 1942 May 11 -3:30 StJohns N%sT 1942 May 11
-3:30 Canada N%sT 1946 -3:30 Canada N%sT 1946
-3:30 StJohns N%sT -3:30 StJohns N%sT 2011 Nov
-3:30 Canada N%sT
# most of east Labrador # most of east Labrador
...@@ -1214,7 +1236,8 @@ Zone America/Goose_Bay -4:01:40 - LMT 1884 # Happy Valley-Goose Bay ...@@ -1214,7 +1236,8 @@ Zone America/Goose_Bay -4:01:40 - LMT 1884 # Happy Valley-Goose Bay
-3:30 StJohns N%sT 1942 May 11 -3:30 StJohns N%sT 1942 May 11
-3:30 Canada N%sT 1946 -3:30 Canada N%sT 1946
-3:30 StJohns N%sT 1966 Mar 15 2:00 -3:30 StJohns N%sT 1966 Mar 15 2:00
-4:00 StJohns A%sT -4:00 StJohns A%sT 2011 Nov
-4:00 Canada A%sT
# west Labrador, Nova Scotia, Prince Edward I # west Labrador, Nova Scotia, Prince Edward I
...@@ -1946,20 +1969,69 @@ Zone America/Dawson_Creek -8:00:56 - LMT 1884 ...@@ -1946,20 +1969,69 @@ Zone America/Dawson_Creek -8:00:56 - LMT 1884
# daylight saving.... # daylight saving....
# http://www.nnsl.com/frames/newspapers/2006-11/nov13_06none.html # http://www.nnsl.com/frames/newspapers/2006-11/nov13_06none.html
# From Chris Walton (2007-03-14): # From Chris Walton (2011-03-21):
# Today I phoned the "hamlet office" to find out what Resolute was doing with # Back in 2007 I initiated the creation of a new "zone file" for Resolute
# its clocks. # Bay. Resolute Bay is a small community located about 900km north of
# the Arctic Circle. The zone file was required because Resolute Bay had
# decided to use UTC-5 instead of UTC-6 for the winter of 2006-2007.
#
# According to new information which I received last week, Resolute Bay
# went back to using UTC-6 in the winter of 2007-2008...
#
# On March 11/2007 most of Canada went onto daylight saving. On March
# 14/2007 I phoned the Resolute Bay hamlet office to do a "time check." I
# talked to somebody that was both knowledgeable and helpful. I was able
# to confirm that Resolute Bay was still operating on UTC-5. It was
# explained to me that Resolute Bay had been on the Eastern Time zone
# (EST) in the winter, and was now back on the Central Time zone (CDT).
# i.e. the time zone had changed twice in the last year but the clocks
# had not moved. The residents had to know which time zone they were in
# so they could follow the correct TV schedule...
#
# On Nov 02/2008 most of Canada went onto standard time. On Nov 03/2008 I
# phoned the Resolute Bay hamlet office...[D]ue to the challenging nature
# of the phone call, I decided to seek out an alternate source of
# information. I found an e-mail address for somebody by the name of
# Stephanie Adams whose job was listed as "Inns North Support Officer for
# Arctic Co-operatives." I was under the impression that Stephanie lived
# and worked in Resolute Bay...
#
# On March 14/2011 I phoned the hamlet office again. I was told that
# Resolute Bay had been using Central Standard Time over the winter of
# 2010-2011 and that the clocks had therefore been moved one hour ahead
# on March 13/2011. The person I talked to was aware that Resolute Bay
# had previously experimented with Eastern Standard Time but he could not
# tell me when the practice had stopped.
#
# On March 17/2011 I searched the Web to find an e-mail address of
# somebody that might be able to tell me exactly when Resolute Bay went
# off Eastern Standard Time. I stumbled on the name "Aziz Kheraj." Aziz
# used to be the mayor of Resolute Bay and he apparently owns half the
# businesses including "South Camp Inn." This website has some info on
# Aziz:
# <a href="http://www.uphere.ca/node/493">
# http://www.uphere.ca/node/493
# </a>
# #
# The individual that answered the phone confirmed that the clocks did not # I sent Aziz an e-mail asking when Resolute Bay had stopped using
# move at the end of daylight saving on October 29/2006. He also told me that # Eastern Standard Time.
# the clocks did not move this past weekend (March 11/2007).... #
# Aziz responded quickly with this: "hi, The time was not changed for the
# From Chris Walton (2008-11-13): # 1 year only, the following year, the community went back to the old way
# ...the residents of Resolute believe that they are changing "time zones" # of "spring ahead-fall behind" currently we are zulu plus 5 hrs and in
# twice a year. In winter months, local time is qualified with "Eastern # the winter Zulu plus 6 hrs"
# Time" which is really "Eastern Standard Time (UTC-5)". In summer #
# months, local time is qualified with "Central Time" which is really # This of course conflicted with everything I had ascertained in November 2008.
# "Central Daylight Time (UTC-5)"... #
# I sent Aziz a copy of my 2008 e-mail exchange with Stephanie. Aziz
# responded with this: "Hi, Stephanie lives in Winnipeg. I live here, You
# may want to check with the weather office in Resolute Bay or do a
# search on the weather through Env. Canada. web site"
#
# If I had realized the Stephanie did not live in Resolute Bay I would
# never have contacted her. I now believe that all the information I
# obtained in November 2008 should be ignored...
# I apologize for reporting incorrect information in 2008.
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
Rule NT_YK 1918 only - Apr 14 2:00 1:00 D Rule NT_YK 1918 only - Apr 14 2:00 1:00 D
...@@ -1987,14 +2059,12 @@ Zone America/Iqaluit 0 - zzz 1942 Aug # Frobisher Bay est. ...@@ -1987,14 +2059,12 @@ Zone America/Iqaluit 0 - zzz 1942 Aug # Frobisher Bay est.
-6:00 Canada C%sT 2000 Oct 29 2:00 -6:00 Canada C%sT 2000 Oct 29 2:00
-5:00 Canada E%sT -5:00 Canada E%sT
# aka Qausuittuq # aka Qausuittuq
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
Rule Resolute 2006 max - Nov Sun>=1 2:00 0 ES
Rule Resolute 2007 max - Mar Sun>=8 2:00 0 CD
Zone America/Resolute 0 - zzz 1947 Aug 31 # Resolute founded Zone America/Resolute 0 - zzz 1947 Aug 31 # Resolute founded
-6:00 NT_YK C%sT 2000 Oct 29 2:00 -6:00 NT_YK C%sT 2000 Oct 29 2:00
-5:00 - EST 2001 Apr 1 3:00 -5:00 - EST 2001 Apr 1 3:00
-6:00 Canada C%sT 2006 Oct 29 2:00 -6:00 Canada C%sT 2006 Oct 29 2:00
-5:00 Resolute %sT -5:00 - EST 2007 Mar 11 3:00
-6:00 Canada C%sT
# aka Kangiqiniq # aka Kangiqiniq
Zone America/Rankin_Inlet 0 - zzz 1957 # Rankin Inlet founded Zone America/Rankin_Inlet 0 - zzz 1957 # Rankin Inlet founded
-6:00 NT_YK C%sT 2000 Oct 29 2:00 -6:00 NT_YK C%sT 2000 Oct 29 2:00
......
...@@ -819,6 +819,26 @@ Zone America/La_Paz -4:32:36 - LMT 1890 ...@@ -819,6 +819,26 @@ Zone America/La_Paz -4:32:36 - LMT 1890
# <a href="http://www.timeanddate.com/news/time/brazil-dst-2008-2009.html"> # <a href="http://www.timeanddate.com/news/time/brazil-dst-2008-2009.html">
# http://www.timeanddate.com/news/time/brazil-dst-2008-2009.html # http://www.timeanddate.com/news/time/brazil-dst-2008-2009.html
# </a> # </a>
#
# From Alexander Krivenyshev (2011-10-04):
# State Bahia will return to Daylight savings time this year after 8 years off.
# The announcement was made by Governor Jaques Wagner in an interview to a
# television station in Salvador.
# In Portuguese:
# <a href="http://g1.globo.com/bahia/noticia/2011/10/governador-jaques-wagner-confirma-horario-de-verao-na-bahia.html">
# http://g1.globo.com/bahia/noticia/2011/10/governador-jaques-wagner-confirma-horario-de-verao-na-bahia.html
# </a> and
# <a href="http://noticias.terra.com.br/brasil/noticias/0,,OI5390887-EI8139,00-Bahia+volta+a+ter+horario+de+verao+apos+oito+anos.html">
# http://noticias.terra.com.br/brasil/noticias/0,,OI5390887-EI8139,00-Bahia+volta+a+ter+horario+de+verao+apos+oito+anos.html
# </a>
# From Guilherme Bernardes Rodrigues (2011-10-07):
# There is news in the media, however there is still no decree about it.
# I just send a e-mail to Zulmira Brandão at
# <a href="http://pcdsh01.on.br/">http://pcdsh01.on.br/</a> the
# oficial agency about time in Brazil, and she confirmed that the old rule is
# still in force.
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
# Decree <a href="http://pcdsh01.on.br/HV20466.htm">20,466</a> (1931-10-01) # Decree <a href="http://pcdsh01.on.br/HV20466.htm">20,466</a> (1931-10-01)
...@@ -1057,6 +1077,9 @@ Zone America/Maceio -2:22:52 - LMT 1914 ...@@ -1057,6 +1077,9 @@ Zone America/Maceio -2:22:52 - LMT 1914
Zone America/Bahia -2:34:04 - LMT 1914 Zone America/Bahia -2:34:04 - LMT 1914
-3:00 Brazil BR%sT 2003 Sep 24 -3:00 Brazil BR%sT 2003 Sep 24
-3:00 - BRT -3:00 - BRT
# as noted above, not yet in operation.
# -3:00 - BRT 2011 Oct 16
# -3:00 Brazil BR%sT
# #
# Goias (GO), Distrito Federal (DF), Minas Gerais (MG), # Goias (GO), Distrito Federal (DF), Minas Gerais (MG),
# Espirito Santo (ES), Rio de Janeiro (RJ), Sao Paulo (SP), Parana (PR), # Espirito Santo (ES), Rio de Janeiro (RJ), Sao Paulo (SP), Parana (PR),
...@@ -1298,6 +1321,14 @@ Zone America/Curacao -4:35:44 - LMT 1912 Feb 12 # Willemstad ...@@ -1298,6 +1321,14 @@ Zone America/Curacao -4:35:44 - LMT 1912 Feb 12 # Willemstad
-4:30 - ANT 1965 # Netherlands Antilles Time -4:30 - ANT 1965 # Netherlands Antilles Time
-4:00 - AST -4:00 - AST
# From Arthur David Olson (2011-06-15):
# At least for now, use links for places with new iso3166 codes.
# The name "Lower Prince's Quarter" is both longer than fourteen charaters
# and contains an apostrophe; use "Lower_Princes" below.
Link America/Curacao America/Lower_Princes # Sint Maarten
Link America/Curacao America/Kralendijk # Bonaire, Sint Estatius and Saba
# Ecuador # Ecuador
# #
# From Paul Eggert (2007-03-04): # From Paul Eggert (2007-03-04):
......
...@@ -54,7 +54,6 @@ AG +1703-06148 America/Antigua ...@@ -54,7 +54,6 @@ AG +1703-06148 America/Antigua
AI +1812-06304 America/Anguilla AI +1812-06304 America/Anguilla
AL +4120+01950 Europe/Tirane AL +4120+01950 Europe/Tirane
AM +4011+04430 Asia/Yerevan AM +4011+04430 Asia/Yerevan
AN +1211-06900 America/Curacao
AO -0848+01314 Africa/Luanda AO -0848+01314 Africa/Luanda
AQ -7750+16636 Antarctica/McMurdo McMurdo Station, Ross Island AQ -7750+16636 Antarctica/McMurdo McMurdo Station, Ross Island
AQ -9000+00000 Antarctica/South_Pole Amundsen-Scott Station, South Pole AQ -9000+00000 Antarctica/South_Pole Amundsen-Scott Station, South Pole
...@@ -109,6 +108,7 @@ BL +1753-06251 America/St_Barthelemy ...@@ -109,6 +108,7 @@ BL +1753-06251 America/St_Barthelemy
BM +3217-06446 Atlantic/Bermuda BM +3217-06446 Atlantic/Bermuda
BN +0456+11455 Asia/Brunei BN +0456+11455 Asia/Brunei
BO -1630-06809 America/La_Paz BO -1630-06809 America/La_Paz
BQ +120903-0681636 America/Kralendijk
BR -0351-03225 America/Noronha Atlantic islands BR -0351-03225 America/Noronha Atlantic islands
BR -0127-04829 America/Belem Amapa, E Para BR -0127-04829 America/Belem Amapa, E Para
BR -0343-03830 America/Fortaleza NE Brazil (MA, PI, CE, RN, PB) BR -0343-03830 America/Fortaleza NE Brazil (MA, PI, CE, RN, PB)
...@@ -142,7 +142,7 @@ CA +4901-08816 America/Nipigon Eastern Time - Ontario & Quebec - places that did ...@@ -142,7 +142,7 @@ CA +4901-08816 America/Nipigon Eastern Time - Ontario & Quebec - places that did
CA +4823-08915 America/Thunder_Bay Eastern Time - Thunder Bay, Ontario CA +4823-08915 America/Thunder_Bay Eastern Time - Thunder Bay, Ontario
CA +6344-06828 America/Iqaluit Eastern Time - east Nunavut - most locations CA +6344-06828 America/Iqaluit Eastern Time - east Nunavut - most locations
CA +6608-06544 America/Pangnirtung Eastern Time - Pangnirtung, Nunavut CA +6608-06544 America/Pangnirtung Eastern Time - Pangnirtung, Nunavut
CA +744144-0944945 America/Resolute Eastern Standard Time - Resolute, Nunavut CA +744144-0944945 America/Resolute Central Standard Time - Resolute, Nunavut
CA +484531-0913718 America/Atikokan Eastern Standard Time - Atikokan, Ontario and Southampton I, Nunavut CA +484531-0913718 America/Atikokan Eastern Standard Time - Atikokan, Ontario and Southampton I, Nunavut
CA +624900-0920459 America/Rankin_Inlet Central Time - central Nunavut CA +624900-0920459 America/Rankin_Inlet Central Time - central Nunavut
CA +4953-09709 America/Winnipeg Central Time - Manitoba & west Ontario CA +4953-09709 America/Winnipeg Central Time - Manitoba & west Ontario
...@@ -177,6 +177,7 @@ CO +0436-07405 America/Bogota ...@@ -177,6 +177,7 @@ CO +0436-07405 America/Bogota
CR +0956-08405 America/Costa_Rica CR +0956-08405 America/Costa_Rica
CU +2308-08222 America/Havana CU +2308-08222 America/Havana
CV +1455-02331 Atlantic/Cape_Verde CV +1455-02331 Atlantic/Cape_Verde
CW +1211-06900 America/Curacao
CX -1025+10543 Indian/Christmas CX -1025+10543 Indian/Christmas
CY +3510+03322 Asia/Nicosia CY +3510+03322 Asia/Nicosia
CZ +5005+01426 Europe/Prague CZ +5005+01426 Europe/Prague
...@@ -340,7 +341,8 @@ PL +5215+02100 Europe/Warsaw ...@@ -340,7 +341,8 @@ PL +5215+02100 Europe/Warsaw
PM +4703-05620 America/Miquelon PM +4703-05620 America/Miquelon
PN -2504-13005 Pacific/Pitcairn PN -2504-13005 Pacific/Pitcairn
PR +182806-0660622 America/Puerto_Rico PR +182806-0660622 America/Puerto_Rico
PS +3130+03428 Asia/Gaza PS +3130+03428 Asia/Gaza Gaza Strip
PS +313200+0350542 Asia/Hebron West Bank
PT +3843-00908 Europe/Lisbon mainland PT +3843-00908 Europe/Lisbon mainland
PT +3238-01654 Atlantic/Madeira Madeira Islands PT +3238-01654 Atlantic/Madeira Madeira Islands
PT +3744-02540 Atlantic/Azores Azores PT +3744-02540 Atlantic/Azores Azores
...@@ -382,8 +384,10 @@ SM +4355+01228 Europe/San_Marino ...@@ -382,8 +384,10 @@ SM +4355+01228 Europe/San_Marino
SN +1440-01726 Africa/Dakar SN +1440-01726 Africa/Dakar
SO +0204+04522 Africa/Mogadishu SO +0204+04522 Africa/Mogadishu
SR +0550-05510 America/Paramaribo SR +0550-05510 America/Paramaribo
SS +0451+03136 Africa/Juba
ST +0020+00644 Africa/Sao_Tome ST +0020+00644 Africa/Sao_Tome
SV +1342-08912 America/El_Salvador SV +1342-08912 America/El_Salvador
SX +180305-0630250 America/Lower_Princes
SY +3330+03618 Asia/Damascus SY +3330+03618 Asia/Damascus
SZ -2618+03106 Africa/Mbabane SZ -2618+03106 Africa/Mbabane
TC +2128-07108 America/Grand_Turk TC +2128-07108 America/Grand_Turk
......
# #
# Copyright (c) 1995, 2010, Oracle and/or its affiliates. All rights reserved. # Copyright (c) 1995, 2011, 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
...@@ -26,6 +26,8 @@ ...@@ -26,6 +26,8 @@
BUILDDIR = ../.. BUILDDIR = ../..
PACKAGE = sun.net PACKAGE = sun.net
PRODUCT = sun PRODUCT = sun
SUBDIRS_MAKEFLAGS += JAVAC_MAX_WARNINGS=true
SUBDIRS_MAKEFLAGS += JAVAC_WARNINGS_FATAL=true
include $(BUILDDIR)/common/Defs.gmk include $(BUILDDIR)/common/Defs.gmk
SUBDIRS = others spi SUBDIRS = others spi
......
...@@ -24,6 +24,8 @@ ...@@ -24,6 +24,8 @@
# #
BUILDDIR = ../../.. BUILDDIR = ../../..
SUBDIRS_MAKEFLAGS += JAVAC_WARNINGS_FATAL=true
include $(BUILDDIR)/common/Defs.gmk include $(BUILDDIR)/common/Defs.gmk
SUBDIRS_misc = nameservice SUBDIRS_misc = nameservice
......
...@@ -28,7 +28,8 @@ ...@@ -28,7 +28,8 @@
# #
BUILDDIR = ../../../../.. BUILDDIR = ../../../../..
JAVAC_MAX_WARNINGS = true
JAVAC_WARNINGS_FATAL = true
# dns should probably be its own module # dns should probably be its own module
PACKAGE = sun.net.spi.nameservice.dns PACKAGE = sun.net.spi.nameservice.dns
PRODUCT = sun PRODUCT = sun
......
...@@ -30,15 +30,8 @@ ...@@ -30,15 +30,8 @@
BUILDDIR = ../../.. BUILDDIR = ../../..
PACKAGE = sun.rmi PACKAGE = sun.rmi
PRODUCT = sun PRODUCT = sun
LIBRARY = rmi
include $(BUILDDIR)/common/Defs.gmk include $(BUILDDIR)/common/Defs.gmk
#
# Add use of a mapfile
#
FILES_m = mapfile-vers
include $(BUILDDIR)/common/Mapfile-vers.gmk
# #
# Java files to compile. # Java files to compile.
# #
...@@ -51,32 +44,10 @@ AUTO_FILES_JAVA_DIRS = \ ...@@ -51,32 +44,10 @@ AUTO_FILES_JAVA_DIRS = \
sun/rmi/transport \ sun/rmi/transport \
com/sun/rmi com/sun/rmi
#
# Native files to compile.
#
FILES_c = \
sun/rmi/server/MarshalInputStream.c
#
# Add ambient vpath to pick up files not part of sun.rmi package
#
vpath %.c $(SHARE_SRC)/native/sun/rmi/server
#
# Exported files that require generated .h
#
FILES_export = \
sun/rmi/server/MarshalInputStream.java
#
# Link to JVM for JVM_LatestUserDefinedLoader
#
OTHER_LDLIBS = $(JVMLIB)
# #
# Rules # Rules
# #
include $(BUILDDIR)/common/Library.gmk include $(BUILDDIR)/common/Rules.gmk
# #
# Full package names of implementations requiring stubs # Full package names of implementations requiring stubs
......
...@@ -192,10 +192,8 @@ ifeq ($(NATIVE_ECC_AVAILABLE), true) ...@@ -192,10 +192,8 @@ ifeq ($(NATIVE_ECC_AVAILABLE), true)
# #
# Libraries to link # Libraries to link
# #
ifeq ($(PLATFORM), windows) ifneq ($(PLATFORM), windows)
OTHER_LDLIBS += $(JVMLIB) OTHER_LDLIBS = $(LIBCXX)
else
OTHER_LDLIBS = -ldl $(JVMLIB) $(LIBCXX)
endif endif
include $(BUILDDIR)/common/Mapfile-vers.gmk include $(BUILDDIR)/common/Mapfile-vers.gmk
......
...@@ -72,5 +72,6 @@ include $(BUILDDIR)/common/Library.gmk ...@@ -72,5 +72,6 @@ include $(BUILDDIR)/common/Library.gmk
# Libraries to link # Libraries to link
# #
ifneq ($(PLATFORM), windows) ifneq ($(PLATFORM), windows)
OTHER_LDLIBS = -ldl $(JVMLIB) OTHER_LDLIBS = -ldl
endif endif
...@@ -69,15 +69,6 @@ else ...@@ -69,15 +69,6 @@ else
include $(BUILDDIR)/common/Classes.gmk include $(BUILDDIR)/common/Classes.gmk
endif # PLATFORM endif # PLATFORM
#
# Libraries to link
#
ifeq ($(PLATFORM), windows)
OTHER_LDLIBS = $(JVMLIB)
else
OTHER_LDLIBS = -ldl $(JVMLIB)
endif
build: build:
ifeq ($(PLATFORM),windows) ifeq ($(PLATFORM),windows)
$(call make-launcher, kinit, sun.security.krb5.internal.tools.Kinit, , ) $(call make-launcher, kinit, sun.security.krb5.internal.tools.Kinit, , )
......
...@@ -159,7 +159,7 @@ include $(BUILDDIR)/common/Library.gmk ...@@ -159,7 +159,7 @@ include $(BUILDDIR)/common/Library.gmk
# Libraries to link # Libraries to link
# #
ifeq ($(PLATFORM), windows) ifeq ($(PLATFORM), windows)
OTHER_LDLIBS += $(JVMLIB) Crypt32.Lib OTHER_LDLIBS += Crypt32.Lib
endif endif
# #
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
BUILDDIR = ../../.. BUILDDIR = ../../..
PACKAGE = sun.security.other PACKAGE = sun.security.other
PRODUCT = sun PRODUCT = sun
JAVAC_MAX_WARNINGS=false JAVAC_MAX_WARNINGS=true
JAVAC_LINT_OPTIONS=-Xlint:all,-deprecation JAVAC_LINT_OPTIONS=-Xlint:all,-deprecation
JAVAC_WARNINGS_FATAL=true JAVAC_WARNINGS_FATAL=true
include $(BUILDDIR)/common/Defs.gmk include $(BUILDDIR)/common/Defs.gmk
...@@ -38,6 +38,7 @@ AUTO_FILES_JAVA_DIRS = \ ...@@ -38,6 +38,7 @@ AUTO_FILES_JAVA_DIRS = \
sun/security/acl \ sun/security/acl \
sun/security/jca \ sun/security/jca \
sun/security/pkcs \ sun/security/pkcs \
sun/security/pkcs10 \
sun/security/pkcs12 \ sun/security/pkcs12 \
sun/security/provider \ sun/security/provider \
sun/security/rsa \ sun/security/rsa \
......
...@@ -159,10 +159,8 @@ include $(BUILDDIR)/common/Library.gmk ...@@ -159,10 +159,8 @@ include $(BUILDDIR)/common/Library.gmk
# #
# Libraries to link # Libraries to link
# #
ifeq ($(PLATFORM), windows) ifneq ($(PLATFORM), windows)
OTHER_LDLIBS = $(JVMLIB) OTHER_LDLIBS = -ldl
else
OTHER_LDLIBS = -ldl $(JVMLIB)
endif endif
# Other config files # Other config files
......
...@@ -73,8 +73,8 @@ include $(BUILDDIR)/common/Library.gmk ...@@ -73,8 +73,8 @@ include $(BUILDDIR)/common/Library.gmk
# Libraries to link # Libraries to link
# #
ifeq ($(PLATFORM), windows) ifeq ($(PLATFORM), windows)
OTHER_LDLIBS = $(JVMLIB) winscard.lib OTHER_LDLIBS = winscard.lib
else else
OTHER_LDLIBS = -ldl $(JVMLIB) OTHER_LDLIBS = -ldl
OTHER_CFLAGS = -D__sun_jdk OTHER_CFLAGS = -D__sun_jdk
endif endif
# #
# Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved. # Copyright (c) 2011, 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
...@@ -23,11 +23,18 @@ ...@@ -23,11 +23,18 @@
# questions. # questions.
# #
# Define library interface. BUILDDIR = ../..
PACKAGE = sun.util
PRODUCT = sun
include $(BUILDDIR)/common/Defs.gmk
#
# Files
#
AUTO_FILES_JAVA_DIRS = sun/util/xml
#
# Rules
#
include $(BUILDDIR)/common/Classes.gmk
SUNWprivate_1.1 {
global:
Java_sun_rmi_server_MarshalInputStream_latestUserDefinedLoader;
local:
*;
};
...@@ -76,8 +76,8 @@ class Mappings { ...@@ -76,8 +76,8 @@ class Mappings {
// If the GMT offset of this Zone will change in some // If the GMT offset of this Zone will change in some
// future time, this Zone is added to the exclude list. // future time, this Zone is added to the exclude list.
boolean isExcluded = false; boolean isExcluded = false;
if (zone.size() > 1) { for (int i = 0; i < zone.size(); i++) {
ZoneRec zrec = zone.get(zone.size()-2); ZoneRec zrec = zone.get(i);
if ((zrec.getGmtOffset() != rawOffset) if ((zrec.getGmtOffset() != rawOffset)
&& (zrec.getUntilTime(0) > Time.getCurrentTime())) { && (zrec.getUntilTime(0) > Time.getCurrentTime())) {
if (excludeList == null) { if (excludeList == null) {
...@@ -85,6 +85,7 @@ class Mappings { ...@@ -85,6 +85,7 @@ class Mappings {
} }
excludeList.add(zone.getName()); excludeList.add(zone.getName());
isExcluded = true; isExcluded = true;
break;
} }
} }
......
...@@ -32,6 +32,7 @@ import java.io.IOException; ...@@ -32,6 +32,7 @@ import java.io.IOException;
import java.io.OutputStream; import java.io.OutputStream;
import java.io.InputStream; import java.io.InputStream;
import java.net.Socket; import java.net.Socket;
import javax.net.ssl.SSLSocket;
import javax.naming.CommunicationException; import javax.naming.CommunicationException;
import javax.naming.ServiceUnavailableException; import javax.naming.ServiceUnavailableException;
...@@ -361,6 +362,19 @@ public final class Connection implements Runnable { ...@@ -361,6 +362,19 @@ public final class Connection implements Runnable {
} }
} }
// For LDAP connect timeouts on LDAP over SSL connections must treat
// the SSL handshake following socket connection as part of the timeout.
// So explicitly set a socket read timeout, trigger the SSL handshake,
// then reset the timeout.
if (connectTimeout > 0 && socket instanceof SSLSocket) {
SSLSocket sslSocket = (SSLSocket) socket;
int socketTimeout = sslSocket.getSoTimeout();
sslSocket.setSoTimeout(connectTimeout); // reuse full timeout value
sslSocket.startHandshake();
sslSocket.setSoTimeout(socketTimeout);
}
return socket; return socket;
} }
......
/* /*
* Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2006, 2011, 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
...@@ -54,13 +54,13 @@ public abstract class BasicAuthenticator extends Authenticator { ...@@ -54,13 +54,13 @@ public abstract class BasicAuthenticator extends Authenticator {
public Result authenticate (HttpExchange t) public Result authenticate (HttpExchange t)
{ {
Headers rmap = (Headers) t.getRequestHeaders(); Headers rmap = t.getRequestHeaders();
/* /*
* look for auth token * look for auth token
*/ */
String auth = rmap.getFirst ("Authorization"); String auth = rmap.getFirst ("Authorization");
if (auth == null) { if (auth == null) {
Headers map = (Headers) t.getResponseHeaders(); Headers map = t.getResponseHeaders();
map.set ("WWW-Authenticate", "Basic realm=" + "\""+realm+"\""); map.set ("WWW-Authenticate", "Basic realm=" + "\""+realm+"\"");
return new Authenticator.Retry (401); return new Authenticator.Retry (401);
} }
...@@ -83,7 +83,7 @@ public abstract class BasicAuthenticator extends Authenticator { ...@@ -83,7 +83,7 @@ public abstract class BasicAuthenticator extends Authenticator {
} else { } else {
/* reject the request again with 401 */ /* reject the request again with 401 */
Headers map = (Headers) t.getResponseHeaders(); Headers map = t.getResponseHeaders();
map.set ("WWW-Authenticate", "Basic realm=" + "\""+realm+"\""); map.set ("WWW-Authenticate", "Basic realm=" + "\""+realm+"\"");
return new Authenticator.Failure(401); return new Authenticator.Failure(401);
} }
......
/* /*
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2005, 2011, 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
...@@ -117,7 +117,7 @@ public class Headers implements Map<String,List<String>> { ...@@ -117,7 +117,7 @@ public class Headers implements Map<String,List<String>> {
* @return the first string value associated with the key * @return the first string value associated with the key
*/ */
public String getFirst (String key) { public String getFirst (String key) {
List<String> l = map.get(normalize((String)key)); List<String> l = map.get(normalize(key));
if (l == null) { if (l == null) {
return null; return null;
} }
......
/* /*
* Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2005, 2011, 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
...@@ -81,29 +81,27 @@ public abstract class HttpServerProvider { ...@@ -81,29 +81,27 @@ public abstract class HttpServerProvider {
if (cn == null) if (cn == null)
return false; return false;
try { try {
Class c = Class.forName(cn, true, Class<?> c = Class.forName(cn, true,
ClassLoader.getSystemClassLoader()); ClassLoader.getSystemClassLoader());
provider = (HttpServerProvider)c.newInstance(); provider = (HttpServerProvider)c.newInstance();
return true; return true;
} catch (ClassNotFoundException x) { } catch (ClassNotFoundException |
throw new ServiceConfigurationError(x); IllegalAccessException |
} catch (IllegalAccessException x) { InstantiationException |
throw new ServiceConfigurationError(x); SecurityException x) {
} catch (InstantiationException x) {
throw new ServiceConfigurationError(x);
} catch (SecurityException x) {
throw new ServiceConfigurationError(x); throw new ServiceConfigurationError(x);
} }
} }
private static boolean loadProviderAsService() { private static boolean loadProviderAsService() {
Iterator i = Service.providers(HttpServerProvider.class, @SuppressWarnings("unchecked")
Iterator<HttpServerProvider> i = Service.providers(HttpServerProvider.class,
ClassLoader.getSystemClassLoader()); ClassLoader.getSystemClassLoader());
for (;;) { for (;;) {
try { try {
if (!i.hasNext()) if (!i.hasNext())
return false; return false;
provider = (HttpServerProvider)i.next(); provider = i.next();
return true; return true;
} catch (ServiceConfigurationError sce) { } catch (ServiceConfigurationError sce) {
if (sce.getCause() instanceof SecurityException) { if (sce.getCause() instanceof SecurityException) {
......
/* /*
* Copyright (c) 2000, 2006, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2000, 2011, 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
...@@ -77,7 +77,7 @@ final class SSLSecurity { ...@@ -77,7 +77,7 @@ final class SSLSecurity {
{ {
Provider provider = service.getProvider(); Provider provider = service.getProvider();
String className = service.getClassName(); String className = service.getClassName();
Class implClass; Class<?> implClass;
try { try {
ClassLoader cl = provider.getClass().getClassLoader(); ClassLoader cl = provider.getClass().getClassLoader();
if (cl == null) { if (cl == null) {
...@@ -133,8 +133,8 @@ final class SSLSecurity { ...@@ -133,8 +133,8 @@ final class SSLSecurity {
* or someone has removed classes from the jsse.jar file. * or someone has removed classes from the jsse.jar file.
*/ */
Class typeClassJavax; Class<?> typeClassJavax;
Class typeClassCom; Class<?> typeClassCom;
Object obj = null; Object obj = null;
/* /*
...@@ -237,7 +237,7 @@ final class SSLSecurity { ...@@ -237,7 +237,7 @@ final class SSLSecurity {
/* /*
* Checks whether one class is the superclass of another * Checks whether one class is the superclass of another
*/ */
private static boolean checkSuperclass(Class subclass, Class superclass) { private static boolean checkSuperclass(Class<?> subclass, Class<?> superclass) {
if ((subclass == null) || (superclass == null)) if ((subclass == null) || (superclass == null))
return false; return false;
...@@ -276,7 +276,6 @@ final class SSLSecurity { ...@@ -276,7 +276,6 @@ final class SSLSecurity {
* object. This also mean that anything going down into the SPI * object. This also mean that anything going down into the SPI
* needs to be wrapped, as well as anything coming back up. * needs to be wrapped, as well as anything coming back up.
*/ */
final class SSLContextSpiWrapper extends SSLContextSpi { final class SSLContextSpiWrapper extends SSLContextSpi {
private javax.net.ssl.SSLContext theSSLContext; private javax.net.ssl.SSLContext theSSLContext;
......
...@@ -165,10 +165,10 @@ class VerifierWrapper implements javax.net.ssl.HostnameVerifier { ...@@ -165,10 +165,10 @@ class VerifierWrapper implements javax.net.ssl.HostnameVerifier {
private static String getServername(X509Certificate peerCert) { private static String getServername(X509Certificate peerCert) {
try { try {
// compare to subjectAltNames if dnsName is present // compare to subjectAltNames if dnsName is present
Collection subjAltNames = peerCert.getSubjectAlternativeNames(); Collection<List<?>> subjAltNames = peerCert.getSubjectAlternativeNames();
if (subjAltNames != null) { if (subjAltNames != null) {
for (Iterator itr = subjAltNames.iterator(); itr.hasNext(); ) { for (Iterator<List<?>> itr = subjAltNames.iterator(); itr.hasNext(); ) {
List next = (List)itr.next(); List<?> next = itr.next();
if (((Integer)next.get(0)).intValue() == 2) { if (((Integer)next.get(0)).intValue() == 2) {
// compare dNSName with host in url // compare dNSName with host in url
String dnsName = ((String)next.get(1)); String dnsName = ((String)next.get(1));
......
...@@ -115,9 +115,9 @@ public final class Init { ...@@ -115,9 +115,9 @@ public final class Init {
// provider mechanism instead if implementing their own // provider mechanism instead if implementing their own
// transform or canonicalization algorithms. // transform or canonicalization algorithms.
// InputStream is = Class.forName("com.sun.org.apache.xml.internal.security.Init").getResourceAsStream("resource/config.xml"); // InputStream is = Class.forName("com.sun.org.apache.xml.internal.security.Init").getResourceAsStream("resource/config.xml");
InputStream is = (InputStream) AccessController.doPrivileged( InputStream is = AccessController.doPrivileged(
new PrivilegedAction() { new PrivilegedAction<InputStream>() {
public Object run() { public InputStream run() {
// String cfile = System.getProperty // String cfile = System.getProperty
// ("com.sun.org.apache.xml.internal.security.resource.config"); // ("com.sun.org.apache.xml.internal.security.resource.config");
return getClass().getResourceAsStream return getClass().getResourceAsStream
......
...@@ -45,9 +45,9 @@ public class JCEMapper { ...@@ -45,9 +45,9 @@ public class JCEMapper {
private static Map uriToJCEName; private static Map<String, String> uriToJCEName;
private static Map algorithmsMap; private static Map<String, Algorithm> algorithmsMap;
private static String providerName = null; private static String providerName = null;
/** /**
...@@ -63,8 +63,8 @@ public class JCEMapper { ...@@ -63,8 +63,8 @@ public class JCEMapper {
static void loadAlgorithms( Element algorithmsEl) { static void loadAlgorithms( Element algorithmsEl) {
Element[] algorithms = XMLUtils.selectNodes(algorithmsEl.getFirstChild(),Init.CONF_NS,"Algorithm"); Element[] algorithms = XMLUtils.selectNodes(algorithmsEl.getFirstChild(),Init.CONF_NS,"Algorithm");
uriToJCEName = new HashMap( algorithms.length * 2); uriToJCEName = new HashMap<String, String>( algorithms.length * 2);
algorithmsMap = new HashMap( algorithms.length * 2); algorithmsMap = new HashMap<String, Algorithm>( algorithms.length * 2);
for (int i = 0 ;i < algorithms.length ;i ++) { for (int i = 0 ;i < algorithms.length ;i ++) {
Element el = algorithms[i]; Element el = algorithms[i];
String id = el.getAttribute("URI"); String id = el.getAttribute("URI");
...@@ -76,7 +76,7 @@ public class JCEMapper { ...@@ -76,7 +76,7 @@ public class JCEMapper {
} }
static Algorithm getAlgorithmMapping(String algoURI) { static Algorithm getAlgorithmMapping(String algoURI) {
return ((Algorithm)algorithmsMap.get(algoURI)); return algorithmsMap.get(algoURI);
} }
/** /**
...@@ -90,7 +90,7 @@ public class JCEMapper { ...@@ -90,7 +90,7 @@ public class JCEMapper {
if (log.isLoggable(java.util.logging.Level.FINE)) if (log.isLoggable(java.util.logging.Level.FINE))
log.log(java.util.logging.Level.FINE, "Request for URI " + AlgorithmURI); log.log(java.util.logging.Level.FINE, "Request for URI " + AlgorithmURI);
String jceName = (String) uriToJCEName.get(AlgorithmURI); String jceName = uriToJCEName.get(AlgorithmURI);
return jceName; return jceName;
} }
...@@ -106,7 +106,7 @@ public class JCEMapper { ...@@ -106,7 +106,7 @@ public class JCEMapper {
if (log.isLoggable(java.util.logging.Level.FINE)) if (log.isLoggable(java.util.logging.Level.FINE))
log.log(java.util.logging.Level.FINE, "Request for URI " + AlgorithmURI); log.log(java.util.logging.Level.FINE, "Request for URI " + AlgorithmURI);
return ((Algorithm) algorithmsMap.get(AlgorithmURI)).algorithmClass; return (algorithmsMap.get(AlgorithmURI)).algorithmClass;
} }
/** /**
...@@ -116,7 +116,7 @@ public class JCEMapper { ...@@ -116,7 +116,7 @@ public class JCEMapper {
* @return The length of the key used in the alogrithm * @return The length of the key used in the alogrithm
*/ */
public static int getKeyLengthFromURI(String AlgorithmURI) { public static int getKeyLengthFromURI(String AlgorithmURI) {
return Integer.parseInt(((Algorithm) algorithmsMap.get(AlgorithmURI)).keyLength); return Integer.parseInt((algorithmsMap.get(AlgorithmURI)).keyLength);
} }
/** /**
...@@ -128,7 +128,7 @@ public class JCEMapper { ...@@ -128,7 +128,7 @@ public class JCEMapper {
*/ */
public static String getJCEKeyAlgorithmFromURI(String AlgorithmURI) { public static String getJCEKeyAlgorithmFromURI(String AlgorithmURI) {
return ((Algorithm) algorithmsMap.get(AlgorithmURI)).requiredKey; return (algorithmsMap.get(AlgorithmURI)).requiredKey;
} }
......
...@@ -71,9 +71,10 @@ public class MessageDigestAlgorithm extends Algorithm { ...@@ -71,9 +71,10 @@ public class MessageDigestAlgorithm extends Algorithm {
this.algorithm = messageDigest; this.algorithm = messageDigest;
} }
static ThreadLocal instances=new ThreadLocal() { static ThreadLocal<Map<String, MessageDigest>> instances=new
protected Object initialValue() { ThreadLocal<Map<String, MessageDigest>>() {
return new HashMap(); protected Map<String, MessageDigest> initialValue() {
return new HashMap<String, MessageDigest>();
}; };
}; };
...@@ -92,7 +93,7 @@ public class MessageDigestAlgorithm extends Algorithm { ...@@ -92,7 +93,7 @@ public class MessageDigestAlgorithm extends Algorithm {
} }
private static MessageDigest getDigestInstance(String algorithmURI) throws XMLSignatureException { private static MessageDigest getDigestInstance(String algorithmURI) throws XMLSignatureException {
MessageDigest result=(MessageDigest) ((Map)instances.get()).get(algorithmURI); MessageDigest result= instances.get().get(algorithmURI);
if (result!=null) if (result!=null)
return result; return result;
String algorithmID = JCEMapper.translateURItoJCEID(algorithmURI); String algorithmID = JCEMapper.translateURItoJCEID(algorithmURI);
...@@ -121,7 +122,7 @@ private static MessageDigest getDigestInstance(String algorithmURI) throws XMLSi ...@@ -121,7 +122,7 @@ private static MessageDigest getDigestInstance(String algorithmURI) throws XMLSi
throw new XMLSignatureException("algorithms.NoSuchAlgorithm", exArgs); throw new XMLSignatureException("algorithms.NoSuchAlgorithm", exArgs);
} }
((Map)instances.get()).put(algorithmURI, md); instances.get().put(algorithmURI, md);
return md; return md;
} }
......
...@@ -51,28 +51,28 @@ public class SignatureAlgorithm extends Algorithm { ...@@ -51,28 +51,28 @@ public class SignatureAlgorithm extends Algorithm {
static boolean _alreadyInitialized = false; static boolean _alreadyInitialized = false;
/** All available algorithm classes are registered here */ /** All available algorithm classes are registered here */
static HashMap _algorithmHash = null; static Map<String, Class<? extends SignatureAlgorithmSpi>> _algorithmHash = null;
static ThreadLocal instancesSigning=new ThreadLocal() { static ThreadLocal<Map<String, SignatureAlgorithmSpi>> instancesSigning=new ThreadLocal<Map<String, SignatureAlgorithmSpi>>() {
protected Object initialValue() { protected Map<String, SignatureAlgorithmSpi> initialValue() {
return new HashMap(); return new HashMap<String, SignatureAlgorithmSpi>();
}; };
}; };
static ThreadLocal instancesVerify=new ThreadLocal() { static ThreadLocal<Map<String, SignatureAlgorithmSpi>> instancesVerify=new ThreadLocal<Map<String, SignatureAlgorithmSpi>>() {
protected Object initialValue() { protected Map<String, SignatureAlgorithmSpi> initialValue() {
return new HashMap(); return new HashMap<String, SignatureAlgorithmSpi>();
}; };
}; };
static ThreadLocal keysSigning=new ThreadLocal() { static ThreadLocal<Map<String, Key>> keysSigning=new ThreadLocal<Map<String, Key>>() {
protected Object initialValue() { protected Map<String, Key> initialValue() {
return new HashMap(); return new HashMap<String, Key>();
}; };
}; };
static ThreadLocal keysVerify=new ThreadLocal() { static ThreadLocal<Map<String, Key>> keysVerify=new ThreadLocal<Map<String, Key>>() {
protected Object initialValue() { protected Map<String, Key> initialValue() {
return new HashMap(); return new HashMap<String, Key>();
}; };
}; };
// boolean isForSigning=false; // boolean isForSigning=false;
...@@ -105,34 +105,34 @@ public class SignatureAlgorithm extends Algorithm { ...@@ -105,34 +105,34 @@ public class SignatureAlgorithm extends Algorithm {
.engineGetContextFromElement(this._constructionElement); .engineGetContextFromElement(this._constructionElement);
} }
private static SignatureAlgorithmSpi getInstanceForSigning(String algorithmURI) throws XMLSignatureException { private static SignatureAlgorithmSpi getInstanceForSigning(String algorithmURI) throws XMLSignatureException {
SignatureAlgorithmSpi result=(SignatureAlgorithmSpi) ((Map)instancesSigning.get()).get(algorithmURI); SignatureAlgorithmSpi result= instancesSigning.get().get(algorithmURI);
if (result!=null) { if (result!=null) {
result.reset(); result.reset();
return result; return result;
} }
result=buildSigner(algorithmURI, result); result=buildSigner(algorithmURI, result);
((Map)instancesSigning.get()).put(algorithmURI,result); instancesSigning.get().put(algorithmURI,result);
return result; return result;
} }
private static SignatureAlgorithmSpi getInstanceForVerify(String algorithmURI) throws XMLSignatureException { private static SignatureAlgorithmSpi getInstanceForVerify(String algorithmURI) throws XMLSignatureException {
SignatureAlgorithmSpi result=(SignatureAlgorithmSpi) ((Map)instancesVerify.get()).get(algorithmURI); SignatureAlgorithmSpi result= instancesVerify.get().get(algorithmURI);
if (result!=null) { if (result!=null) {
result.reset(); result.reset();
return result; return result;
} }
result=buildSigner(algorithmURI, result); result=buildSigner(algorithmURI, result);
((Map)instancesVerify.get()).put(algorithmURI,result); instancesVerify.get().put(algorithmURI,result);
return result; return result;
} }
private static SignatureAlgorithmSpi buildSigner(String algorithmURI, SignatureAlgorithmSpi result) throws XMLSignatureException { private static SignatureAlgorithmSpi buildSigner(String algorithmURI, SignatureAlgorithmSpi result) throws XMLSignatureException {
try { try {
Class implementingClass = Class<? extends SignatureAlgorithmSpi> implementingClass =
SignatureAlgorithm.getImplementingClass(algorithmURI); SignatureAlgorithm.getImplementingClass(algorithmURI);
if (log.isLoggable(java.util.logging.Level.FINE)) if (log.isLoggable(java.util.logging.Level.FINE))
log.log(java.util.logging.Level.FINE, "Create URI \"" + algorithmURI + "\" class \"" log.log(java.util.logging.Level.FINE, "Create URI \"" + algorithmURI + "\" class \""
+ implementingClass + "\""); + implementingClass + "\"");
result=(SignatureAlgorithmSpi) implementingClass.newInstance(); result= implementingClass.newInstance();
return result; return result;
} catch (IllegalAccessException ex) { } catch (IllegalAccessException ex) {
Object exArgs[] = { algorithmURI, ex.getMessage() }; Object exArgs[] = { algorithmURI, ex.getMessage() };
...@@ -270,7 +270,7 @@ public class SignatureAlgorithm extends Algorithm { ...@@ -270,7 +270,7 @@ public class SignatureAlgorithm extends Algorithm {
*/ */
public void initSign(Key signingKey) throws XMLSignatureException { public void initSign(Key signingKey) throws XMLSignatureException {
initializeAlgorithm(true); initializeAlgorithm(true);
Map map=(Map)keysSigning.get(); Map<String, Key> map=keysSigning.get();
if (map.get(this.algorithmURI)==signingKey) { if (map.get(this.algorithmURI)==signingKey) {
return; return;
} }
...@@ -329,7 +329,7 @@ public class SignatureAlgorithm extends Algorithm { ...@@ -329,7 +329,7 @@ public class SignatureAlgorithm extends Algorithm {
*/ */
public void initVerify(Key verificationKey) throws XMLSignatureException { public void initVerify(Key verificationKey) throws XMLSignatureException {
initializeAlgorithm(false); initializeAlgorithm(false);
Map map=(Map)keysVerify.get(); Map<String, Key> map=keysVerify.get();
if (map.get(this.algorithmURI)==verificationKey) { if (map.get(this.algorithmURI)==verificationKey) {
return; return;
} }
...@@ -375,7 +375,7 @@ public class SignatureAlgorithm extends Algorithm { ...@@ -375,7 +375,7 @@ public class SignatureAlgorithm extends Algorithm {
log.log(java.util.logging.Level.FINE, "Init() called"); log.log(java.util.logging.Level.FINE, "Init() called");
if (!SignatureAlgorithm._alreadyInitialized) { if (!SignatureAlgorithm._alreadyInitialized) {
SignatureAlgorithm._algorithmHash = new HashMap(10); SignatureAlgorithm._algorithmHash = new HashMap<String, Class<? extends SignatureAlgorithmSpi>>(10);
SignatureAlgorithm._alreadyInitialized = true; SignatureAlgorithm._alreadyInitialized = true;
} }
} }
...@@ -388,6 +388,7 @@ public class SignatureAlgorithm extends Algorithm { ...@@ -388,6 +388,7 @@ public class SignatureAlgorithm extends Algorithm {
* @throws AlgorithmAlreadyRegisteredException if specified algorithmURI is already registered * @throws AlgorithmAlreadyRegisteredException if specified algorithmURI is already registered
* @throws XMLSignatureException * @throws XMLSignatureException
*/ */
@SuppressWarnings("unchecked")
public static void register(String algorithmURI, String implementingClass) public static void register(String algorithmURI, String implementingClass)
throws AlgorithmAlreadyRegisteredException,XMLSignatureException { throws AlgorithmAlreadyRegisteredException,XMLSignatureException {
...@@ -396,7 +397,7 @@ public class SignatureAlgorithm extends Algorithm { ...@@ -396,7 +397,7 @@ public class SignatureAlgorithm extends Algorithm {
log.log(java.util.logging.Level.FINE, "Try to register " + algorithmURI + " " + implementingClass); log.log(java.util.logging.Level.FINE, "Try to register " + algorithmURI + " " + implementingClass);
// are we already registered? // are we already registered?
Class registeredClassClass = Class<? extends SignatureAlgorithmSpi> registeredClassClass =
SignatureAlgorithm.getImplementingClass(algorithmURI); SignatureAlgorithm.getImplementingClass(algorithmURI);
if (registeredClassClass!=null) { if (registeredClassClass!=null) {
String registeredClass = registeredClassClass.getName(); String registeredClass = registeredClassClass.getName();
...@@ -409,7 +410,7 @@ public class SignatureAlgorithm extends Algorithm { ...@@ -409,7 +410,7 @@ public class SignatureAlgorithm extends Algorithm {
} }
} }
try { try {
SignatureAlgorithm._algorithmHash.put(algorithmURI, Class.forName(implementingClass)); SignatureAlgorithm._algorithmHash.put(algorithmURI, (Class <? extends SignatureAlgorithmSpi>)Class.forName(implementingClass));
} catch (ClassNotFoundException ex) { } catch (ClassNotFoundException ex) {
Object exArgs[] = { algorithmURI, ex.getMessage() }; Object exArgs[] = { algorithmURI, ex.getMessage() };
...@@ -431,13 +432,13 @@ public class SignatureAlgorithm extends Algorithm { ...@@ -431,13 +432,13 @@ public class SignatureAlgorithm extends Algorithm {
* @param URI * @param URI
* @return the class that implements the URI * @return the class that implements the URI
*/ */
private static Class getImplementingClass(String URI) { private static Class<? extends SignatureAlgorithmSpi> getImplementingClass(String URI) {
if (SignatureAlgorithm._algorithmHash == null) { if (SignatureAlgorithm._algorithmHash == null) {
return null; return null;
} }
return (Class) SignatureAlgorithm._algorithmHash.get(URI); return SignatureAlgorithm._algorithmHash.get(URI);
} }
/** /**
......
...@@ -28,6 +28,7 @@ import java.util.Set; ...@@ -28,6 +28,7 @@ import java.util.Set;
import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.xpath.XPath;
import com.sun.org.apache.xml.internal.security.exceptions.AlgorithmAlreadyRegisteredException; import com.sun.org.apache.xml.internal.security.exceptions.AlgorithmAlreadyRegisteredException;
import org.w3c.dom.Document; import org.w3c.dom.Document;
...@@ -83,7 +84,7 @@ public class Canonicalizer { ...@@ -83,7 +84,7 @@ public class Canonicalizer {
ALGO_ID_C14N11_OMIT_COMMENTS + "#WithComments"; ALGO_ID_C14N11_OMIT_COMMENTS + "#WithComments";
static boolean _alreadyInitialized = false; static boolean _alreadyInitialized = false;
static Map _canonicalizerHash = null; static Map<String,Class<? extends CanonicalizerSpi>> _canonicalizerHash = null;
protected CanonicalizerSpi canonicalizerSpi = null; protected CanonicalizerSpi canonicalizerSpi = null;
...@@ -94,7 +95,7 @@ public class Canonicalizer { ...@@ -94,7 +95,7 @@ public class Canonicalizer {
public static void init() { public static void init() {
if (!Canonicalizer._alreadyInitialized) { if (!Canonicalizer._alreadyInitialized) {
Canonicalizer._canonicalizerHash = new HashMap(10); Canonicalizer._canonicalizerHash = new HashMap<String, Class<? extends CanonicalizerSpi>>(10);
Canonicalizer._alreadyInitialized = true; Canonicalizer._alreadyInitialized = true;
} }
} }
...@@ -109,10 +110,11 @@ public class Canonicalizer { ...@@ -109,10 +110,11 @@ public class Canonicalizer {
throws InvalidCanonicalizerException { throws InvalidCanonicalizerException {
try { try {
Class implementingClass = getImplementingClass(algorithmURI); Class<? extends CanonicalizerSpi> implementingClass =
getImplementingClass(algorithmURI);
this.canonicalizerSpi = this.canonicalizerSpi =
(CanonicalizerSpi) implementingClass.newInstance(); implementingClass.newInstance();
this.canonicalizerSpi.reset=true; this.canonicalizerSpi.reset=true;
} catch (Exception e) { } catch (Exception e) {
Object exArgs[] = { algorithmURI }; Object exArgs[] = { algorithmURI };
...@@ -144,11 +146,12 @@ public class Canonicalizer { ...@@ -144,11 +146,12 @@ public class Canonicalizer {
* @param implementingClass * @param implementingClass
* @throws AlgorithmAlreadyRegisteredException * @throws AlgorithmAlreadyRegisteredException
*/ */
@SuppressWarnings("unchecked")
public static void register(String algorithmURI, String implementingClass) public static void register(String algorithmURI, String implementingClass)
throws AlgorithmAlreadyRegisteredException { throws AlgorithmAlreadyRegisteredException {
// check whether URI is already registered // check whether URI is already registered
Class registeredClass = getImplementingClass(algorithmURI); Class<? extends CanonicalizerSpi> registeredClass = getImplementingClass(algorithmURI);
if (registeredClass != null) { if (registeredClass != null) {
Object exArgs[] = { algorithmURI, registeredClass }; Object exArgs[] = { algorithmURI, registeredClass };
...@@ -158,7 +161,7 @@ public class Canonicalizer { ...@@ -158,7 +161,7 @@ public class Canonicalizer {
} }
try { try {
_canonicalizerHash.put(algorithmURI, Class.forName(implementingClass)); _canonicalizerHash.put(algorithmURI, (Class<? extends CanonicalizerSpi>) Class.forName(implementingClass));
} catch (ClassNotFoundException e) { } catch (ClassNotFoundException e) {
throw new RuntimeException("c14n class not found"); throw new RuntimeException("c14n class not found");
} }
...@@ -304,7 +307,7 @@ public class Canonicalizer { ...@@ -304,7 +307,7 @@ public class Canonicalizer {
* @return the result of the c14n. * @return the result of the c14n.
* @throws CanonicalizationException * @throws CanonicalizationException
*/ */
public byte[] canonicalizeXPathNodeSet(Set xpathNodeSet) public byte[] canonicalizeXPathNodeSet(Set<Node> xpathNodeSet)
throws CanonicalizationException { throws CanonicalizationException {
return this.canonicalizerSpi.engineCanonicalizeXPathNodeSet(xpathNodeSet); return this.canonicalizerSpi.engineCanonicalizeXPathNodeSet(xpathNodeSet);
} }
...@@ -317,7 +320,7 @@ public class Canonicalizer { ...@@ -317,7 +320,7 @@ public class Canonicalizer {
* @return the result of the c14n. * @return the result of the c14n.
* @throws CanonicalizationException * @throws CanonicalizationException
*/ */
public byte[] canonicalizeXPathNodeSet(Set xpathNodeSet, public byte[] canonicalizeXPathNodeSet(Set<Node> xpathNodeSet,
String inclusiveNamespaces) throws CanonicalizationException { String inclusiveNamespaces) throws CanonicalizationException {
return this.canonicalizerSpi.engineCanonicalizeXPathNodeSet(xpathNodeSet, return this.canonicalizerSpi.engineCanonicalizeXPathNodeSet(xpathNodeSet,
inclusiveNamespaces); inclusiveNamespaces);
...@@ -347,8 +350,8 @@ public class Canonicalizer { ...@@ -347,8 +350,8 @@ public class Canonicalizer {
* @param URI * @param URI
* @return the name of the class that implements the given URI * @return the name of the class that implements the given URI
*/ */
private static Class getImplementingClass(String URI) { private static Class<? extends CanonicalizerSpi> getImplementingClass(String URI) {
return (Class) _canonicalizerHash.get(URI); return _canonicalizerHash.get(URI);
} }
/** /**
......
...@@ -28,6 +28,7 @@ import java.util.Set; ...@@ -28,6 +28,7 @@ import java.util.Set;
import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.xpath.XPath;
import com.sun.org.apache.xml.internal.security.utils.XMLUtils; import com.sun.org.apache.xml.internal.security.utils.XMLUtils;
import org.w3c.dom.Document; import org.w3c.dom.Document;
...@@ -151,7 +152,7 @@ public abstract class CanonicalizerSpi { ...@@ -151,7 +152,7 @@ public abstract class CanonicalizerSpi {
* @return the c14n bytes * @return the c14n bytes
* @throws CanonicalizationException * @throws CanonicalizationException
*/ */
public abstract byte[] engineCanonicalizeXPathNodeSet(Set xpathNodeSet) public abstract byte[] engineCanonicalizeXPathNodeSet(Set<Node> xpathNodeSet)
throws CanonicalizationException; throws CanonicalizationException;
/** /**
...@@ -162,7 +163,7 @@ public abstract class CanonicalizerSpi { ...@@ -162,7 +163,7 @@ public abstract class CanonicalizerSpi {
* @return the c14n bytes * @return the c14n bytes
* @throws CanonicalizationException * @throws CanonicalizationException
*/ */
public abstract byte[] engineCanonicalizeXPathNodeSet(Set xpathNodeSet, String inclusiveNamespaces) public abstract byte[] engineCanonicalizeXPathNodeSet(Set<Node> xpathNodeSet, String inclusiveNamespaces)
throws CanonicalizationException; throws CanonicalizationException;
/** /**
......
...@@ -41,7 +41,7 @@ import java.util.Comparator; ...@@ -41,7 +41,7 @@ import java.util.Comparator;
* *
* @author Christian Geuer-Pollmann * @author Christian Geuer-Pollmann
*/ */
public class AttrCompare implements Comparator, Serializable { public class AttrCompare implements Comparator<Attr>, Serializable {
private final static long serialVersionUID = -7113259629930576230L; private final static long serialVersionUID = -7113259629930576230L;
private final static int ATTR0_BEFORE_ATTR1 = -1; private final static int ATTR0_BEFORE_ATTR1 = -1;
...@@ -62,16 +62,14 @@ public class AttrCompare implements Comparator, Serializable { ...@@ -62,16 +62,14 @@ public class AttrCompare implements Comparator, Serializable {
* key (an empty namespace URI is lexicographically least). * key (an empty namespace URI is lexicographically least).
* </UL> * </UL>
* *
* @param obj0 casted Attr * @param attr0
* @param obj1 casted Attr * @param attr1
* @return returns a negative integer, zero, or a positive integer as * @return returns a negative integer, zero, or a positive integer as
* obj0 is less than, equal to, or greater than obj1 * obj0 is less than, equal to, or greater than obj1
* *
*/ */
public int compare(Object obj0, Object obj1) { public int compare(Attr attr0, Attr attr1) {
Attr attr0 = (Attr) obj0;
Attr attr1 = (Attr) obj1;
String namespaceURI0 = attr0.getNamespaceURI(); String namespaceURI0 = attr0.getNamespaceURI();
String namespaceURI1 = attr1.getNamespaceURI(); String namespaceURI1 = attr1.getNamespaceURI();
......
...@@ -25,6 +25,7 @@ import java.net.URI; ...@@ -25,6 +25,7 @@ import java.net.URI;
import java.net.URISyntaxException; import java.net.URISyntaxException;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collection; import java.util.Collection;
import java.util.Comparator;
import java.util.HashMap; import java.util.HashMap;
import java.util.Iterator; import java.util.Iterator;
import java.util.List; import java.util.List;
...@@ -33,6 +34,7 @@ import java.util.Set; ...@@ -33,6 +34,7 @@ import java.util.Set;
import java.util.SortedSet; import java.util.SortedSet;
import java.util.TreeSet; import java.util.TreeSet;
import javax.xml.parsers.ParserConfigurationException; import javax.xml.parsers.ParserConfigurationException;
import javax.xml.xpath.XPath;
import org.w3c.dom.Attr; import org.w3c.dom.Attr;
import org.w3c.dom.Document; import org.w3c.dom.Document;
import org.w3c.dom.Element; import org.w3c.dom.Element;
...@@ -59,7 +61,7 @@ import com.sun.org.apache.xml.internal.security.utils.XMLUtils; ...@@ -59,7 +61,7 @@ import com.sun.org.apache.xml.internal.security.utils.XMLUtils;
*/ */
public abstract class Canonicalizer11 extends CanonicalizerBase { public abstract class Canonicalizer11 extends CanonicalizerBase {
boolean firstCall = true; boolean firstCall = true;
final SortedSet result = new TreeSet(COMPARE); final SortedSet<Attr> result = new TreeSet<Attr>(COMPARE);
static final String XMLNS_URI = Constants.NamespaceSpecNS; static final String XMLNS_URI = Constants.NamespaceSpecNS;
static final String XML_LANG_URI = Constants.XML_LANG_SPACE_SpecNS; static final String XML_LANG_URI = Constants.XML_LANG_SPACE_SpecNS;
...@@ -72,9 +74,9 @@ public abstract class Canonicalizer11 extends CanonicalizerBase { ...@@ -72,9 +74,9 @@ public abstract class Canonicalizer11 extends CanonicalizerBase {
static class XmlsStackElement { static class XmlsStackElement {
int level; int level;
boolean rendered = false; boolean rendered = false;
List nodes = new ArrayList(); List<Attr> nodes = new ArrayList<Attr>();
}; };
List levels = new ArrayList(); List<XmlsStackElement> levels = new ArrayList<XmlsStackElement>();
void push(int level) { void push(int level) {
currentLevel = level; currentLevel = level;
if (currentLevel == -1) if (currentLevel == -1)
...@@ -86,7 +88,7 @@ public abstract class Canonicalizer11 extends CanonicalizerBase { ...@@ -86,7 +88,7 @@ public abstract class Canonicalizer11 extends CanonicalizerBase {
lastlevel = 0; lastlevel = 0;
return; return;
} }
lastlevel=((XmlsStackElement)levels.get(levels.size()-1)).level; lastlevel=(levels.get(levels.size()-1)).level;
} }
} }
void addXmlnsAttr(Attr n) { void addXmlnsAttr(Attr n) {
...@@ -98,7 +100,7 @@ public abstract class Canonicalizer11 extends CanonicalizerBase { ...@@ -98,7 +100,7 @@ public abstract class Canonicalizer11 extends CanonicalizerBase {
} }
cur.nodes.add(n); cur.nodes.add(n);
} }
void getXmlnsAttr(Collection col) { void getXmlnsAttr(Collection<Attr> col) {
if (cur == null) { if (cur == null) {
cur = new XmlsStackElement(); cur = new XmlsStackElement();
cur.level = currentLevel; cur.level = currentLevel;
...@@ -111,7 +113,7 @@ public abstract class Canonicalizer11 extends CanonicalizerBase { ...@@ -111,7 +113,7 @@ public abstract class Canonicalizer11 extends CanonicalizerBase {
if (size == -1) { if (size == -1) {
parentRendered = true; parentRendered = true;
} else { } else {
e = (XmlsStackElement) levels.get(size); e = levels.get(size);
if (e.rendered && e.level+1 == currentLevel) if (e.rendered && e.level+1 == currentLevel)
parentRendered = true; parentRendered = true;
} }
...@@ -121,17 +123,17 @@ public abstract class Canonicalizer11 extends CanonicalizerBase { ...@@ -121,17 +123,17 @@ public abstract class Canonicalizer11 extends CanonicalizerBase {
return; return;
} }
Map loa = new HashMap(); Map<String, Attr> loa = new HashMap<String, Attr>();
List baseAttrs = new ArrayList(); List<Attr> baseAttrs = new ArrayList<Attr>();
boolean successiveOmitted = true; boolean successiveOmitted = true;
for (;size>=0;size--) { for (;size>=0;size--) {
e = (XmlsStackElement) levels.get(size); e = levels.get(size);
if (e.rendered) { if (e.rendered) {
successiveOmitted = false; successiveOmitted = false;
} }
Iterator it = e.nodes.iterator(); Iterator<Attr> it = e.nodes.iterator();
while (it.hasNext() && successiveOmitted) { while (it.hasNext() && successiveOmitted) {
Attr n = (Attr) it.next(); Attr n = it.next();
if (n.getLocalName().equals("base")) { if (n.getLocalName().equals("base")) {
if (!e.rendered) { if (!e.rendered) {
baseAttrs.add(n); baseAttrs.add(n);
...@@ -141,11 +143,11 @@ public abstract class Canonicalizer11 extends CanonicalizerBase { ...@@ -141,11 +143,11 @@ public abstract class Canonicalizer11 extends CanonicalizerBase {
} }
} }
if (!baseAttrs.isEmpty()) { if (!baseAttrs.isEmpty()) {
Iterator it = cur.nodes.iterator(); Iterator<Attr> it = cur.nodes.iterator();
String base = null; String base = null;
Attr baseAttr = null; Attr baseAttr = null;
while (it.hasNext()) { while (it.hasNext()) {
Attr n = (Attr) it.next(); Attr n = it.next();
if (n.getLocalName().equals("base")) { if (n.getLocalName().equals("base")) {
base = n.getValue(); base = n.getValue();
baseAttr = n; baseAttr = n;
...@@ -154,7 +156,7 @@ public abstract class Canonicalizer11 extends CanonicalizerBase { ...@@ -154,7 +156,7 @@ public abstract class Canonicalizer11 extends CanonicalizerBase {
} }
it = baseAttrs.iterator(); it = baseAttrs.iterator();
while (it.hasNext()) { while (it.hasNext()) {
Attr n = (Attr) it.next(); Attr n = it.next();
if (base == null) { if (base == null) {
base = n.getValue(); base = n.getValue();
baseAttr = n; baseAttr = n;
...@@ -202,13 +204,13 @@ public abstract class Canonicalizer11 extends CanonicalizerBase { ...@@ -202,13 +204,13 @@ public abstract class Canonicalizer11 extends CanonicalizerBase {
* @return the Attr[]s to be outputted * @return the Attr[]s to be outputted
* @throws CanonicalizationException * @throws CanonicalizationException
*/ */
Iterator handleAttributesSubtree(Element E, NameSpaceSymbTable ns) Iterator<Attr> handleAttributesSubtree(Element E, NameSpaceSymbTable ns)
throws CanonicalizationException { throws CanonicalizationException {
if (!E.hasAttributes() && !firstCall) { if (!E.hasAttributes() && !firstCall) {
return null; return null;
} }
// result will contain the attrs which have to be outputted // result will contain the attrs which have to be outputted
final SortedSet result = this.result; final SortedSet<Attr> result = this.result;
result.clear(); result.clear();
NamedNodeMap attrs = E.getAttributes(); NamedNodeMap attrs = E.getAttributes();
int attrsLength = attrs.getLength(); int attrsLength = attrs.getLength();
...@@ -236,7 +238,7 @@ public abstract class Canonicalizer11 extends CanonicalizerBase { ...@@ -236,7 +238,7 @@ public abstract class Canonicalizer11 extends CanonicalizerBase {
if (n != null) { if (n != null) {
// Render the ns definition // Render the ns definition
result.add(n); result.add((Attr)n);
if (C14nHelper.namespaceIsRelative(N)) { if (C14nHelper.namespaceIsRelative(N)) {
Object exArgs[] = {E.getTagName(), NName, N.getNodeValue()}; Object exArgs[] = {E.getTagName(), NName, N.getNodeValue()};
throw new CanonicalizationException( throw new CanonicalizationException(
...@@ -251,13 +253,15 @@ public abstract class Canonicalizer11 extends CanonicalizerBase { ...@@ -251,13 +253,15 @@ public abstract class Canonicalizer11 extends CanonicalizerBase {
// to the output. // to the output.
ns.getUnrenderedNodes(result); ns.getUnrenderedNodes(result);
// output the attributes in the xml namespace. // output the attributes in the xml namespace.
xmlattrStack.getXmlnsAttr(result); xmlattrStack.getXmlnsAttr(getSortedSetAsCollection(result));
firstCall = false; firstCall = false;
} }
return result.iterator(); return result.iterator();
} }
/** /**
* Returns the Attr[]s to be outputted for the given element. * Returns the Attr[]s to be outputted for the given element.
* <br> * <br>
...@@ -271,7 +275,7 @@ public abstract class Canonicalizer11 extends CanonicalizerBase { ...@@ -271,7 +275,7 @@ public abstract class Canonicalizer11 extends CanonicalizerBase {
* @return the Attr[]s to be outputted * @return the Attr[]s to be outputted
* @throws CanonicalizationException * @throws CanonicalizationException
*/ */
Iterator handleAttributes(Element E, NameSpaceSymbTable ns) Iterator<Attr> handleAttributes(Element E, NameSpaceSymbTable ns)
throws CanonicalizationException { throws CanonicalizationException {
// result will contain the attrs which have to be output // result will contain the attrs which have to be output
xmlattrStack.push(ns.getLevel()); xmlattrStack.push(ns.getLevel());
...@@ -283,11 +287,11 @@ public abstract class Canonicalizer11 extends CanonicalizerBase { ...@@ -283,11 +287,11 @@ public abstract class Canonicalizer11 extends CanonicalizerBase {
attrsLength = attrs.getLength(); attrsLength = attrs.getLength();
} }
SortedSet result = this.result; SortedSet<Attr> result = this.result;
result.clear(); result.clear();
for (int i = 0; i < attrsLength; i++) { for (int i = 0; i < attrsLength; i++) {
Attr N = (Attr) attrs.item(i); Attr N = (Attr)attrs.item(i);
String NUri = N.getNamespaceURI(); String NUri = N.getNamespaceURI();
if (XMLNS_URI != NUri) { if (XMLNS_URI != NUri) {
...@@ -332,7 +336,7 @@ public abstract class Canonicalizer11 extends CanonicalizerBase { ...@@ -332,7 +336,7 @@ public abstract class Canonicalizer11 extends CanonicalizerBase {
// (NName, NValue, N, isRealVisible); // (NName, NValue, N, isRealVisible);
Node n = ns.addMappingAndRender(NName, NValue, N); Node n = ns.addMappingAndRender(NName, NValue, N);
if (n != null) { if (n != null) {
result.add(n); result.add((Attr)n);
if (C14nHelper.namespaceIsRelative(N)) { if (C14nHelper.namespaceIsRelative(N)) {
Object exArgs[] = Object exArgs[] =
{ E.getTagName(), NName, N.getNodeValue() }; { E.getTagName(), NName, N.getNodeValue() };
...@@ -362,7 +366,7 @@ public abstract class Canonicalizer11 extends CanonicalizerBase { ...@@ -362,7 +366,7 @@ public abstract class Canonicalizer11 extends CanonicalizerBase {
} }
// output the xmlns def if needed. // output the xmlns def if needed.
if (n != null) { if (n != null) {
result.add(n); result.add((Attr)n);
} }
// Float all xml:* attributes of the unselected parent elements to // Float all xml:* attributes of the unselected parent elements to
// this one. addXmlAttributes(E,result); // this one. addXmlAttributes(E,result);
...@@ -381,7 +385,7 @@ public abstract class Canonicalizer11 extends CanonicalizerBase { ...@@ -381,7 +385,7 @@ public abstract class Canonicalizer11 extends CanonicalizerBase {
* @return none it always fails * @return none it always fails
* @throws CanonicalizationException always * @throws CanonicalizationException always
*/ */
public byte[] engineCanonicalizeXPathNodeSet(Set xpathNodeSet, public byte[] engineCanonicalizeXPathNodeSet(Set<Node> xpathNodeSet,
String inclusiveNamespaces) throws CanonicalizationException { String inclusiveNamespaces) throws CanonicalizationException {
throw new CanonicalizationException( throw new CanonicalizationException(
"c14n.Canonicalizer.UnsupportedOperation"); "c14n.Canonicalizer.UnsupportedOperation");
......
...@@ -57,7 +57,7 @@ import org.xml.sax.SAXException; ...@@ -57,7 +57,7 @@ import org.xml.sax.SAXException;
*/ */
public abstract class Canonicalizer20010315 extends CanonicalizerBase { public abstract class Canonicalizer20010315 extends CanonicalizerBase {
boolean firstCall=true; boolean firstCall=true;
final SortedSet result= new TreeSet(COMPARE); final SortedSet<Attr> result= new TreeSet<Attr>(COMPARE);
static final String XMLNS_URI=Constants.NamespaceSpecNS; static final String XMLNS_URI=Constants.NamespaceSpecNS;
static final String XML_LANG_URI=Constants.XML_LANG_SPACE_SpecNS; static final String XML_LANG_URI=Constants.XML_LANG_SPACE_SpecNS;
static class XmlAttrStack { static class XmlAttrStack {
...@@ -67,9 +67,9 @@ public abstract class Canonicalizer20010315 extends CanonicalizerBase { ...@@ -67,9 +67,9 @@ public abstract class Canonicalizer20010315 extends CanonicalizerBase {
static class XmlsStackElement { static class XmlsStackElement {
int level; int level;
boolean rendered=false; boolean rendered=false;
List nodes=new ArrayList(); List<Attr> nodes=new ArrayList<Attr>();
}; };
List levels=new ArrayList(); List<XmlsStackElement> levels=new ArrayList<XmlsStackElement>();
void push(int level) { void push(int level) {
currentLevel=level; currentLevel=level;
if (currentLevel==-1) if (currentLevel==-1)
...@@ -81,7 +81,7 @@ public abstract class Canonicalizer20010315 extends CanonicalizerBase { ...@@ -81,7 +81,7 @@ public abstract class Canonicalizer20010315 extends CanonicalizerBase {
lastlevel=0; lastlevel=0;
return; return;
} }
lastlevel=((XmlsStackElement)levels.get(levels.size()-1)).level; lastlevel=(levels.get(levels.size()-1)).level;
} }
} }
void addXmlnsAttr(Attr n) { void addXmlnsAttr(Attr n) {
...@@ -93,7 +93,7 @@ public abstract class Canonicalizer20010315 extends CanonicalizerBase { ...@@ -93,7 +93,7 @@ public abstract class Canonicalizer20010315 extends CanonicalizerBase {
} }
cur.nodes.add(n); cur.nodes.add(n);
} }
void getXmlnsAttr(Collection col) { void getXmlnsAttr(Collection<Attr> col) {
int size=levels.size()-1; int size=levels.size()-1;
if (cur==null) { if (cur==null) {
cur=new XmlsStackElement(); cur=new XmlsStackElement();
...@@ -106,7 +106,7 @@ public abstract class Canonicalizer20010315 extends CanonicalizerBase { ...@@ -106,7 +106,7 @@ public abstract class Canonicalizer20010315 extends CanonicalizerBase {
if (size==-1) { if (size==-1) {
parentRendered=true; parentRendered=true;
} else { } else {
e=(XmlsStackElement)levels.get(size); e=levels.get(size);
if (e.rendered && e.level+1==currentLevel) if (e.rendered && e.level+1==currentLevel)
parentRendered=true; parentRendered=true;
...@@ -117,12 +117,12 @@ public abstract class Canonicalizer20010315 extends CanonicalizerBase { ...@@ -117,12 +117,12 @@ public abstract class Canonicalizer20010315 extends CanonicalizerBase {
return; return;
} }
Map loa = new HashMap(); Map<String,Attr> loa = new HashMap<String,Attr>();
for (;size>=0;size--) { for (;size>=0;size--) {
e=(XmlsStackElement)levels.get(size); e=levels.get(size);
Iterator it=e.nodes.iterator(); Iterator<Attr> it=e.nodes.iterator();
while (it.hasNext()) { while (it.hasNext()) {
Attr n=(Attr)it.next(); Attr n=it.next();
if (!loa.containsKey(n.getName())) if (!loa.containsKey(n.getName()))
loa.put(n.getName(),n); loa.put(n.getName(),n);
} }
...@@ -161,13 +161,13 @@ public abstract class Canonicalizer20010315 extends CanonicalizerBase { ...@@ -161,13 +161,13 @@ public abstract class Canonicalizer20010315 extends CanonicalizerBase {
* @return the Attr[]s to be outputted * @return the Attr[]s to be outputted
* @throws CanonicalizationException * @throws CanonicalizationException
*/ */
Iterator handleAttributesSubtree(Element E, NameSpaceSymbTable ns ) Iterator<Attr> handleAttributesSubtree(Element E, NameSpaceSymbTable ns )
throws CanonicalizationException { throws CanonicalizationException {
if (!E.hasAttributes() && !firstCall) { if (!E.hasAttributes() && !firstCall) {
return null; return null;
} }
// result will contain the attrs which have to be outputted // result will contain the attrs which have to be outputted
final SortedSet result = this.result; final SortedSet<Attr> result = this.result;
result.clear(); result.clear();
NamedNodeMap attrs = E.getAttributes(); NamedNodeMap attrs = E.getAttributes();
int attrsLength = attrs.getLength(); int attrsLength = attrs.getLength();
...@@ -194,7 +194,7 @@ public abstract class Canonicalizer20010315 extends CanonicalizerBase { ...@@ -194,7 +194,7 @@ public abstract class Canonicalizer20010315 extends CanonicalizerBase {
if (n!=null) { if (n!=null) {
//Render the ns definition //Render the ns definition
result.add(n); result.add((Attr)n);
if (C14nHelper.namespaceIsRelative(N)) { if (C14nHelper.namespaceIsRelative(N)) {
Object exArgs[] = { E.getTagName(), NName, N.getNodeValue() }; Object exArgs[] = { E.getTagName(), NName, N.getNodeValue() };
throw new CanonicalizationException( throw new CanonicalizationException(
...@@ -206,7 +206,7 @@ public abstract class Canonicalizer20010315 extends CanonicalizerBase { ...@@ -206,7 +206,7 @@ public abstract class Canonicalizer20010315 extends CanonicalizerBase {
if (firstCall) { if (firstCall) {
//It is the first node of the subtree //It is the first node of the subtree
//Obtain all the namespaces defined in the parents, and added to the output. //Obtain all the namespaces defined in the parents, and added to the output.
ns.getUnrenderedNodes(result); ns.getUnrenderedNodes(getSortedSetAsCollection(result));
//output the attributes in the xml namespace. //output the attributes in the xml namespace.
xmlattrStack.getXmlnsAttr(result); xmlattrStack.getXmlnsAttr(result);
firstCall=false; firstCall=false;
...@@ -227,7 +227,7 @@ public abstract class Canonicalizer20010315 extends CanonicalizerBase { ...@@ -227,7 +227,7 @@ public abstract class Canonicalizer20010315 extends CanonicalizerBase {
* @return the Attr[]s to be outputted * @return the Attr[]s to be outputted
* @throws CanonicalizationException * @throws CanonicalizationException
*/ */
Iterator handleAttributes(Element E, NameSpaceSymbTable ns ) throws CanonicalizationException { Iterator<Attr> handleAttributes(Element E, NameSpaceSymbTable ns ) throws CanonicalizationException {
// result will contain the attrs which have to be outputted // result will contain the attrs which have to be outputted
xmlattrStack.push(ns.getLevel()); xmlattrStack.push(ns.getLevel());
boolean isRealVisible=isVisibleDO(E,ns.getLevel())==1; boolean isRealVisible=isVisibleDO(E,ns.getLevel())==1;
...@@ -239,7 +239,7 @@ public abstract class Canonicalizer20010315 extends CanonicalizerBase { ...@@ -239,7 +239,7 @@ public abstract class Canonicalizer20010315 extends CanonicalizerBase {
} }
SortedSet result = this.result; SortedSet<Attr> result = this.result;
result.clear(); result.clear();
for (int i = 0; i < attrsLength; i++) { for (int i = 0; i < attrsLength; i++) {
...@@ -277,7 +277,7 @@ public abstract class Canonicalizer20010315 extends CanonicalizerBase { ...@@ -277,7 +277,7 @@ public abstract class Canonicalizer20010315 extends CanonicalizerBase {
//Node n=ns.addMappingAndRenderXNodeSet(NName,NValue,N,isRealVisible); //Node n=ns.addMappingAndRenderXNodeSet(NName,NValue,N,isRealVisible);
Node n=ns.addMappingAndRender(NName,NValue,N); Node n=ns.addMappingAndRender(NName,NValue,N);
if (n!=null) { if (n!=null) {
result.add(n); result.add((Attr)n);
if (C14nHelper.namespaceIsRelative(N)) { if (C14nHelper.namespaceIsRelative(N)) {
Object exArgs[] = { E.getTagName(), NName, N.getNodeValue() }; Object exArgs[] = { E.getTagName(), NName, N.getNodeValue() };
throw new CanonicalizationException( throw new CanonicalizationException(
...@@ -306,12 +306,12 @@ public abstract class Canonicalizer20010315 extends CanonicalizerBase { ...@@ -306,12 +306,12 @@ public abstract class Canonicalizer20010315 extends CanonicalizerBase {
} }
//output the xmlns def if needed. //output the xmlns def if needed.
if (n!=null) { if (n!=null) {
result.add(n); result.add((Attr)n);
} }
//Float all xml:* attributes of the unselected parent elements to this one. //Float all xml:* attributes of the unselected parent elements to this one.
//addXmlAttributes(E,result); //addXmlAttributes(E,result);
xmlattrStack.getXmlnsAttr(result); xmlattrStack.getXmlnsAttr(result);
ns.getUnrenderedNodes(result); ns.getUnrenderedNodes(getSortedSetAsCollection(result));
} }
...@@ -325,7 +325,7 @@ public abstract class Canonicalizer20010315 extends CanonicalizerBase { ...@@ -325,7 +325,7 @@ public abstract class Canonicalizer20010315 extends CanonicalizerBase {
* @return none it always fails * @return none it always fails
* @throws CanonicalizationException always * @throws CanonicalizationException always
*/ */
public byte[] engineCanonicalizeXPathNodeSet(Set xpathNodeSet, String inclusiveNamespaces) public byte[] engineCanonicalizeXPathNodeSet(Set<Node> xpathNodeSet, String inclusiveNamespaces)
throws CanonicalizationException { throws CanonicalizationException {
/** $todo$ well, should we throw UnsupportedOperationException ? */ /** $todo$ well, should we throw UnsupportedOperationException ? */
......
...@@ -61,9 +61,9 @@ public abstract class Canonicalizer20010315Excl extends CanonicalizerBase { ...@@ -61,9 +61,9 @@ public abstract class Canonicalizer20010315Excl extends CanonicalizerBase {
* This Set contains the names (Strings like "xmlns" or "xmlns:foo") of * This Set contains the names (Strings like "xmlns" or "xmlns:foo") of
* the inclusive namespaces. * the inclusive namespaces.
*/ */
TreeSet _inclusiveNSSet = new TreeSet(); TreeSet<String> _inclusiveNSSet = new TreeSet<String>();
static final String XMLNS_URI=Constants.NamespaceSpecNS; static final String XMLNS_URI=Constants.NamespaceSpecNS;
final SortedSet result = new TreeSet(COMPARE); final SortedSet<Attr> result = new TreeSet<Attr>(COMPARE);
/** /**
* Constructor Canonicalizer20010315Excl * Constructor Canonicalizer20010315Excl
* *
...@@ -106,8 +106,7 @@ public abstract class Canonicalizer20010315Excl extends CanonicalizerBase { ...@@ -106,8 +106,7 @@ public abstract class Canonicalizer20010315Excl extends CanonicalizerBase {
*/ */
public byte[] engineCanonicalizeSubTree(Node rootNode, public byte[] engineCanonicalizeSubTree(Node rootNode,
String inclusiveNamespaces,Node excl) throws CanonicalizationException { String inclusiveNamespaces,Node excl) throws CanonicalizationException {
this._inclusiveNSSet = (TreeSet)InclusiveNamespaces this._inclusiveNSSet = getInclusiveNameSpace(inclusiveNamespaces);
.prefixStr2Set(inclusiveNamespaces);
return super.engineCanonicalizeSubTree(rootNode,excl); return super.engineCanonicalizeSubTree(rootNode,excl);
} }
/** /**
...@@ -117,10 +116,10 @@ public abstract class Canonicalizer20010315Excl extends CanonicalizerBase { ...@@ -117,10 +116,10 @@ public abstract class Canonicalizer20010315Excl extends CanonicalizerBase {
* @return the rootNode c14n. * @return the rootNode c14n.
* @throws CanonicalizationException * @throws CanonicalizationException
*/ */
@SuppressWarnings("unchecked")
public byte[] engineCanonicalize(XMLSignatureInput rootNode, public byte[] engineCanonicalize(XMLSignatureInput rootNode,
String inclusiveNamespaces) throws CanonicalizationException { String inclusiveNamespaces) throws CanonicalizationException {
this._inclusiveNSSet = (TreeSet)InclusiveNamespaces this._inclusiveNSSet = getInclusiveNameSpace(inclusiveNamespaces);
.prefixStr2Set(inclusiveNamespaces);
return super.engineCanonicalize(rootNode); return super.engineCanonicalize(rootNode);
} }
...@@ -130,12 +129,12 @@ public abstract class Canonicalizer20010315Excl extends CanonicalizerBase { ...@@ -130,12 +129,12 @@ public abstract class Canonicalizer20010315Excl extends CanonicalizerBase {
* @param E * @param E
* @throws CanonicalizationException * @throws CanonicalizationException
*/ */
Iterator handleAttributesSubtree(Element E,NameSpaceSymbTable ns) Iterator<Attr> handleAttributesSubtree(Element E,NameSpaceSymbTable ns)
throws CanonicalizationException { throws CanonicalizationException {
// System.out.println("During the traversal, I encountered " + // System.out.println("During the traversal, I encountered " +
// XMLUtils.getXPath(E)); // XMLUtils.getXPath(E));
// result will contain the attrs which have to be outputted // result will contain the attrs which have to be outputted
SortedSet result = this.result; SortedSet<Attr> result = this.result;
result.clear(); result.clear();
NamedNodeMap attrs=null; NamedNodeMap attrs=null;
...@@ -145,7 +144,7 @@ public abstract class Canonicalizer20010315Excl extends CanonicalizerBase { ...@@ -145,7 +144,7 @@ public abstract class Canonicalizer20010315Excl extends CanonicalizerBase {
attrsLength = attrs.getLength(); attrsLength = attrs.getLength();
} }
//The prefix visibly utilized(in the attribute or in the name) in the element //The prefix visibly utilized(in the attribute or in the name) in the element
SortedSet visiblyUtilized =(SortedSet) _inclusiveNSSet.clone(); SortedSet<String> visiblyUtilized = getNSSetClone();
for (int i = 0; i < attrsLength; i++) { for (int i = 0; i < attrsLength; i++) {
Attr N = (Attr) attrs.item(i); Attr N = (Attr) attrs.item(i);
...@@ -187,9 +186,9 @@ public abstract class Canonicalizer20010315Excl extends CanonicalizerBase { ...@@ -187,9 +186,9 @@ public abstract class Canonicalizer20010315Excl extends CanonicalizerBase {
visiblyUtilized.add(prefix); visiblyUtilized.add(prefix);
//This can be optimezed by I don't have time //This can be optimezed by I don't have time
Iterator it=visiblyUtilized.iterator(); Iterator<String> it=visiblyUtilized.iterator();
while (it.hasNext()) { while (it.hasNext()) {
String s=(String)it.next(); String s=it.next();
Attr key=ns.getMapping(s); Attr key=ns.getMapping(s);
if (key==null) { if (key==null) {
continue; continue;
...@@ -207,25 +206,35 @@ public abstract class Canonicalizer20010315Excl extends CanonicalizerBase { ...@@ -207,25 +206,35 @@ public abstract class Canonicalizer20010315Excl extends CanonicalizerBase {
* @param inclusiveNamespaces * @param inclusiveNamespaces
* @throws CanonicalizationException * @throws CanonicalizationException
*/ */
public byte[] engineCanonicalizeXPathNodeSet(Set xpathNodeSet, public byte[] engineCanonicalizeXPathNodeSet(Set<Node> xpathNodeSet,
String inclusiveNamespaces) throws CanonicalizationException { String inclusiveNamespaces) throws CanonicalizationException {
this._inclusiveNSSet = getInclusiveNameSpace(inclusiveNamespaces);
this._inclusiveNSSet = (TreeSet)InclusiveNamespaces
.prefixStr2Set(inclusiveNamespaces);
return super.engineCanonicalizeXPathNodeSet(xpathNodeSet); return super.engineCanonicalizeXPathNodeSet(xpathNodeSet);
} }
@SuppressWarnings("unchecked")
private TreeSet<String> getInclusiveNameSpace(String inclusiveNameSpaces) {
return (TreeSet<String>)InclusiveNamespaces.prefixStr2Set(inclusiveNameSpaces);
}
@SuppressWarnings("unchecked")
private SortedSet<String> getNSSetClone() {
return (SortedSet<String>) this._inclusiveNSSet.clone();
}
/** /**
* @inheritDoc * @inheritDoc
* @param E * @param E
* @throws CanonicalizationException * @throws CanonicalizationException
*/ */
final Iterator handleAttributes(Element E, NameSpaceSymbTable ns) final Iterator<Attr> handleAttributes(Element E, NameSpaceSymbTable ns)
throws CanonicalizationException { throws CanonicalizationException {
// result will contain the attrs which have to be outputted // result will contain the attrs which have to be outputted
SortedSet result = this.result; SortedSet<Attr> result = this.result;
result.clear(); result.clear();
NamedNodeMap attrs = null; NamedNodeMap attrs = null;
int attrsLength = 0; int attrsLength = 0;
...@@ -234,11 +243,11 @@ public abstract class Canonicalizer20010315Excl extends CanonicalizerBase { ...@@ -234,11 +243,11 @@ public abstract class Canonicalizer20010315Excl extends CanonicalizerBase {
attrsLength = attrs.getLength(); attrsLength = attrs.getLength();
} }
//The prefix visibly utilized(in the attribute or in the name) in the element //The prefix visibly utilized(in the attribute or in the name) in the element
Set visiblyUtilized =null; Set<String> visiblyUtilized =null;
//It's the output selected. //It's the output selected.
boolean isOutputElement=isVisibleDO(E,ns.getLevel())==1; boolean isOutputElement=isVisibleDO(E,ns.getLevel())==1;
if (isOutputElement) { if (isOutputElement) {
visiblyUtilized = (Set) this._inclusiveNSSet.clone(); visiblyUtilized = getNSSetClone();
} }
for (int i = 0; i < attrsLength; i++) { for (int i = 0; i < attrsLength; i++) {
...@@ -272,7 +281,7 @@ public abstract class Canonicalizer20010315Excl extends CanonicalizerBase { ...@@ -272,7 +281,7 @@ public abstract class Canonicalizer20010315Excl extends CanonicalizerBase {
if (!isOutputElement && isVisible(N) && _inclusiveNSSet.contains(NName) && !ns.removeMappingIfRender(NName)) { if (!isOutputElement && isVisible(N) && _inclusiveNSSet.contains(NName) && !ns.removeMappingIfRender(NName)) {
Node n=ns.addMappingAndRender(NName,NNodeValue,N); Node n=ns.addMappingAndRender(NName,NNodeValue,N);
if (n!=null) { if (n!=null) {
result.add(n); result.add((Attr)n);
if (C14nHelper.namespaceIsRelative(N)) { if (C14nHelper.namespaceIsRelative(N)) {
Object exArgs[] = { E.getTagName(), NName, N.getNodeValue() }; Object exArgs[] = { E.getTagName(), NName, N.getNodeValue() };
throw new CanonicalizationException( throw new CanonicalizationException(
...@@ -315,9 +324,9 @@ public abstract class Canonicalizer20010315Excl extends CanonicalizerBase { ...@@ -315,9 +324,9 @@ public abstract class Canonicalizer20010315Excl extends CanonicalizerBase {
} }
//This can be optimezed by I don't have time //This can be optimezed by I don't have time
//visiblyUtilized.addAll(this._inclusiveNSSet); //visiblyUtilized.addAll(this._inclusiveNSSet);
Iterator it=visiblyUtilized.iterator(); Iterator<String> it=visiblyUtilized.iterator();
while (it.hasNext()) { while (it.hasNext()) {
String s=(String)it.next(); String s=it.next();
Attr key=ns.getMapping(s); Attr key=ns.getMapping(s);
if (key==null) { if (key==null) {
continue; continue;
......
...@@ -33,9 +33,12 @@ import java.util.List; ...@@ -33,9 +33,12 @@ import java.util.List;
import java.util.ListIterator; import java.util.ListIterator;
import java.util.Map; import java.util.Map;
import java.util.Set; import java.util.Set;
import java.util.SortedSet;
import java.util.Collection;
import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException; import javax.xml.parsers.ParserConfigurationException;
import javax.xml.xpath.XPath;
import com.sun.org.apache.xml.internal.security.c14n.CanonicalizationException; import com.sun.org.apache.xml.internal.security.c14n.CanonicalizationException;
import com.sun.org.apache.xml.internal.security.c14n.CanonicalizerSpi; import com.sun.org.apache.xml.internal.security.c14n.CanonicalizerSpi;
...@@ -94,10 +97,10 @@ public abstract class CanonicalizerBase extends CanonicalizerSpi { ...@@ -94,10 +97,10 @@ public abstract class CanonicalizerBase extends CanonicalizerSpi {
} }
} }
List nodeFilter; List<NodeFilter> nodeFilter;
boolean _includeComments; boolean _includeComments;
Set _xpathNodeSet = null; Set<Node> _xpathNodeSet = null;
/** /**
* The node to be skiped/excluded from the DOM tree * The node to be skiped/excluded from the DOM tree
* in subtree canonicalizations. * in subtree canonicalizations.
...@@ -130,7 +133,7 @@ public abstract class CanonicalizerBase extends CanonicalizerSpi { ...@@ -130,7 +133,7 @@ public abstract class CanonicalizerBase extends CanonicalizerSpi {
* @param xpathNodeSet * @param xpathNodeSet
* @throws CanonicalizationException * @throws CanonicalizationException
*/ */
public byte[] engineCanonicalizeXPathNodeSet(Set xpathNodeSet) public byte[] engineCanonicalizeXPathNodeSet(Set<Node> xpathNodeSet)
throws CanonicalizationException { throws CanonicalizationException {
this._xpathNodeSet = xpathNodeSet; this._xpathNodeSet = xpathNodeSet;
return engineCanonicalizeXPathNodeSetInternal(XMLUtils.getOwnerDocument(this._xpathNodeSet)); return engineCanonicalizeXPathNodeSetInternal(XMLUtils.getOwnerDocument(this._xpathNodeSet));
...@@ -251,7 +254,7 @@ public abstract class CanonicalizerBase extends CanonicalizerSpi { ...@@ -251,7 +254,7 @@ public abstract class CanonicalizerBase extends CanonicalizerSpi {
final OutputStream writer=this._writer; final OutputStream writer=this._writer;
final Node excludeNode=this._excludeNode; final Node excludeNode=this._excludeNode;
final boolean includeComments=this._includeComments; final boolean includeComments=this._includeComments;
Map cache=new HashMap(); Map<String, byte[]> cache=new HashMap<String, byte[]>();
do { do {
switch (currentNode.getNodeType()) { switch (currentNode.getNodeType()) {
...@@ -298,11 +301,11 @@ public abstract class CanonicalizerBase extends CanonicalizerSpi { ...@@ -298,11 +301,11 @@ public abstract class CanonicalizerBase extends CanonicalizerSpi {
String name=currentElement.getTagName(); String name=currentElement.getTagName();
UtfHelpper.writeByte(name,writer,cache); UtfHelpper.writeByte(name,writer,cache);
Iterator attrs = this.handleAttributesSubtree(currentElement,ns); Iterator<Attr> attrs = this.handleAttributesSubtree(currentElement,ns);
if (attrs!=null) { if (attrs!=null) {
//we output all Attrs which are available //we output all Attrs which are available
while (attrs.hasNext()) { while (attrs.hasNext()) {
Attr attr = (Attr) attrs.next(); Attr attr = attrs.next();
outputAttrToWriter(attr.getNodeName(),attr.getNodeValue(), writer,cache); outputAttrToWriter(attr.getNodeName(),attr.getNodeValue(), writer,cache);
} }
} }
...@@ -394,7 +397,7 @@ public abstract class CanonicalizerBase extends CanonicalizerSpi { ...@@ -394,7 +397,7 @@ public abstract class CanonicalizerBase extends CanonicalizerSpi {
Node parentNode=null; Node parentNode=null;
OutputStream writer=this._writer; OutputStream writer=this._writer;
int documentLevel=NODE_BEFORE_DOCUMENT_ELEMENT; int documentLevel=NODE_BEFORE_DOCUMENT_ELEMENT;
Map cache=new HashMap(); Map<String, byte[]> cache=new HashMap<String,byte[]>();
do { do {
switch (currentNode.getNodeType()) { switch (currentNode.getNodeType()) {
...@@ -464,11 +467,11 @@ public abstract class CanonicalizerBase extends CanonicalizerSpi { ...@@ -464,11 +467,11 @@ public abstract class CanonicalizerBase extends CanonicalizerSpi {
ns.push(); ns.push();
} }
Iterator attrs = handleAttributes(currentElement,ns); Iterator<Attr> attrs = handleAttributes(currentElement,ns);
if (attrs!=null) { if (attrs!=null) {
//we output all Attrs which are available //we output all Attrs which are available
while (attrs.hasNext()) { while (attrs.hasNext()) {
Attr attr = (Attr) attrs.next(); Attr attr = attrs.next();
outputAttrToWriter(attr.getNodeName(),attr.getNodeValue(), writer,cache); outputAttrToWriter(attr.getNodeName(),attr.getNodeValue(), writer,cache);
} }
} }
...@@ -522,9 +525,9 @@ public abstract class CanonicalizerBase extends CanonicalizerSpi { ...@@ -522,9 +525,9 @@ public abstract class CanonicalizerBase extends CanonicalizerSpi {
} }
int isVisibleDO(Node currentNode,int level) { int isVisibleDO(Node currentNode,int level) {
if (nodeFilter!=null) { if (nodeFilter!=null) {
Iterator it=nodeFilter.iterator(); Iterator<NodeFilter> it=nodeFilter.iterator();
while (it.hasNext()) { while (it.hasNext()) {
int i=((NodeFilter)it.next()).isNodeIncludeDO(currentNode,level); int i=(it.next()).isNodeIncludeDO(currentNode,level);
if (i!=1) if (i!=1)
return i; return i;
} }
...@@ -535,9 +538,9 @@ public abstract class CanonicalizerBase extends CanonicalizerSpi { ...@@ -535,9 +538,9 @@ public abstract class CanonicalizerBase extends CanonicalizerSpi {
} }
int isVisibleInt(Node currentNode) { int isVisibleInt(Node currentNode) {
if (nodeFilter!=null) { if (nodeFilter!=null) {
Iterator it=nodeFilter.iterator(); Iterator<NodeFilter> it=nodeFilter.iterator();
while (it.hasNext()) { while (it.hasNext()) {
int i=((NodeFilter)it.next()).isNodeInclude(currentNode); int i=(it.next()).isNodeInclude(currentNode);
if (i!=1) if (i!=1)
return i; return i;
} }
...@@ -549,9 +552,9 @@ public abstract class CanonicalizerBase extends CanonicalizerSpi { ...@@ -549,9 +552,9 @@ public abstract class CanonicalizerBase extends CanonicalizerSpi {
boolean isVisible(Node currentNode) { boolean isVisible(Node currentNode) {
if (nodeFilter!=null) { if (nodeFilter!=null) {
Iterator it=nodeFilter.iterator(); Iterator<NodeFilter> it=nodeFilter.iterator();
while (it.hasNext()) { while (it.hasNext()) {
if (((NodeFilter)it.next()).isNodeInclude(currentNode)!=1) if ((it.next()).isNodeInclude(currentNode)!=1)
return false; return false;
} }
} }
...@@ -589,7 +592,7 @@ public abstract class CanonicalizerBase extends CanonicalizerSpi { ...@@ -589,7 +592,7 @@ public abstract class CanonicalizerBase extends CanonicalizerSpi {
* @param ns * @param ns
*/ */
final void getParentNameSpaces(Element el,NameSpaceSymbTable ns) { final void getParentNameSpaces(Element el,NameSpaceSymbTable ns) {
List parents=new ArrayList(10); List<Element> parents=new ArrayList<Element>(10);
Node n1=el.getParentNode(); Node n1=el.getParentNode();
if (!(n1 instanceof Element)) { if (!(n1 instanceof Element)) {
return; return;
...@@ -605,9 +608,9 @@ public abstract class CanonicalizerBase extends CanonicalizerSpi { ...@@ -605,9 +608,9 @@ public abstract class CanonicalizerBase extends CanonicalizerSpi {
parent=(Element)n; parent=(Element)n;
} }
//Visit them in reverse order. //Visit them in reverse order.
ListIterator it=parents.listIterator(parents.size()); ListIterator<Element> it=parents.listIterator(parents.size());
while (it.hasPrevious()) { while (it.hasPrevious()) {
Element ele=(Element)it.previous(); Element ele=it.previous();
handleParent(ele, ns); handleParent(ele, ns);
} }
Attr nsprefix; Attr nsprefix;
...@@ -624,7 +627,7 @@ public abstract class CanonicalizerBase extends CanonicalizerSpi { ...@@ -624,7 +627,7 @@ public abstract class CanonicalizerBase extends CanonicalizerSpi {
* @return the attributes nodes to output. * @return the attributes nodes to output.
* @throws CanonicalizationException * @throws CanonicalizationException
*/ */
abstract Iterator handleAttributes(Element E, NameSpaceSymbTable ns ) abstract Iterator<Attr> handleAttributes(Element E, NameSpaceSymbTable ns )
throws CanonicalizationException; throws CanonicalizationException;
/** /**
...@@ -635,7 +638,7 @@ public abstract class CanonicalizerBase extends CanonicalizerSpi { ...@@ -635,7 +638,7 @@ public abstract class CanonicalizerBase extends CanonicalizerSpi {
* @return the attributes nodes to output. * @return the attributes nodes to output.
* @throws CanonicalizationException * @throws CanonicalizationException
*/ */
abstract Iterator handleAttributesSubtree(Element E, NameSpaceSymbTable ns) abstract Iterator<Attr> handleAttributesSubtree(Element E, NameSpaceSymbTable ns)
throws CanonicalizationException; throws CanonicalizationException;
abstract void circumventBugIfNeeded(XMLSignatureInput input) throws CanonicalizationException, ParserConfigurationException, IOException, SAXException; abstract void circumventBugIfNeeded(XMLSignatureInput input) throws CanonicalizationException, ParserConfigurationException, IOException, SAXException;
...@@ -660,7 +663,7 @@ public abstract class CanonicalizerBase extends CanonicalizerSpi { ...@@ -660,7 +663,7 @@ public abstract class CanonicalizerBase extends CanonicalizerSpi {
* @throws IOException * @throws IOException
*/ */
static final void outputAttrToWriter(final String name, final String value, final OutputStream writer, static final void outputAttrToWriter(final String name, final String value, final OutputStream writer,
final Map cache) throws IOException { final Map<String, byte[]> cache) throws IOException {
writer.write(' '); writer.write(' ');
UtfHelpper.writeByte(name,writer,cache); UtfHelpper.writeByte(name,writer,cache);
writer.write(equalsStr); writer.write(equalsStr);
...@@ -841,4 +844,10 @@ public abstract class CanonicalizerBase extends CanonicalizerSpi { ...@@ -841,4 +844,10 @@ public abstract class CanonicalizerBase extends CanonicalizerSpi {
} }
} }
@SuppressWarnings("unchecked")
protected Collection<Attr> getSortedSetAsCollection(SortedSet<Attr> result) {
return (Collection<Attr>)(Collection)result;
}
} }
...@@ -44,7 +44,7 @@ public class NameSpaceSymbTable { ...@@ -44,7 +44,7 @@ public class NameSpaceSymbTable {
/**The level of nameSpaces (for Inclusive visibility).*/ /**The level of nameSpaces (for Inclusive visibility).*/
int nameSpaces=0; int nameSpaces=0;
/**The stacks for removing the definitions when doing pop.*/ /**The stacks for removing the definitions when doing pop.*/
List level; List<SymbMap> level;
boolean cloned=true; boolean cloned=true;
static final String XMLNS="xmlns"; static final String XMLNS="xmlns";
final static SymbMap initialMap=new SymbMap(); final static SymbMap initialMap=new SymbMap();
...@@ -57,7 +57,7 @@ public class NameSpaceSymbTable { ...@@ -57,7 +57,7 @@ public class NameSpaceSymbTable {
* Default constractor * Default constractor
**/ **/
public NameSpaceSymbTable() { public NameSpaceSymbTable() {
level = new ArrayList(10); level = new ArrayList<SymbMap>(10);
//Insert the default binding for xmlns. //Insert the default binding for xmlns.
symb=(SymbMap) initialMap.clone(); symb=(SymbMap) initialMap.clone();
} }
...@@ -67,11 +67,11 @@ public class NameSpaceSymbTable { ...@@ -67,11 +67,11 @@ public class NameSpaceSymbTable {
* For Inclusive rendering * For Inclusive rendering
* @param result the list where to fill the unrendered xmlns definitions. * @param result the list where to fill the unrendered xmlns definitions.
**/ **/
public void getUnrenderedNodes(Collection result) { public void getUnrenderedNodes(Collection<Attr> result) {
//List result=new ArrayList(); //List result=new ArrayList();
Iterator it=symb.entrySet().iterator(); Iterator<NameSpaceSymbEntry> it=symb.entrySet().iterator();
while (it.hasNext()) { while (it.hasNext()) {
NameSpaceSymbEntry n=(NameSpaceSymbEntry)(it.next()); NameSpaceSymbEntry n= it.next();
//put them rendered? //put them rendered?
if ((!n.rendered) && (n.n!=null)) { if ((!n.rendered) && (n.n!=null)) {
n=(NameSpaceSymbEntry) n.clone(); n=(NameSpaceSymbEntry) n.clone();
...@@ -339,8 +339,8 @@ class SymbMap implements Cloneable { ...@@ -339,8 +339,8 @@ class SymbMap implements Cloneable {
} }
} }
List entrySet() { List<NameSpaceSymbEntry> entrySet() {
List a=new ArrayList(); List<NameSpaceSymbEntry> a=new ArrayList<NameSpaceSymbEntry>();
for (int i=0;i<entries.length;i++) { for (int i=0;i<entries.length;i++) {
if ((entries[i]!=null) && !("".equals(entries[i].uri))) { if ((entries[i]!=null) && !("".equals(entries[i].uri))) {
a.add(entries[i]); a.add(entries[i]);
......
...@@ -6,8 +6,8 @@ import java.util.Map; ...@@ -6,8 +6,8 @@ import java.util.Map;
public class UtfHelpper { public class UtfHelpper {
final static void writeByte(final String str,final OutputStream out,Map cache) throws IOException { final static void writeByte(final String str,final OutputStream out,Map<String,byte[]> cache) throws IOException {
byte []result=(byte[]) cache.get(str); byte []result= cache.get(str);
if (result==null) { if (result==null) {
result=getStringInUtf8(str); result=getStringInUtf8(str);
cache.put(str,result); cache.put(str,result);
......
...@@ -95,7 +95,7 @@ public interface AgreementMethod { ...@@ -95,7 +95,7 @@ public interface AgreementMethod {
* Returns aditional information regarding the <code>AgreementMethod</code>. * Returns aditional information regarding the <code>AgreementMethod</code>.
* @return * @return
*/ */
Iterator getAgreementMethodInformation(); Iterator<Element> getAgreementMethodInformation();
/** /**
* Adds additional <code>AgreementMethod</code> information. * Adds additional <code>AgreementMethod</code> information.
......
...@@ -89,7 +89,7 @@ public interface EncryptionMethod { ...@@ -89,7 +89,7 @@ public interface EncryptionMethod {
* @return an <code>Iterator</code> over all the additional infomation * @return an <code>Iterator</code> over all the additional infomation
* about the <code>EncryptionMethod</code>. * about the <code>EncryptionMethod</code>.
*/ */
Iterator getEncryptionMethodInformation(); Iterator<Element> getEncryptionMethodInformation();
/** /**
* Adds encryption method information. * Adds encryption method information.
......
...@@ -67,7 +67,7 @@ public interface EncryptionProperties { ...@@ -67,7 +67,7 @@ public interface EncryptionProperties {
* *
* @return an <code>Iterator</code> over all the encryption properties. * @return an <code>Iterator</code> over all the encryption properties.
*/ */
Iterator getEncryptionProperties(); Iterator<EncryptionProperty> getEncryptionProperties();
/** /**
* Adds an <code>EncryptionProperty</code>. * Adds an <code>EncryptionProperty</code>.
......
...@@ -101,7 +101,7 @@ public interface EncryptionProperty { ...@@ -101,7 +101,7 @@ public interface EncryptionProperty {
* @return an <code>Iterator</code> over all the addiitonal encryption * @return an <code>Iterator</code> over all the addiitonal encryption
* information contained in this class. * information contained in this class.
*/ */
Iterator getEncryptionInformation(); Iterator<Element> getEncryptionInformation();
/** /**
* Adds encryption information. * Adds encryption information.
......
...@@ -74,7 +74,7 @@ public interface Reference { ...@@ -74,7 +74,7 @@ public interface Reference {
* *
* @return child elements. * @return child elements.
*/ */
Iterator getElementRetrievalInformation(); Iterator<Element> getElementRetrievalInformation();
/** /**
* Adds retrieval information. * Adds retrieval information.
......
...@@ -87,7 +87,7 @@ public interface ReferenceList { ...@@ -87,7 +87,7 @@ public interface ReferenceList {
* *
* @return Iterator. * @return Iterator.
*/ */
public Iterator getReferences(); public Iterator<Reference> getReferences();
/** /**
* <code>DataReference</code> factory method. Returns a * <code>DataReference</code> factory method. Returns a
......
...@@ -2772,7 +2772,7 @@ public class XMLCipher { ...@@ -2772,7 +2772,7 @@ public class XMLCipher {
// </complexType> // </complexType>
private class AgreementMethodImpl implements AgreementMethod { private class AgreementMethodImpl implements AgreementMethod {
private byte[] kaNonce = null; private byte[] kaNonce = null;
private List agreementMethodInformation = null; private List<Element> agreementMethodInformation = null;
private KeyInfo originatorKeyInfo = null; private KeyInfo originatorKeyInfo = null;
private KeyInfo recipientKeyInfo = null; private KeyInfo recipientKeyInfo = null;
private String algorithmURI = null; private String algorithmURI = null;
...@@ -2781,7 +2781,7 @@ public class XMLCipher { ...@@ -2781,7 +2781,7 @@ public class XMLCipher {
* @param algorithm * @param algorithm
*/ */
public AgreementMethodImpl(String algorithm) { public AgreementMethodImpl(String algorithm) {
agreementMethodInformation = new LinkedList(); agreementMethodInformation = new LinkedList<Element>();
URI tmpAlgorithm = null; URI tmpAlgorithm = null;
try { try {
tmpAlgorithm = new URI(algorithm); tmpAlgorithm = new URI(algorithm);
...@@ -2802,7 +2802,7 @@ public class XMLCipher { ...@@ -2802,7 +2802,7 @@ public class XMLCipher {
} }
/** @inheritDoc */ /** @inheritDoc */
public Iterator getAgreementMethodInformation() { public Iterator<Element> getAgreementMethodInformation() {
return (agreementMethodInformation.iterator()); return (agreementMethodInformation.iterator());
} }
...@@ -2879,9 +2879,9 @@ public class XMLCipher { ...@@ -2879,9 +2879,9 @@ public class XMLCipher {
_contextDocument.createTextNode(new String(kaNonce))); _contextDocument.createTextNode(new String(kaNonce)));
} }
if (!agreementMethodInformation.isEmpty()) { if (!agreementMethodInformation.isEmpty()) {
Iterator itr = agreementMethodInformation.iterator(); Iterator<Element> itr = agreementMethodInformation.iterator();
while (itr.hasNext()) { while (itr.hasNext()) {
result.appendChild((Element) itr.next()); result.appendChild(itr.next());
} }
} }
if (null != originatorKeyInfo) { if (null != originatorKeyInfo) {
...@@ -3486,7 +3486,7 @@ public class XMLCipher { ...@@ -3486,7 +3486,7 @@ public class XMLCipher {
private String algorithm = null; private String algorithm = null;
private int keySize = Integer.MIN_VALUE; private int keySize = Integer.MIN_VALUE;
private byte[] oaepParams = null; private byte[] oaepParams = null;
private List encryptionMethodInformation = null; private List<Element> encryptionMethodInformation = null;
/** /**
* *
* @param algorithm * @param algorithm
...@@ -3499,7 +3499,7 @@ public class XMLCipher { ...@@ -3499,7 +3499,7 @@ public class XMLCipher {
// complain // complain
} }
this.algorithm = tmpAlgorithm.toString(); this.algorithm = tmpAlgorithm.toString();
encryptionMethodInformation = new LinkedList(); encryptionMethodInformation = new LinkedList<Element>();
} }
/** @inheritDoc */ /** @inheritDoc */
public String getAlgorithm() { public String getAlgorithm() {
...@@ -3522,7 +3522,7 @@ public class XMLCipher { ...@@ -3522,7 +3522,7 @@ public class XMLCipher {
oaepParams = params; oaepParams = params;
} }
/** @inheritDoc */ /** @inheritDoc */
public Iterator getEncryptionMethodInformation() { public Iterator<Element> getEncryptionMethodInformation() {
return (encryptionMethodInformation.iterator()); return (encryptionMethodInformation.iterator());
} }
/** @inheritDoc */ /** @inheritDoc */
...@@ -3565,8 +3565,8 @@ public class XMLCipher { ...@@ -3565,8 +3565,8 @@ public class XMLCipher {
new String(oaepParams)))); new String(oaepParams))));
} }
if (!encryptionMethodInformation.isEmpty()) { if (!encryptionMethodInformation.isEmpty()) {
Iterator itr = encryptionMethodInformation.iterator(); Iterator<Element> itr = encryptionMethodInformation.iterator();
result.appendChild((Element) itr.next()); result.appendChild(itr.next());
} }
return (result); return (result);
...@@ -3582,13 +3582,13 @@ public class XMLCipher { ...@@ -3582,13 +3582,13 @@ public class XMLCipher {
// </complexType> // </complexType>
private class EncryptionPropertiesImpl implements EncryptionProperties { private class EncryptionPropertiesImpl implements EncryptionProperties {
private String id = null; private String id = null;
private List encryptionProperties = null; private List<EncryptionProperty> encryptionProperties = null;
/** /**
* *
* *
*/ */
public EncryptionPropertiesImpl() { public EncryptionPropertiesImpl() {
encryptionProperties = new LinkedList(); encryptionProperties = new LinkedList<EncryptionProperty>();
} }
/** @inheritDoc */ /** @inheritDoc */
public String getId() { public String getId() {
...@@ -3599,7 +3599,7 @@ public class XMLCipher { ...@@ -3599,7 +3599,7 @@ public class XMLCipher {
this.id = id; this.id = id;
} }
/** @inheritDoc */ /** @inheritDoc */
public Iterator getEncryptionProperties() { public Iterator<EncryptionProperty> getEncryptionProperties() {
return (encryptionProperties.iterator()); return (encryptionProperties.iterator());
} }
/** @inheritDoc */ /** @inheritDoc */
...@@ -3625,7 +3625,7 @@ public class XMLCipher { ...@@ -3625,7 +3625,7 @@ public class XMLCipher {
if (null != id) { if (null != id) {
result.setAttributeNS(null, EncryptionConstants._ATT_ID, id); result.setAttributeNS(null, EncryptionConstants._ATT_ID, id);
} }
Iterator itr = getEncryptionProperties(); Iterator<EncryptionProperty> itr = getEncryptionProperties();
while (itr.hasNext()) { while (itr.hasNext()) {
result.appendChild(((EncryptionPropertyImpl) result.appendChild(((EncryptionPropertyImpl)
itr.next()).toElement()); itr.next()).toElement());
...@@ -3647,15 +3647,15 @@ public class XMLCipher { ...@@ -3647,15 +3647,15 @@ public class XMLCipher {
private class EncryptionPropertyImpl implements EncryptionProperty { private class EncryptionPropertyImpl implements EncryptionProperty {
private String target = null; private String target = null;
private String id = null; private String id = null;
private HashMap attributeMap = new HashMap(); private HashMap<String,String> attributeMap = new HashMap<String,String>();
private List encryptionInformation = null; private List<Element> encryptionInformation = null;
/** /**
* *
* *
*/ */
public EncryptionPropertyImpl() { public EncryptionPropertyImpl() {
encryptionInformation = new LinkedList(); encryptionInformation = new LinkedList<Element>();
} }
/** @inheritDoc */ /** @inheritDoc */
public String getTarget() { public String getTarget() {
...@@ -3692,14 +3692,14 @@ public class XMLCipher { ...@@ -3692,14 +3692,14 @@ public class XMLCipher {
} }
/** @inheritDoc */ /** @inheritDoc */
public String getAttribute(String attribute) { public String getAttribute(String attribute) {
return (String) attributeMap.get(attribute); return attributeMap.get(attribute);
} }
/** @inheritDoc */ /** @inheritDoc */
public void setAttribute(String attribute, String value) { public void setAttribute(String attribute, String value) {
attributeMap.put(attribute, value); attributeMap.put(attribute, value);
} }
/** @inheritDoc */ /** @inheritDoc */
public Iterator getEncryptionInformation() { public Iterator<Element> getEncryptionInformation() {
return (encryptionInformation.iterator()); return (encryptionInformation.iterator());
} }
/** @inheritDoc */ /** @inheritDoc */
...@@ -3821,8 +3821,8 @@ public class XMLCipher { ...@@ -3821,8 +3821,8 @@ public class XMLCipher {
// </complexType> // </complexType>
//</element> //</element>
private class ReferenceListImpl implements ReferenceList { private class ReferenceListImpl implements ReferenceList {
private Class sentry; private Class<?> sentry;
private List references; private List<Reference> references;
/** /**
* *
* @param type * @param type
...@@ -3835,7 +3835,7 @@ public class XMLCipher { ...@@ -3835,7 +3835,7 @@ public class XMLCipher {
} else { } else {
throw new IllegalArgumentException(); throw new IllegalArgumentException();
} }
references = new LinkedList(); references = new LinkedList<Reference>();
} }
/** @inheritDoc */ /** @inheritDoc */
public void add(Reference reference) { public void add(Reference reference) {
...@@ -3860,7 +3860,7 @@ public class XMLCipher { ...@@ -3860,7 +3860,7 @@ public class XMLCipher {
return (references.isEmpty()); return (references.isEmpty());
} }
/** @inheritDoc */ /** @inheritDoc */
public Iterator getReferences() { public Iterator<Reference> getReferences() {
return (references.iterator()); return (references.iterator());
} }
...@@ -3869,9 +3869,9 @@ public class XMLCipher { ...@@ -3869,9 +3869,9 @@ public class XMLCipher {
_contextDocument, _contextDocument,
EncryptionConstants.EncryptionSpecNS, EncryptionConstants.EncryptionSpecNS,
EncryptionConstants._TAG_REFERENCELIST); EncryptionConstants._TAG_REFERENCELIST);
Iterator eachReference = references.iterator(); Iterator<Reference> eachReference = references.iterator();
while (eachReference.hasNext()) { while (eachReference.hasNext()) {
Reference reference = (Reference) eachReference.next(); Reference reference = eachReference.next();
result.appendChild( result.appendChild(
((ReferenceImpl) reference).toElement()); ((ReferenceImpl) reference).toElement());
} }
...@@ -3894,18 +3894,18 @@ public class XMLCipher { ...@@ -3894,18 +3894,18 @@ public class XMLCipher {
*/ */
private abstract class ReferenceImpl implements Reference { private abstract class ReferenceImpl implements Reference {
private String uri; private String uri;
private List referenceInformation; private List<Element> referenceInformation;
ReferenceImpl(String _uri) { ReferenceImpl(String _uri) {
this.uri = _uri; this.uri = _uri;
referenceInformation = new LinkedList(); referenceInformation = new LinkedList<Element>();
} }
/** @inheritDoc */ /** @inheritDoc */
public String getURI() { public String getURI() {
return (uri); return (uri);
} }
/** @inheritDoc */ /** @inheritDoc */
public Iterator getElementRetrievalInformation() { public Iterator<Element> getElementRetrievalInformation() {
return (referenceInformation.iterator()); return (referenceInformation.iterator());
} }
/** @inheritDoc */ /** @inheritDoc */
......
...@@ -97,12 +97,12 @@ public class KeyInfo extends SignatureElementProxy { ...@@ -97,12 +97,12 @@ public class KeyInfo extends SignatureElementProxy {
/** {@link java.util.logging} logging facility */ /** {@link java.util.logging} logging facility */
static java.util.logging.Logger log = static java.util.logging.Logger log =
java.util.logging.Logger.getLogger(KeyInfo.class.getName()); java.util.logging.Logger.getLogger(KeyInfo.class.getName());
List x509Datas=null; List<X509Data> x509Datas=null;
List encryptedKeys=null; List<EncryptedKey> encryptedKeys=null;
static final List nullList; static final List<StorageResolver> nullList;
static { static {
List list = new ArrayList(); List<StorageResolver> list = new ArrayList<StorageResolver>(1);
list.add(null); list.add(null);
nullList = Collections.unmodifiableList(list); nullList = Collections.unmodifiableList(list);
} }
...@@ -297,7 +297,7 @@ public class KeyInfo extends SignatureElementProxy { ...@@ -297,7 +297,7 @@ public class KeyInfo extends SignatureElementProxy {
*/ */
public void add(X509Data x509data) { public void add(X509Data x509data) {
if (x509Datas==null) if (x509Datas==null)
x509Datas=new ArrayList(); x509Datas=new ArrayList<X509Data>();
x509Datas.add(x509data); x509Datas.add(x509data);
this._constructionElement.appendChild(x509data.getElement()); this._constructionElement.appendChild(x509data.getElement());
XMLUtils.addReturnToElement(this._constructionElement); XMLUtils.addReturnToElement(this._constructionElement);
...@@ -313,7 +313,7 @@ public class KeyInfo extends SignatureElementProxy { ...@@ -313,7 +313,7 @@ public class KeyInfo extends SignatureElementProxy {
public void add(EncryptedKey encryptedKey) public void add(EncryptedKey encryptedKey)
throws XMLEncryptionException { throws XMLEncryptionException {
if (encryptedKeys==null) if (encryptedKeys==null)
encryptedKeys=new ArrayList(); encryptedKeys=new ArrayList<EncryptedKey>();
encryptedKeys.add(encryptedKey); encryptedKeys.add(encryptedKey);
XMLCipher cipher = XMLCipher.getInstance(); XMLCipher cipher = XMLCipher.getInstance();
this._constructionElement.appendChild(cipher.martial(encryptedKey)); this._constructionElement.appendChild(cipher.martial(encryptedKey));
...@@ -541,7 +541,7 @@ public class KeyInfo extends SignatureElementProxy { ...@@ -541,7 +541,7 @@ public class KeyInfo extends SignatureElementProxy {
*/ */
public X509Data itemX509Data(int i) throws XMLSecurityException { public X509Data itemX509Data(int i) throws XMLSecurityException {
if (x509Datas!=null) { if (x509Datas!=null) {
return (X509Data) x509Datas.get(i); return x509Datas.get(i);
} }
Element e = XMLUtils.selectDsNode(this._constructionElement.getFirstChild(), Element e = XMLUtils.selectDsNode(this._constructionElement.getFirstChild(),
Constants._TAG_X509DATA,i); Constants._TAG_X509DATA,i);
...@@ -562,7 +562,7 @@ public class KeyInfo extends SignatureElementProxy { ...@@ -562,7 +562,7 @@ public class KeyInfo extends SignatureElementProxy {
public EncryptedKey itemEncryptedKey(int i) throws XMLSecurityException { public EncryptedKey itemEncryptedKey(int i) throws XMLSecurityException {
if (encryptedKeys!=null) { if (encryptedKeys!=null) {
return (EncryptedKey) encryptedKeys.get(i); return encryptedKeys.get(i);
} }
Element e = Element e =
XMLUtils.selectXencNode(this._constructionElement.getFirstChild(), XMLUtils.selectXencNode(this._constructionElement.getFirstChild(),
...@@ -728,16 +728,16 @@ public class KeyInfo extends SignatureElementProxy { ...@@ -728,16 +728,16 @@ public class KeyInfo extends SignatureElementProxy {
PublicKey getPublicKeyFromStaticResolvers() throws KeyResolverException { PublicKey getPublicKeyFromStaticResolvers() throws KeyResolverException {
int length=KeyResolver.length(); int length=KeyResolver.length();
int storageLength=this._storageResolvers.size(); int storageLength=this._storageResolvers.size();
Iterator it= KeyResolver.iterator(); Iterator<KeyResolverSpi> it= KeyResolver.iterator();
for (int i = 0; i < length; i++) { for (int i = 0; i < length; i++) {
KeyResolverSpi keyResolver = (KeyResolverSpi) it.next(); KeyResolverSpi keyResolver = it.next();
Node currentChild=this._constructionElement.getFirstChild(); Node currentChild=this._constructionElement.getFirstChild();
String uri= this.getBaseURI(); String uri= this.getBaseURI();
while (currentChild!=null) { while (currentChild!=null) {
if (currentChild.getNodeType() == Node.ELEMENT_NODE) { if (currentChild.getNodeType() == Node.ELEMENT_NODE) {
for (int k = 0; k < storageLength; k++) { for (int k = 0; k < storageLength; k++) {
StorageResolver storage = StorageResolver storage =
(StorageResolver) this._storageResolvers.get(k); this._storageResolvers.get(k);
PublicKey pk = PublicKey pk =
keyResolver.engineLookupAndResolvePublicKey((Element) currentChild, keyResolver.engineLookupAndResolvePublicKey((Element) currentChild,
...@@ -776,7 +776,7 @@ public class KeyInfo extends SignatureElementProxy { ...@@ -776,7 +776,7 @@ public class KeyInfo extends SignatureElementProxy {
if (currentChild.getNodeType() == Node.ELEMENT_NODE) { if (currentChild.getNodeType() == Node.ELEMENT_NODE) {
for (int k = 0; k < storageLength; k++) { for (int k = 0; k < storageLength; k++) {
StorageResolver storage = StorageResolver storage =
(StorageResolver) this._storageResolvers.get(k); this._storageResolvers.get(k);
PublicKey pk = keyResolver PublicKey pk = keyResolver
.engineLookupAndResolvePublicKey((Element) currentChild, uri, storage); .engineLookupAndResolvePublicKey((Element) currentChild, uri, storage);
...@@ -845,9 +845,9 @@ public class KeyInfo extends SignatureElementProxy { ...@@ -845,9 +845,9 @@ public class KeyInfo extends SignatureElementProxy {
String uri=this.getBaseURI(); String uri=this.getBaseURI();
int length= KeyResolver.length(); int length= KeyResolver.length();
int storageLength=this._storageResolvers.size(); int storageLength=this._storageResolvers.size();
Iterator it = KeyResolver.iterator(); Iterator<KeyResolverSpi> it = KeyResolver.iterator();
for (int i = 0; i <length; i++) { for (int i = 0; i <length; i++) {
KeyResolverSpi keyResolver = (KeyResolverSpi) it.next(); KeyResolverSpi keyResolver = it.next();
X509Certificate cert= applyCurrentResolver(uri, storageLength, keyResolver); X509Certificate cert= applyCurrentResolver(uri, storageLength, keyResolver);
if (cert!=null) { if (cert!=null) {
KeyResolver.hit(it); KeyResolver.hit(it);
...@@ -863,7 +863,7 @@ public class KeyInfo extends SignatureElementProxy { ...@@ -863,7 +863,7 @@ public class KeyInfo extends SignatureElementProxy {
if (currentChild.getNodeType() == Node.ELEMENT_NODE) { if (currentChild.getNodeType() == Node.ELEMENT_NODE) {
for (int k = 0; k < storageLength; k++) { for (int k = 0; k < storageLength; k++) {
StorageResolver storage = StorageResolver storage =
(StorageResolver) this._storageResolvers.get(k); this._storageResolvers.get(k);
X509Certificate cert = keyResolver X509Certificate cert = keyResolver
.engineLookupResolveX509Certificate((Element) currentChild, uri, .engineLookupResolveX509Certificate((Element) currentChild, uri,
...@@ -944,9 +944,9 @@ public class KeyInfo extends SignatureElementProxy { ...@@ -944,9 +944,9 @@ public class KeyInfo extends SignatureElementProxy {
SecretKey getSecretKeyFromStaticResolvers() throws KeyResolverException { SecretKey getSecretKeyFromStaticResolvers() throws KeyResolverException {
final int length=KeyResolver.length(); final int length=KeyResolver.length();
int storageLength=this._storageResolvers.size(); int storageLength=this._storageResolvers.size();
Iterator it = KeyResolver.iterator(); Iterator<KeyResolverSpi> it = KeyResolver.iterator();
for (int i = 0; i < length; i++) { for (int i = 0; i < length; i++) {
KeyResolverSpi keyResolver = (KeyResolverSpi) it.next(); KeyResolverSpi keyResolver = it.next();
Node currentChild=this._constructionElement.getFirstChild(); Node currentChild=this._constructionElement.getFirstChild();
String uri=this.getBaseURI(); String uri=this.getBaseURI();
...@@ -954,7 +954,7 @@ public class KeyInfo extends SignatureElementProxy { ...@@ -954,7 +954,7 @@ public class KeyInfo extends SignatureElementProxy {
if (currentChild.getNodeType() == Node.ELEMENT_NODE) { if (currentChild.getNodeType() == Node.ELEMENT_NODE) {
for (int k = 0; k < storageLength; k++) { for (int k = 0; k < storageLength; k++) {
StorageResolver storage = StorageResolver storage =
(StorageResolver) this._storageResolvers.get(k); this._storageResolvers.get(k);
SecretKey sk = SecretKey sk =
keyResolver.engineLookupAndResolveSecretKey((Element) currentChild, keyResolver.engineLookupAndResolveSecretKey((Element) currentChild,
...@@ -992,7 +992,7 @@ public class KeyInfo extends SignatureElementProxy { ...@@ -992,7 +992,7 @@ public class KeyInfo extends SignatureElementProxy {
if (currentChild.getNodeType() == Node.ELEMENT_NODE) { if (currentChild.getNodeType() == Node.ELEMENT_NODE) {
for (int k = 0; k < storageLength; k++) { for (int k = 0; k < storageLength; k++) {
StorageResolver storage = StorageResolver storage =
(StorageResolver) this._storageResolvers.get(k); this._storageResolvers.get(k);
SecretKey sk = keyResolver SecretKey sk = keyResolver
.engineLookupAndResolveSecretKey((Element) currentChild, uri, storage); .engineLookupAndResolveSecretKey((Element) currentChild, uri, storage);
...@@ -1012,7 +1012,7 @@ public class KeyInfo extends SignatureElementProxy { ...@@ -1012,7 +1012,7 @@ public class KeyInfo extends SignatureElementProxy {
/** /**
* Stores the individual (per-KeyInfo) {@link KeyResolver}s * Stores the individual (per-KeyInfo) {@link KeyResolver}s
*/ */
List _internalKeyResolvers = null; List<KeyResolverSpi> _internalKeyResolvers = null;
/** /**
* This method is used to add a custom {@link KeyResolverSpi} to a KeyInfo * This method is used to add a custom {@link KeyResolverSpi} to a KeyInfo
...@@ -1022,7 +1022,7 @@ public class KeyInfo extends SignatureElementProxy { ...@@ -1022,7 +1022,7 @@ public class KeyInfo extends SignatureElementProxy {
*/ */
public void registerInternalKeyResolver(KeyResolverSpi realKeyResolver) { public void registerInternalKeyResolver(KeyResolverSpi realKeyResolver) {
if (_internalKeyResolvers==null) { if (_internalKeyResolvers==null) {
_internalKeyResolvers=new ArrayList(); _internalKeyResolvers=new ArrayList<KeyResolverSpi>();
} }
this._internalKeyResolvers.add(realKeyResolver); this._internalKeyResolvers.add(realKeyResolver);
} }
...@@ -1044,11 +1044,11 @@ public class KeyInfo extends SignatureElementProxy { ...@@ -1044,11 +1044,11 @@ public class KeyInfo extends SignatureElementProxy {
* @return the KeyResolverSpi for the index. * @return the KeyResolverSpi for the index.
*/ */
KeyResolverSpi itemInternalKeyResolver(int i) { KeyResolverSpi itemInternalKeyResolver(int i) {
return (KeyResolverSpi) this._internalKeyResolvers.get(i); return this._internalKeyResolvers.get(i);
} }
/** Field _storageResolvers */ /** Field _storageResolvers */
List _storageResolvers = nullList; List<StorageResolver> _storageResolvers = nullList;
/** /**
* Method addStorageResolver * Method addStorageResolver
...@@ -1057,7 +1057,7 @@ public class KeyInfo extends SignatureElementProxy { ...@@ -1057,7 +1057,7 @@ public class KeyInfo extends SignatureElementProxy {
*/ */
public void addStorageResolver(StorageResolver storageResolver) { public void addStorageResolver(StorageResolver storageResolver) {
if (_storageResolvers == nullList ){ if (_storageResolvers == nullList ){
_storageResolvers=new ArrayList(); _storageResolvers=new ArrayList<StorageResolver>();
} }
this._storageResolvers.add(storageResolver); this._storageResolvers.add(storageResolver);
......
...@@ -52,7 +52,7 @@ public class KeyResolver { ...@@ -52,7 +52,7 @@ public class KeyResolver {
static boolean _alreadyInitialized = false; static boolean _alreadyInitialized = false;
/** Field _resolverVector */ /** Field _resolverVector */
static List _resolverVector = null; static List<KeyResolver> _resolverVector = null;
/** Field _resolverSpi */ /** Field _resolverSpi */
protected KeyResolverSpi _resolverSpi = null; protected KeyResolverSpi _resolverSpi = null;
...@@ -85,12 +85,12 @@ public class KeyResolver { ...@@ -85,12 +85,12 @@ public class KeyResolver {
return KeyResolver._resolverVector.size(); return KeyResolver._resolverVector.size();
} }
public static void hit(Iterator hintI) { public static void hit(Iterator<KeyResolverSpi> hintI) {
ResolverIterator hint = (ResolverIterator) hintI; ResolverIterator hint = (ResolverIterator) hintI;
int i = hint.i; int i = hint.i;
if (i!=1 && hint.res ==_resolverVector) { if (i!=1 && hint.res ==_resolverVector) {
List resolverVector=(List)((ArrayList)_resolverVector).clone(); List<KeyResolver> resolverVector=getResolverVectorClone();
Object ob=resolverVector.remove(i-1); KeyResolver ob=resolverVector.remove(i-1);
resolverVector.add(0,ob); resolverVector.add(0,ob);
_resolverVector=resolverVector; _resolverVector=resolverVector;
} else { } else {
...@@ -113,12 +113,9 @@ public class KeyResolver { ...@@ -113,12 +113,9 @@ public class KeyResolver {
throws KeyResolverException { throws KeyResolverException {
// use the old vector to not be hit by updates // use the old vector to not be hit by updates
List resolverVector = KeyResolver._resolverVector; List<KeyResolver> resolverVector = KeyResolver._resolverVector;
for (int i = 0; i < resolverVector.size(); i++) { for (KeyResolver resolver : resolverVector) {
KeyResolver resolver= if (resolver==null) {
(KeyResolver) resolverVector.get(i);
if (resolver==null) {
Object exArgs[] = { Object exArgs[] = {
(((element != null) (((element != null)
&& (element.getNodeType() == Node.ELEMENT_NODE)) && (element.getNodeType() == Node.ELEMENT_NODE))
...@@ -157,10 +154,8 @@ public class KeyResolver { ...@@ -157,10 +154,8 @@ public class KeyResolver {
Element element, String BaseURI, StorageResolver storage) Element element, String BaseURI, StorageResolver storage)
throws KeyResolverException { throws KeyResolverException {
List resolverVector = KeyResolver._resolverVector; List<KeyResolver> resolverVector = KeyResolver._resolverVector;
for (int i = 0; i < resolverVector.size(); i++) { for (KeyResolver resolver : resolverVector) {
KeyResolver resolver=
(KeyResolver) resolverVector.get(i);
if (resolver==null) { if (resolver==null) {
Object exArgs[] = { Object exArgs[] = {
...@@ -176,11 +171,11 @@ public class KeyResolver { ...@@ -176,11 +171,11 @@ public class KeyResolver {
PublicKey cert=resolver.resolvePublicKey(element, BaseURI, storage); PublicKey cert=resolver.resolvePublicKey(element, BaseURI, storage);
if (cert!=null) { if (cert!=null) {
if (i!=0 && resolverVector==_resolverVector) { if (resolverVector.indexOf(resolver)!=0 && resolverVector==_resolverVector) {
//update resolver. //update resolver.
resolverVector=(List)((ArrayList)_resolverVector).clone(); resolverVector=getResolverVectorClone();
Object ob=resolverVector.remove(i); resolverVector.remove(resolver);
resolverVector.add(0,ob); resolverVector.add(0,resolver);
_resolverVector=resolverVector; _resolverVector=resolverVector;
} }
return cert; return cert;
...@@ -195,13 +190,19 @@ public class KeyResolver { ...@@ -195,13 +190,19 @@ public class KeyResolver {
throw new KeyResolverException("utils.resolver.noClass", exArgs); throw new KeyResolverException("utils.resolver.noClass", exArgs);
} }
@SuppressWarnings("unchecked")
private static List<KeyResolver> getResolverVectorClone() {
return (List<KeyResolver>)((ArrayList<KeyResolver>)_resolverVector).clone();
}
/** /**
* The init() function is called by com.sun.org.apache.xml.internal.security.Init.init() * The init() function is called by com.sun.org.apache.xml.internal.security.Init.init()
*/ */
public static void init() { public static void init() {
if (!KeyResolver._alreadyInitialized) { if (!KeyResolver._alreadyInitialized) {
KeyResolver._resolverVector = new ArrayList(10); KeyResolver._resolverVector = new ArrayList<KeyResolver>(10);
_alreadyInitialized = true; _alreadyInitialized = true;
} }
} }
...@@ -230,8 +231,8 @@ public class KeyResolver { ...@@ -230,8 +231,8 @@ public class KeyResolver {
* *
* @param className * @param className
*/ */
public static void registerAtStart(String className) { public static void registerAtStart(String className) throws ClassNotFoundException, IllegalAccessException, InstantiationException {
KeyResolver._resolverVector.add(0, className); register(className);
} }
/** /**
...@@ -322,11 +323,11 @@ public class KeyResolver { ...@@ -322,11 +323,11 @@ public class KeyResolver {
return this._resolverSpi.getClass().getName(); return this._resolverSpi.getClass().getName();
} }
static class ResolverIterator implements Iterator { static class ResolverIterator implements Iterator<KeyResolverSpi> {
List res; List<KeyResolver> res;
Iterator it; Iterator<KeyResolver> it;
int i; int i;
public ResolverIterator(List list) { public ResolverIterator(List<KeyResolver> list) {
res = list; res = list;
it = res.iterator(); it = res.iterator();
} }
...@@ -335,9 +336,9 @@ public class KeyResolver { ...@@ -335,9 +336,9 @@ public class KeyResolver {
return it.hasNext(); return it.hasNext();
} }
public Object next() { public KeyResolverSpi next() {
i++; i++;
KeyResolver resolver = (KeyResolver) it.next(); KeyResolver resolver = it.next();
if (resolver==null) { if (resolver==null) {
throw new RuntimeException("utils.resolver.noClass"); throw new RuntimeException("utils.resolver.noClass");
} }
...@@ -351,7 +352,7 @@ public class KeyResolver { ...@@ -351,7 +352,7 @@ public class KeyResolver {
} }
}; };
public static Iterator iterator() { public static Iterator<KeyResolverSpi> iterator() {
return new ResolverIterator(_resolverVector); return new ResolverIterator(_resolverVector);
} }
} }
...@@ -32,7 +32,7 @@ import org.w3c.dom.Element; ...@@ -32,7 +32,7 @@ import org.w3c.dom.Element;
/** /**
* This class is abstract class for a child KeyInfo Elemnet. * This class is abstract class for a child KeyInfo Elemnet.
* *
* If you want the your KeyResolver, at firstly you must extand this class, and register * If you want your KeyResolver, at first you must extend this class, and register
* as following in config.xml * as following in config.xml
* <PRE> * <PRE>
* &lt;KeyResolver URI="http://www.w3.org/2000/09/xmldsig#KeyValue" * &lt;KeyResolver URI="http://www.w3.org/2000/09/xmldsig#KeyValue"
...@@ -177,7 +177,7 @@ public abstract class KeyResolverSpi { ...@@ -177,7 +177,7 @@ public abstract class KeyResolverSpi {
} }
/** Field _properties */ /** Field _properties */
protected java.util.Map _properties = null; protected java.util.Map<String,String> _properties = null;
protected boolean globalResolver=false; protected boolean globalResolver=false;
...@@ -189,7 +189,7 @@ public abstract class KeyResolverSpi { ...@@ -189,7 +189,7 @@ public abstract class KeyResolverSpi {
*/ */
public void engineSetProperty(String key, String value) { public void engineSetProperty(String key, String value) {
if (_properties==null) if (_properties==null)
_properties=new HashMap(); _properties=new HashMap<String,String>();
this._properties.put(key, value); this._properties.put(key, value);
} }
...@@ -203,7 +203,7 @@ public abstract class KeyResolverSpi { ...@@ -203,7 +203,7 @@ public abstract class KeyResolverSpi {
if (_properties==null) if (_properties==null)
return null; return null;
return (String) this._properties.get(key); return this._properties.get(key);
} }
/** /**
......
...@@ -278,18 +278,18 @@ public class RetrievalMethodResolver extends KeyResolverSpi { ...@@ -278,18 +278,18 @@ public class RetrievalMethodResolver extends KeyResolverSpi {
return null; return null;
} }
static Element getDocumentElement(Set set) { static Element getDocumentElement(Set<Node> set) {
Iterator it=set.iterator(); Iterator<Node> it=set.iterator();
Element e=null; Element e=null;
while (it.hasNext()) { while (it.hasNext()) {
Node currentNode=(Node)it.next(); Node currentNode=it.next();
if (currentNode instanceof Element) { if (currentNode instanceof Element) {
e=(Element)currentNode; e=(Element)currentNode;
break; break;
} }
} }
List parents=new ArrayList(10); List<Element> parents=new ArrayList<Element>(10);
//Obtain all the parents of the elemnt //Obtain all the parents of the elemnt
do { do {
...@@ -301,10 +301,10 @@ public class RetrievalMethodResolver extends KeyResolverSpi { ...@@ -301,10 +301,10 @@ public class RetrievalMethodResolver extends KeyResolverSpi {
e=(Element)n; e=(Element)n;
} while (e!=null); } while (e!=null);
//Visit them in reverse order. //Visit them in reverse order.
ListIterator it2=parents.listIterator(parents.size()-1); ListIterator<Element> it2=parents.listIterator(parents.size()-1);
Element ele=null; Element ele=null;
while (it2.hasPrevious()) { while (it2.hasPrevious()) {
ele=(Element)it2.previous(); ele=it2.previous();
if (set.contains(ele)) { if (set.contains(ele)) {
return ele; return ele;
} }
......
...@@ -42,10 +42,10 @@ public class StorageResolver { ...@@ -42,10 +42,10 @@ public class StorageResolver {
java.util.logging.Logger.getLogger(StorageResolver.class.getName()); java.util.logging.Logger.getLogger(StorageResolver.class.getName());
/** Field _storageResolvers */ /** Field _storageResolvers */
List _storageResolvers = null; List<Object> _storageResolvers = null;
/** Field _iterator */ /** Field _iterator */
Iterator _iterator = null; Iterator<Object> _iterator = null;
/** /**
* Constructor StorageResolver * Constructor StorageResolver
...@@ -69,7 +69,7 @@ public class StorageResolver { ...@@ -69,7 +69,7 @@ public class StorageResolver {
*/ */
public void add(StorageResolverSpi resolver) { public void add(StorageResolverSpi resolver) {
if (_storageResolvers==null) if (_storageResolvers==null)
_storageResolvers=new ArrayList(); _storageResolvers=new ArrayList<Object>();
this._storageResolvers.add(resolver); this._storageResolvers.add(resolver);
this._iterator = null; this._iterator = null;
...@@ -121,11 +121,11 @@ public class StorageResolver { ...@@ -121,11 +121,11 @@ public class StorageResolver {
* @return the iterator for the resolvers. * @return the iterator for the resolvers.
* *
*/ */
public Iterator getIterator() { public Iterator<Object> getIterator() {
if (this._iterator == null) { if (this._iterator == null) {
if (_storageResolvers==null) if (_storageResolvers==null)
_storageResolvers=new ArrayList(); _storageResolvers=new ArrayList<Object>();
this._iterator = new StorageResolverIterator(this._storageResolvers.iterator()); this._iterator = new StorageResolverIterator(this._storageResolvers.iterator());
} }
...@@ -141,7 +141,7 @@ public class StorageResolver { ...@@ -141,7 +141,7 @@ public class StorageResolver {
if (this._iterator == null) { if (this._iterator == null) {
if (_storageResolvers==null) if (_storageResolvers==null)
_storageResolvers=new ArrayList(); _storageResolvers=new ArrayList<Object>();
this._iterator = new StorageResolverIterator(this._storageResolvers.iterator()); this._iterator = new StorageResolverIterator(this._storageResolvers.iterator());
} }
...@@ -163,17 +163,17 @@ public class StorageResolver { ...@@ -163,17 +163,17 @@ public class StorageResolver {
* @author $Author: mullan $ * @author $Author: mullan $
* @version $Revision: 1.5 $ * @version $Revision: 1.5 $
*/ */
static class StorageResolverIterator implements Iterator { static class StorageResolverIterator implements Iterator<Object> {
/** Field _resolvers */ /** Field _resolvers */
Iterator _resolvers = null; Iterator<Object> _resolvers = null;
/** /**
* Constructor FilesystemIterator * Constructor FilesystemIterator
* *
* @param resolvers * @param resolvers
*/ */
public StorageResolverIterator(Iterator resolvers) { public StorageResolverIterator(Iterator<Object> resolvers) {
this._resolvers = resolvers; this._resolvers = resolvers;
} }
......
...@@ -36,5 +36,5 @@ public abstract class StorageResolverSpi { ...@@ -36,5 +36,5 @@ public abstract class StorageResolverSpi {
* *
* @return the iterator for the storage * @return the iterator for the storage
*/ */
public abstract Iterator getIterator(); public abstract Iterator<?> getIterator();
} }
...@@ -54,10 +54,10 @@ public class CertsInFilesystemDirectoryResolver extends StorageResolverSpi { ...@@ -54,10 +54,10 @@ public class CertsInFilesystemDirectoryResolver extends StorageResolverSpi {
String _merlinsCertificatesDir = null; String _merlinsCertificatesDir = null;
/** Field _certs */ /** Field _certs */
private List _certs = new ArrayList(); private List<X509Certificate> _certs = new ArrayList<X509Certificate>();
/** Field _iterator */ /** Field _iterator */
Iterator _iterator = null; Iterator<X509Certificate> _iterator = null;
/** /**
* *
...@@ -83,7 +83,7 @@ public class CertsInFilesystemDirectoryResolver extends StorageResolverSpi { ...@@ -83,7 +83,7 @@ public class CertsInFilesystemDirectoryResolver extends StorageResolverSpi {
private void readCertsFromHarddrive() throws StorageResolverException { private void readCertsFromHarddrive() throws StorageResolverException {
File certDir = new File(this._merlinsCertificatesDir); File certDir = new File(this._merlinsCertificatesDir);
ArrayList al = new ArrayList(); ArrayList<String> al = new ArrayList<String>();
String[] names = certDir.list(); String[] names = certDir.list();
for (int i = 0; i < names.length; i++) { for (int i = 0; i < names.length; i++) {
...@@ -108,7 +108,7 @@ public class CertsInFilesystemDirectoryResolver extends StorageResolverSpi { ...@@ -108,7 +108,7 @@ public class CertsInFilesystemDirectoryResolver extends StorageResolverSpi {
for (int i = 0; i < al.size(); i++) { for (int i = 0; i < al.size(); i++) {
String filename = certDir.getAbsolutePath() + File.separator String filename = certDir.getAbsolutePath() + File.separator
+ (String) al.get(i); + al.get(i);
File file = new File(filename); File file = new File(filename);
boolean added = false; boolean added = false;
String dn = null; String dn = null;
...@@ -146,7 +146,7 @@ public class CertsInFilesystemDirectoryResolver extends StorageResolverSpi { ...@@ -146,7 +146,7 @@ public class CertsInFilesystemDirectoryResolver extends StorageResolverSpi {
} }
/** @inheritDoc */ /** @inheritDoc */
public Iterator getIterator() { public Iterator<X509Certificate> getIterator() {
return this._iterator; return this._iterator;
} }
...@@ -156,10 +156,10 @@ public class CertsInFilesystemDirectoryResolver extends StorageResolverSpi { ...@@ -156,10 +156,10 @@ public class CertsInFilesystemDirectoryResolver extends StorageResolverSpi {
* @author $Author: mullan $ * @author $Author: mullan $
* @version $Revision: 1.5 $ * @version $Revision: 1.5 $
*/ */
private static class FilesystemIterator implements Iterator { private static class FilesystemIterator implements Iterator<X509Certificate> {
/** Field _certs */ /** Field _certs */
List _certs = null; List<X509Certificate> _certs = null;
/** Field _i */ /** Field _i */
int _i; int _i;
...@@ -169,7 +169,7 @@ public class CertsInFilesystemDirectoryResolver extends StorageResolverSpi { ...@@ -169,7 +169,7 @@ public class CertsInFilesystemDirectoryResolver extends StorageResolverSpi {
* *
* @param certs * @param certs
*/ */
public FilesystemIterator(List certs) { public FilesystemIterator(List<X509Certificate> certs) {
this._certs = certs; this._certs = certs;
this._i = 0; this._i = 0;
} }
...@@ -180,7 +180,7 @@ public class CertsInFilesystemDirectoryResolver extends StorageResolverSpi { ...@@ -180,7 +180,7 @@ public class CertsInFilesystemDirectoryResolver extends StorageResolverSpi {
} }
/** @inheritDoc */ /** @inheritDoc */
public Object next() { public X509Certificate next() {
return this._certs.get(this._i++); return this._certs.get(this._i++);
} }
...@@ -206,8 +206,8 @@ public class CertsInFilesystemDirectoryResolver extends StorageResolverSpi { ...@@ -206,8 +206,8 @@ public class CertsInFilesystemDirectoryResolver extends StorageResolverSpi {
new CertsInFilesystemDirectoryResolver( new CertsInFilesystemDirectoryResolver(
"data/ie/baltimore/merlin-examples/merlin-xmldsig-eighteen/certs"); "data/ie/baltimore/merlin-examples/merlin-xmldsig-eighteen/certs");
for (Iterator i = krs.getIterator(); i.hasNext(); ) { for (Iterator<X509Certificate> i = krs.getIterator(); i.hasNext(); ) {
X509Certificate cert = (X509Certificate) i.next(); X509Certificate cert = i.next();
byte[] ski = byte[] ski =
com.sun.org.apache.xml.internal.security.keys.content.x509.XMLX509SKI com.sun.org.apache.xml.internal.security.keys.content.x509.XMLX509SKI
.getSKIBytesFromCert(cert); .getSKIBytesFromCert(cert);
......
...@@ -42,7 +42,7 @@ public class KeyStoreResolver extends StorageResolverSpi { ...@@ -42,7 +42,7 @@ public class KeyStoreResolver extends StorageResolverSpi {
KeyStore _keyStore = null; KeyStore _keyStore = null;
/** Field _iterator */ /** Field _iterator */
Iterator _iterator = null; Iterator<X509Certificate> _iterator = null;
/** /**
* Constructor KeyStoreResolver * Constructor KeyStoreResolver
...@@ -56,7 +56,7 @@ public class KeyStoreResolver extends StorageResolverSpi { ...@@ -56,7 +56,7 @@ public class KeyStoreResolver extends StorageResolverSpi {
} }
/** @inheritDoc */ /** @inheritDoc */
public Iterator getIterator() { public Iterator<X509Certificate> getIterator() {
return this._iterator; return this._iterator;
} }
...@@ -66,13 +66,13 @@ public class KeyStoreResolver extends StorageResolverSpi { ...@@ -66,13 +66,13 @@ public class KeyStoreResolver extends StorageResolverSpi {
* @author $Author: mullan $ * @author $Author: mullan $
* @version $Revision: 1.5 $ * @version $Revision: 1.5 $
*/ */
static class KeyStoreIterator implements Iterator { static class KeyStoreIterator implements Iterator<X509Certificate> {
/** Field _keyStore */ /** Field _keyStore */
KeyStore _keyStore = null; KeyStore _keyStore = null;
/** Field _aliases */ /** Field _aliases */
Enumeration _aliases = null; Enumeration<String> _aliases = null;
/** /**
* Constructor KeyStoreIterator * Constructor KeyStoreIterator
...@@ -97,12 +97,13 @@ public class KeyStoreResolver extends StorageResolverSpi { ...@@ -97,12 +97,13 @@ public class KeyStoreResolver extends StorageResolverSpi {
} }
/** @inheritDoc */ /** @inheritDoc */
public Object next() { @SuppressWarnings("unchecked")
public X509Certificate next() {
String alias = (String) this._aliases.nextElement(); String alias = this._aliases.nextElement();
try { try {
return this._keyStore.getCertificate(alias); return (X509Certificate)this._keyStore.getCertificate(alias);
} catch (KeyStoreException ex) { } catch (KeyStoreException ex) {
return null; return null;
} }
...@@ -135,8 +136,8 @@ public class KeyStoreResolver extends StorageResolverSpi { ...@@ -135,8 +136,8 @@ public class KeyStoreResolver extends StorageResolverSpi {
KeyStoreResolver krs = new KeyStoreResolver(ks); KeyStoreResolver krs = new KeyStoreResolver(ks);
for (Iterator i = krs.getIterator(); i.hasNext(); ) { for (Iterator<X509Certificate> i = krs.getIterator(); i.hasNext(); ) {
X509Certificate cert = (X509Certificate) i.next(); X509Certificate cert = i.next();
byte[] ski = byte[] ski =
com.sun.org.apache.xml.internal.security.keys.content.x509.XMLX509SKI com.sun.org.apache.xml.internal.security.keys.content.x509.XMLX509SKI
.getSKIBytesFromCert(cert); .getSKIBytesFromCert(cert);
......
...@@ -38,7 +38,7 @@ public class SingleCertificateResolver extends StorageResolverSpi { ...@@ -38,7 +38,7 @@ public class SingleCertificateResolver extends StorageResolverSpi {
X509Certificate _certificate = null; X509Certificate _certificate = null;
/** Field _iterator */ /** Field _iterator */
Iterator _iterator = null; Iterator<X509Certificate> _iterator = null;
/** /**
* *
...@@ -51,7 +51,7 @@ public class SingleCertificateResolver extends StorageResolverSpi { ...@@ -51,7 +51,7 @@ public class SingleCertificateResolver extends StorageResolverSpi {
} }
/** @inheritDoc */ /** @inheritDoc */
public Iterator getIterator() { public Iterator<X509Certificate> getIterator() {
return this._iterator; return this._iterator;
} }
...@@ -61,7 +61,7 @@ public class SingleCertificateResolver extends StorageResolverSpi { ...@@ -61,7 +61,7 @@ public class SingleCertificateResolver extends StorageResolverSpi {
* @author $Author: mullan $ * @author $Author: mullan $
* @version $Revision: 1.5 $ * @version $Revision: 1.5 $
*/ */
static class InternalIterator implements Iterator { static class InternalIterator implements Iterator<X509Certificate> {
/** Field _alreadyReturned */ /** Field _alreadyReturned */
boolean _alreadyReturned = false; boolean _alreadyReturned = false;
...@@ -84,7 +84,7 @@ public class SingleCertificateResolver extends StorageResolverSpi { ...@@ -84,7 +84,7 @@ public class SingleCertificateResolver extends StorageResolverSpi {
} }
/** @inheritDoc */ /** @inheritDoc */
public Object next() { public X509Certificate next() {
this._alreadyReturned = true; this._alreadyReturned = true;
......
...@@ -28,6 +28,7 @@ import java.util.HashMap; ...@@ -28,6 +28,7 @@ import java.util.HashMap;
import java.util.Iterator; import java.util.Iterator;
import java.util.List; import java.util.List;
import java.util.Set; import java.util.Set;
import java.util.Map;
import javax.xml.parsers.ParserConfigurationException; import javax.xml.parsers.ParserConfigurationException;
...@@ -62,17 +63,17 @@ public class Manifest extends SignatureElementProxy { ...@@ -62,17 +63,17 @@ public class Manifest extends SignatureElementProxy {
java.util.logging.Logger.getLogger(Manifest.class.getName()); java.util.logging.Logger.getLogger(Manifest.class.getName());
/** Field _references */ /** Field _references */
List _references; List<Reference> _references;
Element[] _referencesEl; Element[] _referencesEl;
/** Field verificationResults[] */ /** Field verificationResults[] */
private boolean verificationResults[] = null; private boolean verificationResults[] = null;
/** Field _resolverProperties */ /** Field _resolverProperties */
HashMap _resolverProperties = null; Map<String,String> _resolverProperties = null;
/** Field _perManifestResolvers */ /** Field _perManifestResolvers */
List _perManifestResolvers = null; List<ResourceResolver> _perManifestResolvers = null;
/** /**
* Consturts {@link Manifest} * Consturts {@link Manifest}
...@@ -85,7 +86,7 @@ public class Manifest extends SignatureElementProxy { ...@@ -85,7 +86,7 @@ public class Manifest extends SignatureElementProxy {
XMLUtils.addReturnToElement(this._constructionElement); XMLUtils.addReturnToElement(this._constructionElement);
this._references = new ArrayList(); this._references = new ArrayList<Reference>();
} }
/** /**
...@@ -117,7 +118,7 @@ public class Manifest extends SignatureElementProxy { ...@@ -117,7 +118,7 @@ public class Manifest extends SignatureElementProxy {
} }
// create Vector // create Vector
this._references = new ArrayList(le); this._references = new ArrayList<Reference>(le);
for (int i = 0; i < le; i++) { for (int i = 0; i < le; i++) {
this._references.add(null); this._references.add(null);
...@@ -175,7 +176,7 @@ public class Manifest extends SignatureElementProxy { ...@@ -175,7 +176,7 @@ public class Manifest extends SignatureElementProxy {
for (int i = 0; i < this.getLength(); i++) { for (int i = 0; i < this.getLength(); i++) {
// update the cached Reference object, the Element content is automatically updated // update the cached Reference object, the Element content is automatically updated
Reference currentRef = (Reference) this._references.get(i); Reference currentRef = this._references.get(i);
currentRef.generateDigestValue(); currentRef.generateDigestValue();
} }
...@@ -208,7 +209,7 @@ public class Manifest extends SignatureElementProxy { ...@@ -208,7 +209,7 @@ public class Manifest extends SignatureElementProxy {
this._references.set(i, ref); this._references.set(i, ref);
} }
return (Reference) this._references.get(i); return this._references.get(i);
} }
...@@ -323,12 +324,12 @@ public class Manifest extends SignatureElementProxy { ...@@ -323,12 +324,12 @@ public class Manifest extends SignatureElementProxy {
try { try {
XMLSignatureInput signedManifestNodes = XMLSignatureInput signedManifestNodes =
currentRef.dereferenceURIandPerformTransforms(null); currentRef.dereferenceURIandPerformTransforms(null);
Set nl = signedManifestNodes.getNodeSet(); Set<Node> nl = signedManifestNodes.getNodeSet();
Manifest referencedManifest = null; Manifest referencedManifest = null;
Iterator nlIterator = nl.iterator(); Iterator<Node> nlIterator = nl.iterator();
findManifest: while (nlIterator.hasNext()) { findManifest: while (nlIterator.hasNext()) {
Node n = (Node) nlIterator.next(); Node n = nlIterator.next();
if ((n.getNodeType() == Node.ELEMENT_NODE) && ((Element) n) if ((n.getNodeType() == Node.ELEMENT_NODE) && ((Element) n)
.getNamespaceURI() .getNamespaceURI()
...@@ -449,7 +450,7 @@ public class Manifest extends SignatureElementProxy { ...@@ -449,7 +450,7 @@ public class Manifest extends SignatureElementProxy {
return; return;
} }
if (_perManifestResolvers==null) if (_perManifestResolvers==null)
_perManifestResolvers = new ArrayList(); _perManifestResolvers = new ArrayList<ResourceResolver>();
this._perManifestResolvers.add(resolver); this._perManifestResolvers.add(resolver);
} }
...@@ -465,7 +466,7 @@ public class Manifest extends SignatureElementProxy { ...@@ -465,7 +466,7 @@ public class Manifest extends SignatureElementProxy {
return; return;
} }
if (_perManifestResolvers==null) if (_perManifestResolvers==null)
_perManifestResolvers = new ArrayList(); _perManifestResolvers = new ArrayList<ResourceResolver>();
this._perManifestResolvers.add(new ResourceResolver(resolverSpi)); this._perManifestResolvers.add(new ResourceResolver(resolverSpi));
} }
...@@ -479,7 +480,7 @@ public class Manifest extends SignatureElementProxy { ...@@ -479,7 +480,7 @@ public class Manifest extends SignatureElementProxy {
*/ */
public void setResolverProperty(String key, String value) { public void setResolverProperty(String key, String value) {
if (_resolverProperties==null) { if (_resolverProperties==null) {
_resolverProperties=new HashMap(10); _resolverProperties=new HashMap<String, String>(10);
} }
this._resolverProperties.put(key, value); this._resolverProperties.put(key, value);
} }
...@@ -491,7 +492,7 @@ public class Manifest extends SignatureElementProxy { ...@@ -491,7 +492,7 @@ public class Manifest extends SignatureElementProxy {
* @return the value * @return the value
*/ */
public String getResolverProperty(String key) { public String getResolverProperty(String key) {
return (String) this._resolverProperties.get(key); return this._resolverProperties.get(key);
} }
/** /**
......
...@@ -436,6 +436,7 @@ private Element digestValueElement; ...@@ -436,6 +436,7 @@ private Element digestValueElement;
* *
* @deprecated use getContentsBeforeTransformation * @deprecated use getContentsBeforeTransformation
*/ */
@Deprecated
public XMLSignatureInput getTransformsInput() throws ReferenceNotInitializedException public XMLSignatureInput getTransformsInput() throws ReferenceNotInitializedException
{ {
XMLSignatureInput input=getContentsBeforeTransformation(); XMLSignatureInput input=getContentsBeforeTransformation();
...@@ -557,7 +558,7 @@ private Element digestValueElement; ...@@ -557,7 +558,7 @@ private Element digestValueElement;
try { try {
XMLSignatureInput nodes = this.getNodesetBeforeFirstCanonicalization(); XMLSignatureInput nodes = this.getNodesetBeforeFirstCanonicalization();
Set inclusiveNamespaces = new HashSet(); Set<String> inclusiveNamespaces = new HashSet<String>();
{ {
Transforms transforms = this.getTransforms(); Transforms transforms = this.getTransforms();
...@@ -710,7 +711,7 @@ private Element digestValueElement; ...@@ -710,7 +711,7 @@ private Element digestValueElement;
XMLSignatureInput output=this.dereferenceURIandPerformTransforms(os); XMLSignatureInput output=this.dereferenceURIandPerformTransforms(os);
// if signing and c14n11 property == true explicitly add // if signing and c14n11 property == true explicitly add
// C14N11 transform if needed // C14N11 transform if needed
if (this.useC14N11 && !validating && if (Reference.useC14N11 && !validating &&
!output.isOutputStreamSet() && !output.isOctetStream()) { !output.isOutputStreamSet() && !output.isOctetStream()) {
if (transforms == null) { if (transforms == null) {
transforms = new Transforms(this._doc); transforms = new Transforms(this._doc);
......
...@@ -74,7 +74,7 @@ public class XMLSignatureInput implements Cloneable { ...@@ -74,7 +74,7 @@ public class XMLSignatureInput implements Cloneable {
/** /**
* The original NodeSet for this XMLSignatureInput * The original NodeSet for this XMLSignatureInput
*/ */
Set _inputNodeSet = null; Set<Node> _inputNodeSet = null;
/** /**
* The original Element * The original Element
*/ */
...@@ -107,7 +107,7 @@ public class XMLSignatureInput implements Cloneable { ...@@ -107,7 +107,7 @@ public class XMLSignatureInput implements Cloneable {
/** /**
* Node Filter list. * Node Filter list.
*/ */
List nodeFilters=new ArrayList(); List<NodeFilter> nodeFilters=new ArrayList<NodeFilter>();
boolean needsToBeExpanded=false; boolean needsToBeExpanded=false;
OutputStream outputStream=null; OutputStream outputStream=null;
...@@ -164,6 +164,7 @@ public class XMLSignatureInput implements Cloneable { ...@@ -164,6 +164,7 @@ public class XMLSignatureInput implements Cloneable {
* @deprecated * @deprecated
* @param inputStr the input String which including XML document or node * @param inputStr the input String which including XML document or node
*/ */
@Deprecated
public XMLSignatureInput(String inputStr) { public XMLSignatureInput(String inputStr) {
this(inputStr.getBytes()); this(inputStr.getBytes());
} }
...@@ -179,6 +180,7 @@ public class XMLSignatureInput implements Cloneable { ...@@ -179,6 +180,7 @@ public class XMLSignatureInput implements Cloneable {
* @param encoding the encoding of <code>inputStr</code> * @param encoding the encoding of <code>inputStr</code>
* @throws UnsupportedEncodingException * @throws UnsupportedEncodingException
*/ */
@Deprecated
public XMLSignatureInput(String inputStr, String encoding) public XMLSignatureInput(String inputStr, String encoding)
throws UnsupportedEncodingException { throws UnsupportedEncodingException {
this(inputStr.getBytes(encoding)); this(inputStr.getBytes(encoding));
...@@ -201,7 +203,7 @@ public class XMLSignatureInput implements Cloneable { ...@@ -201,7 +203,7 @@ public class XMLSignatureInput implements Cloneable {
* @param inputNodeSet * @param inputNodeSet
* @param usedXPathAPI * @param usedXPathAPI
*/ */
public XMLSignatureInput(Set inputNodeSet) { public XMLSignatureInput(Set<Node> inputNodeSet) {
this._inputNodeSet = inputNodeSet; this._inputNodeSet = inputNodeSet;
} }
...@@ -215,7 +217,7 @@ public class XMLSignatureInput implements Cloneable { ...@@ -215,7 +217,7 @@ public class XMLSignatureInput implements Cloneable {
* @throws ParserConfigurationException * @throws ParserConfigurationException
* @throws CanonicalizationException * @throws CanonicalizationException
*/ */
public Set getNodeSet() throws CanonicalizationException, public Set<Node> getNodeSet() throws CanonicalizationException,
ParserConfigurationException, IOException, SAXException { ParserConfigurationException, IOException, SAXException {
return getNodeSet(false); return getNodeSet(false);
} }
...@@ -231,7 +233,7 @@ public class XMLSignatureInput implements Cloneable { ...@@ -231,7 +233,7 @@ public class XMLSignatureInput implements Cloneable {
* @throws ParserConfigurationException * @throws ParserConfigurationException
* @throws CanonicalizationException * @throws CanonicalizationException
*/ */
public Set getNodeSet(boolean circumvent) public Set<Node> getNodeSet(boolean circumvent)
throws ParserConfigurationException, IOException, SAXException, throws ParserConfigurationException, IOException, SAXException,
CanonicalizationException { CanonicalizationException {
if (this._inputNodeSet!=null) { if (this._inputNodeSet!=null) {
...@@ -242,13 +244,13 @@ public class XMLSignatureInput implements Cloneable { ...@@ -242,13 +244,13 @@ public class XMLSignatureInput implements Cloneable {
if (circumvent) { if (circumvent) {
XMLUtils.circumventBug2650(XMLUtils.getOwnerDocument(_subNode)); XMLUtils.circumventBug2650(XMLUtils.getOwnerDocument(_subNode));
} }
this._inputNodeSet = new HashSet(); this._inputNodeSet = new HashSet<Node>();
XMLUtils.getSet(_subNode,this._inputNodeSet, excludeNode, this.excludeComments); XMLUtils.getSet(_subNode,this._inputNodeSet, excludeNode, this.excludeComments);
return this._inputNodeSet; return this._inputNodeSet;
} else if (this.isOctetStream()) { } else if (this.isOctetStream()) {
convertToNodes(); convertToNodes();
HashSet result=new HashSet(); HashSet<Node> result=new HashSet<Node>();
XMLUtils.getSet(_subNode, result,null,false); XMLUtils.getSet(_subNode, result,null,false);
//this._inputNodeSet=result; //this._inputNodeSet=result;
return result; return result;
...@@ -447,7 +449,7 @@ public class XMLSignatureInput implements Cloneable { ...@@ -447,7 +449,7 @@ public class XMLSignatureInput implements Cloneable {
* @throws XMLSignatureException * @throws XMLSignatureException
* @return The HTML representation for this XMLSignature * @return The HTML representation for this XMLSignature
*/ */
public String getHTMLRepresentation(Set inclusiveNamespaces) public String getHTMLRepresentation(Set<String> inclusiveNamespaces)
throws XMLSignatureException { throws XMLSignatureException {
XMLSignatureInputDebugger db = new XMLSignatureInputDebugger( this, XMLSignatureInputDebugger db = new XMLSignatureInputDebugger( this,
...@@ -584,7 +586,7 @@ public class XMLSignatureInput implements Cloneable { ...@@ -584,7 +586,7 @@ public class XMLSignatureInput implements Cloneable {
/** /**
* @return the node filters * @return the node filters
*/ */
public List getNodeFilters() { public List<NodeFilter> getNodeFilters() {
// TODO Auto-generated method stub // TODO Auto-generated method stub
return nodeFilters; return nodeFilters;
} }
......
...@@ -47,9 +47,9 @@ public class XMLSignatureInputDebugger { ...@@ -47,9 +47,9 @@ public class XMLSignatureInputDebugger {
/** Field _xmlSignatureInput */ /** Field _xmlSignatureInput */
private Set _xpathNodeSet; private Set<Node> _xpathNodeSet;
private Set _inclusiveNamespaces; private Set<String> _inclusiveNamespaces;
/** Field _doc */ /** Field _doc */
private Document _doc = null; private Document _doc = null;
...@@ -159,7 +159,7 @@ public class XMLSignatureInputDebugger { ...@@ -159,7 +159,7 @@ public class XMLSignatureInputDebugger {
* @param inclusiveNamespace * @param inclusiveNamespace
*/ */
public XMLSignatureInputDebugger( public XMLSignatureInputDebugger(
XMLSignatureInput xmlSignatureInput, Set inclusiveNamespace) { XMLSignatureInput xmlSignatureInput, Set<String> inclusiveNamespace) {
this(xmlSignatureInput); this(xmlSignatureInput);
...@@ -182,7 +182,7 @@ public class XMLSignatureInputDebugger { ...@@ -182,7 +182,7 @@ public class XMLSignatureInputDebugger {
{ {
// get only a single node as anchor to fetch the owner document // get only a single node as anchor to fetch the owner document
Node n = (Node) this._xpathNodeSet.iterator().next(); Node n = this._xpathNodeSet.iterator().next();
this._doc = XMLUtils.getOwnerDocument(n); this._doc = XMLUtils.getOwnerDocument(n);
} }
...@@ -341,10 +341,10 @@ public class XMLSignatureInputDebugger { ...@@ -341,10 +341,10 @@ public class XMLSignatureInputDebugger {
// we output all Attrs which are available // we output all Attrs which are available
NamedNodeMap attrs = currentElement.getAttributes(); NamedNodeMap attrs = currentElement.getAttributes();
int attrsLength = attrs.getLength(); int attrsLength = attrs.getLength();
Object attrs2[] = new Object[attrsLength]; Attr attrs2[] = new Attr[attrsLength];
for (int i = 0; i < attrsLength; i++) { for (int i = 0; i < attrsLength; i++) {
attrs2[i] = attrs.item(i); attrs2[i] = (Attr)attrs.item(i);
} }
Arrays.sort(attrs2, ATTR_COMPARE); Arrays.sort(attrs2, ATTR_COMPARE);
......
...@@ -25,6 +25,7 @@ import java.io.OutputStream; ...@@ -25,6 +25,7 @@ import java.io.OutputStream;
import java.security.AccessController; import java.security.AccessController;
import java.security.PrivilegedAction; import java.security.PrivilegedAction;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map;
import javax.xml.parsers.ParserConfigurationException; import javax.xml.parsers.ParserConfigurationException;
import com.sun.org.apache.xml.internal.security.c14n.CanonicalizationException; import com.sun.org.apache.xml.internal.security.c14n.CanonicalizationException;
...@@ -65,9 +66,9 @@ public final class Transform extends SignatureElementProxy { ...@@ -65,9 +66,9 @@ public final class Transform extends SignatureElementProxy {
private static boolean alreadyInitialized = false; private static boolean alreadyInitialized = false;
/** All available Transform classes are registered here */ /** All available Transform classes are registered here */
private static HashMap transformClassHash = null; private static Map<String, Class<?>> transformClassHash = null;
private static HashMap transformSpiHash = new HashMap(); private static Map<String, TransformSpi> transformSpiHash = new HashMap<String, TransformSpi>();
private TransformSpi transformSpi = null; private TransformSpi transformSpi = null;
...@@ -209,7 +210,7 @@ public final class Transform extends SignatureElementProxy { ...@@ -209,7 +210,7 @@ public final class Transform extends SignatureElementProxy {
*/ */
public static void init() { public static void init() {
if (!alreadyInitialized) { if (!alreadyInitialized) {
transformClassHash = new HashMap(10); transformClassHash = new HashMap<String,Class<?>>(10);
// make sure builtin algorithms are all registered first // make sure builtin algorithms are all registered first
com.sun.org.apache.xml.internal.security.Init.init(); com.sun.org.apache.xml.internal.security.Init.init();
alreadyInitialized = true; alreadyInitialized = true;
...@@ -231,7 +232,7 @@ public final class Transform extends SignatureElementProxy { ...@@ -231,7 +232,7 @@ public final class Transform extends SignatureElementProxy {
throws AlgorithmAlreadyRegisteredException { throws AlgorithmAlreadyRegisteredException {
// are we already registered? // are we already registered?
Class registeredClass = getImplementingClass(algorithmURI); Class<? extends TransformSpi> registeredClass = getImplementingClass(algorithmURI);
if ((registeredClass != null) ) { if ((registeredClass != null) ) {
Object exArgs[] = { algorithmURI, registeredClass }; Object exArgs[] = { algorithmURI, registeredClass };
throw new AlgorithmAlreadyRegisteredException( throw new AlgorithmAlreadyRegisteredException(
...@@ -331,20 +332,21 @@ public final class Transform extends SignatureElementProxy { ...@@ -331,20 +332,21 @@ public final class Transform extends SignatureElementProxy {
* @param URI * @param URI
* @return The name of the class implementing the URI. * @return The name of the class implementing the URI.
*/ */
private static Class getImplementingClass(String URI) { @SuppressWarnings("unchecked")
return (Class) transformClassHash.get(URI); private static Class<? extends TransformSpi> getImplementingClass(String URI) {
return (Class<? extends TransformSpi>)transformClassHash.get(URI);
} }
private static TransformSpi getTransformSpi(String URI) private static TransformSpi getTransformSpi(String URI)
throws InvalidTransformException { throws InvalidTransformException {
try { try {
Object value = transformSpiHash.get(URI); TransformSpi value = transformSpiHash.get(URI);
if (value != null) { if (value != null) {
return (TransformSpi) value; return value;
} }
Class cl = (Class) transformClassHash.get(URI); Class<? extends TransformSpi> cl = getImplementingClass(URI);
if (cl != null) { if (cl != null) {
TransformSpi tr = (TransformSpi) cl.newInstance(); TransformSpi tr = cl.newInstance();
transformSpiHash.put(URI, tr); transformSpiHash.put(URI, tr);
return tr; return tr;
} }
......
...@@ -41,6 +41,7 @@ public abstract class TransformSpi { ...@@ -41,6 +41,7 @@ public abstract class TransformSpi {
* For API compatibility not thread safe. * For API compatibility not thread safe.
* @deprecated * @deprecated
*/ */
@Deprecated
protected Transform _transformObject = null; protected Transform _transformObject = null;
/** /**
* Set the transform object. * Set the transform object.
...@@ -48,6 +49,7 @@ public abstract class TransformSpi { ...@@ -48,6 +49,7 @@ public abstract class TransformSpi {
* @param transform the Transform * @param transform the Transform
* @deprecated * @deprecated
*/ */
@Deprecated
protected void setTransform(Transform transform) { protected void setTransform(Transform transform) {
this._transformObject = transform; this._transformObject = transform;
} }
...@@ -120,6 +122,7 @@ public abstract class TransformSpi { ...@@ -120,6 +122,7 @@ public abstract class TransformSpi {
* @throws SAXException * @throws SAXException
* @throws TransformationException * @throws TransformationException
*/ */
@Deprecated
protected XMLSignatureInput enginePerformTransform( protected XMLSignatureInput enginePerformTransform(
XMLSignatureInput input) XMLSignatureInput input)
throws IOException, throws IOException,
......
...@@ -154,6 +154,7 @@ public class FuncHere extends Function { ...@@ -154,6 +154,7 @@ public class FuncHere extends Function {
* @param vars * @param vars
* @param globalsSize * @param globalsSize
*/ */
@SuppressWarnings("rawtypes")
public void fixupVariables(java.util.Vector vars, int globalsSize) { public void fixupVariables(java.util.Vector vars, int globalsSize) {
// do nothing // do nothing
......
...@@ -96,9 +96,9 @@ public class TransformXPath2Filter extends TransformSpi { ...@@ -96,9 +96,9 @@ public class TransformXPath2Filter extends TransformSpi {
throws TransformationException { throws TransformationException {
CachedXPathAPIHolder.setDoc(_transformObject.getElement().getOwnerDocument()); CachedXPathAPIHolder.setDoc(_transformObject.getElement().getOwnerDocument());
try { try {
List unionNodes=new ArrayList(); List<NodeList> unionNodes=new ArrayList<NodeList>();
List substractNodes=new ArrayList(); List<NodeList> substractNodes=new ArrayList<NodeList>();
List intersectNodes=new ArrayList(); List<NodeList> intersectNodes=new ArrayList<NodeList>();
CachedXPathFuncHereAPI xPathFuncHereAPI = CachedXPathFuncHereAPI xPathFuncHereAPI =
new CachedXPathFuncHereAPI(CachedXPathAPIHolder.getCachedXPathAPI()); new CachedXPathFuncHereAPI(CachedXPathAPIHolder.getCachedXPathAPI());
...@@ -170,18 +170,15 @@ public class TransformXPath2Filter extends TransformSpi { ...@@ -170,18 +170,15 @@ public class TransformXPath2Filter extends TransformSpi {
throw new TransformationException("empty", ex); throw new TransformationException("empty", ex);
} }
} }
static Set convertNodeListToSet(List l){ static Set<Node> convertNodeListToSet(List<NodeList> l){
Set result=new HashSet(); Set<Node> result=new HashSet<Node>();
for (int j=0;j<l.size();j++) {
NodeList rootNodes=(NodeList) l.get(j);
int length = rootNodes.getLength();
for (NodeList rootNodes : l) {
int length = rootNodes.getLength();
for (int i = 0; i < length; i++) { for (int i = 0; i < length; i++) {
Node rootNode = rootNodes.item(i); Node rootNode = rootNodes.item(i);
result.add(rootNode); result.add(rootNode);
} }
} }
return result; return result;
} }
...@@ -191,8 +188,8 @@ class XPath2NodeFilter implements NodeFilter { ...@@ -191,8 +188,8 @@ class XPath2NodeFilter implements NodeFilter {
boolean hasUnionNodes; boolean hasUnionNodes;
boolean hasSubstractNodes; boolean hasSubstractNodes;
boolean hasIntersectNodes; boolean hasIntersectNodes;
XPath2NodeFilter(Set unionNodes, Set substractNodes, XPath2NodeFilter(Set<Node> unionNodes, Set<Node> substractNodes,
Set intersectNodes) { Set<Node> intersectNodes) {
this.unionNodes=unionNodes; this.unionNodes=unionNodes;
hasUnionNodes=!unionNodes.isEmpty(); hasUnionNodes=!unionNodes.isEmpty();
this.substractNodes=substractNodes; this.substractNodes=substractNodes;
...@@ -200,9 +197,9 @@ class XPath2NodeFilter implements NodeFilter { ...@@ -200,9 +197,9 @@ class XPath2NodeFilter implements NodeFilter {
this.intersectNodes=intersectNodes; this.intersectNodes=intersectNodes;
hasIntersectNodes=!intersectNodes.isEmpty(); hasIntersectNodes=!intersectNodes.isEmpty();
} }
Set unionNodes; Set<Node> unionNodes;
Set substractNodes; Set<Node> substractNodes;
Set intersectNodes; Set<Node> intersectNodes;
/** /**
...@@ -282,16 +279,15 @@ class XPath2NodeFilter implements NodeFilter { ...@@ -282,16 +279,15 @@ class XPath2NodeFilter implements NodeFilter {
* *
* @return if rooted bye the rootnodes * @return if rooted bye the rootnodes
*/ */
static boolean rooted(Node currentNode, Set nodeList ) { static boolean rooted(Node currentNode, Set<Node> nodeList ) {
if (nodeList.contains(currentNode)) { if (nodeList.contains(currentNode)) {
return true; return true;
} }
Iterator it=nodeList.iterator();
while (it.hasNext()) { for(Node rootNode : nodeList) {
Node rootNode = (Node) it.next(); if (XMLUtils.isDescendantOrSelf(rootNode,currentNode)) {
if (XMLUtils.isDescendantOrSelf(rootNode,currentNode)) { return true;
return true; }
}
} }
return false; return false;
} }
...@@ -303,7 +299,7 @@ class XPath2NodeFilter implements NodeFilter { ...@@ -303,7 +299,7 @@ class XPath2NodeFilter implements NodeFilter {
* *
* @return if rooted bye the rootnodes * @return if rooted bye the rootnodes
*/ */
static boolean inList(Node currentNode, Set nodeList ) { static boolean inList(Node currentNode, Set<Node> nodeList ) {
return nodeList.contains(currentNode); return nodeList.contains(currentNode);
} }
} }
...@@ -62,14 +62,6 @@ public class TransformXSLT extends TransformSpi { ...@@ -62,14 +62,6 @@ public class TransformXSLT extends TransformSpi {
static final String defaultXSLTSpecNSprefix = "xslt"; static final String defaultXSLTSpecNSprefix = "xslt";
static final String XSLTSTYLESHEET = "stylesheet"; static final String XSLTSTYLESHEET = "stylesheet";
// check for secure processing feature
private static Class xClass = null;
static {
try {
xClass = Class.forName("javax.xml.XMLConstants");
} catch (Exception e) {}
}
static java.util.logging.Logger log = static java.util.logging.Logger log =
java.util.logging.Logger.getLogger( java.util.logging.Logger.getLogger(
TransformXSLT.class.getName()); TransformXSLT.class.getName());
...@@ -101,10 +93,6 @@ public class TransformXSLT extends TransformSpi { ...@@ -101,10 +93,6 @@ public class TransformXSLT extends TransformSpi {
protected XMLSignatureInput enginePerformTransform(XMLSignatureInput input,OutputStream baos, Transform _transformObject) protected XMLSignatureInput enginePerformTransform(XMLSignatureInput input,OutputStream baos, Transform _transformObject)
throws IOException, throws IOException,
TransformationException { TransformationException {
if (xClass == null) {
Object exArgs[] = { "SECURE_PROCESSING_FEATURE not supported" };
throw new TransformationException("generic.EmptyMessage", exArgs);
}
try { try {
Element transformElement = _transformObject.getElement(); Element transformElement = _transformObject.getElement();
...@@ -119,11 +107,9 @@ public class TransformXSLT extends TransformSpi { ...@@ -119,11 +107,9 @@ public class TransformXSLT extends TransformSpi {
} }
TransformerFactory tFactory = TransformerFactory.newInstance(); TransformerFactory tFactory = TransformerFactory.newInstance();
Class c = tFactory.getClass();
Method m = c.getMethod("setFeature", new Class[] {String.class, boolean.class});
// Process XSLT stylesheets in a secure manner
m.invoke(tFactory, new Object[] {"http://javax.xml.XMLConstants/feature/secure-processing", Boolean.TRUE});
// Process XSLT stylesheets in a secure manner
tFactory.setFeature("http://javax.xml.XMLConstants/feature/secure-processing", Boolean.TRUE);
/* /*
* This transform requires an octet stream as input. If the actual * This transform requires an octet stream as input. If the actual
* input is an XPath node-set, then the signature application should * input is an XPath node-set, then the signature application should
...@@ -192,18 +178,6 @@ public class TransformXSLT extends TransformSpi { ...@@ -192,18 +178,6 @@ public class TransformXSLT extends TransformSpi {
} catch (TransformerException ex) { } catch (TransformerException ex) {
Object exArgs[] = { ex.getMessage() }; Object exArgs[] = { ex.getMessage() };
throw new TransformationException("generic.EmptyMessage", exArgs, ex);
} catch (NoSuchMethodException ex) {
Object exArgs[] = { ex.getMessage() };
throw new TransformationException("generic.EmptyMessage", exArgs, ex);
} catch (IllegalAccessException ex) {
Object exArgs[] = { ex.getMessage() };
throw new TransformationException("generic.EmptyMessage", exArgs, ex);
} catch (java.lang.reflect.InvocationTargetException ex) {
Object exArgs[] = { ex.getMessage() };
throw new TransformationException("generic.EmptyMessage", exArgs, ex); throw new TransformationException("generic.EmptyMessage", exArgs, ex);
} }
} }
......
...@@ -74,19 +74,16 @@ public class InclusiveNamespaces extends ElementProxy ...@@ -74,19 +74,16 @@ public class InclusiveNamespaces extends ElementProxy
* @param doc * @param doc
* @param prefixes * @param prefixes
*/ */
public InclusiveNamespaces(Document doc, Set prefixes) { public InclusiveNamespaces(Document doc, Set<String> prefixes) {
super(doc); super(doc);
StringBuffer sb = new StringBuffer(); StringBuffer sb = new StringBuffer();
SortedSet prefixList = new TreeSet(prefixes); SortedSet<String> prefixList = new TreeSet<String>(prefixes);
Iterator it = prefixList.iterator();
while (it.hasNext()) {
String prefix = (String) it.next();
for (String prefix : prefixList) {
if (prefix.equals("xmlns")) { if (prefix.equals("xmlns")) {
sb.append("#default "); sb.append("#default ");
} else { } else {
...@@ -138,9 +135,9 @@ public class InclusiveNamespaces extends ElementProxy ...@@ -138,9 +135,9 @@ public class InclusiveNamespaces extends ElementProxy
* @param inclusiveNamespaces * @param inclusiveNamespaces
* @return A set to string * @return A set to string
*/ */
public static SortedSet prefixStr2Set(String inclusiveNamespaces) { public static SortedSet<String> prefixStr2Set(String inclusiveNamespaces) {
SortedSet prefixes = new TreeSet(); SortedSet<String> prefixes = new TreeSet<String>();
if ((inclusiveNamespaces == null) if ((inclusiveNamespaces == null)
|| (inclusiveNamespaces.length() == 0)) { || (inclusiveNamespaces.length() == 0)) {
......
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册