This commit is contained in:
John Coomes 2009-02-09 13:47:26 -08:00
commit b3e23ac700
167 changed files with 1818 additions and 884 deletions

View File

@ -17,3 +17,4 @@ a2879b2837f5a4c87e9542efe69ef138194af8ff jdk7-b38
3c53424bbe3bb77e01b468b4b0140deec33e11fc jdk7-b40 3c53424bbe3bb77e01b468b4b0140deec33e11fc jdk7-b40
3cb2a607c347934f8e7e86f840a094c28b08d9ea jdk7-b41 3cb2a607c347934f8e7e86f840a094c28b08d9ea jdk7-b41
caf58ffa084568990cbb3441f9ae188e36b31770 jdk7-b42 caf58ffa084568990cbb3441f9ae188e36b31770 jdk7-b42
41bd0a702bc8ec6feebd725a63e7c3227f82ab11 jdk7-b43

View File

@ -17,3 +17,4 @@ ab523b49de1fc73fefe6855ce1e0349bdbd7af29 jdk7-b39
44be42de6693063fb191989bf0e188de2fa51e7c jdk7-b40 44be42de6693063fb191989bf0e188de2fa51e7c jdk7-b40
541bdc5ad32fc33255944d0a044ad992f3d915e8 jdk7-b41 541bdc5ad32fc33255944d0a044ad992f3d915e8 jdk7-b41
94052b87287303527125026fe4b2698cf867ea83 jdk7-b42 94052b87287303527125026fe4b2698cf867ea83 jdk7-b42
848e684279d2ba42577d9621d5b2e5af3823d12d jdk7-b43

View File

@ -17,3 +17,4 @@ ef6af34d75a7b44e77083f1d4ee47631fa09d3b4 jdk7-b31
184e21992f47a8d730df1adc5b21a108f3125489 jdk7-b40 184e21992f47a8d730df1adc5b21a108f3125489 jdk7-b40
c90eeda9594ed2983403e2049aed8d503126c62e jdk7-b41 c90eeda9594ed2983403e2049aed8d503126c62e jdk7-b41
ccd6a16502e0650d91d85c4b86be05cbcd461a87 jdk7-b42 ccd6a16502e0650d91d85c4b86be05cbcd461a87 jdk7-b42
9cd740d48a4855321d69f137a7109c00bcda76be jdk7-b43

View File

@ -17,3 +17,4 @@ d9bc824aa078573829bb66572af847e26e1bd12e jdk7-b38
81a0cbe3b28460ce836109934ece03db7afaf9cc jdk7-b40 81a0cbe3b28460ce836109934ece03db7afaf9cc jdk7-b40
f9d938ede1960d18cb7cf23c645b026519c1a678 jdk7-b41 f9d938ede1960d18cb7cf23c645b026519c1a678 jdk7-b41
ad8c8ca4ab0f4c86e74c061958f44a8f4a930f2c jdk7-b42 ad8c8ca4ab0f4c86e74c061958f44a8f4a930f2c jdk7-b42
fc6a5ae3fef5ebacfa896dbb3ae37715e388e282 jdk7-b43

View File

@ -131,6 +131,14 @@ endif
# Enable linker optimization # Enable linker optimization
LFLAGS += -Xlinker -O1 LFLAGS += -Xlinker -O1
# If this is a --hash-style=gnu system, use --hash-style=both
# The gnu .hash section won't work on some Linux systems like SuSE 10.
_HAS_HASH_STYLE_GNU:=$(shell $(CC) -dumpspecs | grep -- '--hash-style=gnu')
ifneq ($(_HAS_HASH_STYLE_GNU),)
LDFLAGS_HASH_STYLE = -Wl,--hash-style=both
endif
LFLAGS += $(LDFLAGS_HASH_STYLE)
# Use $(MAPFLAG:FILENAME=real_file_name) to specify a map file. # Use $(MAPFLAG:FILENAME=real_file_name) to specify a map file.
MAPFLAG = -Xlinker --version-script=FILENAME MAPFLAG = -Xlinker --version-script=FILENAME

View File

@ -17,3 +17,4 @@ e9f750f0a3a00413a7b77028b2ecdabb7129ae32 jdk7-b38
54946f466e2c047c44c903f1bec400b685c2508e jdk7-b40 54946f466e2c047c44c903f1bec400b685c2508e jdk7-b40
0758bd3e2852e4f931ba211cc4d48f589450eeb4 jdk7-b41 0758bd3e2852e4f931ba211cc4d48f589450eeb4 jdk7-b41
036e0dca841a5a17f784d15c86a9da88d2a6f1e6 jdk7-b42 036e0dca841a5a17f784d15c86a9da88d2a6f1e6 jdk7-b42
96fe28d4a9131e1a97bfe00f779e5626cd09c4d0 jdk7-b43

View File

@ -17,3 +17,4 @@ a2a6f9edf761934faf59ea60d7fe7178371302cd jdk7-b37
70a6ac6dd737fe45c2fadb57646195b2b4fe269d jdk7-b40 70a6ac6dd737fe45c2fadb57646195b2b4fe269d jdk7-b40
a8379d24aa03386610169cb0f4e4b8ed266a2e8d jdk7-b41 a8379d24aa03386610169cb0f4e4b8ed266a2e8d jdk7-b41
621c02d83abc850c170fb6726d57b19f1eaf5033 jdk7-b42 621c02d83abc850c170fb6726d57b19f1eaf5033 jdk7-b42
1ad2f51564db6ca4c6d95760cf13fb083d3dec94 jdk7-b43

View File

@ -17,3 +17,4 @@ cc5f810b5af8a3a83b0df5a29d9e24d7a0ff8086 jdk7-b38
2201dad60231a3c3e0346e3a0250d69ca3b71fd4 jdk7-b40 2201dad60231a3c3e0346e3a0250d69ca3b71fd4 jdk7-b40
44941f893cea95ecdd5987b12e548069bd803849 jdk7-b41 44941f893cea95ecdd5987b12e548069bd803849 jdk7-b41
3ef0bdfa7609f79d4f2ea621f30cf593a2e432ce jdk7-b42 3ef0bdfa7609f79d4f2ea621f30cf593a2e432ce jdk7-b42
50c67678b0d180063ade199d398b67a54063fa7f jdk7-b43

View File

@ -142,9 +142,11 @@ endif
$(UNPACK_EXE): $(UNPACK_EXE_FILES_o) winres $(UNPACK_EXE): $(UNPACK_EXE_FILES_o) winres
$(prep-target) $(prep-target)
$(LINKER) $(LDDFLAGS) $(UNPACK_EXE_FILES_o) $(RES) $(LIBCXX) $(LDOUTPUT)$(TEMPDIR)/unpack200$(EXE_SUFFIX) $(LINKER) $(LDDFLAGS) $(UNPACK_EXE_FILES_o) $(RES) $(LIBCXX) $(LDOUTPUT)$(TEMPDIR)/unpack200$(EXE_SUFFIX)
ifdef MT
$(MT) /manifest $(TEMPDIR)/unpack200$(EXE_SUFFIX).manifest /outputresource:$(TEMPDIR)/unpack200$(EXE_SUFFIX);#1
endif
$(CP) $(TEMPDIR)/unpack200$(EXE_SUFFIX) $(UNPACK_EXE) $(CP) $(TEMPDIR)/unpack200$(EXE_SUFFIX) $(UNPACK_EXE)
ifeq ($(PLATFORM), windows) ifeq ($(PLATFORM), windows)
$(RES):: $(VERSIONINFO_RESOURCE) $(RES):: $(VERSIONINFO_RESOURCE)
$(prep-target) $(prep-target)

View File

@ -68,11 +68,24 @@ PLATFORM_INCLUDE = $(INCLUDEDIR)/$(PLATFORM_INCLUDE_NAME)
# The following DLL's are considered MS runtime libraries and should # The following DLL's are considered MS runtime libraries and should
# not to be REBASEd, see deploy/make/common/Release.gmk. # not to be REBASEd, see deploy/make/common/Release.gmk.
# msvcrt.dll, msvcr71.dll: Microsoft runtimes # msvcrt.dll, msvcrnn.dll [msvcr71 or msvcr80 or msvcr90] : Microsoft runtimes
MS_RUNTIME_LIBRARIES = msvcrt.dll MS_RUNTIME_LIBRARIES = msvcrt.dll
MSVCRNN_DLL =
ifeq ($(ARCH_DATA_MODEL), 32) ifeq ($(ARCH_DATA_MODEL), 32)
ifeq ($(COMPILER_VERSION), VS2003) ifeq ($(COMPILER_VERSION), VS2003)
MS_RUNTIME_LIBRARIES += msvcr71.dll MSVCRNN_DLL = msvcr71.dll
MSVCPNN_DLL = msvcp71.dll
MS_RUNTIME_LIBRARIES += $(MSVCRNN_DLL)
endif
ifeq ($(COMPILER_VERSION), VS2005)
MSVCRNN_DLL = msvcr80.dll
MSVCPNN_DLL = msvcp80.dll
MS_RUNTIME_LIBRARIES += $(MSVCRNN_DLL)
endif
ifeq ($(COMPILER_VERSION), VS2008)
MSVCRNN_DLL = msvcr90.dll
MSVCPNN_DLL = msvcp90.dll
MS_RUNTIME_LIBRARIES += $(MSVCRNN_DLL)
endif endif
endif endif
@ -178,9 +191,22 @@ ifeq ($(CC_VERSION),msvc)
CC_OPT/LOWER = -O1 CC_OPT/LOWER = -O1
endif endif
endif endif
ifeq ($(COMPILER_VERSION), VS2008)
# Automatic precompiled header option to use (if COMPILE_APPROACH=batch)
AUTOMATIC_PCH_OPTION =
GX_OPTION = -EHsc
ifeq ($(ARCH_DATA_MODEL), 32)
CC_OPT/HIGHEST = -O2
CC_OPT/HIGHER = -O1
CC_OPT/LOWER = -O1
else
CC_OPT/HIGHEST = -O2
CC_OPT/HIGHER = -O1
CC_OPT/LOWER = -O1
endif
endif
else # CC_VERSION else # CC_VERSION
# GCC not supported, but left for historical reference... # GCC not supported, but left for historical reference...
CC_OPT/NONE = CC_OPT/NONE =
CC_OPT/LOWER = -O2 CC_OPT/LOWER = -O2
@ -200,10 +226,13 @@ CC_OPT = $(CC_OPT/$(OPTIMIZATION_LEVEL))
# -MTd Use static debug version (better than -MDd, no runtime issues) # -MTd Use static debug version (better than -MDd, no runtime issues)
# -D_DEBUG Change use of malloc/free/etc to use special debug ones (-MTd) # -D_DEBUG Change use of malloc/free/etc to use special debug ones (-MTd)
# #
# NOTE: We also will use /D _STATIC_CPPLIB so we don't need msvcp71.dll # NOTE: We also will use /D _STATIC_CPPLIB so we don't need msvcpnn.dll
# #
# If MS_RUNTIME_STATIC is requested, use -MT only with VS2003.
ifeq ($(MS_RUNTIME_STATIC),true) ifeq ($(MS_RUNTIME_STATIC),true)
MS_RUNTIME_OPTION=-MT ifeq ($(COMPILER_VERSION), VS2003)
MS_RUNTIME_OPTION=-MT
endif
else else
MS_RUNTIME_OPTION=-MD MS_RUNTIME_OPTION=-MD
endif endif
@ -238,7 +267,7 @@ ifeq ($(CC_VERSION),msvc)
# -YX -Fp/.../foobar.pch Use precompiled headers (try someday?) # -YX -Fp/.../foobar.pch Use precompiled headers (try someday?)
# -nologo Don't print out startup message # -nologo Don't print out startup message
# /D _STATIC_CPPLIB # /D _STATIC_CPPLIB
# Use static link for the C++ runtime (so msvcp71.dll not needed) # Use static link for the C++ runtime (so msvcpnn.dll not needed)
# #
CFLAGS_COMMON += -Zi -nologo CFLAGS_COMMON += -Zi -nologo
CFLAGS_OPT = $(CC_OPT) CFLAGS_OPT = $(CC_OPT)
@ -277,8 +306,16 @@ ifeq ($(CC_VERSION),msvc)
# Always add bufferoverflowU.lib to VS2005 link commands (pack uses LDDFLAGS) # Always add bufferoverflowU.lib to VS2005 link commands (pack uses LDDFLAGS)
LFLAGS_VS2005 = $(BUFFEROVERFLOWLIB) LFLAGS_VS2005 = $(BUFFEROVERFLOWLIB)
# VS2008 has bufferoverflow baked in:
LFLAGS_VS2008 =
# LFLAGS are the flags given to $(LINK) and used to build the actual DLL file # LFLAGS are the flags given to $(LINK) and used to build the actual DLL file
BASELFLAGS = -nologo /opt:REF /incremental:no BASELFLAGS = -nologo /opt:REF /incremental:no
ifdef MT
# VS2005, VS2008, and beyond: ask LINK to generate manifests for .dll & .exe
BASELFLAGS += /manifest
endif
LFLAGS = $(BASELFLAGS) $(LDEBUG) $(EXTRA_LFLAGS) $(LFLAGS_$(COMPILER_VERSION)) LFLAGS = $(BASELFLAGS) $(LDEBUG) $(EXTRA_LFLAGS) $(LFLAGS_$(COMPILER_VERSION))
LDDFLAGS += $(LFLAGS_$(COMPILER_VERSION)) LDDFLAGS += $(LFLAGS_$(COMPILER_VERSION))

View File

@ -179,6 +179,9 @@ else # LIBRARY
# build it into $(OBJDIR) so that the other generated files get put # build it into $(OBJDIR) so that the other generated files get put
# there, then copy just the DLL (and MAP file) to the requested directory. # there, then copy just the DLL (and MAP file) to the requested directory.
# #
# In VS2005 or VS2008 the link command creates a .manifest file that we want
# to insert into the linked artifact so we do not need to track it separately.
# Use ";#2" for .dll and ";#1" for .exe in the MT command below:
$(ACTUAL_LIBRARY):: $(OBJDIR)/$(LIBRARY).lcf $(ACTUAL_LIBRARY):: $(OBJDIR)/$(LIBRARY).lcf
@$(prep-target) @$(prep-target)
@$(MKDIR) -p $(OBJDIR) @$(MKDIR) -p $(OBJDIR)
@ -186,6 +189,9 @@ $(ACTUAL_LIBRARY):: $(OBJDIR)/$(LIBRARY).lcf
-map:$(OBJDIR)/$(LIBRARY).map \ -map:$(OBJDIR)/$(LIBRARY).map \
$(LFLAGS) @$(OBJDIR)/$(LIBRARY).lcf \ $(LFLAGS) @$(OBJDIR)/$(LIBRARY).lcf \
$(OTHER_LCF) $(JAVALIB) $(LDLIBS) $(OTHER_LCF) $(JAVALIB) $(LDLIBS)
ifdef MT
$(MT) /manifest $(OBJDIR)/$(@F).manifest /outputresource:$(OBJDIR)/$(@F);#2
endif
$(CP) $(OBJDIR)/$(@F) $@ $(CP) $(OBJDIR)/$(@F) $@
$(CP) $(OBJDIR)/$(LIBRARY).map $(@D) $(CP) $(OBJDIR)/$(LIBRARY).map $(@D)
$(CP) $(OBJDIR)/$(LIBRARY).pdb $(@D) $(CP) $(OBJDIR)/$(LIBRARY).pdb $(@D)

View File

@ -153,6 +153,9 @@ else
STACK_SIZE=1048576 STACK_SIZE=1048576
endif endif
# In VS2005 or VS2008 the link command creates a .manifest file that we want
# to insert into the linked artifact so we do not need to track it separately.
# Use ";#2" for .dll and ";#1" for .exe in the MT command below:
$(OBJDIR)/$(PROGRAM)$(EXE_SUFFIX):: $(OBJDIR)/$(PROGRAM).lcf $(FILES_o) $(JLI_LCF) $(OBJDIR)/$(PROGRAM)$(EXE_SUFFIX):: $(OBJDIR)/$(PROGRAM).lcf $(FILES_o) $(JLI_LCF)
@$(prep-target) @$(prep-target)
@set -- $?; \ @set -- $?; \
@ -160,6 +163,9 @@ $(OBJDIR)/$(PROGRAM)$(EXE_SUFFIX):: $(OBJDIR)/$(PROGRAM).lcf $(FILES_o) $(JLI_LC
$(LINK) -out:$@ /STACK:$(STACK_SIZE) \ $(LINK) -out:$@ /STACK:$(STACK_SIZE) \
-map:$(OBJDIR)/$(PROGRAM).map $(LFLAGS) $(LDFLAGS) \ -map:$(OBJDIR)/$(PROGRAM).map $(LFLAGS) $(LDFLAGS) \
@$(OBJDIR)/$(PROGRAM).lcf $(LDLIBS) @$(OBJDIR)/$(PROGRAM).lcf $(LDLIBS)
ifdef MT
$(MT) /manifest $(OBJDIR)/$(PROGRAM).exe.manifest /outputresource:$@;#1
endif
else # PLATFORM else # PLATFORM

View File

@ -54,17 +54,10 @@ ifeq ($(PLATFORM), windows)
ifeq ($(ARCH_DATA_MODEL), 32) ifeq ($(ARCH_DATA_MODEL), 32)
LINK_VER := $(shell $(LINK) | $(HEAD) -n 1 | $(NAWK) '{print $$6}') LINK_VER := $(shell $(LINK) | $(HEAD) -n 1 | $(NAWK) '{print $$6}')
CC_MAJORVER :=$(call MajorVersion,$(CC_VER)) CC_MAJORVER :=$(call MajorVersion,$(CC_VER))
REQUIRED_CC_VER = 13.10.3077
REQUIRED_LINK_VER = 7.10.3077
ifeq ($(CC_MAJORVER), 12)
# This should be: CC_VER=12.00.8168 LINK_VER=6.00.8447
COMPILER_NAME=Visual C++ 6.0 Professional + VC6-SP 3
COMPILER_VERSION=VC6
REBASE = $(COMPILER_PATH)rebase
MTL = $(COMPILER_PATH)midl
endif
ifeq ($(CC_MAJORVER), 13) ifeq ($(CC_MAJORVER), 13)
# This should be: CC_VER=13.10.3077 LINK_VER=7.10.3077 # This should be: CC_VER=13.10.3077 LINK_VER=7.10.3077
REQUIRED_CC_VER = 13.10.3077
REQUIRED_LINK_VER = 7.10.3077
COMPILER_NAME=Visual Studio .NET 2003 Professional C++ COMPILER_NAME=Visual Studio .NET 2003 Professional C++
COMPILER_VERSION=VS2003 COMPILER_VERSION=VS2003
REBASE = $(COMPILER_PATH)../../Common7/Tools/Bin/rebase REBASE = $(COMPILER_PATH)../../Common7/Tools/Bin/rebase
@ -74,17 +67,34 @@ ifeq ($(PLATFORM), windows)
endif endif
endif endif
ifeq ($(CC_MAJORVER), 14) ifeq ($(CC_MAJORVER), 14)
# This should be: CC_VER=14.00.0000 LINK_VER=8.00.0000 # This should be: CC_VER=14.00.50727.42 LINK_VER=8.00.50727.42
# NOTE: This compiler has not been tried yet on 32bit systems REQUIRED_CC_VER = 14.00.50727.42
COMPILER_NAME=Visual Studio .NET 2005 REQUIRED_LINK_VER = 8.00.50727.42
COMPILER_NAME=Visual Studio 8
COMPILER_VERSION=VS2005 COMPILER_VERSION=VS2005
REBASE = $(COMPILER_PATH)../../Common8/Tools/Bin/rebase REBASE = $(COMPILER_PATH)../../Common8/Tools/Bin/rebase
MTL = $(COMPILER_PATH)../../Common8/Tools/Bin/midl MTL = $(COMPILER_PATH)../../Common8/Tools/Bin/midl
MT = $(MSDEVTOOLS_PATH)mt
ifndef COMPILER_PATH
COMPILER_PATH := $(error COMPILER_PATH cannot be empty here)
endif
endif
ifeq ($(CC_MAJORVER), 15)
# This should be: CC_VER=15.00.21022.08 LINK_VER=9.00.21022.08
REQUIRED_CC_VER = 15.00.21022.08
REQUIRED_LINK_VER = 9.00.21022.08
COMPILER_NAME=Visual Studio 9
COMPILER_VERSION=VS2008
#rebase and midl moved out of Visual Studio into the SDK:
REBASE = $(MSDEVTOOLS_PATH)/rebase
MTL = $(MSDEVTOOLS_PATH)/midl.exe
MT = $(MSDEVTOOLS_PATH)mt
ifndef COMPILER_PATH ifndef COMPILER_PATH
COMPILER_PATH := $(error COMPILER_PATH cannot be empty here) COMPILER_PATH := $(error COMPILER_PATH cannot be empty here)
endif endif
endif endif
else else
# else ARCH_DATA_MODEL is 64
LINK_VER := $(shell $(LINK) | $(HEAD) -n 1 | $(NAWK) '{print $$6}') LINK_VER := $(shell $(LINK) | $(HEAD) -n 1 | $(NAWK) '{print $$6}')
CC_MAJORVER :=$(call MajorVersion,$(CC_VER)) CC_MAJORVER :=$(call MajorVersion,$(CC_VER))
CC_MINORVER :=$(call MinorVersion,$(CC_VER)) CC_MINORVER :=$(call MinorVersion,$(CC_VER))

View File

@ -74,7 +74,7 @@ override INCREMENTAL_BUILD = false
# The ALT values should never really have spaces or use \. # The ALT values should never really have spaces or use \.
# Suspect these environment variables to have spaces and/or \ characters: # Suspect these environment variables to have spaces and/or \ characters:
# SYSTEMROOT, SystemRoot, WINDIR, windir, PROGRAMFILES, ProgramFiles, # SYSTEMROOT, SystemRoot, WINDIR, windir, PROGRAMFILES, ProgramFiles,
# DXSDK_DIR, MSTOOLS, Mstools, MSSDK, MSSdk, VC71COMNTOOLS, # DXSDK_DIR, MSTOOLS, Mstools, MSSDK, MSSdk, VCnnCOMNTOOLS,
# MSVCDIR, MSVCDir. # MSVCDIR, MSVCDir.
# So use $(subst \,/,) on them first adding quotes and placing them in # So use $(subst \,/,) on them first adding quotes and placing them in
# their own variable assigned with :=, then use FullPath. # their own variable assigned with :=, then use FullPath.
@ -247,22 +247,36 @@ ifeq ($(ARCH_DATA_MODEL), 32)
endif endif
endif endif
endif endif
ifneq ($(subst MSDev98,OLDOLDOLD,$(_msvc_dir)),$(_msvc_dir)) # If we still don't have it, look for VSnnCOMNTOOLS (newest first),
_msvc_dir := # set by installer?
endif
# If we still don't have it, look for VS71COMNTOOLS, setup by installer?
ifeq ($(_msvc_dir),) ifeq ($(_msvc_dir),)
ifdef VS90COMNTOOLS # /Common/Tools directory, use ../../Vc
xVS90COMNTOOLS :="$(subst \,/,$(VS90COMNTOOLS))"
_vs90tools :=$(call FullPath,$(xVS90COMNTOOLS))
endif
ifneq ($(_vs90tools),)
_msvc_dir :=$(_vs90tools)/../../Vc
_redist_sdk :=$(_msvc_dir)/../SDK/v3.5/Bin
endif
ifdef VS80COMNTOOLS # /Common/Tools directory, use ../../Vc
xVS80COMNTOOLS :="$(subst \,/,$(VS80COMNTOOLS))"
_vs80tools :=$(call FullPath,$(xVS80COMNTOOLS))
endif
ifneq ($(_vs80tools),)
_msvc_dir :=$(_vs80tools)/../../Vc
_redist_sdk :=$(_msvc_dir)/../SDK/v2.0/Bin
endif
ifdef VS71COMNTOOLS # /Common/Tools directory, use ../../Vc7 ifdef VS71COMNTOOLS # /Common/Tools directory, use ../../Vc7
xVS71COMNTOOLS :="$(subst \,/,$(VS71COMNTOOLS))" xVS71COMNTOOLS :="$(subst \,/,$(VS71COMNTOOLS))"
_vs71tools :=$(call FullPath,$(xVS71COMNTOOLS)) _vs71tools :=$(call FullPath,$(xVS71COMNTOOLS))
endif endif
ifneq ($(_vs71tools),) ifneq ($(_vs71tools),)
_msvc_dir :=$(_vs71tools)/../../Vc7 _msvc_dir :=$(_vs71tools)/../../Vc7
_redist_sdk :=$(_vs71tools)/../..
endif endif
endif endif
ifneq ($(_msvc_dir),) ifneq ($(_msvc_dir),)
_compiler_bin :=$(_msvc_dir)/Bin _compiler_bin :=$(_msvc_dir)/Bin
_redist_sdk :=$(_msvc_dir)/../SDK/v1.1/Bin
_ms_sdk :=$(_msvc_dir)/PlatformSDK _ms_sdk :=$(_msvc_dir)/PlatformSDK
endif endif
endif endif
@ -410,8 +424,8 @@ _REDIST_SDK_EXISTS := $(shell \
else \ else \
echo "false"; \ echo "false"; \
fi) fi)
_REDIST71_SDK_EXISTS := $(shell \ _REDISTNN_SDK_EXISTS := $(shell \
if [ -f "$(_redist_sdk)/msvcr71.dll" ]; then \ if [ -f "$(_redist_sdk)/$(MSVCRNN_DLL)" ]; then \
echo "true"; \ echo "true"; \
else \ else \
echo "false"; \ echo "false"; \
@ -435,20 +449,20 @@ ifeq ($(ARCH_DATA_MODEL), 32)
MSVCRT_DLL_PATH:=$(call AltCheckSpaces,MSVCRT_DLL_PATH) MSVCRT_DLL_PATH:=$(call AltCheckSpaces,MSVCRT_DLL_PATH)
MSVCRT_DLL_PATH:=$(call AltCheckValue,MSVCRT_DLL_PATH) MSVCRT_DLL_PATH:=$(call AltCheckValue,MSVCRT_DLL_PATH)
# MSVCR71_DLL_PATH: location of msvcr71.dll that will be re-distributed # MSVCRNN_DLL_PATH: location of msvcrnn.dll that will be re-distributed
ifdef ALT_MSVCR71_DLL_PATH ifdef ALT_MSVCRNN_DLL_PATH
xALT_MSVCR71_DLL_PATH :="$(subst \,/,$(ALT_MSVCR71_DLL_PATH))" xALT_MSVCRNN_DLL_PATH :="$(subst \,/,$(ALT_MSVCRNN_DLL_PATH))"
MSVCR71_DLL_PATH :=$(call FullPath,$(xALT_MSVCR71_DLL_PATH)) MSVCRNN_DLL_PATH :=$(call FullPath,$(xALT_MSVCRNN_DLL_PATH))
else else
ifeq ($(_REDIST71_SDK_EXISTS), true) ifeq ($(_REDISTNN_SDK_EXISTS), true)
xREDIST71_DIR :=$(_redist_sdk) xREDISTNN_DIR :=$(_redist_sdk)
else else
xREDIST71_DIR :=$(_system_root)/system32 xREDISTNN_DIR :=$(_system_root)/system32
endif endif
MSVCR71_DLL_PATH :=$(call FullPath,$(xREDIST71_DIR)) MSVCRNN_DLL_PATH :=$(call FullPath,$(xREDISTNN_DIR))
endif endif
MSVCR71_DLL_PATH :=$(call AltCheckSpaces,MSVCR71_DLL_PATH) MSVCRNN_DLL_PATH :=$(call AltCheckSpaces,MSVCRNN_DLL_PATH)
MSVCR71_DLL_PATH:=$(call AltCheckValue,MSVCR71_DLL_PATH) MSVCRNN_DLL_PATH:=$(call AltCheckValue,MSVCRNN_DLL_PATH)
else else

View File

@ -98,7 +98,7 @@ endif
ifeq ($(PLATFORM),windows) ifeq ($(PLATFORM),windows)
ALL_SETTINGS+=$(call addAltSetting,MSVCRT_DLL_PATH) ALL_SETTINGS+=$(call addAltSetting,MSVCRT_DLL_PATH)
ifeq ($(ARCH_DATA_MODEL), 32) ifeq ($(ARCH_DATA_MODEL), 32)
ALL_SETTINGS+=$(call addAltSetting,MSVCR71_DLL_PATH) ALL_SETTINGS+=$(call addAltSetting,MSVCRNN_DLL_PATH)
endif endif
ALL_SETTINGS+=$(call addAltSetting,MSDEVTOOLS_PATH) ALL_SETTINGS+=$(call addAltSetting,MSDEVTOOLS_PATH)
endif endif

View File

@ -835,15 +835,13 @@ ifeq ($(PLATFORM), windows)
"" >> $(ERROR_FILE) ; \ "" >> $(ERROR_FILE) ; \
fi fi
ifeq ($(ARCH_DATA_MODEL), 32) ifeq ($(ARCH_DATA_MODEL), 32)
ifeq ($(COMPILER_VERSION), VS2003) @if [ ! -r "$(MSVCRNN_DLL_PATH)/$(MSVCRNN_DLL)" ]; then \
@if [ ! -r "$(MSVCR71_DLL_PATH)/msvcr71.dll" ]; then \ $(ECHO) "ERROR: You do not have access to $(MSVCRNN_DLL). \n" \
$(ECHO) "ERROR: You do not have access to msvcr71.dll. \n" \
" Please check your access to \n" \ " Please check your access to \n" \
" $(MSVCR71_DLL_PATH) \n" \ " $(MSVCRNN_DLL_PATH) \n" \
" and/or check your value of ALT_MSVCR71_DLL_PATH. \n" \ " and/or check your value of ALT_MSVCRNN_DLL_PATH. \n" \
"" >> $(ERROR_FILE) ; \ "" >> $(ERROR_FILE) ; \
fi fi
endif
endif endif
endif endif

View File

@ -64,7 +64,7 @@ CORE_JAVADOCFLAGS = $(COMMON_JAVADOCFLAGS) \
-bottom $(JAVADOCBOTTOM_SWITCH) \ -bottom $(JAVADOCBOTTOM_SWITCH) \
$(OVERVIEW_OPTION) $(OVERVIEW_OPTION)
DRAFT = '<br><b>DRAFT&nbsp;'$(MILESTONE)-$(BUILD_NUMBER)'</b>' DRAFT = '<br><strong>DRAFT&nbsp;'$(MILESTONE)-$(BUILD_NUMBER)'</strong>'
THIS_YEAR := $(shell $(DATE) | $(SED) -e 's/ / /g' | $(CUT) -d' ' -f6) THIS_YEAR := $(shell $(DATE) | $(SED) -e 's/ / /g' | $(CUT) -d' ' -f6)
TRADEMARK = &\#x2122; TRADEMARK = &\#x2122;
@ -95,7 +95,7 @@ endif
JAVADOCTITLE = 'Java$(TRADEMARK) Platform, Standard Edition $(JDK_MINOR_VERSION)<br>API Specification' JAVADOCTITLE = 'Java$(TRADEMARK) Platform, Standard Edition $(JDK_MINOR_VERSION)<br>API Specification'
JAVADOCWINDOWTITLE = 'Java Platform SE $(JDK_MINOR_VERSION)' JAVADOCWINDOWTITLE = 'Java Platform SE $(JDK_MINOR_VERSION)'
JAVADOCHEADER = '<b>Java$(TRADEMARK)&nbsp;Platform<br>Standard&nbsp;Ed.&nbsp;$(JDK_MINOR_VERSION)</b>' JAVADOCHEADER = '<strong>Java$(TRADEMARK)&nbsp;Platform<br>Standard&nbsp;Ed.&nbsp;$(JDK_MINOR_VERSION)</strong>'
JAVADOCBOTTOM = '<font size="-1"><a href="http://bugs.sun.com/services/bugreport/index.jsp">Submit a bug or feature</a><br>For further API reference and developer documentation, see <a href="{@docroot}/../../webnotes/devdocs-vs-specs.html">Java SE Developer Documentation</a>. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples. <p>Copyright $(THIS_YEAR) Sun Microsystems, Inc. All Rights Reserved. Use is subject to <a href="{@docroot}/../legal/license.html">license terms</a>. Also see the <a href="http://java.sun.com/docs/redist.html">documentation redistribution policy</a>.</font>' JAVADOCBOTTOM = '<font size="-1"><a href="http://bugs.sun.com/services/bugreport/index.jsp">Submit a bug or feature</a><br>For further API reference and developer documentation, see <a href="{@docroot}/../../webnotes/devdocs-vs-specs.html">Java SE Developer Documentation</a>. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples. <p>Copyright $(THIS_YEAR) Sun Microsystems, Inc. All Rights Reserved. Use is subject to <a href="{@docroot}/../legal/license.html">license terms</a>. Also see the <a href="http://java.sun.com/docs/redist.html">documentation redistribution policy</a>.</font>'
JAVADOCOVERVIEW = $(SHARE_SRC)/classes/overview-core.html JAVADOCOVERVIEW = $(SHARE_SRC)/classes/overview-core.html
@ -120,7 +120,7 @@ DOMAPI_JAVADOCFLAGS = $(COMMON_JAVADOCFLAGS) \
-group $(DOMAPI_GROUPNAME) $(DOMAPI_REGEXP) -group $(DOMAPI_GROUPNAME) $(DOMAPI_REGEXP)
DOMAPI_JAVADOCTITLE = 'Common DOM API' DOMAPI_JAVADOCTITLE = 'Common DOM API'
DOMAPI_JAVADOCWINDOWTITLE = 'Common DOM API' DOMAPI_JAVADOCWINDOWTITLE = 'Common DOM API'
DOMAPI_JAVADOCHEADER = '<b>Common DOM API</b>' DOMAPI_JAVADOCHEADER = '<strong>Common DOM API</strong>'
DOMAPI_JAVADOCBOTTOM = '<font size="-1"><a href="http://bugs.sun.com/services/bugreport/index.jsp">Submit a bug or feature</a><br>Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.<br>Copyright $(THIS_YEAR) Sun Microsystems, Inc. 4150 Network Circle<br>Santa Clara, California, 95054, U.S.A. All Rights Reserved.</font>' DOMAPI_JAVADOCBOTTOM = '<font size="-1"><a href="http://bugs.sun.com/services/bugreport/index.jsp">Submit a bug or feature</a><br>Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.<br>Copyright $(THIS_YEAR) Sun Microsystems, Inc. 4150 Network Circle<br>Santa Clara, California, 95054, U.S.A. All Rights Reserved.</font>'
DOMAPI_GROUPNAME = "Packages" DOMAPI_GROUPNAME = "Packages"
DOMAPI_REGEXP = "com.sun.java.browser.dom:org.w3c.dom*" DOMAPI_REGEXP = "com.sun.java.browser.dom:org.w3c.dom*"
@ -140,7 +140,7 @@ MIRROR_JAVADOCFLAGS = $(COMMON_JAVADOCFLAGS) \
-overview $(MIRROR_OVERVIEW) -overview $(MIRROR_OVERVIEW)
MIRROR_JAVADOCTITLE = 'Mirror API' MIRROR_JAVADOCTITLE = 'Mirror API'
MIRROR_JAVADOCWINDOWTITLE = 'Mirror API' MIRROR_JAVADOCWINDOWTITLE = 'Mirror API'
MIRROR_JAVADOCHEADER = '<b>Mirror API</b>' MIRROR_JAVADOCHEADER = '<strong>Mirror API</strong>'
MIRROR_JAVADOCBOTTOM = '<font size="-1"><a href="http://bugs.sun.com/services/bugreport/index.jsp">Report a bug or request a feature.</a><br>Copyright $(THIS_YEAR) Sun Microsystems, Inc. All Rights Reserved. Use is subject to license terms.</font>' MIRROR_JAVADOCBOTTOM = '<font size="-1"><a href="http://bugs.sun.com/services/bugreport/index.jsp">Report a bug or request a feature.</a><br>Copyright $(THIS_YEAR) Sun Microsystems, Inc. All Rights Reserved. Use is subject to license terms.</font>'
MIRROR_GROUPNAME = "Packages" MIRROR_GROUPNAME = "Packages"
MIRROR_OVERVIEW = $(IMPORTSRCDIR)/com/sun/mirror/overview.html MIRROR_OVERVIEW = $(IMPORTSRCDIR)/com/sun/mirror/overview.html
@ -163,7 +163,7 @@ DOCLETAPI_JAVADOCFLAGS = $(COMMON_JAVADOCFLAGS) \
-group $(DOCLETAPI_GROUPNAME) $(DOCLETAPI_REGEXP) -group $(DOCLETAPI_GROUPNAME) $(DOCLETAPI_REGEXP)
DOCLETAPI_JAVADOCTITLE = 'Doclet API' DOCLETAPI_JAVADOCTITLE = 'Doclet API'
DOCLETAPI_JAVADOCWINDOWTITLE = 'Doclet API' DOCLETAPI_JAVADOCWINDOWTITLE = 'Doclet API'
DOCLETAPI_JAVADOCHEADER = '<b>Doclet API</b>' DOCLETAPI_JAVADOCHEADER = '<strong>Doclet API</strong>'
DOCLETAPI_JAVADOCBOTTOM = '<font size="-1"><a href="http://bugs.sun.com/services/bugreport/index.jsp">Submit a bug or feature</a><br>Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.<br>Copyright 1993-$(THIS_YEAR) Sun Microsystems, Inc. 4150 Network Circle<br>Santa Clara, California, 95054, U.S.A. All Rights Reserved.</font>' DOCLETAPI_JAVADOCBOTTOM = '<font size="-1"><a href="http://bugs.sun.com/services/bugreport/index.jsp">Submit a bug or feature</a><br>Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.<br>Copyright 1993-$(THIS_YEAR) Sun Microsystems, Inc. 4150 Network Circle<br>Santa Clara, California, 95054, U.S.A. All Rights Reserved.</font>'
DOCLETAPI_GROUPNAME = "Packages" DOCLETAPI_GROUPNAME = "Packages"
DOCLETAPI_REGEXP = "com.sun.javadoc" DOCLETAPI_REGEXP = "com.sun.javadoc"
@ -407,7 +407,7 @@ TREEAPI_JAVADOCFLAGS = $(COMMON_JAVADOCFLAGS) \
# #
TREEAPI_JAVADOCTITLE = 'Compiler Tree API' TREEAPI_JAVADOCTITLE = 'Compiler Tree API'
TREEAPI_JAVADOCWINDOWTITLE = 'Compiler Tree API' TREEAPI_JAVADOCWINDOWTITLE = 'Compiler Tree API'
TREEAPI_JAVADOCHEADER = '<b>Compiler Tree API</b>' TREEAPI_JAVADOCHEADER = '<strong>Compiler Tree API</strong>'
TREEAPI_JAVADOCBOTTOM = '<font size="-1"><a href="http://bugs.sun.com/services/bugreport/index.jsp">Report a bug or request a feature.</a><br>Copyright $(THIS_YEAR) Sun Microsystems, Inc. All Rights Reserved. Use is subject to license terms.</font>' TREEAPI_JAVADOCBOTTOM = '<font size="-1"><a href="http://bugs.sun.com/services/bugreport/index.jsp">Report a bug or request a feature.</a><br>Copyright $(THIS_YEAR) Sun Microsystems, Inc. All Rights Reserved. Use is subject to license terms.</font>'
TREEAPI_GROUPNAME = "Packages" TREEAPI_GROUPNAME = "Packages"
TREEAPI_OVERVIEW = $(SHARE_SRC)/classes/com/sun/source/overview.html TREEAPI_OVERVIEW = $(SHARE_SRC)/classes/com/sun/source/overview.html

View File

@ -28,11 +28,10 @@ PROGRAM = java
PRODUCT = java PRODUCT = java
# #
# Statically link java to avoid the dependency on msvcr71.dll. This # Statically link java to avoid the dependency on msvcrNN.dll. This
# must be set before Defs.gmk is included. # must be set before Defs.gmk is included.
# #
MS_RUNTIME_STATIC = true MS_RUNTIME_STATIC = true
# #
# Statically link java to avoid the dependency on jli.dll. This # Statically link java to avoid the dependency on jli.dll. This
# must be set before Program.gmk is included. # must be set before Program.gmk is included.
@ -44,6 +43,7 @@ include $(BUILDDIR)/common/Defs.gmk
# Override the default version info with our own resource file (see 5106536) # Override the default version info with our own resource file (see 5106536)
ifeq ($(PLATFORM), windows) ifeq ($(PLATFORM), windows)
LDLIBS_COMMON += user32.lib comctl32.lib LDLIBS_COMMON += user32.lib comctl32.lib
ifdef OPENJDK ifdef OPENJDK
RC_FLAGS += -i "$(PLATFORM_SRC)/resource/icons" RC_FLAGS += -i "$(PLATFORM_SRC)/resource/icons"
else else

View File

@ -32,11 +32,10 @@ PROGRAM = javaw
PRODUCT = java PRODUCT = java
# #
# Statically link javaw to avoid the dependency on msvcr71.dll. This # Statically link javaw to avoid the dependency on msvcrNN.dll. This
# must be set before Defs.gmk is included. # must be set before Defs.gmk is included.
# #
MS_RUNTIME_STATIC = true MS_RUNTIME_STATIC = true
# #
# Statically link javaw to avoid the dependency on jli.dll. This # Statically link javaw to avoid the dependency on jli.dll. This
# must be set before Program.gmk is included. # must be set before Program.gmk is included.

View File

@ -109,7 +109,7 @@ IMPORT_LIST += $(MS_RUNTIME_LIBRARIES:%=$(BINDIR)/%)
$(BINDIR)/msvcrt.dll: $(MSVCRT_DLL_PATH)/msvcrt.dll $(BINDIR)/msvcrt.dll: $(MSVCRT_DLL_PATH)/msvcrt.dll
$(install-import-file) $(install-import-file)
$(CHMOD) a+x $@ $(CHMOD) a+x $@
$(BINDIR)/msvcr71.dll: $(MSVCR71_DLL_PATH)/msvcr71.dll $(BINDIR)/$(MSVCRNN_DLL): $(MSVCRNN_DLL_PATH)/$(MSVCRNN_DLL)
$(install-import-file) $(install-import-file)
$(CHMOD) a+x $@ $(CHMOD) a+x $@

View File

@ -32,6 +32,43 @@
#include "defines.h" #include "defines.h"
#ifdef _MSC_VER
#if _MSC_VER > 1400
/*
* When building for Microsoft Windows, main has a dependency on msvcr??.dll.
*
* When using Visual Studio 2005 or later, that must be recorded in
* the [java,javaw].exe.manifest file.
*
* Reference:
* C:/Program Files/Microsoft SDKs/Windows/v6.1/include/crtdefs.h
*/
#include <crtassem.h>
#ifdef _M_IX86
#pragma comment(linker,"/manifestdependency:\"type='win32' " \
"name='" __LIBRARIES_ASSEMBLY_NAME_PREFIX ".CRT' " \
"version='" _CRT_ASSEMBLY_VERSION "' " \
"processorArchitecture='x86' " \
"publicKeyToken='" _VC_ASSEMBLY_PUBLICKEYTOKEN "'\"")
#endif /* _M_IX86 */
//This may not be necessary yet for the Windows 64-bit build, but it
//will be when that build environment is updated. Need to test to see
//if it is harmless:
#ifdef _M_AMD64
#pragma comment(linker,"/manifestdependency:\"type='win32' " \
"name='" __LIBRARIES_ASSEMBLY_NAME_PREFIX ".CRT' " \
"version='" _CRT_ASSEMBLY_VERSION "' " \
"processorArchitecture='amd64' " \
"publicKeyToken='" _VC_ASSEMBLY_PUBLICKEYTOKEN "'\"")
#endif /* _M_AMD64 */
#endif /* _MSC_VER > 1400 */
#endif /* _MSC_VER */
/* /*
* Entry point. * Entry point.

View File

@ -1,5 +1,5 @@
/* /*
* Copyright 1996-2007 Sun Microsystems, Inc. All Rights Reserved. * Copyright 1996-2008 Sun Microsystems, Inc. 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
@ -486,4 +486,21 @@ final class CipherBox {
return newlen; return newlen;
} }
/*
* Dispose of any intermediate state in the underlying cipher.
* For PKCS11 ciphers, this will release any attached sessions, and
* thus make finalization faster.
*/
void dispose() {
try {
if (cipher != null) {
// ignore return value.
cipher.doFinal();
}
} catch (GeneralSecurityException e) {
// swallow for now.
}
}
} }

View File

@ -1,5 +1,5 @@
/* /*
* Copyright 2003-2007 Sun Microsystems, Inc. All Rights Reserved. * Copyright 2003-2008 Sun Microsystems, Inc. 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
@ -547,6 +547,8 @@ final public class SSLEngineImpl extends SSLEngine {
// ... create decompressor // ... create decompressor
CipherBox oldCipher = readCipher;
try { try {
readCipher = handshaker.newReadCipher(); readCipher = handshaker.newReadCipher();
readMAC = handshaker.newReadMAC(); readMAC = handshaker.newReadMAC();
@ -555,6 +557,16 @@ final public class SSLEngineImpl extends SSLEngine {
throw (SSLException)new SSLException throw (SSLException)new SSLException
("Algorithm missing: ").initCause(e); ("Algorithm missing: ").initCause(e);
} }
/*
* Dispose of any intermediate state in the underlying cipher.
* For PKCS11 ciphers, this will release any attached sessions,
* and thus make finalization faster.
*
* Since MAC's doFinal() is called for every SSL/TLS packet, it's
* not necessary to do the same with MAC's.
*/
oldCipher.dispose();
} }
/* /*
@ -572,6 +584,8 @@ final public class SSLEngineImpl extends SSLEngine {
// ... create compressor // ... create compressor
CipherBox oldCipher = writeCipher;
try { try {
writeCipher = handshaker.newWriteCipher(); writeCipher = handshaker.newWriteCipher();
writeMAC = handshaker.newWriteMAC(); writeMAC = handshaker.newWriteMAC();
@ -580,6 +594,9 @@ final public class SSLEngineImpl extends SSLEngine {
throw (SSLException)new SSLException throw (SSLException)new SSLException
("Algorithm missing: ").initCause(e); ("Algorithm missing: ").initCause(e);
} }
// See comment above.
oldCipher.dispose();
} }
/* /*
@ -1231,6 +1248,9 @@ final public class SSLEngineImpl extends SSLEngine {
break; break;
} }
// See comment in changeReadCiphers()
writeCipher.dispose();
connectionState = cs_CLOSED; connectionState = cs_CLOSED;
} }
@ -1271,6 +1291,10 @@ final public class SSLEngineImpl extends SSLEngine {
closeOutboundInternal(); closeOutboundInternal();
inboundDone = true; inboundDone = true;
// See comment in changeReadCiphers()
readCipher.dispose();
connectionState = cs_CLOSED; connectionState = cs_CLOSED;
} }
@ -1457,6 +1481,10 @@ final public class SSLEngineImpl extends SSLEngine {
connectionState = cs_CLOSED; connectionState = cs_CLOSED;
// See comment in changeReadCiphers()
readCipher.dispose();
writeCipher.dispose();
if (cause instanceof RuntimeException) { if (cause instanceof RuntimeException) {
throw (RuntimeException)cause; throw (RuntimeException)cause;
} else { } else {

View File

@ -1427,6 +1427,10 @@ final public class SSLSocketImpl extends BaseSSLSocketImpl {
waitForClose(false); waitForClose(false);
} }
// See comment in changeReadCiphers()
readCipher.dispose();
writeCipher.dispose();
// state will be set to cs_CLOSED in the finally block below // state will be set to cs_CLOSED in the finally block below
break; break;
@ -1633,6 +1637,11 @@ final public class SSLSocketImpl extends BaseSSLSocketImpl {
* Clean up our side. * Clean up our side.
*/ */
closeSocket(); closeSocket();
// See comment in changeReadCiphers()
readCipher.dispose();
writeCipher.dispose();
connectionState = (oldState == cs_APP_CLOSED) ? cs_APP_CLOSED connectionState = (oldState == cs_APP_CLOSED) ? cs_APP_CLOSED
: cs_CLOSED; : cs_CLOSED;
throw closeReason; throw closeReason;
@ -1763,6 +1772,8 @@ final public class SSLSocketImpl extends BaseSSLSocketImpl {
// ... create decompressor // ... create decompressor
CipherBox oldCipher = readCipher;
try { try {
readCipher = handshaker.newReadCipher(); readCipher = handshaker.newReadCipher();
readMAC = handshaker.newReadMAC(); readMAC = handshaker.newReadMAC();
@ -1771,6 +1782,16 @@ final public class SSLSocketImpl extends BaseSSLSocketImpl {
throw (SSLException)new SSLException throw (SSLException)new SSLException
("Algorithm missing: ").initCause(e); ("Algorithm missing: ").initCause(e);
} }
/*
* Dispose of any intermediate state in the underlying cipher.
* For PKCS11 ciphers, this will release any attached sessions,
* and thus make finalization faster.
*
* Since MAC's doFinal() is called for every SSL/TLS packet, it's
* not necessary to do the same with MAC's.
*/
oldCipher.dispose();
} }
// used by Handshaker // used by Handshaker
@ -1783,6 +1804,8 @@ final public class SSLSocketImpl extends BaseSSLSocketImpl {
// ... create compressor // ... create compressor
CipherBox oldCipher = writeCipher;
try { try {
writeCipher = handshaker.newWriteCipher(); writeCipher = handshaker.newWriteCipher();
writeMAC = handshaker.newWriteMAC(); writeMAC = handshaker.newWriteMAC();
@ -1791,6 +1814,9 @@ final public class SSLSocketImpl extends BaseSSLSocketImpl {
throw (SSLException)new SSLException throw (SSLException)new SSLException
("Algorithm missing: ").initCause(e); ("Algorithm missing: ").initCause(e);
} }
// See comment above.
oldCipher.dispose();
} }
/* /*

View File

@ -46,9 +46,18 @@ class Main {
String zname = ""; String zname = "";
String[] files; String[] files;
String rootjar = null; String rootjar = null;
Hashtable filesTable = new Hashtable();
Vector paths = new Vector(); // An entryName(path)->File map generated during "expand", it helps to
Vector v; // decide whether or not an existing entry in a jar file needs to be
// replaced, during the "update" operation.
Map<String, File> entryMap = new HashMap<String, File>();
// All files need to be added/updated.
Set<File> entries = new LinkedHashSet<File>();
// Directories specified by "-C" operation.
List<String> paths = new ArrayList<String>();
CRC32 crc32 = new CRC32(); CRC32 crc32 = new CRC32();
/* /*
* cflag: create * cflag: create
@ -175,7 +184,8 @@ class Main {
vflag = false; vflag = false;
} }
} }
create(new BufferedOutputStream(out), expand(files), manifest); expand(null, files, false);
create(new BufferedOutputStream(out, 4096), manifest);
if (in != null) { if (in != null) {
in.close(); in.close();
} }
@ -198,8 +208,8 @@ class Main {
} }
InputStream manifest = (!Mflag && (mname != null)) ? InputStream manifest = (!Mflag && (mname != null)) ?
(new FileInputStream(mname)) : null; (new FileInputStream(mname)) : null;
expand(files); expand(null, files, true);
boolean updateOk = update(in, new BufferedOutputStream(out), manifest); boolean updateOk = update(in, new BufferedOutputStream(out), manifest, null);
if (ok) { if (ok) {
ok = updateOk; ok = updateOk;
} }
@ -354,7 +364,7 @@ class Main {
while (dir.indexOf("//") > -1) { while (dir.indexOf("//") > -1) {
dir = dir.replace("//", "/"); dir = dir.replace("//", "/");
} }
paths.addElement(dir.replace(File.separatorChar, '/')); paths.add(dir.replace(File.separatorChar, '/'));
nameBuf[k++] = dir + args[++i]; nameBuf[k++] = dir + args[++i];
} else { } else {
nameBuf[k++] = args[i]; nameBuf[k++] = args[i];
@ -387,17 +397,7 @@ class Main {
* Expands list of files to process into full list of all files that * Expands list of files to process into full list of all files that
* can be found by recursively descending directories. * can be found by recursively descending directories.
*/ */
String[] expand(String[] files) { void expand(File dir, String[] files, boolean isUpdate) {
v = new Vector();
expand(null, files, v, filesTable);
files = new String[v.size()];
for (int i = 0; i < files.length; i++) {
files[i] = ((File)v.elementAt(i)).getPath();
}
return files;
}
void expand(File dir, String[] files, Vector v, Hashtable t) {
if (files == null) { if (files == null) {
return; return;
} }
@ -409,17 +409,20 @@ class Main {
f = new File(dir, files[i]); f = new File(dir, files[i]);
} }
if (f.isFile()) { if (f.isFile()) {
if (!t.contains(f)) { if (entries.add(f)) {
t.put(entryName(f.getPath()), f); if (isUpdate)
v.addElement(f); entryMap.put(entryName(f.getPath()), f);
} }
} else if (f.isDirectory()) { } else if (f.isDirectory()) {
String dirPath = f.getPath(); if (entries.add(f)) {
dirPath = (dirPath.endsWith(File.separator)) ? dirPath : if (isUpdate) {
(dirPath + File.separator); String dirPath = f.getPath();
t.put(entryName(dirPath), f); dirPath = (dirPath.endsWith(File.separator)) ? dirPath :
v.addElement(f); (dirPath + File.separator);
expand(f, f.list(), v, t); entryMap.put(entryName(dirPath), f);
}
expand(f, f.list(), isUpdate);
}
} else { } else {
error(formatMsg("error.nosuch.fileordir", String.valueOf(f))); error(formatMsg("error.nosuch.fileordir", String.valueOf(f)));
ok = false; ok = false;
@ -430,7 +433,7 @@ class Main {
/* /*
* Creates a new JAR file. * Creates a new JAR file.
*/ */
void create(OutputStream out, String[] files, Manifest manifest) void create(OutputStream out, Manifest manifest)
throws IOException throws IOException
{ {
ZipOutputStream zos = new JarOutputStream(out); ZipOutputStream zos = new JarOutputStream(out);
@ -455,8 +458,8 @@ class Main {
manifest.write(zos); manifest.write(zos);
zos.closeEntry(); zos.closeEntry();
} }
for (int i = 0; i < files.length; i++) { for (File file: entries) {
addFile(zos, new File(files[i])); addFile(zos, file);
} }
zos.close(); zos.close();
} }
@ -465,10 +468,9 @@ class Main {
* update an existing jar file. * update an existing jar file.
*/ */
boolean update(InputStream in, OutputStream out, boolean update(InputStream in, OutputStream out,
InputStream newManifest) throws IOException InputStream newManifest,
JarIndex jarIndex) throws IOException
{ {
Hashtable t = filesTable;
Vector v = this.v;
ZipInputStream zis = new ZipInputStream(in); ZipInputStream zis = new ZipInputStream(in);
ZipOutputStream zos = new JarOutputStream(out); ZipOutputStream zos = new JarOutputStream(out);
ZipEntry e = null; ZipEntry e = null;
@ -477,8 +479,8 @@ class Main {
int n = 0; int n = 0;
boolean updateOk = true; boolean updateOk = true;
if (t.containsKey(INDEX)) { if (jarIndex != null) {
addIndex((JarIndex)t.get(INDEX), zos); addIndex(jarIndex, zos);
} }
// put the old entries first, replace if necessary // put the old entries first, replace if necessary
@ -488,9 +490,8 @@ class Main {
boolean isManifestEntry = name.toUpperCase( boolean isManifestEntry = name.toUpperCase(
java.util.Locale.ENGLISH). java.util.Locale.ENGLISH).
equals(MANIFEST); equals(MANIFEST);
if ((name.toUpperCase().equals(INDEX) if ((name.toUpperCase().equals(INDEX) && jarIndex != null)
&& t.containsKey(INDEX)) || (Mflag && isManifestEntry)) {
|| (Mflag && isManifestEntry)) {
continue; continue;
} else if (isManifestEntry && ((newManifest != null) || } else if (isManifestEntry && ((newManifest != null) ||
(ename != null))) { (ename != null))) {
@ -514,8 +515,7 @@ class Main {
} }
updateManifest(old, zos); updateManifest(old, zos);
} else { } else {
if (!t.containsKey(name)) { // copy the old stuff if (!entryMap.containsKey(name)) { // copy the old stuff
// do our own compression // do our own compression
ZipEntry e2 = new ZipEntry(name); ZipEntry e2 = new ZipEntry(name);
e2.setMethod(e.getMethod()); e2.setMethod(e.getMethod());
@ -531,21 +531,17 @@ class Main {
zos.write(buf, 0, n); zos.write(buf, 0, n);
} }
} else { // replace with the new files } else { // replace with the new files
addFile(zos, (File)(t.get(name))); File f = entryMap.get(name);
t.remove(name); addFile(zos, f);
entryMap.remove(name);
entries.remove(f);
} }
} }
} }
t.remove(INDEX);
// add the remaining new files // add the remaining new files
if (!t.isEmpty()) { for (File f: entries) {
for (int i = 0; i < v.size(); i++) { addFile(zos, f);
File f = (File)v.elementAt(i);
if (t.containsValue(f)) {
addFile(zos, f);
}
}
} }
if (!foundManifest) { if (!foundManifest) {
if (newManifest != null) { if (newManifest != null) {
@ -611,8 +607,7 @@ class Main {
private String entryName(String name) { private String entryName(String name) {
name = name.replace(File.separatorChar, '/'); name = name.replace(File.separatorChar, '/');
String matchPath = ""; String matchPath = "";
for (int i = 0; i < paths.size(); i++) { for (String path : paths) {
String path = (String)paths.elementAt(i);
if (name.startsWith(path) && (path.length() > matchPath.length())) { if (name.startsWith(path) && (path.length() > matchPath.length())) {
matchPath = path; matchPath = path;
} }
@ -669,7 +664,6 @@ class Main {
void addFile(ZipOutputStream zos, File file) throws IOException { void addFile(ZipOutputStream zos, File file) throws IOException {
String name = file.getPath(); String name = file.getPath();
boolean isDir = file.isDirectory(); boolean isDir = file.isDirectory();
if (isDir) { if (isDir) {
name = name.endsWith(File.separator) ? name : name = name.endsWith(File.separator) ? name :
(name + File.separator); (name + File.separator);
@ -704,7 +698,7 @@ class Main {
} }
zos.putNextEntry(e); zos.putNextEntry(e);
if (!isDir) { if (!isDir) {
byte[] buf = new byte[1024]; byte[] buf = new byte[8192];
int len; int len;
InputStream is = new BufferedInputStream(new FileInputStream(file)); InputStream is = new BufferedInputStream(new FileInputStream(file));
while ((len = is.read(buf, 0, buf.length)) != -1) { while ((len = is.read(buf, 0, buf.length)) != -1) {
@ -749,7 +743,7 @@ class Main {
*/ */
private void crc32File(ZipEntry e, File f) throws IOException { private void crc32File(ZipEntry e, File f) throws IOException {
InputStream is = new BufferedInputStream(new FileInputStream(f)); InputStream is = new BufferedInputStream(new FileInputStream(f));
byte[] buf = new byte[1024]; byte[] buf = new byte[8192];
crc32.reset(); crc32.reset();
int r = 0; int r = 0;
int nread = 0; int nread = 0;
@ -772,7 +766,7 @@ class Main {
void extract(InputStream in, String files[]) throws IOException { void extract(InputStream in, String files[]) throws IOException {
ZipInputStream zis = new ZipInputStream(in); ZipInputStream zis = new ZipInputStream(in);
ZipEntry e; ZipEntry e;
// Set of all directory entries specified in archive. Dissallows // Set of all directory entries specified in archive. Disallows
// null entries. Disallows all entries if using pre-6.0 behavior. // null entries. Disallows all entries if using pre-6.0 behavior.
Set<ZipEntry> dirs = new HashSet<ZipEntry>() { Set<ZipEntry> dirs = new HashSet<ZipEntry>() {
public boolean add(ZipEntry e) { public boolean add(ZipEntry e) {
@ -897,17 +891,16 @@ class Main {
} }
} }
/** /**
* Output the class index table to the INDEX.LIST file of the * Output the class index table to the INDEX.LIST file of the
* root jar file. * root jar file.
*/ */
void dumpIndex(String rootjar, JarIndex index) throws IOException { void dumpIndex(String rootjar, JarIndex index) throws IOException {
filesTable.put(INDEX, index);
File scratchFile = File.createTempFile("scratch", null, new File(".")); File scratchFile = File.createTempFile("scratch", null, new File("."));
File jarFile = new File(rootjar); File jarFile = new File(rootjar);
boolean updateOk = update(new FileInputStream(jarFile), boolean updateOk = update(new FileInputStream(jarFile),
new FileOutputStream(scratchFile), null); new FileOutputStream(scratchFile),
null, index);
jarFile.delete(); jarFile.delete();
if (!scratchFile.renameTo(jarFile)) { if (!scratchFile.renameTo(jarFile)) {
scratchFile.delete(); scratchFile.delete();

View File

@ -25,6 +25,7 @@
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <stddef.h>
#include "jni.h" #include "jni.h"
#include "jni_util.h" #include "jni_util.h"
@ -34,9 +35,9 @@
/* IO helper functions */ /* IO helper functions */
int jint
readSingle(JNIEnv *env, jobject this, jfieldID fid) { readSingle(JNIEnv *env, jobject this, jfieldID fid) {
int nread; jint nread;
char ret; char ret;
FD fd = GET_FD(this, fid); FD fd = GET_FD(this, fid);
if (fd == -1) { if (fd == -1) {
@ -49,7 +50,7 @@ readSingle(JNIEnv *env, jobject this, jfieldID fid) {
} else if (nread == JVM_IO_ERR) { /* error */ } else if (nread == JVM_IO_ERR) { /* error */
JNU_ThrowIOExceptionWithLastError(env, "Read error"); JNU_ThrowIOExceptionWithLastError(env, "Read error");
} else if (nread == JVM_IO_INTR) { } else if (nread == JVM_IO_INTR) {
JNU_ThrowByName(env, "java/io/InterruptedIOException", 0); JNU_ThrowByName(env, "java/io/InterruptedIOException", NULL);
} }
return ret & 0xFF; return ret & 0xFF;
} }
@ -58,25 +59,35 @@ readSingle(JNIEnv *env, jobject this, jfieldID fid) {
*/ */
#define BUF_SIZE 8192 #define BUF_SIZE 8192
/*
* Returns true if the array slice defined by the given offset and length
* is out of bounds.
*/
static int
outOfBounds(JNIEnv *env, jint off, jint len, jbyteArray array) {
return ((off < 0) ||
(len < 0) ||
// We are very careful to avoid signed integer overflow,
// the result of which is undefined in C.
((*env)->GetArrayLength(env, array) - off < len));
}
int jint
readBytes(JNIEnv *env, jobject this, jbyteArray bytes, readBytes(JNIEnv *env, jobject this, jbyteArray bytes,
jint off, jint len, jfieldID fid) jint off, jint len, jfieldID fid)
{ {
int nread, datalen; jint nread;
char stackBuf[BUF_SIZE]; char stackBuf[BUF_SIZE];
char *buf = 0; char *buf = NULL;
FD fd; FD fd;
if (IS_NULL(bytes)) { if (IS_NULL(bytes)) {
JNU_ThrowNullPointerException(env, 0); JNU_ThrowNullPointerException(env, NULL);
return -1; return -1;
} }
datalen = (*env)->GetArrayLength(env, bytes);
if ((off < 0) || (off > datalen) || if (outOfBounds(env, off, len, bytes)) {
(len < 0) || ((off + len) > datalen) || ((off + len) < 0)) { JNU_ThrowByName(env, "java/lang/IndexOutOfBoundsException", NULL);
JNU_ThrowByName(env, "java/lang/IndexOutOfBoundsException", 0);
return -1; return -1;
} }
@ -84,8 +95,8 @@ readBytes(JNIEnv *env, jobject this, jbyteArray bytes,
return 0; return 0;
} else if (len > BUF_SIZE) { } else if (len > BUF_SIZE) {
buf = malloc(len); buf = malloc(len);
if (buf == 0) { if (buf == NULL) {
JNU_ThrowOutOfMemoryError(env, 0); JNU_ThrowOutOfMemoryError(env, NULL);
return 0; return 0;
} }
} else { } else {
@ -95,18 +106,18 @@ readBytes(JNIEnv *env, jobject this, jbyteArray bytes,
fd = GET_FD(this, fid); fd = GET_FD(this, fid);
if (fd == -1) { if (fd == -1) {
JNU_ThrowIOException(env, "Stream Closed"); JNU_ThrowIOException(env, "Stream Closed");
return -1;
}
nread = IO_Read(fd, buf, len);
if (nread > 0) {
(*env)->SetByteArrayRegion(env, bytes, off, nread, (jbyte *)buf);
} else if (nread == JVM_IO_ERR) {
JNU_ThrowIOExceptionWithLastError(env, "Read error");
} else if (nread == JVM_IO_INTR) { /* EOF */
JNU_ThrowByName(env, "java/io/InterruptedIOException", 0);
} else { /* EOF */
nread = -1; nread = -1;
} else {
nread = IO_Read(fd, buf, len);
if (nread > 0) {
(*env)->SetByteArrayRegion(env, bytes, off, nread, (jbyte *)buf);
} else if (nread == JVM_IO_ERR) {
JNU_ThrowIOExceptionWithLastError(env, "Read error");
} else if (nread == JVM_IO_INTR) {
JNU_ThrowByName(env, "java/io/InterruptedIOException", NULL);
} else { /* EOF */
nread = -1;
}
} }
if (buf != stackBuf) { if (buf != stackBuf) {
@ -117,8 +128,9 @@ readBytes(JNIEnv *env, jobject this, jbyteArray bytes,
void void
writeSingle(JNIEnv *env, jobject this, jint byte, jfieldID fid) { writeSingle(JNIEnv *env, jobject this, jint byte, jfieldID fid) {
char c = byte; // Discard the 24 high-order bits of byte. See OutputStream#write(int)
int n; char c = (char) byte;
jint n;
FD fd = GET_FD(this, fid); FD fd = GET_FD(this, fid);
if (fd == -1) { if (fd == -1) {
JNU_ThrowIOException(env, "Stream Closed"); JNU_ThrowIOException(env, "Stream Closed");
@ -128,28 +140,26 @@ writeSingle(JNIEnv *env, jobject this, jint byte, jfieldID fid) {
if (n == JVM_IO_ERR) { if (n == JVM_IO_ERR) {
JNU_ThrowIOExceptionWithLastError(env, "Write error"); JNU_ThrowIOExceptionWithLastError(env, "Write error");
} else if (n == JVM_IO_INTR) { } else if (n == JVM_IO_INTR) {
JNU_ThrowByName(env, "java/io/InterruptedIOException", 0); JNU_ThrowByName(env, "java/io/InterruptedIOException", NULL);
} }
} }
void void
writeBytes(JNIEnv *env, jobject this, jbyteArray bytes, writeBytes(JNIEnv *env, jobject this, jbyteArray bytes,
jint off, jint len, jfieldID fid) jint off, jint len, jfieldID fid)
{ {
int n, datalen; jint n;
char stackBuf[BUF_SIZE]; char stackBuf[BUF_SIZE];
char *buf = 0; char *buf = NULL;
FD fd; FD fd;
if (IS_NULL(bytes)) { if (IS_NULL(bytes)) {
JNU_ThrowNullPointerException(env, 0); JNU_ThrowNullPointerException(env, NULL);
return; return;
} }
datalen = (*env)->GetArrayLength(env, bytes);
if ((off < 0) || (off > datalen) || if (outOfBounds(env, off, len, bytes)) {
(len < 0) || ((off + len) > datalen) || ((off + len) < 0)) { JNU_ThrowByName(env, "java/lang/IndexOutOfBoundsException", NULL);
JNU_ThrowByName(env, "java/lang/IndexOutOfBoundsException", 0);
return; return;
} }
@ -157,8 +167,8 @@ writeBytes(JNIEnv *env, jobject this, jbyteArray bytes,
return; return;
} else if (len > BUF_SIZE) { } else if (len > BUF_SIZE) {
buf = malloc(len); buf = malloc(len);
if (buf == 0) { if (buf == NULL) {
JNU_ThrowOutOfMemoryError(env, 0); JNU_ThrowOutOfMemoryError(env, NULL);
return; return;
} }
} else { } else {
@ -180,7 +190,7 @@ writeBytes(JNIEnv *env, jobject this, jbyteArray bytes,
JNU_ThrowIOExceptionWithLastError(env, "Write error"); JNU_ThrowIOExceptionWithLastError(env, "Write error");
break; break;
} else if (n == JVM_IO_INTR) { } else if (n == JVM_IO_INTR) {
JNU_ThrowByName(env, "java/io/InterruptedIOException", 0); JNU_ThrowByName(env, "java/io/InterruptedIOException", NULL);
break; break;
} }
off += n; off += n;
@ -196,19 +206,19 @@ void
throwFileNotFoundException(JNIEnv *env, jstring path) throwFileNotFoundException(JNIEnv *env, jstring path)
{ {
char buf[256]; char buf[256];
int n; jint n;
jobject x; jobject x;
jstring why = NULL; jstring why = NULL;
n = JVM_GetLastErrorString(buf, sizeof(buf)); n = JVM_GetLastErrorString(buf, sizeof(buf));
if (n > 0) { if (n > 0) {
why = JNU_NewStringPlatform(env, buf); why = JNU_NewStringPlatform(env, buf);
} }
x = JNU_NewObjectByName(env, x = JNU_NewObjectByName(env,
"java/io/FileNotFoundException", "java/io/FileNotFoundException",
"(Ljava/lang/String;Ljava/lang/String;)V", "(Ljava/lang/String;Ljava/lang/String;)V",
path, why); path, why);
if (x != NULL) { if (x != NULL) {
(*env)->Throw(env, x); (*env)->Throw(env, x);
} }
} }

View File

@ -38,9 +38,9 @@ extern jfieldID IO_handle_fdID;
* IO helper functions * IO helper functions
*/ */
int readSingle(JNIEnv *env, jobject this, jfieldID fid); jint readSingle(JNIEnv *env, jobject this, jfieldID fid);
int readBytes(JNIEnv *env, jobject this, jbyteArray bytes, jint off, jint readBytes(JNIEnv *env, jobject this, jbyteArray bytes, jint off,
jint len, jfieldID fid); jint len, jfieldID fid);
void writeSingle(JNIEnv *env, jobject this, jint byte, jfieldID fid); void writeSingle(JNIEnv *env, jobject this, jint byte, jfieldID fid);
void writeBytes(JNIEnv *env, jobject this, jbyteArray bytes, jint off, void writeBytes(JNIEnv *env, jobject this, jbyteArray bytes, jint off,
jint len, jfieldID fid); jint len, jfieldID fid);

View File

@ -41,7 +41,6 @@
#define JVM_DLL "jvm.dll" #define JVM_DLL "jvm.dll"
#define JAVA_DLL "java.dll" #define JAVA_DLL "java.dll"
#define CRT_DLL "msvcr71.dll"
/* /*
* Prototypes. * Prototypes.
@ -206,7 +205,15 @@ LoadJavaVM(const char *jvmpath, InvocationFunctions *ifn)
* assumed to be present in the "JRE path" directory. If it is not found * assumed to be present in the "JRE path" directory. If it is not found
* there (or "JRE path" fails to resolve), skip the explicit load and let * there (or "JRE path" fails to resolve), skip the explicit load and let
* nature take its course, which is likely to be a failure to execute. * nature take its course, which is likely to be a failure to execute.
*
* (NOTE: the above statement is only true for Visual Studio 2003 and
* msvcr71.dll.)
*/ */
#ifdef _MSC_VER
#if _MSC_VER < 1400
#define CRT_DLL "msvcr71.dll"
#endif
#ifdef CRT_DLL
if (GetJREPath(crtpath, MAXPATHLEN)) { if (GetJREPath(crtpath, MAXPATHLEN)) {
(void)JLI_StrCat(crtpath, "\\bin\\" CRT_DLL); /* Add crt dll */ (void)JLI_StrCat(crtpath, "\\bin\\" CRT_DLL); /* Add crt dll */
JLI_TraceLauncher("CRT path is %s\n", crtpath); JLI_TraceLauncher("CRT path is %s\n", crtpath);
@ -217,6 +224,8 @@ LoadJavaVM(const char *jvmpath, InvocationFunctions *ifn)
} }
} }
} }
#endif /* CRT_DLL */
#endif /* _MSC_VER */
/* Load the Java VM DLL */ /* Load the Java VM DLL */
if ((handle = LoadLibrary(jvmpath)) == 0) { if ((handle = LoadLibrary(jvmpath)) == 0) {

View File

@ -345,7 +345,6 @@ JNIEXPORT void JNICALL Java_sun_tools_attach_WindowsVirtualMachine_enqueue
DataBlock data; DataBlock data;
DataBlock* pData; DataBlock* pData;
DWORD* pCode; DWORD* pCode;
DWORD numBytes;
DWORD stubLen; DWORD stubLen;
HANDLE hProcess, hThread; HANDLE hProcess, hThread;
jint argsLen, i; jint argsLen, i;
@ -400,7 +399,7 @@ JNIEXPORT void JNICALL Java_sun_tools_attach_WindowsVirtualMachine_enqueue
JNU_ThrowIOExceptionWithLastError(env, "VirtualAllocEx failed"); JNU_ThrowIOExceptionWithLastError(env, "VirtualAllocEx failed");
return; return;
} }
WriteProcessMemory( hProcess, (LPVOID)pData, (LPVOID)&data, (DWORD)sizeof(DataBlock), &numBytes ); WriteProcessMemory( hProcess, (LPVOID)pData, (LPCVOID)&data, (SIZE_T)sizeof(DataBlock), NULL );
stubLen = (DWORD)(*env)->GetArrayLength(env, stub); stubLen = (DWORD)(*env)->GetArrayLength(env, stub);
@ -412,7 +411,7 @@ JNIEXPORT void JNICALL Java_sun_tools_attach_WindowsVirtualMachine_enqueue
VirtualFreeEx(hProcess, pData, 0, MEM_RELEASE); VirtualFreeEx(hProcess, pData, 0, MEM_RELEASE);
return; return;
} }
WriteProcessMemory( hProcess, (LPVOID)pCode, (LPVOID)stubCode, (DWORD)stubLen, &numBytes ); WriteProcessMemory( hProcess, (LPVOID)pCode, (LPCVOID)stubCode, (SIZE_T)stubLen, NULL );
if (isCopy) { if (isCopy) {
(*env)->ReleaseByteArrayElements(env, stub, stubCode, JNI_ABORT); (*env)->ReleaseByteArrayElements(env, stub, stubCode, JNI_ABORT);
} }

View File

@ -0,0 +1,51 @@
/*
* Copyright 2008 Sun Microsystems, Inc. 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.
*
* 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
* CA 95054 USA or visit www.sun.com if you need additional information or
* have any questions.
*/
/*
* @test
* @bug 6791458
* @summary Reading from closed input files leaks native memory
*/
import java.io.*;
public class MemoryLeak {
public static void main(String[] args) throws Throwable {
byte[] bytes = new byte[1 << 20];
String dir = System.getProperty("test.src", ".");
File testFile = new File(dir, "input.txt");
FileInputStream s = new FileInputStream(testFile);
s.close();
for (int i = 0; i < 10000; i++) {
try {
s.read(bytes);
throw new Error("expected IOException");
} catch (IOException _) {
/* OK */
} catch (OutOfMemoryError oome) {
System.out.printf("Got OutOfMemoryError, i=%d%n", i);
throw oome;
}
}
}
}

View File

@ -22,107 +22,76 @@
*/ */
/* /*
@test * @test
@bug 4017728 4079849 * @bug 4017728 4079849 6788196
@summary Check for correct Array Bounds check in read of FileInputStream and * @summary Check for correct Array Bounds check in read of FileInputStream and
RandomAccessFile * RandomAccessFile
*/ */
import java.io.*; import java.io.*;
/* /*
* The test calls the read(byte buf[] , int off , int len) of FileInputStream with * The test calls the read(byte buf[] , int off , int len) of
* different values of off and len to see if the ArrayOutOfBoundsException is * FileInputStream with different values of off and len to see if the
* thrown according to the JLS1.0 specification. The read(...) method calls * IndexOutOfBoundsException is thrown. The read(...) method calls
* readBytes(...) in native code(io_util.c). The read(...) method in RandomAccessFile * readBytes(...) in native code(io_util.c). The read(...) method in
* also calls the same native method. So one should see similar results. * RandomAccessFile also calls the same native method. So one should
* see similar results.
*/ */
public class ReadBytesBounds { public class ReadBytesBounds {
public static void main(String argv[]) throws Exception{ static final FileInputStream fis;
static final RandomAccessFile raf;
int num_test_cases = 12; static final byte[] b = new byte[32];
int off[] = {-1 , -1 , 0 , 0 , 33 , 33 , 0 , 32 , 32 , 4 , 1 , 0};
int len[] = {-1 , 0 , -1 , 33 , 0 , 4 , 32 , 0 , 4 , 16 , 31 , 0};
boolean results[] = { false , false , false , false , false , false ,
true , true , false , true , true , true};
FileInputStream fis = null;
RandomAccessFile raf = null;
byte b[] = new byte[32];
int num_good = 0;
int num_bad = 0;
String dir = System.getProperty("test.src", ".");
File testFile = new File(dir, "input.txt");
fis = new FileInputStream(testFile);
for(int i = 0; i < num_test_cases; i++) {
try {
int bytes_read = fis.read(b , off[i] , len[i]);
} catch(IndexOutOfBoundsException aiobe) {
if (results[i]) {
throw new RuntimeException("Unexpected result");
}
else {
num_good++;
}
continue;
}
if (results[i]) {
num_good++;
}
else {
throw new RuntimeException("Unexpected result");
}
static {
try {
String dir = System.getProperty("test.src", ".");
File testFile = new File(dir, "input.txt");
fis = new FileInputStream(testFile);
raf = new RandomAccessFile(testFile , "r");
} catch (Throwable t) {
throw new Error(t);
} }
System.out.println("Results for FileInputStream.read");
System.out.println("\nTotal number of test cases = " + num_test_cases +
"\nNumber succeded = " + num_good +
"\nNumber failed = " + num_bad);
num_good = 0;
num_bad = 0;
raf = new RandomAccessFile(testFile , "r");
for(int i = 0; i < num_test_cases; i++) {
try {
int bytes_read = raf.read(b , off[i] , len[i]);
} catch(IndexOutOfBoundsException aiobe) {
if (results[i]) {
throw new RuntimeException("Unexpected result");
}
else {
num_good++;
}
continue;
}
if (results[i]) {
num_good++;
}
else {
throw new RuntimeException("Unexpected result");
}
}
System.out.println("Results for RandomAccessFile.read");
System.out.println("\nTotal number of test cases = " + num_test_cases +
"\nNumber succeded = " + num_good +
"\nNumber failed = " + num_bad);
} }
public static void main(String argv[]) throws Throwable {
byte b[] = new byte[32];
testRead(-1, -1, false);
testRead(-1, 0, false);
testRead( 0, -1, false);
testRead( 0, 33, false);
testRead(33, 0, false);
testRead(33, 4, false);
testRead( 0, 32, true);
testRead(32, 0, true);
testRead(32, 4, false);
testRead( 4, 16, true);
testRead( 1, 31, true);
testRead( 0, 0, true);
testRead(31, Integer.MAX_VALUE, false);
testRead( 0, Integer.MAX_VALUE, false);
testRead(-1, Integer.MAX_VALUE, false);
testRead(-4, Integer.MIN_VALUE, false);
testRead( 0, Integer.MIN_VALUE, false);
}
static void testRead(int off, int len, boolean expected) throws Throwable {
System.err.printf("off=%d len=%d expected=%b%n", off, len, expected);
boolean result;
try {
fis.read(b, off, len);
raf.read(b, off, len);
result = true;
} catch (IndexOutOfBoundsException e) {
result = false;
}
if (result != expected) {
throw new RuntimeException
(String.format("Unexpected result off=%d len=%d expected=%b",
off, len, expected));
}
}
} }

View File

@ -0,0 +1,71 @@
/*
* Copyright 2004 Sun Microsystems, Inc. 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.
*
* 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
* CA 95054 USA or visit www.sun.com if you need additional information or
* have any questions.
*/
import java.net.URISyntaxException;
import java.util.Set;
import sun.jvmstat.monitor.MonitorException;
import sun.jvmstat.monitor.MonitoredHost;
import sun.jvmstat.monitor.MonitoredVm;
import sun.jvmstat.monitor.VmIdentifier;
/**
*
* @test
* @bug 6672135
* @summary setInterval() for local MonitoredHost and local MonitoredVm
* @author Tomas Hurka
*/
public class CR6672135 {
private static final int INTERVAL = 2000;
public static void main(String[] args) {
int vmInterval;
int hostInterval;
try {
MonitoredHost localHost = MonitoredHost.getMonitoredHost("localhost");
Set vms = localHost.activeVms();
Integer vmInt = (Integer) vms.iterator().next();
String uriString = "//" + vmInt + "?mode=r"; // NOI18N
VmIdentifier vmId = new VmIdentifier(uriString);
MonitoredVm vm = localHost.getMonitoredVm(vmId);
vm.setInterval(INTERVAL);
localHost.setInterval(INTERVAL);
vmInterval = vm.getInterval();
hostInterval = localHost.getInterval();
} catch (Exception ex) {
throw new Error ("Test failed",ex);
}
System.out.println("VM "+vmInterval);
if (vmInterval != INTERVAL) {
throw new Error("Test failed");
}
System.out.println("Host "+hostInterval);
if (hostInterval != INTERVAL) {
throw new Error("Test failed");
}
}
}

View File

@ -17,3 +17,4 @@ eaf608c64fecf70f955dc9f29f94c055b183aeec jdk7-b30
32e30988324601d08b87989f0821d99aa8534511 jdk7-b40 32e30988324601d08b87989f0821d99aa8534511 jdk7-b40
ded6b40f558e8d19b3c17715b3d67ee001606645 jdk7-b41 ded6b40f558e8d19b3c17715b3d67ee001606645 jdk7-b41
5e5567c2db56a931cf07768218c20903d9828b5f jdk7-b42 5e5567c2db56a931cf07768218c20903d9828b5f jdk7-b42
e2f8f6daee9decd5721d598dacf4d0b5915651df jdk7-b43

View File

@ -66,7 +66,7 @@ javac.no.jdk.warnings = -XDignore.symbol.file=true
# set the following to -version to verify the versions of javac being used # set the following to -version to verify the versions of javac being used
javac.version.opt = javac.version.opt =
# in time, there should be no exceptions to -Xlint:all # in time, there should be no exceptions to -Xlint:all
javac.lint.opts = -Xlint:all,-deprecation,-fallthrough,-serial,-unchecked,-cast,-rawtypes javac.lint.opts = -Xlint:all,-deprecation,-fallthrough,-serial,-unchecked,-cast
# options for the <javadoc> task for javac # options for the <javadoc> task for javac
javadoc.jls3.url=http://java.sun.com/docs/books/jls/ javadoc.jls3.url=http://java.sun.com/docs/books/jls/

View File

@ -74,7 +74,7 @@ public abstract class Trees {
ClassLoader cl = arg.getClass().getClassLoader(); ClassLoader cl = arg.getClass().getClassLoader();
Class<?> c = Class.forName("com.sun.tools.javac.api.JavacTrees", false, cl); Class<?> c = Class.forName("com.sun.tools.javac.api.JavacTrees", false, cl);
argType = Class.forName(argType.getName(), false, cl); argType = Class.forName(argType.getName(), false, cl);
Method m = c.getMethod("instance", new Class[] { argType }); Method m = c.getMethod("instance", new Class<?>[] { argType });
return (Trees) m.invoke(null, new Object[] { arg }); return (Trees) m.invoke(null, new Object[] { arg });
} catch (Throwable e) { } catch (Throwable e) {
throw new AssertionError(e); throw new AssertionError(e);

View File

@ -281,7 +281,7 @@ public class Apt extends ListBuffer<Env<AttrContext>> {
// Discovery process // Discovery process
// List of annotation processory factory instances // List of annotation processory factory instances
java.util.Iterator providers = null; java.util.Iterator<AnnotationProcessorFactory> providers = null;
{ {
/* /*
* If a factory is provided by the user, the * If a factory is provided by the user, the

View File

@ -217,7 +217,7 @@ class AnnotationProxyMaker {
} }
} }
@SuppressWarnings("unchecked") @SuppressWarnings({"unchecked", "rawtypes"})
public void visitEnum(Attribute.Enum e) { public void visitEnum(Attribute.Enum e) {
if (runtimeType.isEnum()) { if (runtimeType.isEnum()) {
String constName = e.value.toString(); String constName = e.value.toString();
@ -225,7 +225,7 @@ class AnnotationProxyMaker {
value = Enum.valueOf((Class)runtimeType, constName); value = Enum.valueOf((Class)runtimeType, constName);
} catch (IllegalArgumentException ex) { } catch (IllegalArgumentException ex) {
value = new EnumConstantNotPresentExceptionProxy( value = new EnumConstantNotPresentExceptionProxy(
(Class)runtimeType, constName); (Class<Enum<?>>)runtimeType, constName);
} }
} else { } else {
value = null; // indicates a type mismatch value = null; // indicates a type mismatch

View File

@ -130,8 +130,8 @@ class Constants {
append((EnumConstantDeclarationImpl) val); append((EnumConstantDeclarationImpl) val);
} else if (val instanceof AnnotationMirror) { } else if (val instanceof AnnotationMirror) {
append((AnnotationMirrorImpl) val); append((AnnotationMirrorImpl) val);
} else if (val instanceof Collection) { } else if (val instanceof Collection<?>) {
append((Collection) val); append((Collection<?>) val);
} else { } else {
appendUnquoted(val.toString()); appendUnquoted(val.toString());
} }
@ -234,7 +234,7 @@ class Constants {
* and separated by ", ". Useful for array-valued annotation * and separated by ", ". Useful for array-valued annotation
* elements. * elements.
*/ */
void append(Collection vals) { void append(Collection<?> vals) {
buf.append('{'); buf.append('{');
boolean first = true; boolean first = true;
for (Object val : vals) { for (Object val : vals) {

View File

@ -71,7 +71,7 @@ public abstract class AbstractExecutableMemberWriter extends AbstractMemberWrite
member.position().line() != classdoc.position().line()) { member.position().line() != classdoc.position().line()) {
writer.printSrcLink(member, member.name()); writer.printSrcLink(member, member.name());
} else { } else {
bold(member.name()); strong(member.name());
} }
writeParameters(member); writeParameters(member);
writeExceptions(member); writeExceptions(member);
@ -87,10 +87,10 @@ public abstract class AbstractExecutableMemberWriter extends AbstractMemberWrite
protected void writeSummaryLink(int context, ClassDoc cd, ProgramElementDoc member) { protected void writeSummaryLink(int context, ClassDoc cd, ProgramElementDoc member) {
ExecutableMemberDoc emd = (ExecutableMemberDoc)member; ExecutableMemberDoc emd = (ExecutableMemberDoc)member;
String name = emd.name(); String name = emd.name();
writer.bold(); writer.strong();
writer.printDocLink(context, cd, (MemberDoc) emd, writer.printDocLink(context, cd, (MemberDoc) emd,
name, false); name, false);
writer.boldEnd(); writer.strongEnd();
writer.displayLength = name.length(); writer.displayLength = name.length();
writeParameters(emd, false); writeParameters(emd, false);
} }

View File

@ -78,12 +78,12 @@ public class AbstractIndexWriter extends HtmlDocletWriter {
} }
/** /**
* Print the text "Index" in bold format in the navigation bar. * Print the text "Index" in strong format in the navigation bar.
*/ */
protected void navLinkIndex() { protected void navLinkIndex() {
navCellRevStart(); navCellRevStart();
fontStyle("NavBarFont1Rev"); fontStyle("NavBarFont1Rev");
boldText("doclet.Index"); strongText("doclet.Index");
fontEnd(); fontEnd();
navCellEnd(); navCellEnd();
} }
@ -95,14 +95,14 @@ public class AbstractIndexWriter extends HtmlDocletWriter {
* @param unicode Unicode for which member list information to be generated. * @param unicode Unicode for which member list information to be generated.
* @param memberlist List of members for the unicode character. * @param memberlist List of members for the unicode character.
*/ */
protected void generateContents(Character unicode, List memberlist) { protected void generateContents(Character unicode, List<? extends Doc> memberlist) {
anchor("_" + unicode + "_"); anchor("_" + unicode + "_");
h2(); h2();
bold(unicode.toString()); strong(unicode.toString());
h2End(); h2End();
dl(); dl();
for (int i = 0; i < memberlist.size(); i++) { for (int i = 0; i < memberlist.size(); i++) {
Doc element = (Doc)memberlist.get(i); Doc element = memberlist.get(i);
if (element instanceof MemberDoc) { if (element instanceof MemberDoc) {
printDescription((MemberDoc)element); printDescription((MemberDoc)element);
} else if (element instanceof ClassDoc) { } else if (element instanceof ClassDoc) {
@ -195,14 +195,14 @@ public class AbstractIndexWriter extends HtmlDocletWriter {
protected void printComment(ProgramElementDoc element) { protected void printComment(ProgramElementDoc element) {
Tag[] tags; Tag[] tags;
if (Util.isDeprecated(element)) { if (Util.isDeprecated(element)) {
boldText("doclet.Deprecated"); space(); strongText("doclet.Deprecated"); space();
if ((tags = element.tags("deprecated")).length > 0) if ((tags = element.tags("deprecated")).length > 0)
printInlineDeprecatedComment(element, tags[0]); printInlineDeprecatedComment(element, tags[0]);
} else { } else {
ClassDoc cont = element.containingClass(); ClassDoc cont = element.containingClass();
while (cont != null) { while (cont != null) {
if (Util.isDeprecated(cont)) { if (Util.isDeprecated(cont)) {
boldText("doclet.Deprecated"); space(); strongText("doclet.Deprecated"); space();
break; break;
} }
cont = cont.containingClass(); cont = cont.containingClass();

View File

@ -98,8 +98,8 @@ public abstract class AbstractMemberWriter {
writer.displayLength++; writer.displayLength++;
} }
protected void bold(String str) { protected void strong(String str) {
writer.bold(str); writer.strong(str);
writer.displayLength += str.length(); writer.displayLength += str.length();
} }
@ -317,11 +317,11 @@ public abstract class AbstractMemberWriter {
* format for listing the API. Call methods from the sub-class to complete * format for listing the API. Call methods from the sub-class to complete
* the generation. * the generation.
*/ */
protected void printDeprecatedAPI(List deprmembers, String headingKey) { protected void printDeprecatedAPI(List<Doc> deprmembers, String headingKey) {
if (deprmembers.size() > 0) { if (deprmembers.size() > 0) {
writer.tableIndexSummary(); writer.tableIndexSummary();
writer.tableHeaderStart("#CCCCFF"); writer.tableHeaderStart("#CCCCFF");
writer.boldText(headingKey); writer.strongText(headingKey);
writer.tableHeaderEnd(); writer.tableHeaderEnd();
for (int i = 0; i < deprmembers.size(); i++) { for (int i = 0; i < deprmembers.size(); i++) {
ProgramElementDoc member =(ProgramElementDoc)deprmembers.get(i); ProgramElementDoc member =(ProgramElementDoc)deprmembers.get(i);
@ -363,7 +363,7 @@ public abstract class AbstractMemberWriter {
if (cd != null && !(pgmdoc instanceof ConstructorDoc) if (cd != null && !(pgmdoc instanceof ConstructorDoc)
&& !(pgmdoc instanceof ClassDoc)) { && !(pgmdoc instanceof ClassDoc)) {
// Add class context // Add class context
writer.bold(cd.name() + "."); writer.strong(cd.name() + ".");
} }
writeSummaryLink( writeSummaryLink(
pgmdoc instanceof ClassDoc ? pgmdoc instanceof ClassDoc ?
@ -377,12 +377,12 @@ public abstract class AbstractMemberWriter {
} }
} }
protected void navDetailLink(List members) { protected void navDetailLink(List<?> members) {
printNavDetailLink(members.size() > 0? true: false); printNavDetailLink(members.size() > 0? true: false);
} }
protected void navSummaryLink(List members, protected void navSummaryLink(List<?> members,
VisibleMemberMap visibleMemberMap) { VisibleMemberMap visibleMemberMap) {
if (members.size() > 0) { if (members.size() > 0) {
printNavSummaryLink(null, true); printNavSummaryLink(null, true);
@ -390,7 +390,7 @@ public abstract class AbstractMemberWriter {
} else { } else {
ClassDoc icd = classdoc.superclass(); ClassDoc icd = classdoc.superclass();
while (icd != null) { while (icd != null) {
List inhmembers = visibleMemberMap.getMembersFor(icd); List<?> inhmembers = visibleMemberMap.getMembersFor(icd);
if (inhmembers.size() > 0) { if (inhmembers.size() > 0) {
printNavSummaryLink(icd, true); printNavSummaryLink(icd, true);
return; return;

View File

@ -137,13 +137,13 @@ public abstract class AbstractPackageIndexWriter extends HtmlDocletWriter {
} }
/** /**
* Highlight "Overview" in the bold format, in the navigation bar as this * Highlight "Overview" in the strong format, in the navigation bar as this
* is the overview page. * is the overview page.
*/ */
protected void navLinkContents() { protected void navLinkContents() {
navCellRevStart(); navCellRevStart();
fontStyle("NavBarFont1Rev"); fontStyle("NavBarFont1Rev");
boldText("doclet.Overview"); strongText("doclet.Overview");
fontEnd(); fontEnd();
navCellEnd(); navCellEnd();
} }

View File

@ -96,12 +96,12 @@ public abstract class AbstractTreeWriter extends HtmlDocletWriter {
* @param list list of the sub-classes at this level. * @param list list of the sub-classes at this level.
* @param isEnum true if we are generating a tree for enums. * @param isEnum true if we are generating a tree for enums.
*/ */
protected void generateLevelInfo(ClassDoc parent, List list, protected void generateLevelInfo(ClassDoc parent, List<ClassDoc> list,
boolean isEnum) { boolean isEnum) {
if (list.size() > 0) { if (list.size() > 0) {
ul(); ul();
for (int i = 0; i < list.size(); i++) { for (int i = 0; i < list.size(); i++) {
ClassDoc local = (ClassDoc)list.get(i); ClassDoc local = list.get(i);
printPartialInfo(local); printPartialInfo(local);
printExtendsImplements(parent, local); printExtendsImplements(parent, local);
generateLevelInfo(local, classtree.subs(local, isEnum), generateLevelInfo(local, classtree.subs(local, isEnum),
@ -119,9 +119,9 @@ public abstract class AbstractTreeWriter extends HtmlDocletWriter {
* other classes in this run will derive from these classes. * other classes in this run will derive from these classes.
* @param heading Heading for the tree. * @param heading Heading for the tree.
*/ */
protected void generateTree(List list, String heading) { protected void generateTree(List<ClassDoc> list, String heading) {
if (list.size() > 0) { if (list.size() > 0) {
ClassDoc firstClassDoc = (ClassDoc)list.get(0); ClassDoc firstClassDoc = list.get(0);
printTreeHeading(heading); printTreeHeading(heading);
generateLevelInfo(!firstClassDoc.isInterface()? firstClassDoc : null, generateLevelInfo(!firstClassDoc.isInterface()? firstClassDoc : null,
list, list,
@ -173,7 +173,7 @@ public abstract class AbstractTreeWriter extends HtmlDocletWriter {
*/ */
protected void printPartialInfo(ClassDoc cd) { protected void printPartialInfo(ClassDoc cd) {
li("circle"); li("circle");
printPreQualifiedBoldClassLink(LinkInfoImpl.CONTEXT_TREE, cd); printPreQualifiedStrongClassLink(LinkInfoImpl.CONTEXT_TREE, cd);
} }
/** /**
@ -193,7 +193,7 @@ public abstract class AbstractTreeWriter extends HtmlDocletWriter {
protected void navLinkTree() { protected void navLinkTree() {
navCellRevStart(); navCellRevStart();
fontStyle("NavBarFont1Rev"); fontStyle("NavBarFont1Rev");
boldText("doclet.Tree"); strongText("doclet.Tree");
fontEnd(); fontEnd();
navCellEnd(); navCellEnd();
} }

View File

@ -137,9 +137,9 @@ public class AllClassesFrameWriter extends HtmlDocletWriter {
* @param classlist Sorted list of classes. * @param classlist Sorted list of classes.
* @param wantFrames True if we want frames. * @param wantFrames True if we want frames.
*/ */
protected void generateContents(List classlist, boolean wantFrames) { protected void generateContents(List<Doc> classlist, boolean wantFrames) {
for (int i = 0; i < classlist.size(); i++) { for (int i = 0; i < classlist.size(); i++) {
ClassDoc cd = (ClassDoc)(classlist.get(i)); ClassDoc cd = (ClassDoc)classlist.get(i);
if (!Util.isCoreClass(cd)) { if (!Util.isCoreClass(cd)) {
continue; continue;
} }
@ -160,7 +160,7 @@ public class AllClassesFrameWriter extends HtmlDocletWriter {
*/ */
protected void printAllClassesTableHeader() { protected void printAllClassesTableHeader() {
fontSizeStyle("+1", "FrameHeadingFont"); fontSizeStyle("+1", "FrameHeadingFont");
boldText("doclet.All_Classes"); strongText("doclet.All_Classes");
fontEnd(); fontEnd();
br(); br();
table(); table();

View File

@ -65,7 +65,7 @@ public class AnnotationTypeOptionalMemberWriterImpl extends
public void writeDefaultValueInfo(MemberDoc member) { public void writeDefaultValueInfo(MemberDoc member) {
writer.dl(); writer.dl();
writer.dt(); writer.dt();
writer.bold(ConfigurationImpl.getInstance(). writer.strong(ConfigurationImpl.getInstance().
getText("doclet.Default")); getText("doclet.Default"));
writer.dd(); writer.dd();
writer.print(((AnnotationTypeElementDoc) member).defaultValue()); writer.print(((AnnotationTypeElementDoc) member).defaultValue());
@ -84,7 +84,7 @@ public class AnnotationTypeOptionalMemberWriterImpl extends
* {@inheritDoc} * {@inheritDoc}
*/ */
public void printSummaryLabel(ClassDoc cd) { public void printSummaryLabel(ClassDoc cd) {
writer.boldText("doclet.Annotation_Type_Optional_Member_Summary"); writer.strongText("doclet.Annotation_Type_Optional_Member_Summary");
} }
/** /**

View File

@ -131,7 +131,7 @@ public class AnnotationTypeRequiredMemberWriterImpl extends AbstractMemberWriter
if (configuration().linksource) { if (configuration().linksource) {
writer.printSrcLink(member, member.name()); writer.printSrcLink(member, member.name());
} else { } else {
bold(member.name()); strong(member.name());
} }
writer.preEnd(); writer.preEnd();
writer.dl(); writer.dl();
@ -183,7 +183,7 @@ public class AnnotationTypeRequiredMemberWriterImpl extends AbstractMemberWriter
* {@inheritDoc} * {@inheritDoc}
*/ */
public void printSummaryLabel(ClassDoc cd) { public void printSummaryLabel(ClassDoc cd) {
writer.boldText("doclet.Annotation_Type_Required_Member_Summary"); writer.strongText("doclet.Annotation_Type_Required_Member_Summary");
} }
/** /**
@ -210,9 +210,9 @@ public class AnnotationTypeRequiredMemberWriterImpl extends AbstractMemberWriter
* {@inheritDoc} * {@inheritDoc}
*/ */
protected void writeSummaryLink(int context, ClassDoc cd, ProgramElementDoc member) { protected void writeSummaryLink(int context, ClassDoc cd, ProgramElementDoc member) {
writer.bold(); writer.strong();
writer.printDocLink(context, (MemberDoc) member, member.name(), false); writer.printDocLink(context, (MemberDoc) member, member.name(), false);
writer.boldEnd(); writer.strongEnd();
} }
/** /**

View File

@ -84,7 +84,7 @@ public class AnnotationTypeWriterImpl extends SubWriterHolderWriter
protected void navLinkClass() { protected void navLinkClass() {
navCellRevStart(); navCellRevStart();
fontStyle("NavBarFont1Rev"); fontStyle("NavBarFont1Rev");
boldText("doclet.Class"); strongText("doclet.Class");
fontEnd(); fontEnd();
navCellEnd(); navCellEnd();
} }
@ -176,7 +176,7 @@ public class AnnotationTypeWriterImpl extends SubWriterHolderWriter
if (configuration().linksource) { if (configuration().linksource) {
printSrcLink(annotationType, name); printSrcLink(annotationType, name);
} else { } else {
bold(name); strong(name);
} }
dlEnd(); dlEnd();
preEnd(); preEnd();
@ -220,7 +220,7 @@ public class AnnotationTypeWriterImpl extends SubWriterHolderWriter
hr(); hr();
Tag[] deprs = annotationType.tags("deprecated"); Tag[] deprs = annotationType.tags("deprecated");
if (Util.isDeprecated(annotationType)) { if (Util.isDeprecated(annotationType)) {
boldText("doclet.Deprecated"); strongText("doclet.Deprecated");
if (deprs.length > 0) { if (deprs.length > 0) {
Tag[] commentTags = deprs[0].inlineTags(); Tag[] commentTags = deprs[0].inlineTags();
if (commentTags.length > 0) { if (commentTags.length > 0) {
@ -330,9 +330,9 @@ public class AnnotationTypeWriterImpl extends SubWriterHolderWriter
dl(); dl();
dt(); dt();
if (annotationType.isInterface()) { if (annotationType.isInterface()) {
boldText("doclet.Enclosing_Interface"); strongText("doclet.Enclosing_Interface");
} else { } else {
boldText("doclet.Enclosing_Class"); strongText("doclet.Enclosing_Class");
} }
dd(); dd();
printLink(new LinkInfoImpl(LinkInfoImpl.CONTEXT_CLASS, outerClass, printLink(new LinkInfoImpl(LinkInfoImpl.CONTEXT_CLASS, outerClass,

View File

@ -38,7 +38,7 @@ import java.util.*;
public class ClassUseWriter extends SubWriterHolderWriter { public class ClassUseWriter extends SubWriterHolderWriter {
final ClassDoc classdoc; final ClassDoc classdoc;
Set pkgToPackageAnnotations = null; Set<PackageDoc> pkgToPackageAnnotations = null;
final Map<String,List<ProgramElementDoc>> pkgToClassTypeParameter; final Map<String,List<ProgramElementDoc>> pkgToClassTypeParameter;
final Map<String,List<ProgramElementDoc>> pkgToClassAnnotations; final Map<String,List<ProgramElementDoc>> pkgToClassAnnotations;
final Map<String,List<ProgramElementDoc>> pkgToMethodTypeParameter; final Map<String,List<ProgramElementDoc>> pkgToMethodTypeParameter;
@ -220,8 +220,8 @@ public class ClassUseWriter extends SubWriterHolderWriter {
false))); false)));
tableHeaderEnd(); tableHeaderEnd();
for (Iterator it = pkgSet.iterator(); it.hasNext();) { for (Iterator<PackageDoc> it = pkgSet.iterator(); it.hasNext();) {
PackageDoc pkg = (PackageDoc)it.next(); PackageDoc pkg = it.next();
generatePackageUse(pkg); generatePackageUse(pkg);
} }
tableEnd(); tableEnd();
@ -240,8 +240,8 @@ public class ClassUseWriter extends SubWriterHolderWriter {
getLink(new LinkInfoImpl(LinkInfoImpl.CONTEXT_CLASS_USE_HEADER, classdoc, getLink(new LinkInfoImpl(LinkInfoImpl.CONTEXT_CLASS_USE_HEADER, classdoc,
false))); false)));
tableHeaderEnd(); tableHeaderEnd();
for (Iterator it = pkgToPackageAnnotations.iterator(); it.hasNext();) { for (Iterator<PackageDoc> it = pkgToPackageAnnotations.iterator(); it.hasNext();) {
PackageDoc pkg = (PackageDoc)it.next(); PackageDoc pkg = it.next();
trBgcolorStyle("white", "TableRowColor"); trBgcolorStyle("white", "TableRowColor");
summaryRow(0); summaryRow(0);
//Just want an anchor here. //Just want an anchor here.
@ -259,8 +259,8 @@ public class ClassUseWriter extends SubWriterHolderWriter {
} }
protected void generateClassList() throws IOException { protected void generateClassList() throws IOException {
for (Iterator it = pkgSet.iterator(); it.hasNext();) { for (Iterator<PackageDoc> it = pkgSet.iterator(); it.hasNext();) {
PackageDoc pkg = (PackageDoc)it.next(); PackageDoc pkg = it.next();
anchor(pkg.name()); anchor(pkg.name());
tableIndexSummary(); tableIndexSummary();
tableHeaderStart("#CCCCFF"); tableHeaderStart("#CCCCFF");
@ -394,7 +394,7 @@ public class ClassUseWriter extends SubWriterHolderWriter {
hr(); hr();
center(); center();
h2(); h2();
boldText("doclet.ClassUse_Title", cltype, clname); strongText("doclet.ClassUse_Title", cltype, clname);
h2End(); h2End();
centerEnd(); centerEnd();
} }
@ -436,7 +436,7 @@ public class ClassUseWriter extends SubWriterHolderWriter {
protected void navLinkClassUse() { protected void navLinkClassUse() {
navCellRevStart(); navCellRevStart();
fontStyle("NavBarFont1Rev"); fontStyle("NavBarFont1Rev");
boldText("doclet.navClassUse"); strongText("doclet.navClassUse");
fontEnd(); fontEnd();
navCellEnd(); navCellEnd();
} }

View File

@ -91,7 +91,7 @@ public class ClassWriterImpl extends SubWriterHolderWriter
protected void navLinkClass() { protected void navLinkClass() {
navCellRevStart(); navCellRevStart();
fontStyle("NavBarFont1Rev"); fontStyle("NavBarFont1Rev");
boldText("doclet.Class"); strongText("doclet.Class");
fontEnd(); fontEnd();
navCellEnd(); navCellEnd();
} }
@ -185,7 +185,7 @@ public class ClassWriterImpl extends SubWriterHolderWriter
if (configuration().linksource) { if (configuration().linksource) {
printSrcLink(classDoc, name); printSrcLink(classDoc, name);
} else { } else {
bold(name); strong(name);
} }
if (!isInterface) { if (!isInterface) {
Type superclass = Util.getFirstVisibleSuperClass(classDoc, Type superclass = Util.getFirstVisibleSuperClass(classDoc,
@ -258,7 +258,7 @@ public class ClassWriterImpl extends SubWriterHolderWriter
hr(); hr();
Tag[] deprs = classDoc.tags("deprecated"); Tag[] deprs = classDoc.tags("deprecated");
if (Util.isDeprecated(classDoc)) { if (Util.isDeprecated(classDoc)) {
boldText("doclet.Deprecated"); strongText("doclet.Deprecated");
if (deprs.length > 0) { if (deprs.length > 0) {
Tag[] commentTags = deprs[0].inlineTags(); Tag[] commentTags = deprs[0].inlineTags();
if (commentTags.length > 0) { if (commentTags.length > 0) {
@ -307,9 +307,9 @@ public class ClassWriterImpl extends SubWriterHolderWriter
classDoc, false)); classDoc, false));
if (configuration.shouldExcludeQualifier( if (configuration.shouldExcludeQualifier(
classDoc.containingPackage().name())) { classDoc.containingPackage().name())) {
bold(type.asClassDoc().name() + typeParameters); strong(type.asClassDoc().name() + typeParameters);
} else { } else {
bold(type.asClassDoc().qualifiedName() + typeParameters); strong(type.asClassDoc().qualifiedName() + typeParameters);
} }
} else { } else {
print(getLink(new LinkInfoImpl(LinkInfoImpl.CONTEXT_CLASS_TREE_PARENT, print(getLink(new LinkInfoImpl(LinkInfoImpl.CONTEXT_CLASS_TREE_PARENT,
@ -355,11 +355,11 @@ public class ClassWriterImpl extends SubWriterHolderWriter
classDoc.qualifiedName().equals("org.omg.CORBA.Object")) { classDoc.qualifiedName().equals("org.omg.CORBA.Object")) {
return; // Don't generate the list, too huge return; // Don't generate the list, too huge
} }
List subclasses = classtree.subs(classDoc, false); List<ClassDoc> subclasses = classtree.subs(classDoc, false);
if (subclasses.size() > 0) { if (subclasses.size() > 0) {
dl(); dl();
dt(); dt();
boldText("doclet.Subclasses"); strongText("doclet.Subclasses");
writeClassLinks(LinkInfoImpl.CONTEXT_SUBCLASSES, writeClassLinks(LinkInfoImpl.CONTEXT_SUBCLASSES,
subclasses); subclasses);
} }
@ -371,11 +371,11 @@ public class ClassWriterImpl extends SubWriterHolderWriter
*/ */
public void writeSubInterfacesInfo() { public void writeSubInterfacesInfo() {
if (classDoc.isInterface()) { if (classDoc.isInterface()) {
List subInterfaces = classtree.allSubs(classDoc, false); List<ClassDoc> subInterfaces = classtree.allSubs(classDoc, false);
if (subInterfaces.size() > 0) { if (subInterfaces.size() > 0) {
dl(); dl();
dt(); dt();
boldText("doclet.Subinterfaces"); strongText("doclet.Subinterfaces");
writeClassLinks(LinkInfoImpl.CONTEXT_SUBINTERFACES, writeClassLinks(LinkInfoImpl.CONTEXT_SUBINTERFACES,
subInterfaces); subInterfaces);
} }
@ -393,11 +393,11 @@ public class ClassWriterImpl extends SubWriterHolderWriter
classDoc.qualifiedName().equals("java.io.Serializable")) { classDoc.qualifiedName().equals("java.io.Serializable")) {
return; // Don't generate the list, too big return; // Don't generate the list, too big
} }
List implcl = classtree.implementingclasses(classDoc); List<ClassDoc> implcl = classtree.implementingclasses(classDoc);
if (implcl.size() > 0) { if (implcl.size() > 0) {
dl(); dl();
dt(); dt();
boldText("doclet.Implementing_Classes"); strongText("doclet.Implementing_Classes");
writeClassLinks(LinkInfoImpl.CONTEXT_IMPLEMENTED_CLASSES, writeClassLinks(LinkInfoImpl.CONTEXT_IMPLEMENTED_CLASSES,
implcl); implcl);
} }
@ -409,11 +409,11 @@ public class ClassWriterImpl extends SubWriterHolderWriter
public void writeImplementedInterfacesInfo() { public void writeImplementedInterfacesInfo() {
//NOTE: we really should be using ClassDoc.interfaceTypes() here, but //NOTE: we really should be using ClassDoc.interfaceTypes() here, but
// it doesn't walk up the tree like we want it to. // it doesn't walk up the tree like we want it to.
List interfaceArray = Util.getAllInterfaces(classDoc, configuration); List<Type> interfaceArray = Util.getAllInterfaces(classDoc, configuration);
if (classDoc.isClass() && interfaceArray.size() > 0) { if (classDoc.isClass() && interfaceArray.size() > 0) {
dl(); dl();
dt(); dt();
boldText("doclet.All_Implemented_Interfaces"); strongText("doclet.All_Implemented_Interfaces");
writeClassLinks(LinkInfoImpl.CONTEXT_IMPLEMENTED_INTERFACES, writeClassLinks(LinkInfoImpl.CONTEXT_IMPLEMENTED_INTERFACES,
interfaceArray); interfaceArray);
} }
@ -425,11 +425,11 @@ public class ClassWriterImpl extends SubWriterHolderWriter
public void writeSuperInterfacesInfo() { public void writeSuperInterfacesInfo() {
//NOTE: we really should be using ClassDoc.interfaceTypes() here, but //NOTE: we really should be using ClassDoc.interfaceTypes() here, but
// it doesn't walk up the tree like we want it to. // it doesn't walk up the tree like we want it to.
List interfaceArray = Util.getAllInterfaces(classDoc, configuration); List<Type> interfaceArray = Util.getAllInterfaces(classDoc, configuration);
if (classDoc.isInterface() && interfaceArray.size() > 0) { if (classDoc.isInterface() && interfaceArray.size() > 0) {
dl(); dl();
dt(); dt();
boldText("doclet.All_Superinterfaces"); strongText("doclet.All_Superinterfaces");
writeClassLinks(LinkInfoImpl.CONTEXT_SUPER_INTERFACES, writeClassLinks(LinkInfoImpl.CONTEXT_SUPER_INTERFACES,
interfaceArray); interfaceArray);
} }
@ -438,7 +438,7 @@ public class ClassWriterImpl extends SubWriterHolderWriter
/** /**
* Generate links to the given classes. * Generate links to the given classes.
*/ */
private void writeClassLinks(int context, List list) { private void writeClassLinks(int context, List<?> list) {
Object[] typeList = list.toArray(); Object[] typeList = list.toArray();
//Sort the list to be printed. //Sort the list to be printed.
print(' '); print(' ');
@ -570,9 +570,9 @@ public class ClassWriterImpl extends SubWriterHolderWriter
dl(); dl();
dt(); dt();
if (outerClass.isInterface()) { if (outerClass.isInterface()) {
boldText("doclet.Enclosing_Interface"); strongText("doclet.Enclosing_Interface");
} else { } else {
boldText("doclet.Enclosing_Class"); strongText("doclet.Enclosing_Class");
} }
dd(); dd();
printLink(new LinkInfoImpl(LinkInfoImpl.CONTEXT_CLASS, outerClass, printLink(new LinkInfoImpl(LinkInfoImpl.CONTEXT_CLASS, outerClass,

View File

@ -92,7 +92,7 @@ public class ConstantsSummaryWriterImpl extends HtmlDocletWriter
* {@inheritDoc} * {@inheritDoc}
*/ */
public void writeContentsHeader() { public void writeContentsHeader() {
bold(configuration.getText("doclet.Contents")); strong(configuration.getText("doclet.Contents"));
ul(); ul();
} }
@ -194,10 +194,10 @@ public class ConstantsSummaryWriterImpl extends HtmlDocletWriter
/** /**
* {@inheritDoc} * {@inheritDoc}
*/ */
public void writeConstantMembers(ClassDoc cd, List fields) { public void writeConstantMembers(ClassDoc cd, List<FieldDoc> fields) {
currentClassDoc = cd; currentClassDoc = cd;
for (int i = 0; i < fields.size(); ++i) { for (int i = 0; i < fields.size(); ++i) {
writeConstantMember((FieldDoc)(fields.get(i))); writeConstantMember(fields.get(i));
} }
} }

View File

@ -144,7 +144,7 @@ public class ConstructorWriterImpl extends AbstractExecutableMemberWriter
if (configuration().linksource) { if (configuration().linksource) {
writer.printSrcLink(constructor, constructor.name()); writer.printSrcLink(constructor, constructor.name());
} else { } else {
bold(constructor.name()); strong(constructor.name());
} }
writeParameters(constructor); writeParameters(constructor);
writeExceptions(constructor); writeExceptions(constructor);
@ -220,7 +220,7 @@ public class ConstructorWriterImpl extends AbstractExecutableMemberWriter
} }
public void printSummaryLabel(ClassDoc cd) { public void printSummaryLabel(ClassDoc cd) {
writer.boldText("doclet.Constructor_Summary"); writer.strongText("doclet.Constructor_Summary");
} }
public void printSummaryAnchor(ClassDoc cd) { public void printSummaryAnchor(ClassDoc cd) {
@ -238,7 +238,7 @@ public class ConstructorWriterImpl extends AbstractExecutableMemberWriter
return VisibleMemberMap.CONSTRUCTORS; return VisibleMemberMap.CONSTRUCTORS;
} }
protected void navSummaryLink(List members) { protected void navSummaryLink(List<?> members) {
printNavSummaryLink(classdoc, printNavSummaryLink(classdoc,
members.size() > 0? true: false); members.size() > 0? true: false);
} }

View File

@ -111,7 +111,7 @@ public class DeprecatedListWriter extends SubWriterHolderWriter {
throws IOException { throws IOException {
writeHeader(); writeHeader();
bold(configuration.getText("doclet.Contents")); strong(configuration.getText("doclet.Contents"));
ul(); ul();
for (int i = 0; i < DeprecatedAPIListBuilder.NUM_TYPES; i++) { for (int i = 0; i < DeprecatedAPIListBuilder.NUM_TYPES; i++) {
writeIndexLink(deprapi, i); writeIndexLink(deprapi, i);
@ -156,7 +156,7 @@ public class DeprecatedListWriter extends SubWriterHolderWriter {
hr(); hr();
center(); center();
h2(); h2();
boldText("doclet.Deprecated_API"); strongText("doclet.Deprecated_API");
h2End(); h2End();
centerEnd(); centerEnd();
@ -180,7 +180,7 @@ public class DeprecatedListWriter extends SubWriterHolderWriter {
protected void navLinkDeprecated() { protected void navLinkDeprecated() {
navCellRevStart(); navCellRevStart();
fontStyle("NavBarFont1Rev"); fontStyle("NavBarFont1Rev");
boldText("doclet.navDeprecated"); strongText("doclet.navDeprecated");
fontEnd(); fontEnd();
navCellEnd(); navCellEnd();
} }

View File

@ -143,7 +143,7 @@ public class EnumConstantWriterImpl extends AbstractMemberWriter
if (configuration().linksource) { if (configuration().linksource) {
writer.printSrcLink(enumConstant, enumConstant.name()); writer.printSrcLink(enumConstant, enumConstant.name());
} else { } else {
bold(enumConstant.name()); strong(enumConstant.name());
} }
writer.preEnd(); writer.preEnd();
writer.dl(); writer.dl();
@ -201,7 +201,7 @@ public class EnumConstantWriterImpl extends AbstractMemberWriter
} }
public void printSummaryLabel(ClassDoc cd) { public void printSummaryLabel(ClassDoc cd) {
writer.boldText("doclet.Enum_Constant_Summary"); writer.strongText("doclet.Enum_Constant_Summary");
} }
public void printSummaryAnchor(ClassDoc cd) { public void printSummaryAnchor(ClassDoc cd) {
@ -216,9 +216,9 @@ public class EnumConstantWriterImpl extends AbstractMemberWriter
} }
protected void writeSummaryLink(int context, ClassDoc cd, ProgramElementDoc member) { protected void writeSummaryLink(int context, ClassDoc cd, ProgramElementDoc member) {
writer.bold(); writer.strong();
writer.printDocLink(context, (MemberDoc) member, member.name(), false); writer.printDocLink(context, (MemberDoc) member, member.name(), false);
writer.boldEnd(); writer.strongEnd();
} }
protected void writeInheritedSummaryLink(ClassDoc cd, protected void writeInheritedSummaryLink(ClassDoc cd,

View File

@ -153,7 +153,7 @@ public class FieldWriterImpl extends AbstractMemberWriter
if (configuration().linksource) { if (configuration().linksource) {
writer.printSrcLink(field, field.name()); writer.printSrcLink(field, field.name());
} else { } else {
bold(field.name()); strong(field.name());
} }
writer.preEnd(); writer.preEnd();
writer.dl(); writer.dl();
@ -190,7 +190,7 @@ public class FieldWriterImpl extends AbstractMemberWriter
holder.typeName() : holder.qualifiedTypeName(), holder.typeName() : holder.qualifiedTypeName(),
false)); false));
writer.dd(); writer.dd();
writer.bold(configuration().getText(holder.isClass()? writer.strong(configuration().getText(holder.isClass()?
"doclet.Description_From_Class" : "doclet.Description_From_Class" :
"doclet.Description_From_Interface", classlink)); "doclet.Description_From_Interface", classlink));
writer.ddEnd(); writer.ddEnd();
@ -237,7 +237,7 @@ public class FieldWriterImpl extends AbstractMemberWriter
} }
public void printSummaryLabel(ClassDoc cd) { public void printSummaryLabel(ClassDoc cd) {
writer.boldText("doclet.Field_Summary"); writer.strongText("doclet.Field_Summary");
} }
public void printSummaryAnchor(ClassDoc cd) { public void printSummaryAnchor(ClassDoc cd) {
@ -251,18 +251,18 @@ public class FieldWriterImpl extends AbstractMemberWriter
public void printInheritedSummaryLabel(ClassDoc cd) { public void printInheritedSummaryLabel(ClassDoc cd) {
String classlink = writer.getPreQualifiedClassLink( String classlink = writer.getPreQualifiedClassLink(
LinkInfoImpl.CONTEXT_MEMBER, cd, false); LinkInfoImpl.CONTEXT_MEMBER, cd, false);
writer.bold(); writer.strong();
String key = cd.isClass()? String key = cd.isClass()?
"doclet.Fields_Inherited_From_Class" : "doclet.Fields_Inherited_From_Class" :
"doclet.Fields_Inherited_From_Interface"; "doclet.Fields_Inherited_From_Interface";
writer.printText(key, classlink); writer.printText(key, classlink);
writer.boldEnd(); writer.strongEnd();
} }
protected void writeSummaryLink(int context, ClassDoc cd, ProgramElementDoc member) { protected void writeSummaryLink(int context, ClassDoc cd, ProgramElementDoc member) {
writer.bold(); writer.strong();
writer.printDocLink(context, cd , (MemberDoc) member, member.name(), false); writer.printDocLink(context, cd , (MemberDoc) member, member.name(), false);
writer.boldEnd(); writer.strongEnd();
} }
protected void writeInheritedSummaryLink(ClassDoc cd, protected void writeInheritedSummaryLink(ClassDoc cd,

View File

@ -223,7 +223,7 @@ public class HelpWriter extends HtmlDocletWriter {
protected void navLinkHelp() { protected void navLinkHelp() {
navCellRevStart(); navCellRevStart();
fontStyle("NavBarFont1Rev"); fontStyle("NavBarFont1Rev");
boldText("doclet.Help"); strongText("doclet.Help");
fontEnd(); fontEnd();
navCellEnd(); navCellEnd();
} }

View File

@ -183,21 +183,21 @@ public class HtmlDocletWriter extends HtmlDocWriter {
* @param where Position in the file * @param where Position in the file
* @param target Name of the target frame. * @param target Name of the target frame.
* @param label Tag for the link. * @param label Tag for the link.
* @param bold Whether the label should be bold or not? * @param strong Whether the label should be strong or not?
*/ */
public void printNoFramesTargetHyperLink(String link, String where, public void printNoFramesTargetHyperLink(String link, String where,
String target, String label, String target, String label,
boolean bold) { boolean strong) {
script(); script();
println(" <!--"); println(" <!--");
println(" if(window==top) {"); println(" if(window==top) {");
println(" document.writeln('" println(" document.writeln('"
+ getHyperLink(link, where, label, bold, "", "", target) + "');"); + getHyperLink(link, where, label, strong, "", "", target) + "');");
println(" }"); println(" }");
println(" //-->"); println(" //-->");
scriptEnd(); scriptEnd();
noScript(); noScript();
println(" " + getHyperLink(link, where, label, bold, "", "", target)); println(" " + getHyperLink(link, where, label, strong, "", "", target));
noScriptEnd(); noScriptEnd();
println(DocletConstants.NL); println(DocletConstants.NL);
} }
@ -958,10 +958,10 @@ public class HtmlDocletWriter extends HtmlDocWriter {
* *
* @param pkg the package to link to. * @param pkg the package to link to.
* @param label the label for the link. * @param label the label for the link.
* @param isBold true if the label should be bold. * @param isStrong true if the label should be strong.
*/ */
public void printPackageLink(PackageDoc pkg, String label, boolean isBold) { public void printPackageLink(PackageDoc pkg, String label, boolean isStrong) {
print(getPackageLink(pkg, label, isBold)); print(getPackageLink(pkg, label, isStrong));
} }
/** /**
@ -969,12 +969,12 @@ public class HtmlDocletWriter extends HtmlDocWriter {
* *
* @param pkg the package to link to. * @param pkg the package to link to.
* @param label the label for the link. * @param label the label for the link.
* @param isBold true if the label should be bold. * @param isStrong true if the label should be strong.
* @param style the font of the package link label. * @param style the font of the package link label.
*/ */
public void printPackageLink(PackageDoc pkg, String label, boolean isBold, public void printPackageLink(PackageDoc pkg, String label, boolean isStrong,
String style) { String style) {
print(getPackageLink(pkg, label, isBold, style)); print(getPackageLink(pkg, label, isStrong, style));
} }
/** /**
@ -982,12 +982,12 @@ public class HtmlDocletWriter extends HtmlDocWriter {
* *
* @param pkg the package to link to. * @param pkg the package to link to.
* @param label the label for the link. * @param label the label for the link.
* @param isBold true if the label should be bold. * @param isStrong true if the label should be strong.
* @return the link to the given package. * @return the link to the given package.
*/ */
public String getPackageLink(PackageDoc pkg, String label, public String getPackageLink(PackageDoc pkg, String label,
boolean isBold) { boolean isStrong) {
return getPackageLink(pkg, label, isBold, ""); return getPackageLink(pkg, label, isStrong, "");
} }
/** /**
@ -995,11 +995,11 @@ public class HtmlDocletWriter extends HtmlDocWriter {
* *
* @param pkg the package to link to. * @param pkg the package to link to.
* @param label the label for the link. * @param label the label for the link.
* @param isBold true if the label should be bold. * @param isStrong true if the label should be strong.
* @param style the font of the package link label. * @param style the font of the package link label.
* @return the link to the given package. * @return the link to the given package.
*/ */
public String getPackageLink(PackageDoc pkg, String label, boolean isBold, public String getPackageLink(PackageDoc pkg, String label, boolean isStrong,
String style) { String style) {
boolean included = pkg != null && pkg.isIncluded(); boolean included = pkg != null && pkg.isIncluded();
if (! included) { if (! included) {
@ -1013,11 +1013,11 @@ public class HtmlDocletWriter extends HtmlDocWriter {
} }
if (included || pkg == null) { if (included || pkg == null) {
return getHyperLink(pathString(pkg, "package-summary.html"), return getHyperLink(pathString(pkg, "package-summary.html"),
"", label, isBold, style); "", label, isStrong, style);
} else { } else {
String crossPkgLink = getCrossPackageLink(Util.getPackageName(pkg)); String crossPkgLink = getCrossPackageLink(Util.getPackageName(pkg));
if (crossPkgLink != null) { if (crossPkgLink != null) {
return getHyperLink(crossPkgLink, "", label, isBold, style); return getHyperLink(crossPkgLink, "", label, isStrong, style);
} else { } else {
return label; return label;
} }
@ -1087,12 +1087,12 @@ public class HtmlDocletWriter extends HtmlDocWriter {
* @param refMemName the name of the member being referenced. This should * @param refMemName the name of the member being referenced. This should
* be null or empty string if no member is being referenced. * be null or empty string if no member is being referenced.
* @param label the label for the external link. * @param label the label for the external link.
* @param bold true if the link should be bold. * @param strong true if the link should be strong.
* @param style the style of the link. * @param style the style of the link.
* @param code true if the label should be code font. * @param code true if the label should be code font.
*/ */
public String getCrossClassLink(String qualifiedClassName, String refMemName, public String getCrossClassLink(String qualifiedClassName, String refMemName,
String label, boolean bold, String style, String label, boolean strong, String style,
boolean code) { boolean code) {
String className = "", String className = "",
packageName = qualifiedClassName == null ? "" : qualifiedClassName; packageName = qualifiedClassName == null ? "" : qualifiedClassName;
@ -1113,7 +1113,7 @@ public class HtmlDocletWriter extends HtmlDocWriter {
className + ".html?is-external=true"), className + ".html?is-external=true"),
refMemName == null ? "" : refMemName, refMemName == null ? "" : refMemName,
label == null || label.length() == 0 ? defaultLabel : label, label == null || label.length() == 0 ? defaultLabel : label,
bold, style, strong, style,
configuration.getText("doclet.Href_Class_Or_Interface_Title", packageName), configuration.getText("doclet.Href_Class_Or_Interface_Title", packageName),
""); "");
} }
@ -1152,26 +1152,26 @@ public class HtmlDocletWriter extends HtmlDocWriter {
* link label. * link label.
* *
* @param cd the class to link to. * @param cd the class to link to.
* @param isBold true if the link should be bold. * @param isStrong true if the link should be strong.
* @return the link with the package portion of the label in plain text. * @return the link with the package portion of the label in plain text.
*/ */
public String getPreQualifiedClassLink(int context, public String getPreQualifiedClassLink(int context,
ClassDoc cd, boolean isBold) { ClassDoc cd, boolean isStrong) {
String classlink = ""; String classlink = "";
PackageDoc pd = cd.containingPackage(); PackageDoc pd = cd.containingPackage();
if(pd != null && ! configuration.shouldExcludeQualifier(pd.name())) { if(pd != null && ! configuration.shouldExcludeQualifier(pd.name())) {
classlink = getPkgName(cd); classlink = getPkgName(cd);
} }
classlink += getLink(new LinkInfoImpl(context, cd, cd.name(), isBold)); classlink += getLink(new LinkInfoImpl(context, cd, cd.name(), isStrong));
return classlink; return classlink;
} }
/** /**
* Print Class link, with only class name as the bold link and prefixing * Print Class link, with only class name as the strong link and prefixing
* plain package name. * plain package name.
*/ */
public void printPreQualifiedBoldClassLink(int context, ClassDoc cd) { public void printPreQualifiedStrongClassLink(int context, ClassDoc cd) {
print(getPreQualifiedClassLink(context, cd, true)); print(getPreQualifiedClassLink(context, cd, true));
} }
@ -1187,16 +1187,16 @@ public class HtmlDocletWriter extends HtmlDocWriter {
print(configuration.getText(key, a1, a2)); print(configuration.getText(key, a1, a2));
} }
public void boldText(String key) { public void strongText(String key) {
bold(configuration.getText(key)); strong(configuration.getText(key));
} }
public void boldText(String key, String a1) { public void strongText(String key, String a1) {
bold(configuration.getText(key, a1)); strong(configuration.getText(key, a1));
} }
public void boldText(String key, String a1, String a2) { public void strongText(String key, String a1, String a2) {
bold(configuration.getText(key, a1, a2)); strong(configuration.getText(key, a1, a2));
} }
/** /**
@ -1205,11 +1205,11 @@ public class HtmlDocletWriter extends HtmlDocWriter {
* @param context the id of the context where the link will be printed. * @param context the id of the context where the link will be printed.
* @param doc the member being linked to. * @param doc the member being linked to.
* @param label the label for the link. * @param label the label for the link.
* @param bold true if the link should be bold. * @param strong true if the link should be strong.
*/ */
public void printDocLink(int context, MemberDoc doc, String label, public void printDocLink(int context, MemberDoc doc, String label,
boolean bold) { boolean strong) {
print(getDocLink(context, doc, label, bold)); print(getDocLink(context, doc, label, strong));
} }
/** /**
@ -1221,11 +1221,11 @@ public class HtmlDocletWriter extends HtmlDocWriter {
* inheriting comments. * inheriting comments.
* @param doc the member being linked to. * @param doc the member being linked to.
* @param label the label for the link. * @param label the label for the link.
* @param bold true if the link should be bold. * @param strong true if the link should be strong.
*/ */
public void printDocLink(int context, ClassDoc classDoc, MemberDoc doc, public void printDocLink(int context, ClassDoc classDoc, MemberDoc doc,
String label, boolean bold) { String label, boolean strong) {
print(getDocLink(context, classDoc, doc, label, bold)); print(getDocLink(context, classDoc, doc, label, strong));
} }
/** /**
@ -1234,12 +1234,12 @@ public class HtmlDocletWriter extends HtmlDocWriter {
* @param context the id of the context where the link will be printed. * @param context the id of the context where the link will be printed.
* @param doc the member being linked to. * @param doc the member being linked to.
* @param label the label for the link. * @param label the label for the link.
* @param bold true if the link should be bold. * @param strong true if the link should be strong.
* @return the link for the given member. * @return the link for the given member.
*/ */
public String getDocLink(int context, MemberDoc doc, String label, public String getDocLink(int context, MemberDoc doc, String label,
boolean bold) { boolean strong) {
return getDocLink(context, doc.containingClass(), doc, label, bold); return getDocLink(context, doc.containingClass(), doc, label, strong);
} }
/** /**
@ -1251,21 +1251,21 @@ public class HtmlDocletWriter extends HtmlDocWriter {
* inheriting comments. * inheriting comments.
* @param doc the member being linked to. * @param doc the member being linked to.
* @param label the label for the link. * @param label the label for the link.
* @param bold true if the link should be bold. * @param strong true if the link should be strong.
* @return the link for the given member. * @return the link for the given member.
*/ */
public String getDocLink(int context, ClassDoc classDoc, MemberDoc doc, public String getDocLink(int context, ClassDoc classDoc, MemberDoc doc,
String label, boolean bold) { String label, boolean strong) {
if (! (doc.isIncluded() || if (! (doc.isIncluded() ||
Util.isLinkable(classDoc, configuration()))) { Util.isLinkable(classDoc, configuration()))) {
return label; return label;
} else if (doc instanceof ExecutableMemberDoc) { } else if (doc instanceof ExecutableMemberDoc) {
ExecutableMemberDoc emd = (ExecutableMemberDoc)doc; ExecutableMemberDoc emd = (ExecutableMemberDoc)doc;
return getLink(new LinkInfoImpl(context, classDoc, return getLink(new LinkInfoImpl(context, classDoc,
getAnchor(emd), label, bold)); getAnchor(emd), label, strong));
} else if (doc instanceof MemberDoc) { } else if (doc instanceof MemberDoc) {
return getLink(new LinkInfoImpl(context, classDoc, return getLink(new LinkInfoImpl(context, classDoc,
doc.name(), label, bold)); doc.name(), label, strong));
} else { } else {
return label; return label;
} }
@ -1728,13 +1728,13 @@ public class HtmlDocletWriter extends HtmlDocWriter {
* @param descList the array of {@link AnnotationDesc}. * @param descList the array of {@link AnnotationDesc}.
*/ */
private boolean writeAnnotationInfo(int indent, Doc doc, AnnotationDesc[] descList, boolean lineBreak) { private boolean writeAnnotationInfo(int indent, Doc doc, AnnotationDesc[] descList, boolean lineBreak) {
List annotations = getAnnotations(indent, descList, lineBreak); List<String> annotations = getAnnotations(indent, descList, lineBreak);
if (annotations.size() == 0) { if (annotations.size() == 0) {
return false; return false;
} }
fontNoNewLine("-1"); fontNoNewLine("-1");
for (Iterator iter = annotations.iterator(); iter.hasNext();) { for (Iterator<String> iter = annotations.iterator(); iter.hasNext();) {
print((String) iter.next()); print(iter.next());
} }
fontEnd(); fontEnd();
return true; return true;
@ -1792,8 +1792,8 @@ public class HtmlDocletWriter extends HtmlDocWriter {
annotationTypeValues.add(annotationValue); annotationTypeValues.add(annotationValue);
} }
annotation.append(annotationTypeValues.size() == 1 ? "" : "{"); annotation.append(annotationTypeValues.size() == 1 ? "" : "{");
for (Iterator iter = annotationTypeValues.iterator(); iter.hasNext(); ) { for (Iterator<AnnotationValue> iter = annotationTypeValues.iterator(); iter.hasNext(); ) {
annotation.append(annotationValueToString((AnnotationValue) iter.next())); annotation.append(annotationValueToString(iter.next()));
annotation.append(iter.hasNext() ? "," : ""); annotation.append(iter.hasNext() ? "," : "");
} }
annotation.append(annotationTypeValues.size() == 1 ? "" : "}"); annotation.append(annotationTypeValues.size() == 1 ? "" : "}");
@ -1820,11 +1820,11 @@ public class HtmlDocletWriter extends HtmlDocWriter {
return type.typeName() + type.dimension() + ".class"; return type.typeName() + type.dimension() + ".class";
} }
} else if (annotationValue.value() instanceof AnnotationDesc) { } else if (annotationValue.value() instanceof AnnotationDesc) {
List list = getAnnotations(0, List<String> list = getAnnotations(0,
new AnnotationDesc[]{(AnnotationDesc) annotationValue.value()}, new AnnotationDesc[]{(AnnotationDesc) annotationValue.value()},
false); false);
StringBuffer buf = new StringBuffer(); StringBuffer buf = new StringBuffer();
for (Iterator iter = list.iterator(); iter.hasNext(); ) { for (Iterator<String> iter = list.iterator(); iter.hasNext(); ) {
buf.append(iter.next()); buf.append(iter.next());
} }
return buf.toString(); return buf.toString();

View File

@ -51,7 +51,7 @@ public class HtmlSerialFieldWriter extends FieldWriterImpl
super(writer, classdoc); super(writer, classdoc);
} }
public List members(ClassDoc cd) { public List<FieldDoc> members(ClassDoc cd) {
return Util.asList(cd.serializableFields()); return Util.asList(cd.serializableFields());
} }
@ -100,7 +100,7 @@ public class HtmlSerialFieldWriter extends FieldWriterImpl
fieldType)); fieldType));
} }
print(fieldDimensions + ' '); print(fieldDimensions + ' ');
bold(fieldName); strong(fieldName);
writer.preEnd(); writer.preEnd();
writer.dl(); writer.dl();
} }

View File

@ -81,7 +81,7 @@ public class LinkFactoryImpl extends LinkFactory {
!(linkInfo.classDoc.name() + ".html").equals(m_writer.filename)) { !(linkInfo.classDoc.name() + ".html").equals(m_writer.filename)) {
linkOutput.append(m_writer.getHyperLink(filename, linkOutput.append(m_writer.getHyperLink(filename,
classLinkInfo.where, label.toString(), classLinkInfo.where, label.toString(),
classLinkInfo.isBold, classLinkInfo.styleName, classLinkInfo.isStrong, classLinkInfo.styleName,
title, classLinkInfo.target)); title, classLinkInfo.target));
if (noLabel && !classLinkInfo.excludeTypeParameterLinks) { if (noLabel && !classLinkInfo.excludeTypeParameterLinks) {
linkOutput.append(getTypeParameterLinks(linkInfo).toString()); linkOutput.append(getTypeParameterLinks(linkInfo).toString());
@ -92,7 +92,7 @@ public class LinkFactoryImpl extends LinkFactory {
} else { } else {
String crossLink = m_writer.getCrossClassLink( String crossLink = m_writer.getCrossClassLink(
classDoc.qualifiedName(), classLinkInfo.where, classDoc.qualifiedName(), classLinkInfo.where,
label.toString(), classLinkInfo.isBold, classLinkInfo.styleName, label.toString(), classLinkInfo.isStrong, classLinkInfo.styleName,
true); true);
if (crossLink != null) { if (crossLink != null) {
linkOutput.append(crossLink); linkOutput.append(crossLink);

View File

@ -235,15 +235,15 @@ public class LinkInfoImpl extends LinkInfo {
* @param classDoc the class to link to. * @param classDoc the class to link to.
* @param where the value of the marker #. * @param where the value of the marker #.
* @param label the label for the link. * @param label the label for the link.
* @param isBold true if the link should be bold. * @param isStrong true if the link should be strong.
* @param styleName String style of text defined in style sheet. * @param styleName String style of text defined in style sheet.
*/ */
public LinkInfoImpl (int context, ClassDoc classDoc, String where, String label, public LinkInfoImpl (int context, ClassDoc classDoc, String where, String label,
boolean isBold, String styleName){ boolean isStrong, String styleName){
this.classDoc = classDoc; this.classDoc = classDoc;
this.where = where; this.where = where;
this.label = label; this.label = label;
this.isBold = isBold; this.isStrong = isStrong;
this.styleName = styleName; this.styleName = styleName;
setContext(context); setContext(context);
} }
@ -255,14 +255,14 @@ public class LinkInfoImpl extends LinkInfo {
* @param classDoc the class to link to. * @param classDoc the class to link to.
* @param where the value of the marker #. * @param where the value of the marker #.
* @param label the label for the link. * @param label the label for the link.
* @param isBold true if the link should be bold. * @param isStrong true if the link should be strong.
*/ */
public LinkInfoImpl (int context, ClassDoc classDoc, String where, String label, public LinkInfoImpl (int context, ClassDoc classDoc, String where, String label,
boolean isBold){ boolean isStrong){
this.classDoc = classDoc; this.classDoc = classDoc;
this.where = where; this.where = where;
this.label = label; this.label = label;
this.isBold = isBold; this.isStrong = isStrong;
setContext(context); setContext(context);
} }
@ -283,12 +283,12 @@ public class LinkInfoImpl extends LinkInfo {
* *
* @param context the context of the link. * @param context the context of the link.
* @param executableMemberDoc the member to link to. * @param executableMemberDoc the member to link to.
* @param isBold true if the link should be bold. * @param isStrong true if the link should be strong.
*/ */
public LinkInfoImpl (int context, ExecutableMemberDoc executableMemberDoc, public LinkInfoImpl (int context, ExecutableMemberDoc executableMemberDoc,
boolean isBold){ boolean isStrong){
this.executableMemberDoc = executableMemberDoc; this.executableMemberDoc = executableMemberDoc;
this.isBold = isBold; this.isStrong = isStrong;
setContext(context); setContext(context);
} }
@ -297,11 +297,11 @@ public class LinkInfoImpl extends LinkInfo {
* *
* @param context the context of the link. * @param context the context of the link.
* @param classDoc the class to link to. * @param classDoc the class to link to.
* @param isBold true if the link should be bold. * @param isStrong true if the link should be strong.
*/ */
public LinkInfoImpl (int context, ClassDoc classDoc, boolean isBold){ public LinkInfoImpl (int context, ClassDoc classDoc, boolean isStrong){
this.classDoc = classDoc; this.classDoc = classDoc;
this.isBold = isBold; this.isStrong = isStrong;
setContext(context); setContext(context);
} }
@ -335,13 +335,13 @@ public class LinkInfoImpl extends LinkInfo {
* @param context the context of the link. * @param context the context of the link.
* @param type the class to link to. * @param type the class to link to.
* @param label the label for the link. * @param label the label for the link.
* @param isBold true if the link should be bold. * @param isStrong true if the link should be strong.
*/ */
public LinkInfoImpl (int context, Type type, String label, public LinkInfoImpl (int context, Type type, String label,
boolean isBold){ boolean isStrong){
this.type = type; this.type = type;
this.label = label; this.label = label;
this.isBold = isBold; this.isStrong = isStrong;
setContext(context); setContext(context);
} }
@ -351,13 +351,13 @@ public class LinkInfoImpl extends LinkInfo {
* @param context the context of the link. * @param context the context of the link.
* @param classDoc the class to link to. * @param classDoc the class to link to.
* @param label the label for the link. * @param label the label for the link.
* @param isBold true if the link should be bold. * @param isStrong true if the link should be strong.
*/ */
public LinkInfoImpl (int context, ClassDoc classDoc, String label, public LinkInfoImpl (int context, ClassDoc classDoc, String label,
boolean isBold){ boolean isStrong){
this.classDoc = classDoc; this.classDoc = classDoc;
this.label = label; this.label = label;
this.isBold = isBold; this.isStrong = isStrong;
setContext(context); setContext(context);
} }

View File

@ -167,7 +167,7 @@ public class MethodWriterImpl extends AbstractExecutableMemberWriter
if (configuration().linksource) { if (configuration().linksource) {
writer.printSrcLink(method, method.name()); writer.printSrcLink(method, method.name());
} else { } else {
bold(method.name()); strong(method.name());
} }
writeParameters(method); writeParameters(method);
writeExceptions(method); writeExceptions(method);
@ -210,7 +210,7 @@ public class MethodWriterImpl extends AbstractExecutableMemberWriter
holder.typeName() : holder.qualifiedTypeName(), holder.typeName() : holder.qualifiedTypeName(),
false)); false));
writer.dd(); writer.dd();
writer.boldText(holder.asClassDoc().isClass()? writer.strongText(holder.asClassDoc().isClass()?
"doclet.Description_From_Class": "doclet.Description_From_Class":
"doclet.Description_From_Interface", "doclet.Description_From_Interface",
classlink); classlink);
@ -259,7 +259,7 @@ public class MethodWriterImpl extends AbstractExecutableMemberWriter
} }
public void printSummaryLabel(ClassDoc cd) { public void printSummaryLabel(ClassDoc cd) {
writer.boldText("doclet.Method_Summary"); writer.strongText("doclet.Method_Summary");
} }
public void printSummaryAnchor(ClassDoc cd) { public void printSummaryAnchor(ClassDoc cd) {
@ -274,12 +274,12 @@ public class MethodWriterImpl extends AbstractExecutableMemberWriter
public void printInheritedSummaryLabel(ClassDoc cd) { public void printInheritedSummaryLabel(ClassDoc cd) {
String classlink = writer.getPreQualifiedClassLink( String classlink = writer.getPreQualifiedClassLink(
LinkInfoImpl.CONTEXT_MEMBER, cd, false); LinkInfoImpl.CONTEXT_MEMBER, cd, false);
writer.bold(); writer.strong();
String key = cd.isClass()? String key = cd.isClass()?
"doclet.Methods_Inherited_From_Class" : "doclet.Methods_Inherited_From_Class" :
"doclet.Methods_Inherited_From_Interface"; "doclet.Methods_Inherited_From_Interface";
writer.printText(key, classlink); writer.printText(key, classlink);
writer.boldEnd(); writer.strongEnd();
} }
protected void printSummaryType(ProgramElementDoc member) { protected void printSummaryType(ProgramElementDoc member) {
@ -317,7 +317,7 @@ public class MethodWriterImpl extends AbstractExecutableMemberWriter
writer.getLink(new LinkInfoImpl(context, overriddenType))); writer.getLink(new LinkInfoImpl(context, overriddenType)));
String name = method.name(); String name = method.name();
writer.dt(); writer.dt();
writer.boldText(label); writer.strongText(label);
writer.dd(); writer.dd();
String methLink = writer.codeText( String methLink = writer.codeText(
writer.getLink( writer.getLink(
@ -363,7 +363,7 @@ public class MethodWriterImpl extends AbstractExecutableMemberWriter
writer.getLink(new LinkInfoImpl( writer.getLink(new LinkInfoImpl(
LinkInfoImpl.CONTEXT_METHOD_SPECIFIED_BY, intfac))); LinkInfoImpl.CONTEXT_METHOD_SPECIFIED_BY, intfac)));
writer.dt(); writer.dt();
writer.boldText("doclet.Specified_By"); writer.strongText("doclet.Specified_By");
writer.dd(); writer.dd();
methlink = writer.codeText(writer.getDocLink( methlink = writer.codeText(writer.getDocLink(
LinkInfoImpl.CONTEXT_MEMBER, implementedMeth, LinkInfoImpl.CONTEXT_MEMBER, implementedMeth,

View File

@ -149,7 +149,7 @@ public class NestedClassWriterImpl extends AbstractMemberWriter
} }
public void printSummaryLabel(ClassDoc cd) { public void printSummaryLabel(ClassDoc cd) {
writer.boldText("doclet.Nested_Class_Summary"); writer.strongText("doclet.Nested_Class_Summary");
} }
public void printSummaryAnchor(ClassDoc cd) { public void printSummaryAnchor(ClassDoc cd) {
@ -164,18 +164,18 @@ public class NestedClassWriterImpl extends AbstractMemberWriter
public void printInheritedSummaryLabel(ClassDoc cd) { public void printInheritedSummaryLabel(ClassDoc cd) {
String clslink = writer.getPreQualifiedClassLink( String clslink = writer.getPreQualifiedClassLink(
LinkInfoImpl.CONTEXT_MEMBER, cd, false); LinkInfoImpl.CONTEXT_MEMBER, cd, false);
writer.bold(); writer.strong();
writer.printText(cd.isInterface() ? writer.printText(cd.isInterface() ?
"doclet.Nested_Classes_Interface_Inherited_From_Interface" : "doclet.Nested_Classes_Interface_Inherited_From_Interface" :
"doclet.Nested_Classes_Interfaces_Inherited_From_Class", "doclet.Nested_Classes_Interfaces_Inherited_From_Class",
clslink); clslink);
writer.boldEnd(); writer.strongEnd();
} }
protected void writeSummaryLink(int context, ClassDoc cd, ProgramElementDoc member) { protected void writeSummaryLink(int context, ClassDoc cd, ProgramElementDoc member) {
writer.bold(); writer.strong();
writer.printLink(new LinkInfoImpl(context, (ClassDoc)member, false)); writer.printLink(new LinkInfoImpl(context, (ClassDoc)member, false));
writer.boldEnd(); writer.strongEnd();
} }
protected void writeInheritedSummaryLink(ClassDoc cd, protected void writeInheritedSummaryLink(ClassDoc cd,

View File

@ -49,7 +49,7 @@ public class PackageFrameWriter extends HtmlDocletWriter {
* The classes to be documented. Use this to filter out classes * The classes to be documented. Use this to filter out classes
* that will not be documented. * that will not be documented.
*/ */
private Set documentedClasses; private Set<ClassDoc> documentedClasses;
/** /**
* The name of the output file. * The name of the output file.

View File

@ -87,7 +87,7 @@ public class PackageIndexFrameWriter extends AbstractPackageIndexWriter {
} }
/** /**
* Print the "-packagesheader" string in bold format, at top of the page, * Print the "-packagesheader" string in strong format, at top of the page,
* if it is not the empty string. Otherwise print the "-header" string. * if it is not the empty string. Otherwise print the "-header" string.
* Despite the name, there is actually no navigation bar for this page. * Despite the name, there is actually no navigation bar for this page.
*/ */
@ -95,9 +95,9 @@ public class PackageIndexFrameWriter extends AbstractPackageIndexWriter {
printTableHeader(true); printTableHeader(true);
fontSizeStyle("+1", "FrameTitleFont"); fontSizeStyle("+1", "FrameTitleFont");
if (configuration.packagesheader.length() > 0) { if (configuration.packagesheader.length() > 0) {
bold(replaceDocRootDir(configuration.packagesheader)); strong(replaceDocRootDir(configuration.packagesheader));
} else { } else {
bold(replaceDocRootDir(configuration.header)); strong(replaceDocRootDir(configuration.header));
} }
fontEnd(); fontEnd();
printTableFooter(true); printTableFooter(true);

View File

@ -54,7 +54,7 @@ public class PackageIndexWriter extends AbstractPackageIndexWriter {
/** /**
* List to store the order groups as specified on the command line. * List to store the order groups as specified on the command line.
*/ */
private List groupList; private List<String> groupList;
/** /**
* Construct the PackageIndexWriter. Also constructs the grouping * Construct the PackageIndexWriter. Also constructs the grouping
@ -102,9 +102,9 @@ public class PackageIndexWriter extends AbstractPackageIndexWriter {
if(pkg != null && pkg.name().length() > 0) { if(pkg != null && pkg.name().length() > 0) {
trBgcolorStyle("white", "TableRowColor"); trBgcolorStyle("white", "TableRowColor");
summaryRow(20); summaryRow(20);
bold(); strong();
printPackageLink(pkg, Util.getPackageName(pkg), false); printPackageLink(pkg, Util.getPackageName(pkg), false);
boldEnd(); strongEnd();
summaryRowEnd(); summaryRowEnd();
summaryRow(0); summaryRow(0);
printSummaryComment(pkg); printSummaryComment(pkg);
@ -137,7 +137,7 @@ public class PackageIndexWriter extends AbstractPackageIndexWriter {
if (root.inlineTags().length > 0) { if (root.inlineTags().length > 0) {
printSummaryComment(root); printSummaryComment(root);
p(); p();
bold(configuration.getText("doclet.See")); strong(configuration.getText("doclet.See"));
br(); br();
printNbsps(); printNbsps();
printHyperLink("", "overview_description", printHyperLink("", "overview_description",
@ -152,7 +152,7 @@ public class PackageIndexWriter extends AbstractPackageIndexWriter {
protected void printIndexHeader(String text) { protected void printIndexHeader(String text) {
tableIndexSummary(); tableIndexSummary();
tableHeaderStart("#CCCCFF"); tableHeaderStart("#CCCCFF");
bold(text); strong(text);
tableHeaderEnd(); tableHeaderEnd();
} }

View File

@ -144,7 +144,7 @@ public class PackageTreeWriter extends AbstractTreeWriter {
protected void printLinkToMainTree() { protected void printLinkToMainTree() {
dl(); dl();
dt(); dt();
boldText("doclet.Package_Hierarchies"); strongText("doclet.Package_Hierarchies");
dd(); dd();
navLinkMainTree(configuration.getText("doclet.All_Packages")); navLinkMainTree(configuration.getText("doclet.All_Packages"));
dlEnd(); dlEnd();

View File

@ -63,8 +63,8 @@ public class PackageUseWriter extends SubWriterHolderWriter {
ClassDoc usedClass = content[i]; ClassDoc usedClass = content[i];
Set<ClassDoc> usingClasses = mapper.classToClass.get(usedClass.qualifiedName()); Set<ClassDoc> usingClasses = mapper.classToClass.get(usedClass.qualifiedName());
if (usingClasses != null) { if (usingClasses != null) {
for (Iterator it = usingClasses.iterator(); it.hasNext(); ) { for (Iterator<ClassDoc> it = usingClasses.iterator(); it.hasNext(); ) {
ClassDoc usingClass = (ClassDoc)it.next(); ClassDoc usingClass = it.next();
PackageDoc usingPackage = usingClass.containingPackage(); PackageDoc usingPackage = usingClass.containingPackage();
Set<ClassDoc> usedClasses = usingPackageToUsedClasses Set<ClassDoc> usedClasses = usingPackageToUsedClasses
.get(usingPackage.name()); .get(usingPackage.name());
@ -136,9 +136,9 @@ public class PackageUseWriter extends SubWriterHolderWriter {
printText("doclet.ClassUse_Packages.that.use.0", printText("doclet.ClassUse_Packages.that.use.0",
getPackageLink(pkgdoc, Util.getPackageName(pkgdoc), false)); getPackageLink(pkgdoc, Util.getPackageName(pkgdoc), false));
tableHeaderEnd(); tableHeaderEnd();
Iterator it = usingPackageToUsedClasses.keySet().iterator(); Iterator<String> it = usingPackageToUsedClasses.keySet().iterator();
while (it.hasNext()) { while (it.hasNext()) {
PackageDoc pkg = configuration.root.packageNamed((String)it.next()); PackageDoc pkg = configuration.root.packageNamed(it.next());
generatePackageUse(pkg); generatePackageUse(pkg);
} }
tableEnd(); tableEnd();
@ -147,9 +147,9 @@ public class PackageUseWriter extends SubWriterHolderWriter {
} }
protected void generateClassList() throws IOException { protected void generateClassList() throws IOException {
Iterator itp = usingPackageToUsedClasses.keySet().iterator(); Iterator<String> itp = usingPackageToUsedClasses.keySet().iterator();
while (itp.hasNext()) { while (itp.hasNext()) {
String packageName = (String)itp.next(); String packageName = itp.next();
PackageDoc usingPackage = configuration.root.packageNamed(packageName); PackageDoc usingPackage = configuration.root.packageNamed(packageName);
if (usingPackage != null) { if (usingPackage != null) {
anchor(usingPackage.name()); anchor(usingPackage.name());
@ -160,11 +160,10 @@ public class PackageUseWriter extends SubWriterHolderWriter {
getPackageLink(pkgdoc, Util.getPackageName(pkgdoc), false), getPackageLink(pkgdoc, Util.getPackageName(pkgdoc), false),
getPackageLink(usingPackage,Util.getPackageName(usingPackage), false)); getPackageLink(usingPackage,Util.getPackageName(usingPackage), false));
tableHeaderEnd(); tableHeaderEnd();
Iterator itc = Iterator<ClassDoc> itc =
((Collection)usingPackageToUsedClasses.get(packageName)) usingPackageToUsedClasses.get(packageName).iterator();
.iterator();
while (itc.hasNext()) { while (itc.hasNext()) {
printClassRow((ClassDoc)itc.next(), packageName); printClassRow(itc.next(), packageName);
} }
tableEnd(); tableEnd();
space(); space();
@ -178,9 +177,9 @@ public class PackageUseWriter extends SubWriterHolderWriter {
trBgcolorStyle("white", "TableRowColor"); trBgcolorStyle("white", "TableRowColor");
summaryRow(0); summaryRow(0);
bold(); strong();
printHyperLink(path, packageName, usedClass.name(), true); printHyperLink(path, packageName, usedClass.name(), true);
boldEnd(); strongEnd();
println(); br(); println(); br();
printNbsps(); printNbsps();
printIndexComment(usedClass); printIndexComment(usedClass);
@ -219,7 +218,7 @@ public class PackageUseWriter extends SubWriterHolderWriter {
hr(); hr();
center(); center();
h2(); h2();
boldText("doclet.ClassUse_Title", packageLabel, name); strongText("doclet.ClassUse_Title", packageLabel, name);
h2End(); h2End();
centerEnd(); centerEnd();
} }
@ -251,7 +250,7 @@ public class PackageUseWriter extends SubWriterHolderWriter {
protected void navLinkClassUse() { protected void navLinkClassUse() {
navCellRevStart(); navCellRevStart();
fontStyle("NavBarFont1Rev"); fontStyle("NavBarFont1Rev");
boldText("doclet.navClassUse"); strongText("doclet.navClassUse");
fontEnd(); fontEnd();
navCellEnd(); navCellEnd();
} }

View File

@ -123,14 +123,14 @@ public class PackageWriterImpl extends HtmlDocletWriter
} }
trBgcolorStyle("white", "TableRowColor"); trBgcolorStyle("white", "TableRowColor");
summaryRow(15); summaryRow(15);
bold(); strong();
printLink(new LinkInfoImpl(LinkInfoImpl.CONTEXT_PACKAGE, printLink(new LinkInfoImpl(LinkInfoImpl.CONTEXT_PACKAGE,
classes[i], false)); classes[i], false));
boldEnd(); strongEnd();
summaryRowEnd(); summaryRowEnd();
summaryRow(0); summaryRow(0);
if (Util.isDeprecated(classes[i])) { if (Util.isDeprecated(classes[i])) {
boldText("doclet.Deprecated"); strongText("doclet.Deprecated");
if (classes[i].tags("deprecated").length > 0) { if (classes[i].tags("deprecated").length > 0) {
space(); space();
printSummaryDeprecatedComment(classes[i], printSummaryDeprecatedComment(classes[i],
@ -155,7 +155,7 @@ public class PackageWriterImpl extends HtmlDocletWriter
*/ */
protected void printFirstRow(String label) { protected void printFirstRow(String label) {
tableHeaderStart("#CCCCFF"); tableHeaderStart("#CCCCFF");
bold(label); strong(label);
tableHeaderEnd(); tableHeaderEnd();
} }
@ -194,7 +194,7 @@ public class PackageWriterImpl extends HtmlDocletWriter
if (packageDoc.inlineTags().length > 0 && ! configuration.nocomment) { if (packageDoc.inlineTags().length > 0 && ! configuration.nocomment) {
printSummaryComment(packageDoc); printSummaryComment(packageDoc);
p(); p();
bold(configuration.getText("doclet.See")); strong(configuration.getText("doclet.See"));
br(); br();
printNbsps(); printNbsps();
printHyperLink("", "package_description", printHyperLink("", "package_description",
@ -268,7 +268,7 @@ public class PackageWriterImpl extends HtmlDocletWriter
protected void navLinkPackage() { protected void navLinkPackage() {
navCellRevStart(); navCellRevStart();
fontStyle("NavBarFont1Rev"); fontStyle("NavBarFont1Rev");
boldText("doclet.Package"); strongText("doclet.Package");
fontEnd(); fontEnd();
navCellEnd(); navCellEnd();
} }

View File

@ -73,9 +73,9 @@ public class SerializedFormWriterImpl extends SubWriterHolderWriter
tableHeader(); tableHeader();
thAlign("center"); thAlign("center");
font("+2"); font("+2");
boldText("doclet.Package"); strongText("doclet.Package");
print(' '); print(' ');
bold(packageName); strong(packageName);
tableFooter(); tableFooter();
} }
@ -86,7 +86,7 @@ public class SerializedFormWriterImpl extends SubWriterHolderWriter
* @param serialUID the serial UID to print. * @param serialUID the serial UID to print.
*/ */
public void writeSerialUIDInfo(String header, String serialUID) { public void writeSerialUIDInfo(String header, String serialUID) {
bold(header + "&nbsp;"); strong(header + "&nbsp;");
println(serialUID); println(serialUID);
p(); p();
} }
@ -131,7 +131,7 @@ public class SerializedFormWriterImpl extends SubWriterHolderWriter
tableHeader(); tableHeader();
thAlignColspan("left", 2); thAlignColspan("left", 2);
font("+2"); font("+2");
bold(className); strong(className);
tableFooter(); tableFooter();
p(); p();
} }

View File

@ -81,7 +81,7 @@ public abstract class SubWriterHolderWriter extends HtmlDocletWriter {
public void printTableHeadingBackground(String str) { public void printTableHeadingBackground(String str) {
tableIndexDetail(); tableIndexDetail();
tableHeaderStart("#CCCCFF", 1); tableHeaderStart("#CCCCFF", 1);
bold(str); strong(str);
tableHeaderEnd(); tableHeaderEnd();
tableEnd(); tableEnd();
} }
@ -117,7 +117,7 @@ public abstract class SubWriterHolderWriter extends HtmlDocletWriter {
protected void printIndexComment(Doc member, Tag[] firstSentenceTags) { protected void printIndexComment(Doc member, Tag[] firstSentenceTags) {
Tag[] deprs = member.tags("deprecated"); Tag[] deprs = member.tags("deprecated");
if (Util.isDeprecated((ProgramElementDoc) member)) { if (Util.isDeprecated((ProgramElementDoc) member)) {
boldText("doclet.Deprecated"); strongText("doclet.Deprecated");
space(); space();
if (deprs.length > 0) { if (deprs.length > 0) {
printInlineDeprecatedComment(member, deprs[0]); printInlineDeprecatedComment(member, deprs[0]);
@ -126,7 +126,7 @@ public abstract class SubWriterHolderWriter extends HtmlDocletWriter {
} else { } else {
ClassDoc cd = ((ProgramElementDoc)member).containingClass(); ClassDoc cd = ((ProgramElementDoc)member).containingClass();
if (cd != null && Util.isDeprecated(cd)) { if (cd != null && Util.isDeprecated(cd)) {
boldText("doclet.Deprecated"); space(); strongText("doclet.Deprecated"); space();
} }
} }
printSummaryComment(member, firstSentenceTags); printSummaryComment(member, firstSentenceTags);

View File

@ -69,9 +69,9 @@ public class TagletWriterImpl extends TagletWriter {
Tag[] deprs = doc.tags("deprecated"); Tag[] deprs = doc.tags("deprecated");
if (doc instanceof ClassDoc) { if (doc instanceof ClassDoc) {
if (Util.isDeprecated((ProgramElementDoc) doc)) { if (Util.isDeprecated((ProgramElementDoc) doc)) {
output.append("<B>" + output.append("<STRONG>" +
ConfigurationImpl.getInstance(). ConfigurationImpl.getInstance().
getText("doclet.Deprecated") + "</B>&nbsp;"); getText("doclet.Deprecated") + "</STRONG>&nbsp;");
if (deprs.length > 0) { if (deprs.length > 0) {
Tag[] commentTags = deprs[0].inlineTags(); Tag[] commentTags = deprs[0].inlineTags();
if (commentTags.length > 0) { if (commentTags.length > 0) {
@ -86,9 +86,9 @@ public class TagletWriterImpl extends TagletWriter {
} else { } else {
MemberDoc member = (MemberDoc) doc; MemberDoc member = (MemberDoc) doc;
if (Util.isDeprecated((ProgramElementDoc) doc)) { if (Util.isDeprecated((ProgramElementDoc) doc)) {
output.append("<DD><B>" + output.append("<DD><STRONG>" +
ConfigurationImpl.getInstance(). ConfigurationImpl.getInstance().
getText("doclet.Deprecated") + "</B>&nbsp;"); getText("doclet.Deprecated") + "</STRONG>&nbsp;");
if (deprs.length > 0) { if (deprs.length > 0) {
output.append("<I>"); output.append("<I>");
output.append(commentTagsToOutput(null, doc, output.append(commentTagsToOutput(null, doc,
@ -101,9 +101,9 @@ public class TagletWriterImpl extends TagletWriter {
} }
} else { } else {
if (Util.isDeprecated(member.containingClass())) { if (Util.isDeprecated(member.containingClass())) {
output.append("<DD><B>" + output.append("<DD><STRONG>" +
ConfigurationImpl.getInstance(). ConfigurationImpl.getInstance().
getText("doclet.Deprecated") + "</B>&nbsp;"); getText("doclet.Deprecated") + "</STRONG>&nbsp;");
} }
} }
} }
@ -123,7 +123,7 @@ public class TagletWriterImpl extends TagletWriter {
public TagletOutput getParamHeader(String header) { public TagletOutput getParamHeader(String header) {
StringBuffer result = new StringBuffer(); StringBuffer result = new StringBuffer();
result.append("<DT>"); result.append("<DT>");
result.append("<B>" + header + "</B>"); result.append("<STRONG>" + header + "</STRONG>");
return new TagletOutputImpl(result.toString()); return new TagletOutputImpl(result.toString());
} }
@ -141,8 +141,8 @@ public class TagletWriterImpl extends TagletWriter {
*/ */
public TagletOutput returnTagOutput(Tag returnTag) { public TagletOutput returnTagOutput(Tag returnTag) {
TagletOutput result = new TagletOutputImpl(DocletConstants.NL + "<DT>" + TagletOutput result = new TagletOutputImpl(DocletConstants.NL + "<DT>" +
"<B>" + htmlWriter.configuration.getText("doclet.Returns") + "<STRONG>" + htmlWriter.configuration.getText("doclet.Returns") +
"</B>" + "<DD>" + "</STRONG>" + "<DD>" +
htmlWriter.commentTagsToString(returnTag, null, returnTag.inlineTags(), htmlWriter.commentTagsToString(returnTag, null, returnTag.inlineTags(),
false)); false));
return result; return result;
@ -189,7 +189,7 @@ public class TagletWriterImpl extends TagletWriter {
if (result != null && result.length() > 0) { if (result != null && result.length() > 0) {
return result + ", " + DocletConstants.NL; return result + ", " + DocletConstants.NL;
} else { } else {
return "<DT><B>" + htmlWriter.configuration().getText("doclet.See_Also") + "</B><DD>"; return "<DT><STRONG>" + htmlWriter.configuration().getText("doclet.See_Also") + "</STRONG><DD>";
} }
} }
@ -197,7 +197,7 @@ public class TagletWriterImpl extends TagletWriter {
* {@inheritDoc} * {@inheritDoc}
*/ */
public TagletOutput simpleTagOutput(Tag[] simpleTags, String header) { public TagletOutput simpleTagOutput(Tag[] simpleTags, String header) {
String result = "<DT><B>" + header + "</B></DT>" + DocletConstants.NL + String result = "<DT><STRONG>" + header + "</STRONG></DT>" + DocletConstants.NL +
" <DD>"; " <DD>";
for (int i = 0; i < simpleTags.length; i++) { for (int i = 0; i < simpleTags.length; i++) {
if (i > 0) { if (i > 0) {
@ -212,7 +212,7 @@ public class TagletWriterImpl extends TagletWriter {
* {@inheritDoc} * {@inheritDoc}
*/ */
public TagletOutput simpleTagOutput(Tag simpleTag, String header) { public TagletOutput simpleTagOutput(Tag simpleTag, String header) {
return new TagletOutputImpl("<DT><B>" + header + "</B></DT>" + " <DD>" return new TagletOutputImpl("<DT><STRONG>" + header + "</STRONG></DT>" + " <DD>"
+ htmlWriter.commentTagsToString(simpleTag, null, simpleTag.inlineTags(), false) + htmlWriter.commentTagsToString(simpleTag, null, simpleTag.inlineTags(), false)
+ "</DD>" + DocletConstants.NL); + "</DD>" + DocletConstants.NL);
} }
@ -221,8 +221,8 @@ public class TagletWriterImpl extends TagletWriter {
* {@inheritDoc} * {@inheritDoc}
*/ */
public TagletOutput getThrowsHeader() { public TagletOutput getThrowsHeader() {
return new TagletOutputImpl(DocletConstants.NL + "<DT>" + "<B>" + return new TagletOutputImpl(DocletConstants.NL + "<DT>" + "<STRONG>" +
htmlWriter.configuration().getText("doclet.Throws") + "</B>"); htmlWriter.configuration().getText("doclet.Throws") + "</STRONG>");
} }
/** /**

View File

@ -119,7 +119,7 @@ public class TreeWriter extends AbstractTreeWriter {
if (!classesonly) { if (!classesonly) {
dl(); dl();
dt(); dt();
boldText("doclet.Package_Hierarchies"); strongText("doclet.Package_Hierarchies");
dd(); dd();
for (int i = 0; i < packages.length; i++) { for (int i = 0; i < packages.length; i++) {
if (packages[i].name().length() == 0) { if (packages[i].name().length() == 0) {

View File

@ -83,11 +83,11 @@ public abstract class HtmlDocWriter extends HtmlWriter {
* @param where Position of the link in the file. Character '#' is not * @param where Position of the link in the file. Character '#' is not
* needed. * needed.
* @param label Tag for the link. * @param label Tag for the link.
* @param bold Boolean that sets label to bold. * @param strong Boolean that sets label to strong.
*/ */
public void printHyperLink(String link, String where, public void printHyperLink(String link, String where,
String label, boolean bold) { String label, boolean strong) {
print(getHyperLink(link, where, label, bold, "", "", "")); print(getHyperLink(link, where, label, strong, "", "", ""));
} }
/** /**
@ -109,13 +109,13 @@ public abstract class HtmlDocWriter extends HtmlWriter {
* @param where Position of the link in the file. Character '#' is not * @param where Position of the link in the file. Character '#' is not
* needed. * needed.
* @param label Tag for the link. * @param label Tag for the link.
* @param bold Boolean that sets label to bold. * @param strong Boolean that sets label to strong.
* @param stylename String style of text defined in style sheet. * @param stylename String style of text defined in style sheet.
*/ */
public void printHyperLink(String link, String where, public void printHyperLink(String link, String where,
String label, boolean bold, String label, boolean strong,
String stylename) { String stylename) {
print(getHyperLink(link, where, label, bold, stylename, "", "")); print(getHyperLink(link, where, label, strong, stylename, "", ""));
} }
/** /**
@ -125,12 +125,12 @@ public abstract class HtmlDocWriter extends HtmlWriter {
* @param where Position of the link in the file. Character '#' is not * @param where Position of the link in the file. Character '#' is not
* needed. * needed.
* @param label Tag for the link. * @param label Tag for the link.
* @param bold Boolean that sets label to bold. * @param strong Boolean that sets label to strong.
* @return String Hyper Link. * @return String Hyper Link.
*/ */
public String getHyperLink(String link, String where, public String getHyperLink(String link, String where,
String label, boolean bold) { String label, boolean strong) {
return getHyperLink(link, where, label, bold, "", "", ""); return getHyperLink(link, where, label, strong, "", "", "");
} }
/** /**
@ -140,14 +140,14 @@ public abstract class HtmlDocWriter extends HtmlWriter {
* @param where Position of the link in the file. Character '#' is not * @param where Position of the link in the file. Character '#' is not
* needed. * needed.
* @param label Tag for the link. * @param label Tag for the link.
* @param bold Boolean that sets label to bold. * @param strong Boolean that sets label to strong.
* @param stylename String style of text defined in style sheet. * @param stylename String style of text defined in style sheet.
* @return String Hyper Link. * @return String Hyper Link.
*/ */
public String getHyperLink(String link, String where, public String getHyperLink(String link, String where,
String label, boolean bold, String label, boolean strong,
String stylename) { String stylename) {
return getHyperLink(link, where, label, bold, stylename, "", ""); return getHyperLink(link, where, label, strong, stylename, "", "");
} }
/** /**
@ -157,14 +157,14 @@ public abstract class HtmlDocWriter extends HtmlWriter {
* @param where Position of the link in the file. Character '#' is not * @param where Position of the link in the file. Character '#' is not
* needed. * needed.
* @param label Tag for the link. * @param label Tag for the link.
* @param bold Boolean that sets label to bold. * @param strong Boolean that sets label to strong.
* @param stylename String style of text defined in style sheet. * @param stylename String style of text defined in style sheet.
* @param title String that describes the link's content for accessibility. * @param title String that describes the link's content for accessibility.
* @param target Target frame. * @param target Target frame.
* @return String Hyper Link. * @return String Hyper Link.
*/ */
public String getHyperLink(String link, String where, public String getHyperLink(String link, String where,
String label, boolean bold, String label, boolean strong,
String stylename, String title, String target) { String stylename, String title, String target) {
StringBuffer retlink = new StringBuffer(); StringBuffer retlink = new StringBuffer();
retlink.append("<A HREF=\""); retlink.append("<A HREF=\"");
@ -186,12 +186,12 @@ public abstract class HtmlDocWriter extends HtmlWriter {
retlink.append(stylename); retlink.append(stylename);
retlink.append("\">"); retlink.append("\">");
} }
if (bold) { if (strong) {
retlink.append("<B>"); retlink.append("<STRONG>");
} }
retlink.append(label); retlink.append(label);
if (bold) { if (strong) {
retlink.append("</B>"); retlink.append("</STRONG>");
} }
if (stylename != null && stylename.length() != 0) { if (stylename != null && stylename.length() != 0) {
retlink.append("</FONT>"); retlink.append("</FONT>");

View File

@ -433,46 +433,46 @@ public class HtmlWriter extends PrintWriter {
} }
/** /**
* Get the "&lt;B&gt;" string. * Get the "&lt;STRONG&gt;" string.
* *
* @return String Return String "&lt;B&gt;"; * @return String Return String "&lt;STRONG&gt;";
*/ */
public String getBold() { public String getStrong() {
return "<B>"; return "<STRONG>";
} }
/** /**
* Get the "&lt;/B&gt;" string. * Get the "&lt;/STRONG&gt;" string.
* *
* @return String Return String "&lt;/B&gt;"; * @return String Return String "&lt;/STRONG&gt;";
*/ */
public String getBoldEnd() { public String getStrongEnd() {
return "</B>"; return "</STRONG>";
} }
/** /**
* Print &lt;B&gt; tag. * Print &lt;STRONG&gt; tag.
*/ */
public void bold() { public void strong() {
print("<B>"); print("<STRONG>");
} }
/** /**
* Print &lt;/B&gt; tag. * Print &lt;/STRONG&gt; tag.
*/ */
public void boldEnd() { public void strongEnd() {
print("</B>"); print("</STRONG>");
} }
/** /**
* Print text passed, in bold format using &lt;B&gt; and &lt;/B&gt; tags. * Print text passed, in strong format using &lt;STRONG&gt; and &lt;/STRONG&gt; tags.
* *
* @param text String to be printed in between &lt;B&gt; and &lt;/B&gt; tags. * @param text String to be printed in between &lt;STRONG&gt; and &lt;/STRONG&gt; tags.
*/ */
public void bold(String text) { public void strong(String text) {
bold(); strong();
print(text); print(text);
boldEnd(); strongEnd();
} }
/** /**

View File

@ -441,13 +441,13 @@ public abstract class Configuration {
* @param customTagStrs the set two dimentional arrays of strings. These arrays contain * @param customTagStrs the set two dimentional arrays of strings. These arrays contain
* either -tag or -taglet arguments. * either -tag or -taglet arguments.
*/ */
private void initTagletManager(Set customTagStrs) { private void initTagletManager(Set<String[]> customTagStrs) {
tagletManager = tagletManager == null ? tagletManager = tagletManager == null ?
new TagletManager(nosince, showversion, showauthor, message) : new TagletManager(nosince, showversion, showauthor, message) :
tagletManager; tagletManager;
String[] args; String[] args;
for (Iterator it = customTagStrs.iterator(); it.hasNext(); ) { for (Iterator<String[]> it = customTagStrs.iterator(); it.hasNext(); ) {
args = (String[]) it.next(); args = it.next();
if (args[0].equals("-taglet")) { if (args[0].equals("-taglet")) {
tagletManager.addCustomTag(args[1], tagletpath); tagletManager.addCustomTag(args[1], tagletpath);
continue; continue;

View File

@ -103,7 +103,7 @@ public interface ConstantsSummaryWriter {
* @param cd the class whose constants are being documented. * @param cd the class whose constants are being documented.
* @param fields the constants being documented. * @param fields the constants being documented.
*/ */
public abstract void writeConstantMembers(ClassDoc cd, List fields); public abstract void writeConstantMembers(ClassDoc cd, List<FieldDoc> fields);
/** /**
* Document the given constants. * Document the given constants.

View File

@ -97,22 +97,22 @@ public abstract class AbstractBuilder {
* @param elements the XML elements that specify which components to * @param elements the XML elements that specify which components to
* document. * document.
*/ */
protected void build(List elements) { protected void build(List<?> elements) {
for (int i = 0; i < elements.size(); i++ ) { for (int i = 0; i < elements.size(); i++ ) {
Object element = elements.get(i); Object element = elements.get(i);
String component = (String) String component = (String)
((element instanceof String) ? ((element instanceof String) ?
element : element :
((List) element).get(0)); ((List<?>) element).get(0));
try { try {
invokeMethod("build" + component, invokeMethod("build" + component,
element instanceof String ? element instanceof String ?
new Class[] {} : new Class<?>[] {} :
new Class[] {List.class}, new Class<?>[] {List.class},
element instanceof String ? element instanceof String ?
new Object[] {} : new Object[] {} :
new Object[] {((List) element).subList(1, new Object[] {((List<?>) element).subList(1,
((List) element).size())}); ((List<?>) element).size())});
} catch (NoSuchMethodException e) { } catch (NoSuchMethodException e) {
e.printStackTrace(); e.printStackTrace();
configuration.root.printError("Unknown element: " + component); configuration.root.printError("Unknown element: " + component);
@ -138,7 +138,7 @@ public abstract class AbstractBuilder {
* @param paramClasses the types for each parameter. * @param paramClasses the types for each parameter.
* @param params the parameters of the method. * @param params the parameters of the method.
*/ */
protected abstract void invokeMethod(String methodName, Class[] paramClasses, protected abstract void invokeMethod(String methodName, Class<?>[] paramClasses,
Object[] params) Object[] params)
throws Exception; throws Exception;
} }

View File

@ -69,7 +69,7 @@ public abstract class AbstractMemberBuilder extends AbstractBuilder {
* *
* @param elements {@inheritDoc} * @param elements {@inheritDoc}
*/ */
public void build(List elements) { public void build(List<?> elements) {
if (hasMembersToDocument()) { if (hasMembersToDocument()) {
super.build(elements); super.build(elements);
} }

View File

@ -92,7 +92,7 @@ public class AnnotationTypeBuilder extends AbstractBuilder {
/** /**
* {@inheritDoc} * {@inheritDoc}
*/ */
public void invokeMethod(String methodName, Class[] paramClasses, public void invokeMethod(String methodName, Class<?>[] paramClasses,
Object[] params) Object[] params)
throws Exception { throws Exception {
if (DEBUG) { if (DEBUG) {
@ -122,7 +122,7 @@ public class AnnotationTypeBuilder extends AbstractBuilder {
* *
* @param elements the XML elements that specify how to document a class. * @param elements the XML elements that specify how to document a class.
*/ */
public void buildAnnotationTypeDoc(List elements) throws Exception { public void buildAnnotationTypeDoc(List<?> elements) throws Exception {
build(elements); build(elements);
writer.close(); writer.close();
copyDocFiles(); copyDocFiles();
@ -197,7 +197,7 @@ public class AnnotationTypeBuilder extends AbstractBuilder {
* @param elements the XML elements that specify how a member summary is * @param elements the XML elements that specify how a member summary is
* documented. * documented.
*/ */
public void buildMemberSummary(List elements) throws Exception { public void buildMemberSummary(List<?> elements) throws Exception {
configuration.getBuilderFactory(). configuration.getBuilderFactory().
getMemberSummaryBuilder(writer).build(elements); getMemberSummaryBuilder(writer).build(elements);
writer.completeMemberSummaryBuild(); writer.completeMemberSummaryBuild();
@ -209,7 +209,7 @@ public class AnnotationTypeBuilder extends AbstractBuilder {
* @param elements the XML elements that specify how a annotation type * @param elements the XML elements that specify how a annotation type
* members are documented. * members are documented.
*/ */
public void buildAnnotationTypeOptionalMemberDetails(List elements) public void buildAnnotationTypeOptionalMemberDetails(List<?> elements)
throws Exception { throws Exception {
configuration.getBuilderFactory(). configuration.getBuilderFactory().
getAnnotationTypeOptionalMemberBuilder(writer).build(elements); getAnnotationTypeOptionalMemberBuilder(writer).build(elements);
@ -221,7 +221,7 @@ public class AnnotationTypeBuilder extends AbstractBuilder {
* @param elements the XML elements that specify how a annotation type * @param elements the XML elements that specify how a annotation type
* members are documented. * members are documented.
*/ */
public void buildAnnotationTypeRequiredMemberDetails(List elements) public void buildAnnotationTypeRequiredMemberDetails(List<?> elements)
throws Exception { throws Exception {
configuration.getBuilderFactory(). configuration.getBuilderFactory().
getAnnotationTypeRequiredMemberBuilder(writer).build(elements); getAnnotationTypeRequiredMemberBuilder(writer).build(elements);

View File

@ -95,7 +95,7 @@ public class AnnotationTypeOptionalMemberBuilder extends
* @param elements the XML elements that specify how to construct this * @param elements the XML elements that specify how to construct this
* documentation. * documentation.
*/ */
public void buildAnnotationTypeOptionalMember(List elements) { public void buildAnnotationTypeOptionalMember(List<?> elements) {
if (writer == null) { if (writer == null) {
return; return;
} }
@ -108,7 +108,7 @@ public class AnnotationTypeOptionalMemberBuilder extends
/** /**
* {@inheritDoc} * {@inheritDoc}
*/ */
public void invokeMethod(String methodName, Class[] paramClasses, public void invokeMethod(String methodName, Class<?>[] paramClasses,
Object[] params) Object[] params)
throws Exception { throws Exception {
if (DEBUG) { if (DEBUG) {

View File

@ -116,7 +116,7 @@ public class AnnotationTypeRequiredMemberBuilder extends AbstractMemberBuilder {
/** /**
* {@inheritDoc} * {@inheritDoc}
*/ */
public void invokeMethod(String methodName, Class[] paramClasses, public void invokeMethod(String methodName, Class<?>[] paramClasses,
Object[] params) Object[] params)
throws Exception { throws Exception {
if (DEBUG) { if (DEBUG) {
@ -135,7 +135,7 @@ public class AnnotationTypeRequiredMemberBuilder extends AbstractMemberBuilder {
* @param classDoc the {@link ClassDoc} we want to check. * @param classDoc the {@link ClassDoc} we want to check.
* @return a list of members that will be documented. * @return a list of members that will be documented.
*/ */
public List members(ClassDoc classDoc) { public List<ProgramElementDoc> members(ClassDoc classDoc) {
return visibleMemberMap.getMembersFor(classDoc); return visibleMemberMap.getMembersFor(classDoc);
} }
@ -161,7 +161,7 @@ public class AnnotationTypeRequiredMemberBuilder extends AbstractMemberBuilder {
* @param elements the XML elements that specify how to construct this * @param elements the XML elements that specify how to construct this
* documentation. * documentation.
*/ */
public void buildAnnotationTypeRequiredMember(List elements) { public void buildAnnotationTypeRequiredMember(List<?> elements) {
if (writer == null) { if (writer == null) {
return; return;
} }

View File

@ -108,7 +108,7 @@ public class ClassBuilder extends AbstractBuilder {
/** /**
* {@inheritDoc} * {@inheritDoc}
*/ */
public void invokeMethod(String methodName, Class[] paramClasses, public void invokeMethod(String methodName, Class<?>[] paramClasses,
Object[] params) Object[] params)
throws Exception { throws Exception {
if (DEBUG) { if (DEBUG) {
@ -138,7 +138,7 @@ public class ClassBuilder extends AbstractBuilder {
* *
* @param elements the XML elements that specify how to document a class. * @param elements the XML elements that specify how to document a class.
*/ */
public void buildClassDoc(List elements) throws Exception { public void buildClassDoc(List<?> elements) throws Exception {
build(elements); build(elements);
writer.close(); writer.close();
copyDocFiles(); copyDocFiles();
@ -293,7 +293,7 @@ public class ClassBuilder extends AbstractBuilder {
* @param elements the XML elements that specify how a member summary is * @param elements the XML elements that specify how a member summary is
* documented. * documented.
*/ */
public void buildMemberSummary(List elements) throws Exception { public void buildMemberSummary(List<?> elements) throws Exception {
configuration.getBuilderFactory(). configuration.getBuilderFactory().
getMemberSummaryBuilder(writer).build(elements); getMemberSummaryBuilder(writer).build(elements);
writer.completeMemberSummaryBuild(); writer.completeMemberSummaryBuild();
@ -305,7 +305,7 @@ public class ClassBuilder extends AbstractBuilder {
* @param elements the XML elements that specify how a enum constants are * @param elements the XML elements that specify how a enum constants are
* documented. * documented.
*/ */
public void buildEnumConstantsDetails(List elements) throws Exception { public void buildEnumConstantsDetails(List<?> elements) throws Exception {
configuration.getBuilderFactory(). configuration.getBuilderFactory().
getEnumConstantsBuilder(writer).build(elements); getEnumConstantsBuilder(writer).build(elements);
} }
@ -315,7 +315,7 @@ public class ClassBuilder extends AbstractBuilder {
* *
* @param elements the XML elements that specify how a field is documented. * @param elements the XML elements that specify how a field is documented.
*/ */
public void buildFieldDetails(List elements) throws Exception { public void buildFieldDetails(List<?> elements) throws Exception {
configuration.getBuilderFactory(). configuration.getBuilderFactory().
getFieldBuilder(writer).build(elements); getFieldBuilder(writer).build(elements);
} }
@ -326,7 +326,7 @@ public class ClassBuilder extends AbstractBuilder {
* @param elements the XML elements that specify how to document a * @param elements the XML elements that specify how to document a
* constructor. * constructor.
*/ */
public void buildConstructorDetails(List elements) throws Exception { public void buildConstructorDetails(List<?> elements) throws Exception {
configuration.getBuilderFactory(). configuration.getBuilderFactory().
getConstructorBuilder(writer).build(elements); getConstructorBuilder(writer).build(elements);
} }
@ -336,7 +336,7 @@ public class ClassBuilder extends AbstractBuilder {
* *
* @param elements the XML elements that specify how a method is documented. * @param elements the XML elements that specify how a method is documented.
*/ */
public void buildMethodDetails(List elements) throws Exception { public void buildMethodDetails(List<?> elements) throws Exception {
configuration.getBuilderFactory(). configuration.getBuilderFactory().
getMethodBuilder(writer).build(elements); getMethodBuilder(writer).build(elements);
} }

View File

@ -109,7 +109,7 @@ public class ConstantsSummaryBuilder extends AbstractBuilder {
/** /**
* {@inheritDoc} * {@inheritDoc}
*/ */
public void invokeMethod(String methodName, Class[] paramClasses, public void invokeMethod(String methodName, Class<?>[] paramClasses,
Object[] params) Object[] params)
throws Exception { throws Exception {
if (DEBUG) { if (DEBUG) {
@ -144,7 +144,7 @@ public class ConstantsSummaryBuilder extends AbstractBuilder {
* @param elements the list of elements describing constant summary * @param elements the list of elements describing constant summary
* documentation. * documentation.
*/ */
public void buildConstantSummary(List elements) throws Exception { public void buildConstantSummary(List<?> elements) throws Exception {
build(elements); build(elements);
writer.close(); writer.close();
} }
@ -186,7 +186,7 @@ public class ConstantsSummaryBuilder extends AbstractBuilder {
* @param elements the XML elements that represent the components * @param elements the XML elements that represent the components
* of documentation for each package. * of documentation for each package.
*/ */
public void buildConstantSummaries(List elements) { public void buildConstantSummaries(List<?> elements) {
PackageDoc[] packages = configuration.packages; PackageDoc[] packages = configuration.packages;
printedPackageHeaders = new HashSet<String>(); printedPackageHeaders = new HashSet<String>();
for (int i = 0; i < packages.length; i++) { for (int i = 0; i < packages.length; i++) {
@ -204,7 +204,7 @@ public class ConstantsSummaryBuilder extends AbstractBuilder {
* @param elements the list of XML elements that make up package * @param elements the list of XML elements that make up package
* documentation. * documentation.
*/ */
public void buildPackageConstantSummary(List elements) { public void buildPackageConstantSummary(List<?> elements) {
build(elements); build(elements);
} }
@ -214,7 +214,7 @@ public class ConstantsSummaryBuilder extends AbstractBuilder {
* @param elements the list of XML elements that make up the class * @param elements the list of XML elements that make up the class
* constant summary. * constant summary.
*/ */
public void buildClassConstantSummary(List elements) { public void buildClassConstantSummary(List<?> elements) {
ClassDoc[] classes = currentPackage.name().length() > 0 ? ClassDoc[] classes = currentPackage.name().length() > 0 ?
currentPackage.allClasses() : currentPackage.allClasses() :
configuration.classDocCatalog.allClasses( configuration.classDocCatalog.allClasses(
@ -297,8 +297,8 @@ public class ConstantsSummaryBuilder extends AbstractBuilder {
private boolean hasConstantField (ClassDoc classDoc) { private boolean hasConstantField (ClassDoc classDoc) {
VisibleMemberMap visibleMemberMapFields = new VisibleMemberMap(classDoc, VisibleMemberMap visibleMemberMapFields = new VisibleMemberMap(classDoc,
VisibleMemberMap.FIELDS, configuration.nodeprecated); VisibleMemberMap.FIELDS, configuration.nodeprecated);
List fields = visibleMemberMapFields.getLeafClassMembers(configuration); List<?> fields = visibleMemberMapFields.getLeafClassMembers(configuration);
for (Iterator iter = fields.iterator(); iter.hasNext(); ) { for (Iterator<?> iter = fields.iterator(); iter.hasNext(); ) {
FieldDoc field = (FieldDoc) iter.next(); FieldDoc field = (FieldDoc) iter.next();
if (field.constantValueExpression() != null) { if (field.constantValueExpression() != null) {
classDocsWithConstFields.add(classDoc); classDocsWithConstFields.add(classDoc);

View File

@ -138,7 +138,7 @@ public class ConstructorBuilder extends AbstractMemberBuilder {
*/ */
public void invokeMethod( public void invokeMethod(
String methodName, String methodName,
Class[] paramClasses, Class<?>[] paramClasses,
Object[] params) Object[] params)
throws Exception { throws Exception {
if (DEBUG) { if (DEBUG) {
@ -156,7 +156,7 @@ public class ConstructorBuilder extends AbstractMemberBuilder {
* *
* @return a list of constructors that will be documented. * @return a list of constructors that will be documented.
*/ */
public List members(ClassDoc classDoc) { public List<ProgramElementDoc> members(ClassDoc classDoc) {
return visibleMemberMap.getMembersFor(classDoc); return visibleMemberMap.getMembersFor(classDoc);
} }
@ -175,7 +175,7 @@ public class ConstructorBuilder extends AbstractMemberBuilder {
* @param elements the XML elements that specify how to construct this * @param elements the XML elements that specify how to construct this
* documentation. * documentation.
*/ */
public void buildConstructorDoc(List elements) { public void buildConstructorDoc(List<?> elements) {
if (writer == null) { if (writer == null) {
return; return;
} }

View File

@ -120,7 +120,7 @@ public class EnumConstantBuilder extends AbstractMemberBuilder {
*/ */
public void invokeMethod( public void invokeMethod(
String methodName, String methodName,
Class[] paramClasses, Class<?>[] paramClasses,
Object[] params) Object[] params)
throws Exception { throws Exception {
if (DEBUG) { if (DEBUG) {
@ -139,7 +139,7 @@ public class EnumConstantBuilder extends AbstractMemberBuilder {
* @param classDoc the {@link ClassDoc} we want to check. * @param classDoc the {@link ClassDoc} we want to check.
* @return a list of enum constants that will be documented. * @return a list of enum constants that will be documented.
*/ */
public List members(ClassDoc classDoc) { public List<ProgramElementDoc> members(ClassDoc classDoc) {
return visibleMemberMap.getMembersFor(classDoc); return visibleMemberMap.getMembersFor(classDoc);
} }
@ -165,7 +165,7 @@ public class EnumConstantBuilder extends AbstractMemberBuilder {
* @param elements the XML elements that specify how to construct this * @param elements the XML elements that specify how to construct this
* documentation. * documentation.
*/ */
public void buildEnumConstant(List elements) { public void buildEnumConstant(List<?> elements) {
if (writer == null) { if (writer == null) {
return; return;
} }

View File

@ -121,7 +121,7 @@ public class FieldBuilder extends AbstractMemberBuilder {
*/ */
public void invokeMethod( public void invokeMethod(
String methodName, String methodName,
Class[] paramClasses, Class<?>[] paramClasses,
Object[] params) Object[] params)
throws Exception { throws Exception {
if (DEBUG) { if (DEBUG) {
@ -140,7 +140,7 @@ public class FieldBuilder extends AbstractMemberBuilder {
* @param classDoc the {@link ClassDoc} we want to check. * @param classDoc the {@link ClassDoc} we want to check.
* @return a list of fields that will be documented. * @return a list of fields that will be documented.
*/ */
public List members(ClassDoc classDoc) { public List<ProgramElementDoc> members(ClassDoc classDoc) {
return visibleMemberMap.getMembersFor(classDoc); return visibleMemberMap.getMembersFor(classDoc);
} }
@ -166,7 +166,7 @@ public class FieldBuilder extends AbstractMemberBuilder {
* @param elements the XML elements that specify how to construct this * @param elements the XML elements that specify how to construct this
* documentation. * documentation.
*/ */
public void buildFieldDoc(List elements) { public void buildFieldDoc(List<?> elements) {
if (writer == null) { if (writer == null) {
return; return;
} }

View File

@ -78,9 +78,9 @@ public class LayoutParser extends DefaultHandler {
* *
* @return List the list of XML elements parsed. * @return List the list of XML elements parsed.
*/ */
public List parseXML(String root) { public List<?> parseXML(String root) {
if (xmlElementsMap.containsKey(root)) { if (xmlElementsMap.containsKey(root)) {
return (List) xmlElementsMap.get(root); return xmlElementsMap.get(root);
} }
try { try {
List<Object> xmlElements = new ArrayList<Object>(); List<Object> xmlElements = new ArrayList<Object>();

View File

@ -170,7 +170,7 @@ public class MemberSummaryBuilder extends AbstractMemberBuilder {
* @return a list of methods that will be documented. * @return a list of methods that will be documented.
* @see VisibleMemberMap * @see VisibleMemberMap
*/ */
public List members(int type) { public List<ProgramElementDoc> members(int type) {
return visibleMemberMaps[type].getLeafClassMembers(configuration); return visibleMemberMaps[type].getLeafClassMembers(configuration);
} }
@ -179,7 +179,7 @@ public class MemberSummaryBuilder extends AbstractMemberBuilder {
*/ */
public void invokeMethod( public void invokeMethod(
String methodName, String methodName,
Class[] paramClasses, Class<?>[] paramClasses,
Object[] params) Object[] params)
throws Exception { throws Exception {
if (DEBUG) { if (DEBUG) {
@ -339,9 +339,9 @@ public class MemberSummaryBuilder extends AbstractMemberBuilder {
*/ */
private void buildInheritedSummary(MemberSummaryWriter writer, private void buildInheritedSummary(MemberSummaryWriter writer,
VisibleMemberMap visibleMemberMap) { VisibleMemberMap visibleMemberMap) {
for (Iterator iter = visibleMemberMap.getVisibleClassesList().iterator(); for (Iterator<ClassDoc> iter = visibleMemberMap.getVisibleClassesList().iterator();
iter.hasNext();) { iter.hasNext();) {
ClassDoc inhclass = (ClassDoc) (iter.next()); ClassDoc inhclass = iter.next();
if (! (inhclass.isPublic() || if (! (inhclass.isPublic() ||
Util.isLinkable(inhclass, configuration))) { Util.isLinkable(inhclass, configuration))) {
continue; continue;

View File

@ -116,7 +116,7 @@ public class MethodBuilder extends AbstractMemberBuilder {
*/ */
public void invokeMethod( public void invokeMethod(
String methodName, String methodName,
Class[] paramClasses, Class<?>[] paramClasses,
Object[] params) Object[] params)
throws Exception { throws Exception {
if (DEBUG) { if (DEBUG) {
@ -135,7 +135,7 @@ public class MethodBuilder extends AbstractMemberBuilder {
* @param classDoc the {@link ClassDoc} we want to check. * @param classDoc the {@link ClassDoc} we want to check.
* @return a list of methods that will be documented. * @return a list of methods that will be documented.
*/ */
public List members(ClassDoc classDoc) { public List<ProgramElementDoc> members(ClassDoc classDoc) {
return visibleMemberMap.getMembersFor(classDoc); return visibleMemberMap.getMembersFor(classDoc);
} }
@ -158,7 +158,7 @@ public class MethodBuilder extends AbstractMemberBuilder {
/** /**
* Build the method documentation. * Build the method documentation.
*/ */
public void buildMethodDoc(List elements) { public void buildMethodDoc(List<?> elements) {
if (writer == null) { if (writer == null) {
return; return;
} }

View File

@ -88,7 +88,7 @@ public class PackageSummaryBuilder extends AbstractBuilder {
*/ */
public void invokeMethod( public void invokeMethod(
String methodName, String methodName,
Class[] paramClasses, Class<?>[] paramClasses,
Object[] params) Object[] params)
throws Exception { throws Exception {
if (DEBUG) { if (DEBUG) {
@ -120,7 +120,7 @@ public class PackageSummaryBuilder extends AbstractBuilder {
/** /**
* Build the package documentation. * Build the package documentation.
*/ */
public void buildPackageDoc(List elements) throws Exception { public void buildPackageDoc(List<?> elements) throws Exception {
build(elements); build(elements);
packageWriter.close(); packageWriter.close();
Util.copyDocFiles( Util.copyDocFiles(
@ -162,7 +162,7 @@ public class PackageSummaryBuilder extends AbstractBuilder {
/** /**
* Build the package summary. * Build the package summary.
*/ */
public void buildSummary(List elements) { public void buildSummary(List<?> elements) {
build(elements); build(elements);
} }

View File

@ -130,7 +130,7 @@ public class SerializedFormBuilder extends AbstractBuilder {
/** /**
* Build the serialized form. * Build the serialized form.
*/ */
public void buildSerializedForm(List elements) throws Exception { public void buildSerializedForm(List<?> elements) throws Exception {
build(elements); build(elements);
writer.close(); writer.close();
} }
@ -138,7 +138,7 @@ public class SerializedFormBuilder extends AbstractBuilder {
/** /**
* {@inheritDoc} * {@inheritDoc}
*/ */
public void invokeMethod(String methodName, Class[] paramClasses, public void invokeMethod(String methodName, Class<?>[] paramClasses,
Object[] params) Object[] params)
throws Exception { throws Exception {
if (DEBUG) { if (DEBUG) {
@ -159,7 +159,7 @@ public class SerializedFormBuilder extends AbstractBuilder {
/** /**
* Build the contents. * Build the contents.
*/ */
public void buildSerializedFormSummaries(List elements) { public void buildSerializedFormSummaries(List<?> elements) {
PackageDoc[] packages = configuration.packages; PackageDoc[] packages = configuration.packages;
for (int i = 0; i < packages.length; i++) { for (int i = 0; i < packages.length; i++) {
currentPackage = packages[i]; currentPackage = packages[i];
@ -170,7 +170,7 @@ public class SerializedFormBuilder extends AbstractBuilder {
/** /**
* Build the package serialized for for the current package being processed. * Build the package serialized for for the current package being processed.
*/ */
public void buildPackageSerializedForm(List elements) { public void buildPackageSerializedForm(List<?> elements) {
String foo = currentPackage.name(); String foo = currentPackage.name();
ClassDoc[] classes = currentPackage.allClasses(false); ClassDoc[] classes = currentPackage.allClasses(false);
if (classes == null || classes.length == 0) { if (classes == null || classes.length == 0) {
@ -189,7 +189,7 @@ public class SerializedFormBuilder extends AbstractBuilder {
writer.writePackageHeader(Util.getPackageName(currentPackage)); writer.writePackageHeader(Util.getPackageName(currentPackage));
} }
public void buildClassSerializedForm(List elements) { public void buildClassSerializedForm(List<?> elements) {
ClassDoc[] classes = currentPackage.allClasses(false); ClassDoc[] classes = currentPackage.allClasses(false);
Arrays.sort(classes); Arrays.sort(classes);
for (int j = 0; j < classes.length; j++) { for (int j = 0; j < classes.length; j++) {
@ -368,7 +368,7 @@ public class SerializedFormBuilder extends AbstractBuilder {
/** /**
* build the information for the method. * build the information for the method.
*/ */
public void buildMethodInfo(List elements) { public void buildMethodInfo(List<?> elements) {
if(configuration.nocomment){ if(configuration.nocomment){
return; return;
} }
@ -478,7 +478,7 @@ public class SerializedFormBuilder extends AbstractBuilder {
* Build the summaries for the methods that belong to the given * Build the summaries for the methods that belong to the given
* class. * class.
*/ */
public void buildSerializableMethods(List elements) { public void buildSerializableMethods(List<?> elements) {
MemberDoc[] members = currentClass.serializationMethods(); MemberDoc[] members = currentClass.serializationMethods();
if (members.length > 0) { if (members.length > 0) {
for (int i = 0; i < members.length; i++) { for (int i = 0; i < members.length; i++) {
@ -492,7 +492,7 @@ public class SerializedFormBuilder extends AbstractBuilder {
* Build the summaries for the fields that belong to the given * Build the summaries for the fields that belong to the given
* class. * class.
*/ */
public void buildSerializableFields(List elements) { public void buildSerializableFields(List<?> elements) {
MemberDoc[] members = currentClass.serializableFields(); MemberDoc[] members = currentClass.serializableFields();
if (members.length > 0) { if (members.length > 0) {
for (int i = 0; i < members.length; i++) { for (int i = 0; i < members.length; i++) {

View File

@ -100,7 +100,7 @@ public class ParamTaglet extends BaseTaglet implements InheritableTaglet {
} }
ParamTag[] tags = input.isTypeVariableParamTag ? ParamTag[] tags = input.isTypeVariableParamTag ?
input.method.typeParamTags() : input.method.paramTags(); input.method.typeParamTags() : input.method.paramTags();
Map rankMap = getRankMap(input.isTypeVariableParamTag ? Map<String, String> rankMap = getRankMap(input.isTypeVariableParamTag ?
(Object[]) input.method.typeParameters() : (Object[]) input.method.typeParameters() :
(Object[]) input.method.parameters()); (Object[]) input.method.parameters());
for (int i = 0; i < tags.length; i++) { for (int i = 0; i < tags.length; i++) {
@ -262,7 +262,7 @@ public class ParamTaglet extends BaseTaglet implements InheritableTaglet {
* @return the TagletOutput representation of this <code>Tag</code>. * @return the TagletOutput representation of this <code>Tag</code>.
*/ */
private TagletOutput processParamTags(boolean isNonTypeParams, private TagletOutput processParamTags(boolean isNonTypeParams,
ParamTag[] paramTags, Map rankMap, TagletWriter writer, ParamTag[] paramTags, Map<String, String> rankMap, TagletWriter writer,
Set<String> alreadyDocumented) { Set<String> alreadyDocumented) {
TagletOutput result = writer.getOutputInstance(); TagletOutput result = writer.getOutputInstance();
if (paramTags.length > 0) { if (paramTags.length > 0) {
@ -277,7 +277,7 @@ public class ParamTaglet extends BaseTaglet implements InheritableTaglet {
"doclet.Type_Parameters_warn", "doclet.Type_Parameters_warn",
paramName); paramName);
} }
String rank = (String) rankMap.get(pt.parameterName()); String rank = rankMap.get(pt.parameterName());
if (rank != null && alreadyDocumented.contains(rank)) { if (rank != null && alreadyDocumented.contains(rank)) {
writer.getMsgRetriever().warning(pt.position(), writer.getMsgRetriever().warning(pt.position(),
isNonTypeParams ? isNonTypeParams ?

View File

@ -212,7 +212,7 @@ public class TagletManager {
URLClassLoader appClassLoader = new URLClassLoader(pathToURLs(cpString)); URLClassLoader appClassLoader = new URLClassLoader(pathToURLs(cpString));
customTagClass = appClassLoader.loadClass(classname); customTagClass = appClassLoader.loadClass(classname);
Method meth = customTagClass.getMethod("register", Method meth = customTagClass.getMethod("register",
new Class[] {Class.forName("java.util.Map")}); new Class<?>[] {java.util.Map.class});
Object[] list = customTags.values().toArray(); Object[] list = customTags.values().toArray();
Taglet lastTag = (list != null && list.length > 0) Taglet lastTag = (list != null && list.length > 0)
? (Taglet) list[list.length-1] : null; ? (Taglet) list[list.length-1] : null;
@ -705,9 +705,9 @@ public class TagletManager {
* Initialize lowercase version of standard Javadoc tags. * Initialize lowercase version of standard Javadoc tags.
*/ */
private void initStandardTagsLowercase() { private void initStandardTagsLowercase() {
Iterator it = standardTags.iterator(); Iterator<String> it = standardTags.iterator();
while (it.hasNext()) { while (it.hasNext()) {
standardTagsLowercase.add(((String)it.next()).toLowerCase()); standardTagsLowercase.add(it.next().toLowerCase());
} }
} }

View File

@ -177,9 +177,9 @@ public class ClassTree {
bases.add(cd); bases.add(cd);
} }
} }
List intfacs = Util.getAllInterfaces(cd, configuration); List<Type> intfacs = Util.getAllInterfaces(cd, configuration);
for (Iterator iter = intfacs.iterator(); iter.hasNext();) { for (Iterator<Type> iter = intfacs.iterator(); iter.hasNext();) {
add(implementingclasses, ((Type) iter.next()).asClassDoc(), cd); add(implementingclasses, iter.next().asClassDoc(), cd);
} }
} }
@ -278,13 +278,13 @@ public class ClassTree {
//If class x implements a subinterface of cd, then it follows //If class x implements a subinterface of cd, then it follows
//that class x implements cd. //that class x implements cd.
Iterator implementingClassesIter, subInterfacesIter = subinterfaces.listIterator(); Iterator<ClassDoc> implementingClassesIter, subInterfacesIter = subinterfaces.listIterator();
ClassDoc c; ClassDoc c;
while(subInterfacesIter.hasNext()){ while(subInterfacesIter.hasNext()){
implementingClassesIter = implementingclasses((ClassDoc) implementingClassesIter = implementingclasses(
subInterfacesIter.next()).listIterator(); subInterfacesIter.next()).listIterator();
while(implementingClassesIter.hasNext()){ while(implementingClassesIter.hasNext()){
c = (ClassDoc)implementingClassesIter.next(); c = implementingClassesIter.next();
if(! result.contains(c)){ if(! result.contains(c)){
result.add(c); result.add(c);
} }
@ -328,9 +328,9 @@ public class ClassTree {
List<ClassDoc> list = subs(cd, isEnum); List<ClassDoc> list = subs(cd, isEnum);
for (int i = 0; i < list.size(); i++) { for (int i = 0; i < list.size(); i++) {
cd = list.get(i); cd = list.get(i);
List tlist = subs(cd, isEnum); List<ClassDoc> tlist = subs(cd, isEnum);
for (int j = 0; j < tlist.size(); j++) { for (int j = 0; j < tlist.size(); j++) {
ClassDoc tcd = (ClassDoc)tlist.get(j); ClassDoc tcd = tlist.get(j);
if (!list.contains(tcd)) { if (!list.contains(tcd)) {
list.add(tcd); list.add(tcd);
} }
@ -345,7 +345,7 @@ public class ClassTree {
* thw classdoc for java.lang.Object, since this is the base class for all * thw classdoc for java.lang.Object, since this is the base class for all
* classes. * classes.
*/ */
public List baseclasses() { public List<ClassDoc> baseclasses() {
return baseclasses; return baseclasses;
} }
@ -353,7 +353,7 @@ public class ClassTree {
* Return the list of base interfaces. This is the list of interfaces * Return the list of base interfaces. This is the list of interfaces
* which do not have super-interface. * which do not have super-interface.
*/ */
public List baseinterfaces() { public List<ClassDoc> baseinterfaces() {
return baseinterfaces; return baseinterfaces;
} }
@ -361,7 +361,7 @@ public class ClassTree {
* Return the list of base enums. This is the list of enums * Return the list of base enums. This is the list of enums
* which do not have super-enums. * which do not have super-enums.
*/ */
public List baseEnums() { public List<ClassDoc> baseEnums() {
return baseEnums; return baseEnums;
} }
@ -369,7 +369,7 @@ public class ClassTree {
* Return the list of base annotation types. This is the list of * Return the list of base annotation types. This is the list of
* annotation types which do not have super-annotation types. * annotation types which do not have super-annotation types.
*/ */
public List baseAnnotationTypes() { public List<ClassDoc> baseAnnotationTypes() {
return baseAnnotationTypes; return baseAnnotationTypes;
} }
} }

View File

@ -184,12 +184,12 @@ public class ClassUseMapper {
this.classtree = classtree; this.classtree = classtree;
// Map subclassing, subinterfacing implementing, ... // Map subclassing, subinterfacing implementing, ...
for (Iterator it = classtree.baseclasses().iterator(); it.hasNext();) { for (Iterator<ClassDoc> it = classtree.baseclasses().iterator(); it.hasNext();) {
subclasses((ClassDoc)it.next()); subclasses(it.next());
} }
for (Iterator it = classtree.baseinterfaces().iterator(); it.hasNext();) { for (Iterator<ClassDoc> it = classtree.baseinterfaces().iterator(); it.hasNext();) {
// does subinterfacing as side-effect // does subinterfacing as side-effect
implementingClasses((ClassDoc)it.next()); implementingClasses(it.next());
} }
// Map methods, fields, constructors using a class. // Map methods, fields, constructors using a class.
ClassDoc[] classes = root.classes(); ClassDoc[] classes = root.classes();
@ -279,12 +279,12 @@ public class ClassUseMapper {
List<ClassDoc> impl = classtree.implementingclasses(cd); List<ClassDoc> impl = classtree.implementingclasses(cd);
if (impl != null) { if (impl != null) {
ret.addAll(impl); ret.addAll(impl);
for (Iterator it = impl.iterator(); it.hasNext();) { for (Iterator<ClassDoc> it = impl.iterator(); it.hasNext();) {
ret.addAll(subclasses((ClassDoc)it.next())); ret.addAll(subclasses(it.next()));
} }
} }
for (Iterator it = subinterfaces(cd).iterator(); it.hasNext();) { for (Iterator<ClassDoc> it = subinterfaces(cd).iterator(); it.hasNext();) {
ret.addAll(implementingClasses((ClassDoc)it.next())); ret.addAll(implementingClasses(it.next()));
} }
addAll(classToImplementingClass, cd, ret); addAll(classToImplementingClass, cd, ret);
} }
@ -328,8 +328,7 @@ public class ClassUseMapper {
private <T> List<T> refList(Map<String,List<T>> map, ClassDoc cd) { private <T> List<T> refList(Map<String,List<T>> map, ClassDoc cd) {
List<T> list = map.get(cd.qualifiedName()); List<T> list = map.get(cd.qualifiedName());
if (list == null) { if (list == null) {
@SuppressWarnings("unchecked") List<T> l = new ArrayList<T>();
List<T> l = new ArrayList();
list = l; list = l;
map.put(cd.qualifiedName(), list); map.put(cd.qualifiedName(), list);
} }
@ -348,8 +347,7 @@ public class ClassUseMapper {
private Set<ClassDoc> classSet(ClassDoc cd) { private Set<ClassDoc> classSet(ClassDoc cd) {
Set<ClassDoc> clsSet = classToClass.get(cd.qualifiedName()); Set<ClassDoc> clsSet = classToClass.get(cd.qualifiedName());
if (clsSet == null) { if (clsSet == null) {
@SuppressWarnings("unchecked") Set<ClassDoc> s = new TreeSet<ClassDoc>();
Set<ClassDoc> s = new TreeSet();
clsSet = s; clsSet = s;
classToClass.put(cd.qualifiedName(), clsSet); classToClass.put(cd.qualifiedName(), clsSet);
} }

View File

@ -152,7 +152,7 @@ public class Group {
* *
* @return true if package name format found in the map, else false. * @return true if package name format found in the map, else false.
*/ */
boolean foundGroupFormat(Map map, String pkgFormat) { boolean foundGroupFormat(Map<String,?> map, String pkgFormat) {
if (map.containsKey(pkgFormat)) { if (map.containsKey(pkgFormat)) {
configuration.message.error("doclet.Same_package_name_used", pkgFormat); configuration.message.error("doclet.Same_package_name_used", pkgFormat);
return true; return true;
@ -239,7 +239,7 @@ public class Group {
* Return the list of groups, in the same order as specified * Return the list of groups, in the same order as specified
* on the command line. * on the command line.
*/ */
public List getGroupList() { public List<String> getGroupList() {
return groupList; return groupList;
} }
} }

View File

@ -86,9 +86,9 @@ public class ImplementedMethods {
* from the array passed. * from the array passed.
*/ */
private void buildImplementedMethodList(boolean sort) { private void buildImplementedMethodList(boolean sort) {
List intfacs = Util.getAllInterfaces(classdoc, configuration, sort); List<Type> intfacs = Util.getAllInterfaces(classdoc, configuration, sort);
for (Iterator iter = intfacs.iterator(); iter.hasNext(); ) { for (Iterator<Type> iter = intfacs.iterator(); iter.hasNext(); ) {
Type interfaceType = (Type) iter.next(); Type interfaceType = iter.next();
MethodDoc found = Util.findMethod(interfaceType.asClassDoc(), method); MethodDoc found = Util.findMethod(interfaceType.asClassDoc(), method);
if (found != null) { if (found != null) {
removeOverriddenMethod(found); removeOverriddenMethod(found);

View File

@ -114,7 +114,7 @@ public class IndexBuilder {
this.noDeprecated = noDeprecated; this.noDeprecated = noDeprecated;
this.classesOnly = classesOnly; this.classesOnly = classesOnly;
buildIndexMap(configuration.root); buildIndexMap(configuration.root);
Set set = indexmap.keySet(); Set<Character> set = indexmap.keySet();
elements = set.toArray(); elements = set.toArray();
Arrays.sort(elements); Arrays.sort(elements);
} }
@ -215,7 +215,7 @@ public class IndexBuilder {
* *
* @return Map index map. * @return Map index map.
*/ */
public Map getIndexMap() { public Map<Character,List<Doc>> getIndexMap() {
return indexmap; return indexmap;
} }
@ -225,8 +225,8 @@ public class IndexBuilder {
* @param index index Unicode character. * @param index index Unicode character.
* @return List member list for specific Unicode character. * @return List member list for specific Unicode character.
*/ */
public List getMemberList(Character index) { public List<Doc> getMemberList(Character index) {
return (List)indexmap.get(index); return indexmap.get(index);
} }
/** /**

View File

@ -88,10 +88,10 @@ public class Util {
/** /**
* Return the list of ProgramElementDoc objects as Array. * Return the list of ProgramElementDoc objects as Array.
*/ */
public static ProgramElementDoc[] toProgramElementDocArray(List list) { public static ProgramElementDoc[] toProgramElementDocArray(List<ProgramElementDoc> list) {
ProgramElementDoc[] pgmarr = new ProgramElementDoc[list.size()]; ProgramElementDoc[] pgmarr = new ProgramElementDoc[list.size()];
for (int i = 0; i < list.size(); i++) { for (int i = 0; i < list.size(); i++) {
pgmarr[i] = (ProgramElementDoc)(list.get(i)); pgmarr[i] = list.get(i);
} }
return pgmarr; return pgmarr;
} }
@ -416,9 +416,9 @@ public class Util {
continue; continue;
} }
results.put(interfaceClassDoc, interfaceType); results.put(interfaceClassDoc, interfaceType);
List superInterfaces = getAllInterfaces(interfaceType, configuration, sort); List<Type> superInterfaces = getAllInterfaces(interfaceType, configuration, sort);
for (Iterator iter = superInterfaces.iterator(); iter.hasNext(); ) { for (Iterator<Type> iter = superInterfaces.iterator(); iter.hasNext(); ) {
Type t = (Type) iter.next(); Type t = iter.next();
results.put(t.asClassDoc(), t); results.put(t.asClassDoc(), t);
} }
} }
@ -438,7 +438,7 @@ public class Util {
return resultsList; return resultsList;
} }
public static List getAllInterfaces(Type type, Configuration configuration) { public static List<Type> getAllInterfaces(Type type, Configuration configuration) {
return getAllInterfaces(type, configuration, true); return getAllInterfaces(type, configuration, true);
} }
@ -480,9 +480,9 @@ public class Util {
if (raw) if (raw)
interfaceType = interfaceType.asClassDoc(); interfaceType = interfaceType.asClassDoc();
results.put(interfaceClassDoc, interfaceType); results.put(interfaceClassDoc, interfaceType);
List superInterfaces = getAllInterfaces(interfaceType, configuration); List<Type> superInterfaces = getAllInterfaces(interfaceType, configuration);
for (Iterator iter = superInterfaces.iterator(); iter.hasNext(); ) { for (Iterator<Type> iter = superInterfaces.iterator(); iter.hasNext(); ) {
Type superInterface = (Type) iter.next(); Type superInterface = iter.next();
results.put(superInterface.asClassDoc(), superInterface); results.put(superInterface.asClassDoc(), superInterface);
} }
} }
@ -495,8 +495,8 @@ public class Util {
} }
public static List<ProgramElementDoc> asList(ProgramElementDoc[] members) { public static <T extends ProgramElementDoc> List<T> asList(T[] members) {
List<ProgramElementDoc> list = new ArrayList<ProgramElementDoc>(); List<T> list = new ArrayList<T>();
for (int i = 0; i < members.length; i++) { for (int i = 0; i < members.length; i++) {
list.add(members[i]); list.add(members[i]);
} }

View File

@ -116,7 +116,7 @@ public class VisibleMemberMap {
* *
* @return the list of visible classes in this map. * @return the list of visible classes in this map.
*/ */
public List getVisibleClassesList() { public List<ClassDoc> getVisibleClassesList() {
sort(visibleClasses); sort(visibleClasses);
return visibleClasses; return visibleClasses;
} }
@ -130,8 +130,8 @@ public class VisibleMemberMap {
*/ */
private List<ProgramElementDoc> getInheritedPackagePrivateMethods(Configuration configuration) { private List<ProgramElementDoc> getInheritedPackagePrivateMethods(Configuration configuration) {
List<ProgramElementDoc> results = new ArrayList<ProgramElementDoc>(); List<ProgramElementDoc> results = new ArrayList<ProgramElementDoc>();
for (Iterator iter = visibleClasses.iterator(); iter.hasNext(); ) { for (Iterator<ClassDoc> iter = visibleClasses.iterator(); iter.hasNext(); ) {
ClassDoc currentClass = (ClassDoc) iter.next(); ClassDoc currentClass = iter.next();
if (currentClass != classdoc && if (currentClass != classdoc &&
currentClass.isPackagePrivate() && currentClass.isPackagePrivate() &&
!Util.isLinkable(currentClass, configuration)) { !Util.isLinkable(currentClass, configuration)) {
@ -203,10 +203,10 @@ public class VisibleMemberMap {
} }
} }
private void purgeMemberLevelMap(List list, String level) { private void purgeMemberLevelMap(List<ProgramElementDoc> list, String level) {
for (int i = 0; i < list.size(); i++) { for (int i = 0; i < list.size(); i++) {
Object key = getMemberKey((ProgramElementDoc)list.get(i)); Object key = getMemberKey(list.get(i));
Map memberLevelMap = (Map) memberNameMap.get(key); Map<ProgramElementDoc, String> memberLevelMap = memberNameMap.get(key);
if (level.equals(memberLevelMap.get(list.get(i)))) if (level.equals(memberLevelMap.get(list.get(i))))
memberLevelMap.remove(list.get(i)); memberLevelMap.remove(list.get(i));
} }
@ -230,7 +230,7 @@ public class VisibleMemberMap {
} }
public boolean isEqual(MethodDoc member) { public boolean isEqual(MethodDoc member) {
for (Iterator iter = members.iterator(); iter.hasNext(); ) { for (Iterator<ProgramElementDoc> iter = members.iterator(); iter.hasNext(); ) {
MethodDoc member2 = (MethodDoc) iter.next(); MethodDoc member2 = (MethodDoc) iter.next();
if (Util.executableMembersEqual(member, member2)) { if (Util.executableMembersEqual(member, member2)) {
members.add(member); members.add(member);
@ -438,9 +438,9 @@ public class VisibleMemberMap {
return targetMembers.toArray(new AnnotationTypeElementDoc[]{}); return targetMembers.toArray(new AnnotationTypeElementDoc[]{});
} }
private boolean found(List list, ProgramElementDoc elem) { private boolean found(List<ProgramElementDoc> list, ProgramElementDoc elem) {
for (int i = 0; i < list.size(); i++) { for (int i = 0; i < list.size(); i++) {
ProgramElementDoc pgmelem = (ProgramElementDoc)list.get(i); ProgramElementDoc pgmelem = list.get(i);
if (Util.matches(pgmelem, elem)) { if (Util.matches(pgmelem, elem)) {
return true; return true;
} }
@ -455,13 +455,13 @@ public class VisibleMemberMap {
* level "111". * level "111".
*/ */
private boolean isOverridden(ProgramElementDoc pgmdoc, String level) { private boolean isOverridden(ProgramElementDoc pgmdoc, String level) {
Map memberLevelMap = (Map) memberNameMap.get(getMemberKey(pgmdoc)); Map<?,String> memberLevelMap = (Map<?,String>) memberNameMap.get(getMemberKey(pgmdoc));
if (memberLevelMap == null) if (memberLevelMap == null)
return false; return false;
String mappedlevel = null; String mappedlevel = null;
Iterator iterator = memberLevelMap.values().iterator(); Iterator<String> iterator = memberLevelMap.values().iterator();
while (iterator.hasNext()) { while (iterator.hasNext()) {
mappedlevel = (String)(iterator.next()); mappedlevel = iterator.next();
if (mappedlevel.equals(STARTLEVEL) || if (mappedlevel.equals(STARTLEVEL) ||
(level.startsWith(mappedlevel) && (level.startsWith(mappedlevel) &&
!level.equals(mappedlevel))) { !level.equals(mappedlevel))) {
@ -482,7 +482,7 @@ public class VisibleMemberMap {
} }
private ClassMember getClassMember(MethodDoc member) { private ClassMember getClassMember(MethodDoc member) {
for (Iterator iter = memberNameMap.keySet().iterator(); iter.hasNext();) { for (Iterator<?> iter = memberNameMap.keySet().iterator(); iter.hasNext();) {
Object key = iter.next(); Object key = iter.next();
if (key instanceof String) { if (key instanceof String) {
continue; continue;

View File

@ -69,9 +69,9 @@ public abstract class LinkInfo {
public String label; public String label;
/** /**
* True if the link should be bolded. * True if the link should be strong.
*/ */
public boolean isBold = false; public boolean isStrong = false;
/** /**
* True if we should include the type in the link label. False otherwise. * True if we should include the type in the link label. False otherwise.

Some files were not shown because too many files have changed in this diff Show More