提交 cf483398 编写于 作者: J jgodinez

Merge

...@@ -51,6 +51,7 @@ DEV_DOCS_URL-5 = http://java.sun.com/j2se/1.5.0/docs/index.html ...@@ -51,6 +51,7 @@ DEV_DOCS_URL-5 = http://java.sun.com/j2se/1.5.0/docs/index.html
DEV_DOCS_URL-6 = http://download.oracle.com/javase/6/docs/index.html DEV_DOCS_URL-6 = http://download.oracle.com/javase/6/docs/index.html
DEV_DOCS_URL-7 = http://download.oracle.com/javase/7/docs/index.html DEV_DOCS_URL-7 = http://download.oracle.com/javase/7/docs/index.html
DEV_DOCS_URL = $(DEV_DOCS_URL-$(JDK_MINOR_VERSION)) DEV_DOCS_URL = $(DEV_DOCS_URL-$(JDK_MINOR_VERSION))
DOCS_BASE_URL = http://download.oracle.com/javase/7/docs
# Url to Java Language Spec # Url to Java Language Spec
#JLS3_URL = http://java.sun.com/docs/books/jls/ #JLS3_URL = http://java.sun.com/docs/books/jls/
...@@ -205,7 +206,13 @@ COMMON_JAVADOCFLAGS = \ ...@@ -205,7 +206,13 @@ COMMON_JAVADOCFLAGS = \
-use \ -use \
-keywords \ -keywords \
$(ADDITIONAL_JAVADOCFLAGS) $(ADDITIONAL_JAVADOCFLAGS)
ADDITIONAL_JAVADOCFLAGS =
ifdef OPENJDK
ADDITIONAL_JAVADOCFLAGS = \
-Xdocrootparent $(DOCS_BASE_URL)
else
ADDITIONAL_JAVADOCFLAGS =
endif
# Draft used for non-fcs documents # Draft used for non-fcs documents
JDK_IS_FCS = false JDK_IS_FCS = false
...@@ -1142,56 +1149,6 @@ $(SCTPAPI_PACKAGES_FILE): $(DIRECTORY_CACHE) $(call PackageDependencies,$(SCTPAP ...@@ -1142,56 +1149,6 @@ $(SCTPAPI_PACKAGES_FILE): $(DIRECTORY_CACHE) $(call PackageDependencies,$(SCTPAP
$(prep-target) $(prep-target)
$(call PackageFilter,$(SCTPAPI_PKGS)) $(call PackageFilter,$(SCTPAPI_PKGS))
#############################################################
#
# tracingdocs
#
ALL_OTHER_TARGETS += tracingdocs
TRACING_DOCDIR := $(JRE_API_DOCSDIR)/tracing
TRACING2COREAPI := ../$(JDKJRE2COREAPI)
TRACING_DOCTITLE := Java$(TRADEMARK) Platform Tracing
TRACING_WINDOWTITLE := Platform Tracing
TRACING_HEADER := <strong>Platform Tracing</strong>
TRACING_BOTTOM := $(call CommonBottom,$(TRACING_FIRST_COPYRIGHT_YEAR))
# TRACING_PKGS is located in NON_CORE_PKGS.gmk
TRACING_INDEX_HTML = $(TRACING_DOCDIR)/index.html
TRACING_OPTIONS_FILE = $(DOCSTMPDIR)/tracing.options
TRACING_PACKAGES_FILE = $(DOCSTMPDIR)/tracing.packages
tracingdocs: $(TRACING_INDEX_HTML)
# Set relative location to core api document root
$(TRACING_INDEX_HTML): GET2DOCSDIR=$(TRACING2COREAPI)/..
# Run javadoc if the index file is out of date or missing
$(TRACING_INDEX_HTML): $(TRACING_OPTIONS_FILE) $(TRACING_PACKAGES_FILE)
$(prep-javadoc)
$(call JavadocSummary,$(TRACING_OPTIONS_FILE),$(TRACING_PACKAGES_FILE))
$(JAVADOC_CMD) $(JAVADOC_VM_MEMORY_FLAGS) -d $(@D) \
@$(TRACING_OPTIONS_FILE) @$(TRACING_PACKAGES_FILE)
# Create file with javadoc options in it
$(TRACING_OPTIONS_FILE):
$(prep-target)
@($(call OptionOnly,$(COMMON_JAVADOCFLAGS)) ; \
$(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH)) ; \
$(call OptionPair,-encoding,ascii) ; \
$(call OptionOnly,-nodeprecatedlist) ; \
$(call OptionPair,-doctitle,$(TRACING_DOCTITLE)) ; \
$(call OptionPair,-windowtitle,$(TRACING_WINDOWTITLE) $(DRAFT_WINTITLE));\
$(call OptionPair,-header,$(TRACING_HEADER)$(DRAFT_HEADER)) ; \
$(call OptionPair,-bottom,$(TRACING_BOTTOM)$(DRAFT_BOTTOM)) ; \
$(call OptionTrip,-linkoffline,$(TRACING2COREAPI),$(COREAPI_DOCSDIR)/); \
) >> $@
# Create a file with the package names in it
$(TRACING_PACKAGES_FILE): $(DIRECTORY_CACHE) $(call PackageDependencies,$(TRACING_PKGS))
$(prep-target)
$(call PackageFilter,$(TRACING_PKGS))
############################################################# #############################################################
# #
# Get a cache of all the directories # Get a cache of all the directories
......
...@@ -88,9 +88,6 @@ SMARTCARDIO_PKGS = javax.smartcardio ...@@ -88,9 +88,6 @@ SMARTCARDIO_PKGS = javax.smartcardio
SCTPAPI_PKGS = com.sun.nio.sctp SCTPAPI_PKGS = com.sun.nio.sctp
TRACING_PKGS = com.sun.tracing \
com.sun.tracing.dtrace
# non-core packages in rt.jar # non-core packages in rt.jar
NON_CORE_PKGS = $(DOMAPI_PKGS) \ NON_CORE_PKGS = $(DOMAPI_PKGS) \
$(MGMT_PKGS) \ $(MGMT_PKGS) \
...@@ -100,6 +97,5 @@ NON_CORE_PKGS = $(DOMAPI_PKGS) \ ...@@ -100,6 +97,5 @@ NON_CORE_PKGS = $(DOMAPI_PKGS) \
$(OLD_JSSE_PKGS) \ $(OLD_JSSE_PKGS) \
$(HTTPSERVER_PKGS) \ $(HTTPSERVER_PKGS) \
$(SMARTCARDIO_PKGS) \ $(SMARTCARDIO_PKGS) \
$(TRACING_PKGS) \
$(SCTPAPI_PKGS) $(SCTPAPI_PKGS)
...@@ -356,6 +356,7 @@ JAVA_JAVA_java = \ ...@@ -356,6 +356,7 @@ JAVA_JAVA_java = \
java/util/regex/Matcher.java \ java/util/regex/Matcher.java \
java/util/regex/MatchResult.java \ java/util/regex/MatchResult.java \
java/util/regex/ASCII.java \ java/util/regex/ASCII.java \
java/util/regex/UnicodeProp.java \
java/util/regex/PatternSyntaxException.java \ java/util/regex/PatternSyntaxException.java \
java/util/prefs/Preferences.java \ java/util/prefs/Preferences.java \
java/util/prefs/AbstractPreferences.java \ java/util/prefs/AbstractPreferences.java \
......
...@@ -345,30 +345,35 @@ $(GENSRCDIR)/java/lang/CharacterDataLatin1.java \ ...@@ -345,30 +345,35 @@ $(GENSRCDIR)/java/lang/CharacterDataLatin1.java \
-template $(CHARACTERDATA)/CharacterDataLatin1.java.template \ -template $(CHARACTERDATA)/CharacterDataLatin1.java.template \
-spec $(UNICODEDATA)/UnicodeData.txt \ -spec $(UNICODEDATA)/UnicodeData.txt \
-specialcasing $(UNICODEDATA)/SpecialCasing.txt \ -specialcasing $(UNICODEDATA)/SpecialCasing.txt \
-proplist $(UNICODEDATA)/PropList.txt \
-o $(GENSRCDIR)/java/lang/CharacterDataLatin1.java -string \ -o $(GENSRCDIR)/java/lang/CharacterDataLatin1.java -string \
-usecharforbyte -latin1 8 -usecharforbyte -latin1 8
$(BOOT_JAVA_CMD) -jar $(GENERATECHARACTER_JARFILE) -plane 0 \ $(BOOT_JAVA_CMD) -jar $(GENERATECHARACTER_JARFILE) -plane 0 \
-template $(CHARACTERDATA)/CharacterData00.java.template \ -template $(CHARACTERDATA)/CharacterData00.java.template \
-spec $(UNICODEDATA)/UnicodeData.txt \ -spec $(UNICODEDATA)/UnicodeData.txt \
-specialcasing $(UNICODEDATA)/SpecialCasing.txt \ -specialcasing $(UNICODEDATA)/SpecialCasing.txt \
-proplist $(UNICODEDATA)/PropList.txt \
-o $(GENSRCDIR)/java/lang/CharacterData00.java -string \ -o $(GENSRCDIR)/java/lang/CharacterData00.java -string \
-usecharforbyte 11 4 1 -usecharforbyte 11 4 1
$(BOOT_JAVA_CMD) -jar $(GENERATECHARACTER_JARFILE) -plane 1 \ $(BOOT_JAVA_CMD) -jar $(GENERATECHARACTER_JARFILE) -plane 1 \
-template $(CHARACTERDATA)/CharacterData01.java.template \ -template $(CHARACTERDATA)/CharacterData01.java.template \
-spec $(UNICODEDATA)/UnicodeData.txt \ -spec $(UNICODEDATA)/UnicodeData.txt \
-specialcasing $(UNICODEDATA)/SpecialCasing.txt \ -specialcasing $(UNICODEDATA)/SpecialCasing.txt \
-proplist $(UNICODEDATA)/PropList.txt \
-o $(GENSRCDIR)/java/lang/CharacterData01.java -string \ -o $(GENSRCDIR)/java/lang/CharacterData01.java -string \
-usecharforbyte 11 4 1 -usecharforbyte 11 4 1
$(BOOT_JAVA_CMD) -jar $(GENERATECHARACTER_JARFILE) -plane 2 \ $(BOOT_JAVA_CMD) -jar $(GENERATECHARACTER_JARFILE) -plane 2 \
-template $(CHARACTERDATA)/CharacterData02.java.template \ -template $(CHARACTERDATA)/CharacterData02.java.template \
-spec $(UNICODEDATA)/UnicodeData.txt \ -spec $(UNICODEDATA)/UnicodeData.txt \
-specialcasing $(UNICODEDATA)/SpecialCasing.txt \ -specialcasing $(UNICODEDATA)/SpecialCasing.txt \
-proplist $(UNICODEDATA)/PropList.txt \
-o $(GENSRCDIR)/java/lang/CharacterData02.java -string \ -o $(GENSRCDIR)/java/lang/CharacterData02.java -string \
-usecharforbyte 11 4 1 -usecharforbyte 11 4 1
$(BOOT_JAVA_CMD) -jar $(GENERATECHARACTER_JARFILE) -plane 14 \ $(BOOT_JAVA_CMD) -jar $(GENERATECHARACTER_JARFILE) -plane 14 \
-template $(CHARACTERDATA)/CharacterData0E.java.template \ -template $(CHARACTERDATA)/CharacterData0E.java.template \
-spec $(UNICODEDATA)/UnicodeData.txt \ -spec $(UNICODEDATA)/UnicodeData.txt \
-specialcasing $(UNICODEDATA)/SpecialCasing.txt \ -specialcasing $(UNICODEDATA)/SpecialCasing.txt \
-proplist $(UNICODEDATA)/PropList.txt \
-o $(GENSRCDIR)/java/lang/CharacterData0E.java -string \ -o $(GENSRCDIR)/java/lang/CharacterData0E.java -string \
-usecharforbyte 11 4 1 -usecharforbyte 11 4 1
......
...@@ -71,6 +71,7 @@ FILES_src = \ ...@@ -71,6 +71,7 @@ FILES_src = \
java/nio/charset/CoderMalfunctionError.java \ java/nio/charset/CoderMalfunctionError.java \
java/nio/charset/CodingErrorAction.java \ java/nio/charset/CodingErrorAction.java \
java/nio/charset/MalformedInputException.java \ java/nio/charset/MalformedInputException.java \
java/nio/charset/StandardCharset.java \
java/nio/charset/UnmappableCharacterException.java \ java/nio/charset/UnmappableCharacterException.java \
\ \
java/nio/charset/spi/CharsetProvider.java \ java/nio/charset/spi/CharsetProvider.java \
......
...@@ -44,7 +44,6 @@ SUNWprivate_1.1 { ...@@ -44,7 +44,6 @@ SUNWprivate_1.1 {
Java_sun_nio_ch_EPollArrayWrapper_interrupt; Java_sun_nio_ch_EPollArrayWrapper_interrupt;
Java_sun_nio_ch_EPollArrayWrapper_offsetofData; Java_sun_nio_ch_EPollArrayWrapper_offsetofData;
Java_sun_nio_ch_EPollArrayWrapper_sizeofEPollEvent; Java_sun_nio_ch_EPollArrayWrapper_sizeofEPollEvent;
Java_sun_nio_ch_EPoll_init;
Java_sun_nio_ch_EPoll_eventSize; Java_sun_nio_ch_EPoll_eventSize;
Java_sun_nio_ch_EPoll_eventsOffset; Java_sun_nio_ch_EPoll_eventsOffset;
Java_sun_nio_ch_EPoll_dataOffset; Java_sun_nio_ch_EPoll_dataOffset;
...@@ -129,7 +128,6 @@ SUNWprivate_1.1 { ...@@ -129,7 +128,6 @@ SUNWprivate_1.1 {
Java_sun_nio_fs_GnomeFileTypeDetector_probeUsingGio; Java_sun_nio_fs_GnomeFileTypeDetector_probeUsingGio;
Java_sun_nio_fs_GnomeFileTypeDetector_initializeGnomeVfs; Java_sun_nio_fs_GnomeFileTypeDetector_initializeGnomeVfs;
Java_sun_nio_fs_GnomeFileTypeDetector_probeUsingGnomeVfs; Java_sun_nio_fs_GnomeFileTypeDetector_probeUsingGnomeVfs;
Java_sun_nio_fs_LinuxWatchService_init;
Java_sun_nio_fs_LinuxWatchService_eventSize; Java_sun_nio_fs_LinuxWatchService_eventSize;
Java_sun_nio_fs_LinuxWatchService_eventOffsets; Java_sun_nio_fs_LinuxWatchService_eventOffsets;
Java_sun_nio_fs_LinuxWatchService_inotifyInit; Java_sun_nio_fs_LinuxWatchService_inotifyInit;
......
# #
# Copyright (c) 1996, 2011 Oracle and/or its affiliates. All rights reserved. # Copyright (c) 1996, 2011, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it
...@@ -44,11 +44,9 @@ PROPS_SRC = $(TOPDIR)/src/share/lib/security/java.security-solaris ...@@ -44,11 +44,9 @@ PROPS_SRC = $(TOPDIR)/src/share/lib/security/java.security-solaris
else # PLATFORM else # PLATFORM
# Register Microsoft CryptoAPI provider only on (non-64-bit) Windows platform. # Register Microsoft CryptoAPI provider only on Windows platform.
ifeq ($(PLATFORM), windows) ifeq ($(PLATFORM), windows)
ifneq ($(ARCH_DATA_MODEL), 64)
PROPS_SRC = $(TOPDIR)/src/share/lib/security/java.security-windows PROPS_SRC = $(TOPDIR)/src/share/lib/security/java.security-windows
endif
endif endif
endif # PLATFORM endif # PLATFORM
......
...@@ -2190,7 +2190,8 @@ JDWP "Java(tm) Debug Wire Protocol" ...@@ -2190,7 +2190,8 @@ JDWP "Java(tm) Debug Wire Protocol"
(Out (Out
(byte eventKind "Event kind to request. " (byte eventKind "Event kind to request. "
"See <a href=\"#JDWP_EventKind\">JDWP.EventKind</a> " "See <a href=\"#JDWP_EventKind\">JDWP.EventKind</a> "
"for a complete list of events that can be requested. " "for a complete list of events that can be requested; "
"some events may require a capability in order to be requested. "
) )
(byte suspendPolicy (byte suspendPolicy
"What threads are suspended when this event occurs? " "What threads are suspended when this event occurs? "
...@@ -2732,6 +2733,8 @@ JDWP "Java(tm) Debug Wire Protocol" ...@@ -2732,6 +2733,8 @@ JDWP "Java(tm) Debug Wire Protocol"
(Alt MonitorContendedEnter=JDWP.EventKind.MONITOR_CONTENDED_ENTER (Alt MonitorContendedEnter=JDWP.EventKind.MONITOR_CONTENDED_ENTER
"Notification that a thread in the target VM is attempting " "Notification that a thread in the target VM is attempting "
"to enter a monitor that is already acquired by another thread. " "to enter a monitor that is already acquired by another thread. "
"Requires canRequestMonitorEvents capability - see "
"<a href=\"#JDWP_VirtualMachine_CapabilitiesNew\">CapabilitiesNew</a>. "
"<p>Since JDWP version 1.6. " "<p>Since JDWP version 1.6. "
(int requestID (int requestID
...@@ -2743,6 +2746,8 @@ JDWP "Java(tm) Debug Wire Protocol" ...@@ -2743,6 +2746,8 @@ JDWP "Java(tm) Debug Wire Protocol"
(Alt MonitorContendedEntered=JDWP.EventKind.MONITOR_CONTENDED_ENTERED (Alt MonitorContendedEntered=JDWP.EventKind.MONITOR_CONTENDED_ENTERED
"Notification of a thread in the target VM is entering a monitor " "Notification of a thread in the target VM is entering a monitor "
"after waiting for it to be released by another thread. " "after waiting for it to be released by another thread. "
"Requires canRequestMonitorEvents capability - see "
"<a href=\"#JDWP_VirtualMachine_CapabilitiesNew\">CapabilitiesNew</a>. "
"<p>Since JDWP version 1.6. " "<p>Since JDWP version 1.6. "
(int requestID (int requestID
...@@ -2753,6 +2758,8 @@ JDWP "Java(tm) Debug Wire Protocol" ...@@ -2753,6 +2758,8 @@ JDWP "Java(tm) Debug Wire Protocol"
) )
(Alt MonitorWait=JDWP.EventKind.MONITOR_WAIT (Alt MonitorWait=JDWP.EventKind.MONITOR_WAIT
"Notification of a thread about to wait on a monitor object. " "Notification of a thread about to wait on a monitor object. "
"Requires canRequestMonitorEvents capability - see "
"<a href=\"#JDWP_VirtualMachine_CapabilitiesNew\">CapabilitiesNew</a>. "
"<p>Since JDWP version 1.6. " "<p>Since JDWP version 1.6. "
(int requestID (int requestID
...@@ -2764,6 +2771,8 @@ JDWP "Java(tm) Debug Wire Protocol" ...@@ -2764,6 +2771,8 @@ JDWP "Java(tm) Debug Wire Protocol"
) )
(Alt MonitorWaited=JDWP.EventKind.MONITOR_WAITED (Alt MonitorWaited=JDWP.EventKind.MONITOR_WAITED
"Notification that a thread in the target VM has finished waiting on " "Notification that a thread in the target VM has finished waiting on "
"Requires canRequestMonitorEvents capability - see "
"<a href=\"#JDWP_VirtualMachine_CapabilitiesNew\">CapabilitiesNew</a>. "
"a monitor object. " "a monitor object. "
"<p>Since JDWP version 1.6. " "<p>Since JDWP version 1.6. "
......
...@@ -21,4 +21,4 @@ ...@@ -21,4 +21,4 @@
# or visit www.oracle.com if you need additional information or have any # or visit www.oracle.com if you need additional information or have any
# questions. # questions.
# #
tzdata2011e tzdata2011g
...@@ -234,7 +234,21 @@ Rule Egypt 1989 only - May 6 1:00 1:00 S ...@@ -234,7 +234,21 @@ Rule Egypt 1989 only - May 6 1:00 1:00 S
Rule Egypt 1990 1994 - May 1 1:00 1:00 S Rule Egypt 1990 1994 - May 1 1:00 1:00 S
# IATA (after 1990) says transitions are at 0:00. # IATA (after 1990) says transitions are at 0:00.
# Go with IATA starting in 1995, except correct 1995 entry from 09-30 to 09-29. # Go with IATA starting in 1995, except correct 1995 entry from 09-30 to 09-29.
Rule Egypt 1995 max - Apr lastFri 0:00s 1:00 S
# From Alexander Krivenyshev (2011-04-20):
# "...Egypt's interim cabinet decided on Wednesday to cancel daylight
# saving time after a poll posted on its website showed the majority of
# Egyptians would approve the cancellation."
#
# Egypt to cancel daylight saving time
# <a href="http://www.almasryalyoum.com/en/node/407168">
# http://www.almasryalyoum.com/en/node/407168
# </a>
# or
# <a href="http://www.worldtimezone.com/dst_news/dst_news_egypt04.html">
# http://www.worldtimezone.com/dst_news/dst_news_egypt04.html
# </a>
Rule Egypt 1995 2010 - Apr lastFri 0:00s 1:00 S
Rule Egypt 1995 2005 - Sep lastThu 23:00s 0 - Rule Egypt 1995 2005 - Sep lastThu 23:00s 0 -
# From Steffen Thorsen (2006-09-19): # From Steffen Thorsen (2006-09-19):
# The Egyptian Gazette, issue 41,090 (2006-09-18), page 1, reports: # The Egyptian Gazette, issue 41,090 (2006-09-18), page 1, reports:
...@@ -335,7 +349,7 @@ Rule Egypt 2008 only - Aug lastThu 23:00s 0 - ...@@ -335,7 +349,7 @@ Rule Egypt 2008 only - Aug lastThu 23:00s 0 -
Rule Egypt 2009 only - Aug 20 23:00s 0 - Rule Egypt 2009 only - Aug 20 23:00s 0 -
Rule Egypt 2010 only - Aug 11 0:00 0 - Rule Egypt 2010 only - Aug 11 0:00 0 -
Rule Egypt 2010 only - Sep 10 0:00 1:00 S Rule Egypt 2010 only - Sep 10 0:00 1:00 S
Rule Egypt 2010 max - Sep lastThu 23:00s 0 - Rule Egypt 2010 only - Sep lastThu 23:00s 0 -
# Zone NAME GMTOFF RULES FORMAT [UNTIL] # Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone Africa/Cairo 2:05:00 - LMT 1900 Oct Zone Africa/Cairo 2:05:00 - LMT 1900 Oct
......
...@@ -168,7 +168,7 @@ ...@@ -168,7 +168,7 @@
# A monument to Willett was unveiled on 1927-05-21, in an open space in # A monument to Willett was unveiled on 1927-05-21, in an open space in
# a 45-acre wood near Chislehurst, Kent that was purchased by popular # a 45-acre wood near Chislehurst, Kent that was purchased by popular
# subscription and open to the public. On the south face of the monolith, # subscription and open to the public. On the south face of the monolith,
# designed by G. W. Miller, is the the William Willett Memorial Sundial, # designed by G. W. Miller, is the...William Willett Memorial Sundial,
# which is permanently set to Summer Time. # which is permanently set to Summer Time.
# From Winston Churchill (1934-04-28): # From Winston Churchill (1934-04-28):
...@@ -1808,7 +1808,7 @@ Zone Europe/Oslo 0:43:00 - LMT 1895 Jan 1 ...@@ -1808,7 +1808,7 @@ Zone Europe/Oslo 0:43:00 - LMT 1895 Jan 1
# #
# All these events predate our cutoff date of 1970. Unless we can # All these events predate our cutoff date of 1970. Unless we can
# come up with more definitive info about the timekeeping during the # come up with more definitive info about the timekeeping during the
# war years it's probably best just do do the following for now: # war years it's probably best just do...the following for now:
Link Europe/Oslo Arctic/Longyearbyen Link Europe/Oslo Arctic/Longyearbyen
# Poland # Poland
......
...@@ -767,7 +767,7 @@ Zone America/La_Paz -4:32:36 - LMT 1890 ...@@ -767,7 +767,7 @@ Zone America/La_Paz -4:32:36 - LMT 1890
# #
# As a result of the above Decree I believe the America/Rio_Branco # As a result of the above Decree I believe the America/Rio_Branco
# timezone shall be modified from UTC-5 to UTC-4 and a new timezone shall # timezone shall be modified from UTC-5 to UTC-4 and a new timezone shall
# be created to represent the the west side of the Para State. I # be created to represent the...west side of the Para State. I
# suggest this new timezone be called Santarem as the most # suggest this new timezone be called Santarem as the most
# important/populated city in the affected area. # important/populated city in the affected area.
# #
...@@ -1365,6 +1365,24 @@ Zone Pacific/Galapagos -5:58:24 - LMT 1931 # Puerto Baquerizo Moreno ...@@ -1365,6 +1365,24 @@ Zone Pacific/Galapagos -5:58:24 - LMT 1931 # Puerto Baquerizo Moreno
# For now, we'll just record the time in Stanley, since we have no # For now, we'll just record the time in Stanley, since we have no
# better info. # better info.
# From Steffen Thorsen (2011-04-01):
# The Falkland Islands will not turn back clocks this winter, but stay on
# daylight saving time.
#
# One source:
# <a href="http://www.falklandnews.com/public/story.cfm?get=5914&source=3">
# http://www.falklandnews.com/public/story.cfm?get=5914&source=3
# </a>
#
# We have gotten this confirmed by a clerk of the legislative assembly:
# Normally the clocks revert to Local Mean Time (UTC/GMT -4 hours) on the
# third Sunday of April at 0200hrs and advance to Summer Time (UTC/GMT -3
# hours) on the first Sunday of September at 0200hrs.
#
# IMPORTANT NOTE: During 2011, on a trial basis, the Falkland Islands
# will not revert to local mean time, but clocks will remain on Summer
# time (UTC/GMT - 3 hours) throughout the whole of 2011. Any long term
# change to local time following the trial period will be notified.
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
Rule Falk 1937 1938 - Sep lastSun 0:00 1:00 S Rule Falk 1937 1938 - Sep lastSun 0:00 1:00 S
Rule Falk 1938 1942 - Mar Sun>=19 0:00 0 - Rule Falk 1938 1942 - Mar Sun>=19 0:00 0 -
...@@ -1376,7 +1394,8 @@ Rule Falk 1984 1985 - Apr lastSun 0:00 0 - ...@@ -1376,7 +1394,8 @@ Rule Falk 1984 1985 - Apr lastSun 0:00 0 -
Rule Falk 1984 only - Sep 16 0:00 1:00 S Rule Falk 1984 only - Sep 16 0:00 1:00 S
Rule Falk 1985 2000 - Sep Sun>=9 0:00 1:00 S Rule Falk 1985 2000 - Sep Sun>=9 0:00 1:00 S
Rule Falk 1986 2000 - Apr Sun>=16 0:00 0 - Rule Falk 1986 2000 - Apr Sun>=16 0:00 0 -
Rule Falk 2001 max - Apr Sun>=15 2:00 0 - Rule Falk 2001 2010 - Apr Sun>=15 2:00 0 -
Rule Falk 2012 max - Apr Sun>=15 2:00 0 -
Rule Falk 2001 max - Sep Sun>=1 2:00 1:00 S Rule Falk 2001 max - Sep Sun>=1 2:00 1:00 S
# Zone NAME GMTOFF RULES FORMAT [UNTIL] # Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone Atlantic/Stanley -3:51:24 - LMT 1890 Zone Atlantic/Stanley -3:51:24 - LMT 1890
......
# #
# Copyright (c) 1996, 2010, Oracle and/or its affiliates. All rights reserved. # Copyright (c) 1996, 2011, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it
...@@ -52,12 +52,10 @@ ifeq ($(ARCH_DATA_MODEL), 64) ...@@ -52,12 +52,10 @@ ifeq ($(ARCH_DATA_MODEL), 64)
endif endif
endif endif
# Build Microsoft CryptoAPI provider only on (non-64-bit) Windows platform. # Build Microsoft CryptoAPI provider only on Windows platform.
MSCAPI = MSCAPI =
ifeq ($(PLATFORM), windows) ifeq ($(PLATFORM), windows)
ifneq ($(ARCH_DATA_MODEL), 64)
MSCAPI = mscapi MSCAPI = mscapi
endif
endif endif
# Build in-tree elliptic curve crypto provider only when # Build in-tree elliptic curve crypto provider only when
......
...@@ -73,11 +73,37 @@ class CharacterData00 extends CharacterData { ...@@ -73,11 +73,37 @@ class CharacterData00 extends CharacterData {
return props; return props;
} }
int getPropertiesEx(int ch) {
char offset = (char)ch;
int props = $$LookupEx(offset);
return props;
}
int getType(int ch) { int getType(int ch) {
int props = getProperties(ch); int props = getProperties(ch);
return (props & $$maskType); return (props & $$maskType);
} }
boolean isOtherLowercase(int ch) {
int props = getPropertiesEx(ch);
return (props & $$maskOtherLowercase) != 0;
}
boolean isOtherUppercase(int ch) {
int props = getPropertiesEx(ch);
return (props & $$maskOtherUppercase) != 0;
}
boolean isOtherAlphabetic(int ch) {
int props = getPropertiesEx(ch);
return (props & $$maskOtherAlphabetic) != 0;
}
boolean isIdeographic(int ch) {
int props = getPropertiesEx(ch);
return (props & $$maskIdeographic) != 0;
}
boolean isJavaIdentifierStart(int ch) { boolean isJavaIdentifierStart(int ch) {
int props = getProperties(ch); int props = getProperties(ch);
return ((props & $$maskIdentifierInfo) >= $$lowJavaStart); return ((props & $$maskIdentifierInfo) >= $$lowJavaStart);
......
...@@ -72,11 +72,37 @@ class CharacterData01 extends CharacterData { ...@@ -72,11 +72,37 @@ class CharacterData01 extends CharacterData {
return props; return props;
} }
int getPropertiesEx(int ch) {
char offset = (char)ch;
int props = $$LookupEx(offset);
return props;
}
int getType(int ch) { int getType(int ch) {
int props = getProperties(ch); int props = getProperties(ch);
return (props & $$maskType); return (props & $$maskType);
} }
boolean isOtherLowercase(int ch) {
int props = getPropertiesEx(ch);
return (props & $$maskOtherLowercase) != 0;
}
boolean isOtherUppercase(int ch) {
int props = getPropertiesEx(ch);
return (props & $$maskOtherUppercase) != 0;
}
boolean isOtherAlphabetic(int ch) {
int props = getPropertiesEx(ch);
return (props & $$maskOtherAlphabetic) != 0;
}
boolean isIdeographic(int ch) {
int props = getPropertiesEx(ch);
return (props & $$maskIdeographic) != 0;
}
boolean isJavaIdentifierStart(int ch) { boolean isJavaIdentifierStart(int ch) {
int props = getProperties(ch); int props = getProperties(ch);
return ((props & $$maskIdentifierInfo) >= $$lowJavaStart); return ((props & $$maskIdentifierInfo) >= $$lowJavaStart);
......
...@@ -71,6 +71,32 @@ class CharacterData02 extends CharacterData { ...@@ -71,6 +71,32 @@ class CharacterData02 extends CharacterData {
return props; return props;
} }
int getPropertiesEx(int ch) {
char offset = (char)ch;
int props = $$LookupEx(offset);
return props;
}
boolean isOtherLowercase(int ch) {
int props = getPropertiesEx(ch);
return (props & $$maskOtherLowercase) != 0;
}
boolean isOtherUppercase(int ch) {
int props = getPropertiesEx(ch);
return (props & $$maskOtherUppercase) != 0;
}
boolean isOtherAlphabetic(int ch) {
int props = getPropertiesEx(ch);
return (props & $$maskOtherAlphabetic) != 0;
}
boolean isIdeographic(int ch) {
int props = getPropertiesEx(ch);
return (props & $$maskIdeographic) != 0;
}
int getType(int ch) { int getType(int ch) {
int props = getProperties(ch); int props = getProperties(ch);
return (props & $$maskType); return (props & $$maskType);
......
...@@ -71,6 +71,32 @@ class CharacterData0E extends CharacterData { ...@@ -71,6 +71,32 @@ class CharacterData0E extends CharacterData {
return props; return props;
} }
int getPropertiesEx(int ch) {
char offset = (char)ch;
int props = $$LookupEx(offset);
return props;
}
boolean isOtherLowercase(int ch) {
int props = getPropertiesEx(ch);
return (props & $$maskOtherLowercase) != 0;
}
boolean isOtherUppercase(int ch) {
int props = getPropertiesEx(ch);
return (props & $$maskOtherUppercase) != 0;
}
boolean isOtherAlphabetic(int ch) {
int props = getPropertiesEx(ch);
return (props & $$maskOtherAlphabetic) != 0;
}
boolean isIdeographic(int ch) {
int props = getPropertiesEx(ch);
return (props & $$maskIdeographic) != 0;
}
int getType(int ch) { int getType(int ch) {
int props = getProperties(ch); int props = getProperties(ch);
return (props & $$maskType); return (props & $$maskType);
......
...@@ -72,6 +72,32 @@ class CharacterDataLatin1 extends CharacterData { ...@@ -72,6 +72,32 @@ class CharacterDataLatin1 extends CharacterData {
return props; return props;
} }
int getPropertiesEx(int ch) {
char offset = (char)ch;
int props = $$LookupEx(offset);
return props;
}
boolean isOtherLowercase(int ch) {
int props = getPropertiesEx(ch);
return (props & $$maskOtherLowercase) != 0;
}
boolean isOtherUppercase(int ch) {
int props = getPropertiesEx(ch);
return (props & $$maskOtherUppercase) != 0;
}
boolean isOtherAlphabetic(int ch) {
int props = getPropertiesEx(ch);
return (props & $$maskOtherAlphabetic) != 0;
}
boolean isIdeographic(int ch) {
int props = getPropertiesEx(ch);
return (props & $$maskIdeographic) != 0;
}
int getType(int ch) { int getType(int ch) {
int props = getProperties(ch); int props = getProperties(ch);
return (props & $$maskType); return (props & $$maskType);
......
此差异已折叠。
/* /*
* Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
...@@ -34,6 +33,7 @@ import java.io.PrintWriter; ...@@ -34,6 +33,7 @@ import java.io.PrintWriter;
import java.io.BufferedWriter; import java.io.BufferedWriter;
import java.io.FileWriter; import java.io.FileWriter;
import java.io.File; import java.io.File;
import java.util.List;
import build.tools.generatecharacter.CharacterName; import build.tools.generatecharacter.CharacterName;
...@@ -68,17 +68,16 @@ public class GenerateCharacter { ...@@ -68,17 +68,16 @@ public class GenerateCharacter {
final static boolean DEBUG = false; final static boolean DEBUG = false;
final static int MAX_UNICODE_VALUE = 0xFFFF;
final static String commandMarker = "$$"; final static String commandMarker = "$$";
static String ROOT = ""; static String ROOT = "";
static String DefaultUnicodeSpecFileName = ROOT + "UnicodeData.txt"; static String DefaultUnicodeSpecFileName = ROOT + "UnicodeData.txt";
static String DefaultSpecialCasingFileName = ROOT + "SpecialCasing.txt"; static String DefaultSpecialCasingFileName = ROOT + "SpecialCasing.txt";
static String DefaultPropListFileName = ROOT + "PropList.txt";
static String DefaultJavaTemplateFileName = ROOT + "Character.java.template"; static String DefaultJavaTemplateFileName = ROOT + "Character.java.template";
static String DefaultJavaOutputFileName = ROOT + "Character.java"; static String DefaultJavaOutputFileName = ROOT + "Character.java";
static String DefaultCTemplateFileName = ROOT + "Character.c.template"; static String DefaultCTemplateFileName = ROOT + "Character.c.template";
static String DefaultCOutputFileName = ROOT + "Character.c"; static String DefaultCOutputFileName = ROOT + "Character.c";
static String CharacterDataClassName = "CharacterData";
static int plane = 0; static int plane = 0;
/* The overall idea is that, in the generated Character class source code, /* The overall idea is that, in the generated Character class source code,
...@@ -105,7 +104,11 @@ public class GenerateCharacter { ...@@ -105,7 +104,11 @@ public class GenerateCharacter {
entries are short rather than byte). entries are short rather than byte).
*/ */
/* The character properties are currently encoded into 32 bits in the following manner: /* The character properties are currently encoded into A (32 bits)and B (16 bits)
two parts.
A: the low 32 bits are defined in the following manner:
1 bit Mirrored property. 1 bit Mirrored property.
4 bits Bidirectional category (see below) (unused if -nobidi switch specified) 4 bits Bidirectional category (see below) (unused if -nobidi switch specified)
9 bits A signed offset used for converting case . 9 bits A signed offset used for converting case .
...@@ -148,6 +151,14 @@ public class GenerateCharacter { ...@@ -148,6 +151,14 @@ public class GenerateCharacter {
will produce the desired numeric value. will produce the desired numeric value.
5 bits The digit offset (see description of previous field) 5 bits The digit offset (see description of previous field)
5 bits Character type (see below) 5 bits Character type (see below)
B: the high 16 bits are defined as:
1 bit Other_Lowercase property
1 bit Other_Uppercase property
1 bit Other_Alphabetic property
1 bit Other_Math property
1 bit Ideographic property
1 bit Noncharacter codepoint property
*/ */
...@@ -173,9 +184,22 @@ public class GenerateCharacter { ...@@ -173,9 +184,22 @@ public class GenerateCharacter {
// case offset are 9 bits // case offset are 9 bits
maskCase = 0x01FF, maskCase = 0x01FF,
shiftBidi = 27, maskBidi = 0x78000000, shiftBidi = 27, maskBidi = 0x78000000,
shiftMirrored = 31, maskMirrored = 0x80000000, shiftMirrored = 31, //maskMirrored = 0x80000000,
shiftPlane = 16, maskPlane = 0xFF0000; shiftPlane = 16, maskPlane = 0xFF0000;
// maskMirrored needs to be long, if up 16-bit
private static final long maskMirrored = 0x80000000L;
// bit masks identify the 16-bit priperty field described above, in B
// table
private static final long
maskOtherLowercase = 0x100000000L,
maskOtherUppercase = 0x200000000L,
maskOtherAlphabetic = 0x400000000L,
maskOtherMath = 0x800000000L,
maskIdeographic = 0x1000000000L,
maskNoncharacterCP = 0x2000000000L;
// Can compare masked values with these to determine // Can compare masked values with these to determine
// numeric or lexical types. // numeric or lexical types.
public static int public static int
...@@ -282,7 +306,8 @@ public class GenerateCharacter { ...@@ -282,7 +306,8 @@ public class GenerateCharacter {
* @see GenerateCharacter#buildOne * @see GenerateCharacter#buildOne
*/ */
static long[] buildMap(UnicodeSpec[] data, SpecialCaseMap[] specialMaps) { static long[] buildMap(UnicodeSpec[] data, SpecialCaseMap[] specialMaps, PropList propList)
{
long[] result; long[] result;
if (bLatin1 == true) { if (bLatin1 == true) {
result = new long[256]; result = new long[256];
...@@ -320,7 +345,6 @@ public class GenerateCharacter { ...@@ -320,7 +345,6 @@ public class GenerateCharacter {
result[k] = buildOne(codePoint, data[j], specialMaps); result[k] = buildOne(codePoint, data[j], specialMaps);
++k; ++k;
++codePoint; ++codePoint;
} }
else { else {
System.out.println("An error has occured during spec mapping."); System.out.println("An error has occured during spec mapping.");
...@@ -335,6 +359,15 @@ public class GenerateCharacter { ...@@ -335,6 +359,15 @@ public class GenerateCharacter {
++k; ++k;
++codePoint; ++codePoint;
} }
// now add all extra supported properties from PropList, to the
// upper 16-bit
addExProp(result, propList, "Other_Lowercase", maskOtherLowercase);
addExProp(result, propList, "Other_Uppercase", maskOtherUppercase);
addExProp(result, propList, "Other_Alphabetic", maskOtherAlphabetic);
addExProp(result, propList, "Ideographic", maskIdeographic);
//addExProp(result, propList, "Other_Math", maskOtherMath);
//addExProp(result, propList, "Noncharacter_CodePoint", maskNoncharacterCP);
return result; return result;
} }
...@@ -475,7 +508,6 @@ public class GenerateCharacter { ...@@ -475,7 +508,6 @@ public class GenerateCharacter {
} }
resultA |= ((offset & maskCase) << shiftCaseOffset); resultA |= ((offset & maskCase) << shiftCaseOffset);
// record lexical info about this character // record lexical info about this character
if (us.generalCategory == UnicodeSpec.LOWERCASE_LETTER if (us.generalCategory == UnicodeSpec.LOWERCASE_LETTER
|| us.generalCategory == UnicodeSpec.UPPERCASE_LETTER || us.generalCategory == UnicodeSpec.UPPERCASE_LETTER
...@@ -539,6 +571,16 @@ public class GenerateCharacter { ...@@ -539,6 +571,16 @@ public class GenerateCharacter {
return resultA; return resultA;
} }
static void addExProp(long[] map, PropList propList, String prop, long mask) {
List<Integer> cps = propList.codepoints(prop);
if (cps != null) {
for (Integer cp : cps) {
if (cp < map.length)
map[cp] |= mask;
}
}
}
/** /**
* This is the heart of the table compression strategy. The inputs are a map * This is the heart of the table compression strategy. The inputs are a map
* and a number of bits (size). The map is simply an array of long integer values; * and a number of bits (size). The map is simply an array of long integer values;
...@@ -719,6 +761,9 @@ OUTER: for (int i = 0; i < n; i += m) { ...@@ -719,6 +761,9 @@ OUTER: for (int i = 0; i < n; i += m) {
if (x.length() >= 9 && x.substring(0, 7).equals("Lookup(") && if (x.length() >= 9 && x.substring(0, 7).equals("Lookup(") &&
x.substring(x.length()-1).equals(")") ) x.substring(x.length()-1).equals(")") )
return genAccess("A", x.substring(7, x.length()-1), (identifiers ? 2 : 32)); return genAccess("A", x.substring(7, x.length()-1), (identifiers ? 2 : 32));
if (x.length() >= 11 && x.substring(0, 9).equals("LookupEx(") &&
x.substring(x.length()-1).equals(")") )
return genAccess("B", x.substring(9, x.length()-1), 16);
if (x.equals("shiftType")) return Long.toString(shiftType); if (x.equals("shiftType")) return Long.toString(shiftType);
if (x.equals("shiftIdentifierInfo")) return Long.toString(shiftIdentifierInfo); if (x.equals("shiftIdentifierInfo")) return Long.toString(shiftIdentifierInfo);
if (x.equals("maskIdentifierInfo")) return "0x" + hex8(maskIdentifierInfo); if (x.equals("maskIdentifierInfo")) return "0x" + hex8(maskIdentifierInfo);
...@@ -731,6 +776,10 @@ OUTER: for (int i = 0; i < n; i += m) { ...@@ -731,6 +776,10 @@ OUTER: for (int i = 0; i < n; i += m) {
if (x.equals("maskLowerCase")) return "0x" + hex8(maskLowerCase); if (x.equals("maskLowerCase")) return "0x" + hex8(maskLowerCase);
if (x.equals("maskUpperCase")) return "0x" + hex8(maskUpperCase); if (x.equals("maskUpperCase")) return "0x" + hex8(maskUpperCase);
if (x.equals("maskTitleCase")) return "0x" + hex8(maskTitleCase); if (x.equals("maskTitleCase")) return "0x" + hex8(maskTitleCase);
if (x.equals("maskOtherLowercase")) return "0x" + hex4(maskOtherLowercase >> 32);
if (x.equals("maskOtherUppercase")) return "0x" + hex4(maskOtherUppercase >> 32);
if (x.equals("maskOtherAlphabetic")) return "0x" + hex4(maskOtherAlphabetic >> 32);
if (x.equals("maskIdeographic")) return "0x" + hex4(maskIdeographic >> 32);
if (x.equals("valueIgnorable")) return "0x" + hex8(valueIgnorable); if (x.equals("valueIgnorable")) return "0x" + hex8(valueIgnorable);
if (x.equals("valueJavaUnicodeStart")) return "0x" + hex8(valueJavaUnicodeStart); if (x.equals("valueJavaUnicodeStart")) return "0x" + hex8(valueJavaUnicodeStart);
if (x.equals("valueJavaOnlyStart")) return "0x" + hex8(valueJavaOnlyStart); if (x.equals("valueJavaOnlyStart")) return "0x" + hex8(valueJavaOnlyStart);
...@@ -899,7 +948,7 @@ OUTER: for (int i = 0; i < n; i += m) { ...@@ -899,7 +948,7 @@ OUTER: for (int i = 0; i < n; i += m) {
// If we ever need more than 32 bits to represent the character properties, // If we ever need more than 32 bits to represent the character properties,
// then a table "B" may be needed as well. // then a table "B" may be needed as well.
// genTable(result, "B", tables[n - 1], 32, 16, sizes[n - 1], false, 0, true, true, false); genTable(result, "B", tables[n - 1], 32, 16, sizes[n - 1], false, 0, true, true, false);
totalBytes += ((((tables[n - 1].length * (identifiers ? 2 : 32)) + 31) >> 5) << 2); totalBytes += ((((tables[n - 1].length * (identifiers ? 2 : 32)) + 31) >> 5) << 2);
result.append(commentStart); result.append(commentStart);
...@@ -1137,7 +1186,12 @@ OUTER: for (int i = 0; i < n; i += m) { ...@@ -1137,7 +1186,12 @@ OUTER: for (int i = 0; i < n; i += m) {
char ch = '\u0000'; char ch = '\u0000';
int charsPerEntry = -entriesPerChar; int charsPerEntry = -entriesPerChar;
for (int j=0; j<table.length; ++j) { for (int j=0; j<table.length; ++j) {
long entry = table[j] >> extract; //long entry = table[j] >> extract;
long entry;
if ("A".equals(name))
entry = (table[j] & 0xffffffffL) >> extract;
else
entry = (table[j] >> extract);
if (shiftEntries) entry <<= shift; if (shiftEntries) entry <<= shift;
if (entry >= (1L << bits)) { if (entry >= (1L << bits)) {
FAIL("Entry too big"); FAIL("Entry too big");
...@@ -1549,6 +1603,7 @@ OUTER: for (int i = 0; i < n; i += m) { ...@@ -1549,6 +1603,7 @@ OUTER: for (int i = 0; i < n; i += m) {
static String OutputFileName = null; static String OutputFileName = null;
static String UnicodeSpecFileName = null; // liu static String UnicodeSpecFileName = null; // liu
static String SpecialCasingFileName = null; static String SpecialCasingFileName = null;
static String PropListFileName = null;
static boolean useCharForByte = false; static boolean useCharForByte = false;
static int[] sizes; static int[] sizes;
static int bins = 0; // liu; if > 0, then perform search static int bins = 0; // liu; if > 0, then perform search
...@@ -1668,6 +1723,14 @@ OUTER: for (int i = 0; i < n; i += m) { ...@@ -1668,6 +1723,14 @@ OUTER: for (int i = 0; i < n; i += m) {
SpecialCasingFileName = args[++j]; SpecialCasingFileName = args[++j];
} }
} }
else if (args[j].equals("-proplist")) {
if (j == args.length -1) {
FAIL("File name missing after -proplist");
}
else {
PropListFileName = args[++j];
}
}
else if (args[j].equals("-plane")) { else if (args[j].equals("-plane")) {
if (j == args.length -1) { if (j == args.length -1) {
FAIL("Plane number missing after -plane"); FAIL("Plane number missing after -plane");
...@@ -1728,6 +1791,10 @@ OUTER: for (int i = 0; i < n; i += m) { ...@@ -1728,6 +1791,10 @@ OUTER: for (int i = 0; i < n; i += m) {
SpecialCasingFileName = DefaultSpecialCasingFileName; SpecialCasingFileName = DefaultSpecialCasingFileName;
desc.append(" [-specialcasing " + SpecialCasingFileName + ']'); desc.append(" [-specialcasing " + SpecialCasingFileName + ']');
} }
if (PropListFileName == null) {
PropListFileName = DefaultPropListFileName;
desc.append(" [-proplist " + PropListFileName + ']');
}
if (TemplateFileName == null) { if (TemplateFileName == null) {
TemplateFileName = (Csyntax ? DefaultCTemplateFileName TemplateFileName = (Csyntax ? DefaultCTemplateFileName
: DefaultJavaTemplateFileName); : DefaultJavaTemplateFileName);
...@@ -1877,12 +1944,13 @@ OUTER: for (int i = 0; i < n; i += m) { ...@@ -1877,12 +1944,13 @@ OUTER: for (int i = 0; i < n; i += m) {
try { try {
UnicodeSpec[] data = UnicodeSpec.readSpecFile(new File(UnicodeSpecFileName), plane); UnicodeSpec[] data = UnicodeSpec.readSpecFile(new File(UnicodeSpecFileName), plane);
specialCaseMaps = SpecialCaseMap.readSpecFile(new File(SpecialCasingFileName), plane); specialCaseMaps = SpecialCaseMap.readSpecFile(new File(SpecialCasingFileName), plane);
PropList propList = PropList.readSpecFile(new File(PropListFileName), plane);
if (verbose) { if (verbose) {
System.out.println(data.length + " items read from Unicode spec file " + UnicodeSpecFileName); // liu System.out.println(data.length + " items read from Unicode spec file " + UnicodeSpecFileName); // liu
} }
long[] map = buildMap(data, specialCaseMaps); long[] map = buildMap(data, specialCaseMaps, propList);
if (verbose) { if (verbose) {
System.err.println("Completed building of initial map"); System.err.println("Completed building of initial map");
} }
......
/*
* Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package build.tools.generatecharacter;
import java.util.regex.*;
import java.util.*;
import java.io.*;
/**
* A PropList object contains the lists of code points that have
* the same Unicode property defined in PropList.txt
*
* @author Xueming Shen
*/
public class PropList {
public static PropList readSpecFile(File file, int plane)
throws IOException
{
return new PropList(file, plane);
}
public List<Integer> codepoints(String name) {
return propMap.get(name);
}
public Set<String> names() {
return propMap.keySet();
}
private Map<String, ArrayList<Integer>> propMap =
new LinkedHashMap<String, ArrayList<Integer>>();
private PropList(File file, int plane) throws IOException {
int i, j;
BufferedReader sbfr = new BufferedReader(new FileReader(file));
Matcher m = Pattern.compile("(\\p{XDigit}+)(?:\\.{2}(\\p{XDigit}+))?\\s*;\\s+(\\w+)\\s+#.*").matcher("");
String line = null;
int lineNo = 0;
while ((line = sbfr.readLine()) != null) {
lineNo++;
if (line.length() <= 1 || line.charAt(0) == '#') {
continue;
}
m.reset(line);
if (m.matches()) {
int start = Integer.parseInt(m.group(1), 16);
if ((start >> 16) != plane)
continue;
int end = (m.group(2)==null)?start
:Integer.parseInt(m.group(2), 16);
String name = m.group(3);
start &= 0xffff;
end &= 0xffff;
ArrayList<Integer> list = propMap.get(name);
if (list == null) {
list = new ArrayList<Integer>();
propMap.put(name, list);
}
while (start <= end)
list.add(start++);
} else {
System.out.printf("Warning: Unrecognized line %d <%s>%n", lineNo, line);
}
}
sbfr.close();
//for (String name: propMap.keySet()) {
// System.out.printf("%s %d%n", name, propMap.get(name).size());
//}
}
public static void main(String[] args) throws IOException {
readSpecFile(new File(args[0]), Integer.decode(args[1]));
}
}
...@@ -1666,7 +1666,7 @@ public class CachedRowSetImpl extends BaseRowSet implements RowSet, RowSetIntern ...@@ -1666,7 +1666,7 @@ public class CachedRowSetImpl extends BaseRowSet implements RowSet, RowSetIntern
*/ */
protected void removeCurrentRow() { protected void removeCurrentRow() {
((Row)getCurrentRow()).setDeleted(); ((Row)getCurrentRow()).setDeleted();
rvh.remove(cursorPos); rvh.remove(cursorPos - 1);
--numRows; --numRows;
} }
...@@ -6349,7 +6349,6 @@ public class CachedRowSetImpl extends BaseRowSet implements RowSet, RowSetIntern ...@@ -6349,7 +6349,6 @@ public class CachedRowSetImpl extends BaseRowSet implements RowSet, RowSetIntern
// this can happen if deleted rows are being shown // this can happen if deleted rows are being shown
if (row.getDeleted() == true) { if (row.getDeleted() == true) {
removeCurrentRow(); removeCurrentRow();
--numRows;
} }
} }
......
/* /*
* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -395,7 +395,13 @@ public class Krb5LoginModule implements LoginModule { ...@@ -395,7 +395,13 @@ public class Krb5LoginModule implements LoginModule {
private boolean succeeded = false; private boolean succeeded = false;
private boolean commitSucceeded = false; private boolean commitSucceeded = false;
private String username; private String username;
// Encryption keys calculated from password. Assigned when storekey == true
// and useKeyTab == false (or true but not found)
private EncryptionKey[] encKeys = null; private EncryptionKey[] encKeys = null;
KeyTab ktab = null;
private Credentials cred = null; private Credentials cred = null;
private PrincipalName principal = null; private PrincipalName principal = null;
...@@ -663,15 +669,35 @@ public class Krb5LoginModule implements LoginModule { ...@@ -663,15 +669,35 @@ public class Krb5LoginModule implements LoginModule {
(krb5PrincName.toString(), (krb5PrincName.toString(),
PrincipalName.KRB_NT_PRINCIPAL); PrincipalName.KRB_NT_PRINCIPAL);
} }
if (useKeyTab) {
encKeys =
EncryptionKey.acquireSecretKeys(principal, keyTabName);
/*
* Before dynamic KeyTab support (6894072), here we check if
* the keytab contains keys for the principal. If no, keytab
* will not be used and password is prompted for.
*
* After 6894072, we normally don't check it, and expect the
* keys can be populated until a real connection is made. The
* check is still done when isInitiator == true, where the keys
* will be used right now.
*
* Probably tricky relations:
*
* useKeyTab is config flag, but when it's true but the ktab
* does not contains keys for principal, we would use password
* and keep the flag unchanged (for reuse?). In this method,
* we use (ktab != null) to check whether keytab is used.
* After this method (and when storeKey == true), we use
* (encKeys == null) to check.
*/
if (useKeyTab) {
ktab = (keyTabName == null)
? KeyTab.getInstance()
: KeyTab.getInstance(new File(keyTabName));
if (isInitiator) {
if (Krb5Util.keysFromJavaxKeyTab(ktab, principal).length
== 0) {
ktab = null;
if (debug) { if (debug) {
if (encKeys != null)
System.out.println
("principal's key obtained from the keytab");
else
System.out.println System.out.println
("Key for the principal " + ("Key for the principal " +
principal + principal +
...@@ -679,12 +705,13 @@ public class Krb5LoginModule implements LoginModule { ...@@ -679,12 +705,13 @@ public class Krb5LoginModule implements LoginModule {
((keyTabName == null) ? ((keyTabName == null) ?
"default key tab" : keyTabName)); "default key tab" : keyTabName));
} }
}
}
} }
KrbAsReqBuilder builder; KrbAsReqBuilder builder;
// We can't get the key from the keytab so prompt
if (encKeys == null) { if (ktab == null) {
promptForPass(getPasswdFromSharedState); promptForPass(getPasswdFromSharedState);
builder = new KrbAsReqBuilder(principal, password); builder = new KrbAsReqBuilder(principal, password);
if (isInitiator) { if (isInitiator) {
...@@ -693,9 +720,13 @@ public class Krb5LoginModule implements LoginModule { ...@@ -693,9 +720,13 @@ public class Krb5LoginModule implements LoginModule {
// updated with PA info // updated with PA info
cred = builder.action().getCreds(); cred = builder.action().getCreds();
} }
if (storeKey) {
encKeys = builder.getKeys(); encKeys = builder.getKeys();
// When encKeys is empty, the login actually fails.
// For compatibility, exception is thrown in commit().
}
} else { } else {
builder = new KrbAsReqBuilder(principal, encKeys); builder = new KrbAsReqBuilder(principal, ktab);
if (isInitiator) { if (isInitiator) {
cred = builder.action().getCreds(); cred = builder.action().getCreds();
} }
...@@ -705,12 +736,17 @@ public class Krb5LoginModule implements LoginModule { ...@@ -705,12 +736,17 @@ public class Krb5LoginModule implements LoginModule {
if (debug) { if (debug) {
System.out.println("principal is " + principal); System.out.println("principal is " + principal);
HexDumpEncoder hd = new HexDumpEncoder(); HexDumpEncoder hd = new HexDumpEncoder();
if (ktab != null) {
System.out.println("Will use keytab");
} else if (storeKey) {
for (int i = 0; i < encKeys.length; i++) { for (int i = 0; i < encKeys.length; i++) {
System.out.println("EncryptionKey: keyType=" + System.out.println("EncryptionKey: keyType=" +
encKeys[i].getEType() + " keyBytes (hex dump)=" + encKeys[i].getEType() +
" keyBytes (hex dump)=" +
hd.encodeBuffer(encKeys[i].getBytes())); hd.encodeBuffer(encKeys[i].getBytes()));
} }
} }
}
// we should hava a non-null cred // we should hava a non-null cred
if (isInitiator && (cred == null)) { if (isInitiator && (cred == null)) {
...@@ -989,8 +1025,8 @@ public class Krb5LoginModule implements LoginModule { ...@@ -989,8 +1025,8 @@ public class Krb5LoginModule implements LoginModule {
kerbTicket = Krb5Util.credsToTicket(cred); kerbTicket = Krb5Util.credsToTicket(cred);
} }
if (storeKey) { if (storeKey && encKeys != null) {
if (encKeys == null || encKeys.length <= 0) { if (encKeys.length == 0) {
succeeded = false; succeeded = false;
throw new LoginException("Null Server Key "); throw new LoginException("Null Server Key ");
} }
...@@ -1006,10 +1042,11 @@ public class Krb5LoginModule implements LoginModule { ...@@ -1006,10 +1042,11 @@ public class Krb5LoginModule implements LoginModule {
} }
} }
// Let us add the kerbClientPrinc,kerbTicket and kerbKey (if // Let us add the kerbClientPrinc,kerbTicket and KeyTab/KerbKey (if
// storeKey is true) // storeKey is true)
if (!princSet.contains(kerbClientPrinc)) if (!princSet.contains(kerbClientPrinc)) {
princSet.add(kerbClientPrinc); princSet.add(kerbClientPrinc);
}
// add the TGT // add the TGT
if (kerbTicket != null) { if (kerbTicket != null) {
...@@ -1018,7 +1055,16 @@ public class Krb5LoginModule implements LoginModule { ...@@ -1018,7 +1055,16 @@ public class Krb5LoginModule implements LoginModule {
} }
if (storeKey) { if (storeKey) {
for (int i = 0; i < kerbKeys.length; i++) { if (encKeys == null) {
if (!privCredSet.contains(ktab)) {
privCredSet.add(ktab);
// Compatibility; also add keys to privCredSet
for (KerberosKey key: ktab.getKeys(kerbClientPrinc)) {
privCredSet.add(new Krb5Util.KeysFromKeyTab(key));
}
}
} else {
for (int i = 0; i < kerbKeys.length; i ++) {
if (!privCredSet.contains(kerbKeys[i])) { if (!privCredSet.contains(kerbKeys[i])) {
privCredSet.add(kerbKeys[i]); privCredSet.add(kerbKeys[i]);
} }
...@@ -1035,6 +1081,7 @@ public class Krb5LoginModule implements LoginModule { ...@@ -1035,6 +1081,7 @@ public class Krb5LoginModule implements LoginModule {
} }
} }
} }
}
commitSucceeded = true; commitSucceeded = true;
if (debug) if (debug)
System.out.println("Commit Succeeded \n"); System.out.println("Commit Succeeded \n");
...@@ -1106,7 +1153,8 @@ public class Krb5LoginModule implements LoginModule { ...@@ -1106,7 +1153,8 @@ public class Krb5LoginModule implements LoginModule {
while (it.hasNext()) { while (it.hasNext()) {
Object o = it.next(); Object o = it.next();
if (o instanceof KerberosTicket || if (o instanceof KerberosTicket ||
o instanceof KerberosKey) { o instanceof KerberosKey ||
o instanceof KeyTab) {
it.remove(); it.remove();
} }
} }
...@@ -1161,6 +1209,7 @@ public class Krb5LoginModule implements LoginModule { ...@@ -1161,6 +1209,7 @@ public class Krb5LoginModule implements LoginModule {
} else { } else {
// remove temp results for the next try // remove temp results for the next try
encKeys = null; encKeys = null;
ktab = null;
principal = null; principal = null;
} }
username = null; username = null;
......
...@@ -26,7 +26,6 @@ ...@@ -26,7 +26,6 @@
package com.sun.tools.example.debug.bdi; package com.sun.tools.example.debug.bdi;
import com.sun.jdi.*; import com.sun.jdi.*;
import com.sun.jdi.request.*;
public class AccessWatchpointSpec extends WatchpointSpec { public class AccessWatchpointSpec extends WatchpointSpec {
...@@ -38,6 +37,7 @@ public class AccessWatchpointSpec extends WatchpointSpec { ...@@ -38,6 +37,7 @@ public class AccessWatchpointSpec extends WatchpointSpec {
/** /**
* The 'refType' is known to match. * The 'refType' is known to match.
*/ */
@Override
void resolve(ReferenceType refType) throws InvalidTypeException, void resolve(ReferenceType refType) throws InvalidTypeException,
NoSuchFieldException { NoSuchFieldException {
if (!(refType instanceof ClassType)) { if (!(refType instanceof ClassType)) {
...@@ -51,6 +51,7 @@ public class AccessWatchpointSpec extends WatchpointSpec { ...@@ -51,6 +51,7 @@ public class AccessWatchpointSpec extends WatchpointSpec {
.createAccessWatchpointRequest(field)); .createAccessWatchpointRequest(field));
} }
@Override
public boolean equals(Object obj) { public boolean equals(Object obj) {
return (obj instanceof AccessWatchpointSpec) && super.equals(obj); return (obj instanceof AccessWatchpointSpec) && super.equals(obj);
} }
......
...@@ -27,6 +27,9 @@ package com.sun.tools.example.debug.bdi; ...@@ -27,6 +27,9 @@ package com.sun.tools.example.debug.bdi;
public class AmbiguousMethodException extends Exception public class AmbiguousMethodException extends Exception
{ {
private static final long serialVersionUID = 7793370943251707514L;
public AmbiguousMethodException() public AmbiguousMethodException()
{ {
super(); super();
......
...@@ -25,30 +25,33 @@ ...@@ -25,30 +25,33 @@
package com.sun.tools.example.debug.bdi; package com.sun.tools.example.debug.bdi;
import com.sun.jdi.request.*;
public abstract class BreakpointSpec extends EventRequestSpec { public abstract class BreakpointSpec extends EventRequestSpec {
BreakpointSpec(EventRequestSpecList specs, ReferenceTypeSpec refSpec) { BreakpointSpec(EventRequestSpecList specs, ReferenceTypeSpec refSpec) {
super(specs, refSpec); super(specs, refSpec);
} }
@Override
void notifySet(SpecListener listener, SpecEvent evt) { void notifySet(SpecListener listener, SpecEvent evt) {
listener.breakpointSet(evt); listener.breakpointSet(evt);
} }
@Override
void notifyDeferred(SpecListener listener, SpecEvent evt) { void notifyDeferred(SpecListener listener, SpecEvent evt) {
listener.breakpointDeferred(evt); listener.breakpointDeferred(evt);
} }
@Override
void notifyResolved(SpecListener listener, SpecEvent evt) { void notifyResolved(SpecListener listener, SpecEvent evt) {
listener.breakpointResolved(evt); listener.breakpointResolved(evt);
} }
@Override
void notifyDeleted(SpecListener listener, SpecEvent evt) { void notifyDeleted(SpecListener listener, SpecEvent evt) {
listener.breakpointDeleted(evt); listener.breakpointDeleted(evt);
} }
@Override
void notifyError(SpecListener listener, SpecErrorEvent evt) { void notifyError(SpecListener listener, SpecErrorEvent evt) {
listener.breakpointError(evt); listener.breakpointError(evt);
} }
......
...@@ -43,10 +43,6 @@ class ChildSession extends Session { ...@@ -43,10 +43,6 @@ class ChildSession extends Session {
private BufferedReader out; private BufferedReader out;
private BufferedReader err; private BufferedReader err;
private InputWriter inputWriter;
private OutputReader outputReader;
private OutputReader errorReader;
private InputListener input; private InputListener input;
private OutputListener output; private OutputListener output;
private OutputListener error; private OutputListener error;
...@@ -84,6 +80,7 @@ class ChildSession extends Session { ...@@ -84,6 +80,7 @@ class ChildSession extends Session {
this.error = error; this.error = error;
} }
@Override
public boolean attach() { public boolean attach() {
if (!connectToVMProcess()) { if (!connectToVMProcess()) {
...@@ -131,6 +128,7 @@ class ChildSession extends Session { ...@@ -131,6 +128,7 @@ class ChildSession extends Session {
return true; return true;
} }
@Override
public void detach() { public void detach() {
//### debug //### debug
...@@ -242,10 +240,7 @@ class ChildSession extends Session { ...@@ -242,10 +240,7 @@ class ChildSession extends Session {
this.diagnostics = diagnostics; this.diagnostics = diagnostics;
} }
public void quit() { @Override
running = false;
}
public void run() { public void run() {
try { try {
int count; int count;
...@@ -254,6 +249,7 @@ class ChildSession extends Session { ...@@ -254,6 +249,7 @@ class ChildSession extends Session {
// Run in Swing event dispatcher thread. // Run in Swing event dispatcher thread.
final String chars = new String(buffer, 0, count); final String chars = new String(buffer, 0, count);
SwingUtilities.invokeLater(new Runnable() { SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() { public void run() {
output.putString(chars); output.putString(chars);
} }
...@@ -264,6 +260,7 @@ class ChildSession extends Session { ...@@ -264,6 +260,7 @@ class ChildSession extends Session {
} catch (IOException e) { } catch (IOException e) {
// Run in Swing event dispatcher thread. // Run in Swing event dispatcher thread.
SwingUtilities.invokeLater(new Runnable() { SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() { public void run() {
diagnostics.putString("IO error reading " + diagnostics.putString("IO error reading " +
streamName + streamName +
...@@ -288,11 +285,7 @@ class ChildSession extends Session { ...@@ -288,11 +285,7 @@ class ChildSession extends Session {
this.input = input; this.input = input;
} }
public void quit() { @Override
//### Won't have much effect if blocked on input!
running = false;
}
public void run() { public void run() {
String line; String line;
while (running) { while (running) {
......
...@@ -25,4 +25,7 @@ ...@@ -25,4 +25,7 @@
package com.sun.tools.example.debug.bdi; package com.sun.tools.example.debug.bdi;
public class EvaluationException extends Exception {} public class EvaluationException extends Exception {
private static final long serialVersionUID = 4947109680354951694L;
}
...@@ -25,8 +25,6 @@ ...@@ -25,8 +25,6 @@
package com.sun.tools.example.debug.bdi; package com.sun.tools.example.debug.bdi;
import java.util.*;
import com.sun.jdi.*; import com.sun.jdi.*;
import com.sun.jdi.request.EventRequest; import com.sun.jdi.request.EventRequest;
......
...@@ -26,11 +26,6 @@ ...@@ -26,11 +26,6 @@
package com.sun.tools.example.debug.bdi; package com.sun.tools.example.debug.bdi;
import com.sun.jdi.ReferenceType; import com.sun.jdi.ReferenceType;
import com.sun.jdi.request.*;
import java.util.ArrayList;
import java.util.List;
import java.util.Iterator;
public class ExceptionSpec extends EventRequestSpec { public class ExceptionSpec extends EventRequestSpec {
...@@ -45,22 +40,27 @@ public class ExceptionSpec extends EventRequestSpec { ...@@ -45,22 +40,27 @@ public class ExceptionSpec extends EventRequestSpec {
this.notifyUncaught = notifyUncaught; this.notifyUncaught = notifyUncaught;
} }
@Override
void notifySet(SpecListener listener, SpecEvent evt) { void notifySet(SpecListener listener, SpecEvent evt) {
listener.exceptionInterceptSet(evt); listener.exceptionInterceptSet(evt);
} }
@Override
void notifyDeferred(SpecListener listener, SpecEvent evt) { void notifyDeferred(SpecListener listener, SpecEvent evt) {
listener.exceptionInterceptDeferred(evt); listener.exceptionInterceptDeferred(evt);
} }
@Override
void notifyResolved(SpecListener listener, SpecEvent evt) { void notifyResolved(SpecListener listener, SpecEvent evt) {
listener.exceptionInterceptResolved(evt); listener.exceptionInterceptResolved(evt);
} }
@Override
void notifyDeleted(SpecListener listener, SpecEvent evt) { void notifyDeleted(SpecListener listener, SpecEvent evt) {
listener.exceptionInterceptDeleted(evt); listener.exceptionInterceptDeleted(evt);
} }
@Override
void notifyError(SpecListener listener, SpecErrorEvent evt) { void notifyError(SpecListener listener, SpecErrorEvent evt) {
listener.exceptionInterceptError(evt); listener.exceptionInterceptError(evt);
} }
...@@ -68,16 +68,19 @@ public class ExceptionSpec extends EventRequestSpec { ...@@ -68,16 +68,19 @@ public class ExceptionSpec extends EventRequestSpec {
/** /**
* The 'refType' is known to match. * The 'refType' is known to match.
*/ */
@Override
void resolve(ReferenceType refType) { void resolve(ReferenceType refType) {
setRequest(refType.virtualMachine().eventRequestManager() setRequest(refType.virtualMachine().eventRequestManager()
.createExceptionRequest(refType, .createExceptionRequest(refType,
notifyCaught, notifyUncaught)); notifyCaught, notifyUncaught));
} }
@Override
public int hashCode() { public int hashCode() {
return refSpec.hashCode(); return refSpec.hashCode();
} }
@Override
public boolean equals(Object obj) { public boolean equals(Object obj) {
if (obj instanceof ExceptionSpec) { if (obj instanceof ExceptionSpec) {
ExceptionSpec es = (ExceptionSpec)obj; ExceptionSpec es = (ExceptionSpec)obj;
...@@ -88,6 +91,7 @@ public class ExceptionSpec extends EventRequestSpec { ...@@ -88,6 +91,7 @@ public class ExceptionSpec extends EventRequestSpec {
} }
} }
@Override
public String toString() { public String toString() {
StringBuffer buffer = new StringBuffer("exception catch "); StringBuffer buffer = new StringBuffer("exception catch ");
buffer.append(refSpec.toString()); buffer.append(refSpec.toString());
......
...@@ -26,7 +26,6 @@ ...@@ -26,7 +26,6 @@
package com.sun.tools.example.debug.bdi; package com.sun.tools.example.debug.bdi;
import com.sun.jdi.*; import com.sun.jdi.*;
import com.sun.jdi.event.*;
import com.sun.jdi.request.*; import com.sun.jdi.request.*;
import com.sun.jdi.connect.*; import com.sun.jdi.connect.*;
import com.sun.tools.example.debug.expr.ExpressionParser; import com.sun.tools.example.debug.expr.ExpressionParser;
...@@ -56,7 +55,7 @@ public class ExecutionManager { ...@@ -56,7 +55,7 @@ public class ExecutionManager {
// Session Listeners // Session Listeners
Vector<SessionListener> sessionListeners = new Vector<SessionListener>(); ArrayList<SessionListener> sessionListeners = new ArrayList<SessionListener>();
public void addSessionListener(SessionListener listener) { public void addSessionListener(SessionListener listener) {
sessionListeners.add(listener); sessionListeners.add(listener);
...@@ -68,7 +67,7 @@ public class ExecutionManager { ...@@ -68,7 +67,7 @@ public class ExecutionManager {
// Spec Listeners // Spec Listeners
Vector<SpecListener> specListeners = new Vector<SpecListener>(); ArrayList<SpecListener> specListeners = new ArrayList<SpecListener>();
public void addSpecListener(SpecListener cl) { public void addSpecListener(SpecListener cl) {
specListeners.add(cl); specListeners.add(cl);
...@@ -80,7 +79,7 @@ public class ExecutionManager { ...@@ -80,7 +79,7 @@ public class ExecutionManager {
// JDI Listeners // JDI Listeners
Vector<JDIListener> jdiListeners = new Vector<JDIListener>(); ArrayList<JDIListener> jdiListeners = new ArrayList<JDIListener>();
/** /**
* Adds a JDIListener * Adds a JDIListener
...@@ -105,50 +104,50 @@ public class ExecutionManager { ...@@ -105,50 +104,50 @@ public class ExecutionManager {
// App Echo Listeners // App Echo Listeners
private Vector<OutputListener> appEchoListeners = new Vector<OutputListener>(); private ArrayList<OutputListener> appEchoListeners = new ArrayList<OutputListener>();
public void addApplicationEchoListener(OutputListener l) { public void addApplicationEchoListener(OutputListener l) {
appEchoListeners.addElement(l); appEchoListeners.add(l);
} }
public void removeApplicationEchoListener(OutputListener l) { public void removeApplicationEchoListener(OutputListener l) {
appEchoListeners.removeElement(l); appEchoListeners.remove(l);
} }
// App Output Listeners // App Output Listeners
private Vector<OutputListener> appOutputListeners = new Vector<OutputListener>(); private ArrayList<OutputListener> appOutputListeners = new ArrayList<OutputListener>();
public void addApplicationOutputListener(OutputListener l) { public void addApplicationOutputListener(OutputListener l) {
appOutputListeners.addElement(l); appOutputListeners.add(l);
} }
public void removeApplicationOutputListener(OutputListener l) { public void removeApplicationOutputListener(OutputListener l) {
appOutputListeners.removeElement(l); appOutputListeners.remove(l);
} }
// App Error Listeners // App Error Listeners
private Vector<OutputListener> appErrorListeners = new Vector<OutputListener>(); private ArrayList<OutputListener> appErrorListeners = new ArrayList<OutputListener>();
public void addApplicationErrorListener(OutputListener l) { public void addApplicationErrorListener(OutputListener l) {
appErrorListeners.addElement(l); appErrorListeners.add(l);
} }
public void removeApplicationErrorListener(OutputListener l) { public void removeApplicationErrorListener(OutputListener l) {
appErrorListeners.removeElement(l); appErrorListeners.remove(l);
} }
// Diagnostic Listeners // Diagnostic Listeners
private Vector<OutputListener> diagnosticsListeners = new Vector<OutputListener>(); private ArrayList<OutputListener> diagnosticsListeners = new ArrayList<OutputListener>();
public void addDiagnosticsListener(OutputListener l) { public void addDiagnosticsListener(OutputListener l) {
diagnosticsListeners.addElement(l); diagnosticsListeners.add(l);
} }
public void removeDiagnosticsListener(OutputListener l) { public void removeDiagnosticsListener(OutputListener l) {
diagnosticsListeners.removeElement(l); diagnosticsListeners.remove(l);
} }
/////////// End Listener Registration ////////////// /////////// End Listener Registration //////////////
...@@ -159,7 +158,9 @@ public class ExecutionManager { ...@@ -159,7 +158,9 @@ public class ExecutionManager {
} }
void ensureActiveSession() throws NoSessionException { void ensureActiveSession() throws NoSessionException {
if (session == null) throw new NoSessionException(); if (session == null) {
throw new NoSessionException();
}
} }
public EventRequestManager eventRequestManager() { public EventRequestManager eventRequestManager() {
...@@ -293,6 +294,7 @@ public class ExecutionManager { ...@@ -293,6 +294,7 @@ public class ExecutionManager {
ensureActiveSession(); ensureActiveSession();
if (f != null) { if (f != null) {
frameGetter = new ExpressionParser.GetFrame() { frameGetter = new ExpressionParser.GetFrame() {
@Override
public StackFrame get() /* throws IncompatibleThreadStateException */ { public StackFrame get() /* throws IncompatibleThreadStateException */ {
return f; return f;
} }
...@@ -628,35 +630,35 @@ public class ExecutionManager { ...@@ -628,35 +630,35 @@ public class ExecutionManager {
*/ */
private void notifyInterrupted() { private void notifyInterrupted() {
Vector l = (Vector)sessionListeners.clone(); ArrayList<SessionListener> l = new ArrayList<SessionListener>(sessionListeners);
EventObject evt = new EventObject(this); EventObject evt = new EventObject(this);
for (int i = 0; i < l.size(); i++) { for (int i = 0; i < l.size(); i++) {
((SessionListener)l.elementAt(i)).sessionInterrupt(evt); l.get(i).sessionInterrupt(evt);
} }
} }
private void notifyContinued() { private void notifyContinued() {
Vector l = (Vector)sessionListeners.clone(); ArrayList<SessionListener> l = new ArrayList<SessionListener>(sessionListeners);
EventObject evt = new EventObject(this); EventObject evt = new EventObject(this);
for (int i = 0; i < l.size(); i++) { for (int i = 0; i < l.size(); i++) {
((SessionListener)l.elementAt(i)).sessionContinue(evt); l.get(i).sessionContinue(evt);
} }
} }
private void notifySessionStart() { private void notifySessionStart() {
Vector l = (Vector)sessionListeners.clone(); ArrayList<SessionListener> l = new ArrayList<SessionListener>(sessionListeners);
EventObject evt = new EventObject(this); EventObject evt = new EventObject(this);
for (int i = 0; i < l.size(); i++) { for (int i = 0; i < l.size(); i++) {
((SessionListener)l.elementAt(i)).sessionStart(evt); l.get(i).sessionStart(evt);
} }
} }
private void notifySessionDeath() { private void notifySessionDeath() {
/*** noop for now /*** noop for now
Vector l = (Vector)sessionListeners.clone(); ArrayList<SessionListener> l = new ArrayList<SessionListener>(sessionListeners);
EventObject evt = new EventObject(this); EventObject evt = new EventObject(this);
for (int i = 0; i < l.size(); i++) { for (int i = 0; i < l.size(); i++) {
((SessionListener)l.elementAt(i)).sessionDeath(evt); ((SessionListener)l.get(i)).sessionDeath(evt);
} }
****/ ****/
} }
...@@ -684,6 +686,7 @@ public class ExecutionManager { ...@@ -684,6 +686,7 @@ public class ExecutionManager {
} }
private InputListener appInput = new InputListener() { private InputListener appInput = new InputListener() {
@Override
public String getLine() { public String getLine() {
// Don't allow reader to be interrupted -- catch and retry. // Don't allow reader to be interrupted -- catch and retry.
String line = null; String line = null;
...@@ -703,6 +706,7 @@ public class ExecutionManager { ...@@ -703,6 +706,7 @@ public class ExecutionManager {
// Run in Swing event dispatcher thread. // Run in Swing event dispatcher thread.
final String input = line; final String input = line;
SwingUtilities.invokeLater(new Runnable() { SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() { public void run() {
echoInputLine(input); echoInputLine(input);
} }
...@@ -714,37 +718,40 @@ public class ExecutionManager { ...@@ -714,37 +718,40 @@ public class ExecutionManager {
private static String newline = System.getProperty("line.separator"); private static String newline = System.getProperty("line.separator");
private void echoInputLine(String line) { private void echoInputLine(String line) {
Vector l = (Vector)appEchoListeners.clone(); ArrayList<OutputListener> l = new ArrayList<OutputListener>(appEchoListeners);
for (int i = 0; i < l.size(); i++) { for (int i = 0; i < l.size(); i++) {
OutputListener ol = (OutputListener)l.elementAt(i); OutputListener ol = l.get(i);
ol.putString(line); ol.putString(line);
ol.putString(newline); ol.putString(newline);
} }
} }
private OutputListener appOutput = new OutputListener() { private OutputListener appOutput = new OutputListener() {
@Override
public void putString(String string) { public void putString(String string) {
Vector l = (Vector)appOutputListeners.clone(); ArrayList<OutputListener> l = new ArrayList<OutputListener>(appEchoListeners);
for (int i = 0; i < l.size(); i++) { for (int i = 0; i < l.size(); i++) {
((OutputListener)l.elementAt(i)).putString(string); l.get(i).putString(string);
} }
} }
}; };
private OutputListener appError = new OutputListener() { private OutputListener appError = new OutputListener() {
@Override
public void putString(String string) { public void putString(String string) {
Vector l = (Vector)appErrorListeners.clone(); ArrayList<OutputListener> l = new ArrayList<OutputListener>(appEchoListeners);
for (int i = 0; i < l.size(); i++) { for (int i = 0; i < l.size(); i++) {
((OutputListener)l.elementAt(i)).putString(string); l.get(i).putString(string);
} }
} }
}; };
private OutputListener diagnostics = new OutputListener() { private OutputListener diagnostics = new OutputListener() {
@Override
public void putString(String string) { public void putString(String string) {
Vector l = (Vector)diagnosticsListeners.clone(); ArrayList<OutputListener> l = new ArrayList<OutputListener>(diagnosticsListeners);
for (int i = 0; i < l.size(); i++) { for (int i = 0; i < l.size(); i++) {
((OutputListener)l.elementAt(i)).putString(string); l.get(i).putString(string);
} }
} }
}; };
......
...@@ -25,4 +25,7 @@ ...@@ -25,4 +25,7 @@
package com.sun.tools.example.debug.bdi; package com.sun.tools.example.debug.bdi;
public class FrameIndexOutOfBoundsException extends IndexOutOfBoundsException {} public class FrameIndexOutOfBoundsException extends IndexOutOfBoundsException {
private static final long serialVersionUID = -4870148107027371437L;
}
...@@ -28,8 +28,6 @@ package com.sun.tools.example.debug.bdi; ...@@ -28,8 +28,6 @@ package com.sun.tools.example.debug.bdi;
import com.sun.jdi.*; import com.sun.jdi.*;
import com.sun.jdi.event.*; import com.sun.jdi.event.*;
import java.util.*;
import com.sun.tools.example.debug.event.*; import com.sun.tools.example.debug.event.*;
import javax.swing.SwingUtilities; import javax.swing.SwingUtilities;
...@@ -55,6 +53,7 @@ class JDIEventSource extends Thread { ...@@ -55,6 +53,7 @@ class JDIEventSource extends Thread {
this.queue = session.vm.eventQueue(); this.queue = session.vm.eventQueue();
} }
@Override
public void run() { public void run() {
try { try {
runLoop(); runLoop();
...@@ -78,6 +77,7 @@ class JDIEventSource extends Thread { ...@@ -78,6 +77,7 @@ class JDIEventSource extends Thread {
//### Gross foul hackery! //### Gross foul hackery!
private void dispatchEventSet(final AbstractEventSet es) { private void dispatchEventSet(final AbstractEventSet es) {
SwingUtilities.invokeLater(new Runnable() { SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() { public void run() {
boolean interrupted = es.suspendedAll(); boolean interrupted = es.suspendedAll();
es.notify(firstListener); es.notify(firstListener);
...@@ -117,54 +117,65 @@ class JDIEventSource extends Thread { ...@@ -117,54 +117,65 @@ class JDIEventSource extends Thread {
//### This is a Hack, deal with it //### This is a Hack, deal with it
private class FirstListener implements JDIListener { private class FirstListener implements JDIListener {
@Override
public void accessWatchpoint(AccessWatchpointEventSet e) { public void accessWatchpoint(AccessWatchpointEventSet e) {
session.runtime.validateThreadInfo(); session.runtime.validateThreadInfo();
wantInterrupt = true; wantInterrupt = true;
} }
@Override
public void classPrepare(ClassPrepareEventSet e) { public void classPrepare(ClassPrepareEventSet e) {
wantInterrupt = false; wantInterrupt = false;
runtime.resolve(e.getReferenceType()); runtime.resolve(e.getReferenceType());
} }
@Override
public void classUnload(ClassUnloadEventSet e) { public void classUnload(ClassUnloadEventSet e) {
wantInterrupt = false; wantInterrupt = false;
} }
@Override
public void exception(ExceptionEventSet e) { public void exception(ExceptionEventSet e) {
wantInterrupt = true; wantInterrupt = true;
} }
@Override
public void locationTrigger(LocationTriggerEventSet e) { public void locationTrigger(LocationTriggerEventSet e) {
session.runtime.validateThreadInfo(); session.runtime.validateThreadInfo();
wantInterrupt = true; wantInterrupt = true;
} }
@Override
public void modificationWatchpoint(ModificationWatchpointEventSet e) { public void modificationWatchpoint(ModificationWatchpointEventSet e) {
session.runtime.validateThreadInfo(); session.runtime.validateThreadInfo();
wantInterrupt = true; wantInterrupt = true;
} }
@Override
public void threadDeath(ThreadDeathEventSet e) { public void threadDeath(ThreadDeathEventSet e) {
wantInterrupt = false; wantInterrupt = false;
} }
@Override
public void threadStart(ThreadStartEventSet e) { public void threadStart(ThreadStartEventSet e) {
wantInterrupt = false; wantInterrupt = false;
} }
@Override
public void vmDeath(VMDeathEventSet e) { public void vmDeath(VMDeathEventSet e) {
//### Should have some way to notify user //### Should have some way to notify user
//### that VM died before the session ended. //### that VM died before the session ended.
wantInterrupt = false; wantInterrupt = false;
} }
@Override
public void vmDisconnect(VMDisconnectEventSet e) { public void vmDisconnect(VMDisconnectEventSet e) {
//### Notify user? //### Notify user?
wantInterrupt = false; wantInterrupt = false;
session.runtime.endSession(); session.runtime.endSession();
} }
@Override
public void vmStart(VMStartEventSet e) { public void vmStart(VMStartEventSet e) {
//### Do we need to do anything with it? //### Do we need to do anything with it?
wantInterrupt = false; wantInterrupt = false;
......
...@@ -26,11 +26,7 @@ ...@@ -26,11 +26,7 @@
package com.sun.tools.example.debug.bdi; package com.sun.tools.example.debug.bdi;
import com.sun.jdi.*; import com.sun.jdi.*;
import com.sun.jdi.request.*;
import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Iterator;
public class LineBreakpointSpec extends BreakpointSpec { public class LineBreakpointSpec extends BreakpointSpec {
int lineNumber; int lineNumber;
...@@ -44,6 +40,7 @@ public class LineBreakpointSpec extends BreakpointSpec { ...@@ -44,6 +40,7 @@ public class LineBreakpointSpec extends BreakpointSpec {
/** /**
* The 'refType' is known to match. * The 'refType' is known to match.
*/ */
@Override
void resolve(ReferenceType refType) throws InvalidTypeException, void resolve(ReferenceType refType) throws InvalidTypeException,
LineNotFoundException { LineNotFoundException {
if (!(refType instanceof ClassType)) { if (!(refType instanceof ClassType)) {
...@@ -81,10 +78,12 @@ public class LineBreakpointSpec extends BreakpointSpec { ...@@ -81,10 +78,12 @@ public class LineBreakpointSpec extends BreakpointSpec {
return lineNumber; return lineNumber;
} }
@Override
public int hashCode() { public int hashCode() {
return refSpec.hashCode() + lineNumber; return refSpec.hashCode() + lineNumber;
} }
@Override
public boolean equals(Object obj) { public boolean equals(Object obj) {
if (obj instanceof LineBreakpointSpec) { if (obj instanceof LineBreakpointSpec) {
LineBreakpointSpec breakpoint = (LineBreakpointSpec)obj; LineBreakpointSpec breakpoint = (LineBreakpointSpec)obj;
...@@ -96,6 +95,7 @@ public class LineBreakpointSpec extends BreakpointSpec { ...@@ -96,6 +95,7 @@ public class LineBreakpointSpec extends BreakpointSpec {
} }
} }
@Override
public String errorMessageFor(Exception e) { public String errorMessageFor(Exception e) {
if (e instanceof LineNotFoundException) { if (e instanceof LineNotFoundException) {
return ("No code at line " + lineNumber() + " in " + refSpec); return ("No code at line " + lineNumber() + " in " + refSpec);
...@@ -107,6 +107,7 @@ public class LineBreakpointSpec extends BreakpointSpec { ...@@ -107,6 +107,7 @@ public class LineBreakpointSpec extends BreakpointSpec {
} }
} }
@Override
public String toString() { public String toString() {
StringBuffer buffer = new StringBuffer("breakpoint "); StringBuffer buffer = new StringBuffer("breakpoint ");
buffer.append(refSpec.toString()); buffer.append(refSpec.toString());
......
...@@ -27,6 +27,9 @@ package com.sun.tools.example.debug.bdi; ...@@ -27,6 +27,9 @@ package com.sun.tools.example.debug.bdi;
public class LineNotFoundException extends Exception public class LineNotFoundException extends Exception
{ {
private static final long serialVersionUID = -5630418117861587582L;
public LineNotFoundException() public LineNotFoundException()
{ {
super(); super();
......
...@@ -26,6 +26,9 @@ ...@@ -26,6 +26,9 @@
package com.sun.tools.example.debug.bdi; package com.sun.tools.example.debug.bdi;
class MalformedMemberNameException extends Exception { class MalformedMemberNameException extends Exception {
private static final long serialVersionUID = -7726664097374844485L;
public MalformedMemberNameException() { public MalformedMemberNameException() {
super(); super();
} }
......
...@@ -26,11 +26,8 @@ ...@@ -26,11 +26,8 @@
package com.sun.tools.example.debug.bdi; package com.sun.tools.example.debug.bdi;
import com.sun.jdi.*; import com.sun.jdi.*;
import com.sun.jdi.request.*;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Iterator;
public class MethodBreakpointSpec extends BreakpointSpec { public class MethodBreakpointSpec extends BreakpointSpec {
String methodId; String methodId;
...@@ -47,6 +44,7 @@ public class MethodBreakpointSpec extends BreakpointSpec { ...@@ -47,6 +44,7 @@ public class MethodBreakpointSpec extends BreakpointSpec {
/** /**
* The 'refType' is known to match. * The 'refType' is known to match.
*/ */
@Override
void resolve(ReferenceType refType) throws MalformedMemberNameException, void resolve(ReferenceType refType) throws MalformedMemberNameException,
AmbiguousMethodException, AmbiguousMethodException,
InvalidTypeException, InvalidTypeException,
...@@ -80,12 +78,14 @@ public class MethodBreakpointSpec extends BreakpointSpec { ...@@ -80,12 +78,14 @@ public class MethodBreakpointSpec extends BreakpointSpec {
return methodArgs; return methodArgs;
} }
@Override
public int hashCode() { public int hashCode() {
return refSpec.hashCode() + return refSpec.hashCode() +
((methodId != null) ? methodId.hashCode() : 0) + ((methodId != null) ? methodId.hashCode() : 0) +
((methodArgs != null) ? methodArgs.hashCode() : 0); ((methodArgs != null) ? methodArgs.hashCode() : 0);
} }
@Override
public boolean equals(Object obj) { public boolean equals(Object obj) {
if (obj instanceof MethodBreakpointSpec) { if (obj instanceof MethodBreakpointSpec) {
MethodBreakpointSpec breakpoint = (MethodBreakpointSpec)obj; MethodBreakpointSpec breakpoint = (MethodBreakpointSpec)obj;
...@@ -98,6 +98,7 @@ public class MethodBreakpointSpec extends BreakpointSpec { ...@@ -98,6 +98,7 @@ public class MethodBreakpointSpec extends BreakpointSpec {
} }
} }
@Override
public String errorMessageFor(Exception e) { public String errorMessageFor(Exception e) {
if (e instanceof AmbiguousMethodException) { if (e instanceof AmbiguousMethodException) {
return ("Method " + methodName() + " is overloaded; specify arguments"); return ("Method " + methodName() + " is overloaded; specify arguments");
...@@ -114,6 +115,7 @@ public class MethodBreakpointSpec extends BreakpointSpec { ...@@ -114,6 +115,7 @@ public class MethodBreakpointSpec extends BreakpointSpec {
} }
} }
@Override
public String toString() { public String toString() {
StringBuffer buffer = new StringBuffer("breakpoint "); StringBuffer buffer = new StringBuffer("breakpoint ");
buffer.append(refSpec.toString()); buffer.append(refSpec.toString());
...@@ -257,7 +259,7 @@ public class MethodBreakpointSpec extends BreakpointSpec { ...@@ -257,7 +259,7 @@ public class MethodBreakpointSpec extends BreakpointSpec {
*/ */
if ((name.indexOf('.') == -1) || name.startsWith("*.")) { if ((name.indexOf('.') == -1) || name.startsWith("*.")) {
try { try {
List refs = specs.runtime.findClassesMatchingPattern(name); List<?> refs = specs.runtime.findClassesMatchingPattern(name);
if (refs.size() > 0) { //### ambiguity??? if (refs.size() > 0) { //### ambiguity???
name = ((ReferenceType)(refs.get(0))).name(); name = ((ReferenceType)(refs.get(0))).name();
} }
......
...@@ -27,6 +27,8 @@ package com.sun.tools.example.debug.bdi; ...@@ -27,6 +27,8 @@ package com.sun.tools.example.debug.bdi;
public class MethodNotFoundException extends Exception public class MethodNotFoundException extends Exception
{ {
private static final long serialVersionUID = -2064968107599632609L;
public MethodNotFoundException() public MethodNotFoundException()
{ {
super(); super();
......
...@@ -26,7 +26,6 @@ ...@@ -26,7 +26,6 @@
package com.sun.tools.example.debug.bdi; package com.sun.tools.example.debug.bdi;
import com.sun.jdi.*; import com.sun.jdi.*;
import com.sun.jdi.request.*;
public class ModificationWatchpointSpec extends WatchpointSpec { public class ModificationWatchpointSpec extends WatchpointSpec {
...@@ -38,6 +37,7 @@ public class ModificationWatchpointSpec extends WatchpointSpec { ...@@ -38,6 +37,7 @@ public class ModificationWatchpointSpec extends WatchpointSpec {
/** /**
* The 'refType' is known to match. * The 'refType' is known to match.
*/ */
@Override
void resolve(ReferenceType refType) throws InvalidTypeException, void resolve(ReferenceType refType) throws InvalidTypeException,
NoSuchFieldException { NoSuchFieldException {
if (!(refType instanceof ClassType)) { if (!(refType instanceof ClassType)) {
...@@ -51,6 +51,7 @@ public class ModificationWatchpointSpec extends WatchpointSpec { ...@@ -51,6 +51,7 @@ public class ModificationWatchpointSpec extends WatchpointSpec {
.createModificationWatchpointRequest(field)); .createModificationWatchpointRequest(field));
} }
@Override
public boolean equals(Object obj) { public boolean equals(Object obj) {
return (obj instanceof ModificationWatchpointSpec) && return (obj instanceof ModificationWatchpointSpec) &&
super.equals(obj); super.equals(obj);
......
...@@ -25,4 +25,7 @@ ...@@ -25,4 +25,7 @@
package com.sun.tools.example.debug.bdi; package com.sun.tools.example.debug.bdi;
public class NoSessionException extends Exception {} public class NoSessionException extends Exception {
private static final long serialVersionUID = -7324357828115128603L;
}
...@@ -25,4 +25,8 @@ ...@@ -25,4 +25,8 @@
package com.sun.tools.example.debug.bdi; package com.sun.tools.example.debug.bdi;
public class NoThreadException extends Exception {} public class NoThreadException extends Exception {
private static final long serialVersionUID = 1846613539928921998L;
}
...@@ -47,6 +47,7 @@ class PatternReferenceTypeSpec implements ReferenceTypeSpec { ...@@ -47,6 +47,7 @@ class PatternReferenceTypeSpec implements ReferenceTypeSpec {
/** /**
* Does the specified ReferenceType match this spec. * Does the specified ReferenceType match this spec.
*/ */
@Override
public boolean matches(ReferenceType refType) { public boolean matches(ReferenceType refType) {
if (isWild) { if (isWild) {
return refType.name().endsWith(classId); return refType.name().endsWith(classId);
...@@ -55,10 +56,12 @@ class PatternReferenceTypeSpec implements ReferenceTypeSpec { ...@@ -55,10 +56,12 @@ class PatternReferenceTypeSpec implements ReferenceTypeSpec {
} }
} }
@Override
public int hashCode() { public int hashCode() {
return classId.hashCode(); return classId.hashCode();
} }
@Override
public boolean equals(Object obj) { public boolean equals(Object obj) {
if (obj instanceof PatternReferenceTypeSpec) { if (obj instanceof PatternReferenceTypeSpec) {
PatternReferenceTypeSpec spec = (PatternReferenceTypeSpec)obj; PatternReferenceTypeSpec spec = (PatternReferenceTypeSpec)obj;
...@@ -89,6 +92,7 @@ class PatternReferenceTypeSpec implements ReferenceTypeSpec { ...@@ -89,6 +92,7 @@ class PatternReferenceTypeSpec implements ReferenceTypeSpec {
} }
} }
@Override
public String toString() { public String toString() {
return isWild? "*" + classId : classId; return isWild? "*" + classId : classId;
} }
......
...@@ -33,7 +33,9 @@ interface ReferenceTypeSpec { ...@@ -33,7 +33,9 @@ interface ReferenceTypeSpec {
*/ */
boolean matches(ReferenceType refType); boolean matches(ReferenceType refType);
@Override
int hashCode(); int hashCode();
@Override
boolean equals(Object obj); boolean equals(Object obj);
} }
...@@ -27,7 +27,6 @@ package com.sun.tools.example.debug.bdi; ...@@ -27,7 +27,6 @@ package com.sun.tools.example.debug.bdi;
import com.sun.jdi.VirtualMachine; import com.sun.jdi.VirtualMachine;
import com.sun.jdi.VMDisconnectedException; import com.sun.jdi.VMDisconnectedException;
import com.sun.jdi.event.EventSet;
/** /**
* Our repository of what we know about the state of one * Our repository of what we know about the state of one
......
...@@ -39,6 +39,7 @@ class SourceNameReferenceTypeSpec implements ReferenceTypeSpec { ...@@ -39,6 +39,7 @@ class SourceNameReferenceTypeSpec implements ReferenceTypeSpec {
/** /**
* Does the specified ReferenceType match this spec. * Does the specified ReferenceType match this spec.
*/ */
@Override
public boolean matches(ReferenceType refType) { public boolean matches(ReferenceType refType) {
try { try {
if (refType.sourceName().equals(sourceName)) { if (refType.sourceName().equals(sourceName)) {
...@@ -48,9 +49,6 @@ class SourceNameReferenceTypeSpec implements ReferenceTypeSpec { ...@@ -48,9 +49,6 @@ class SourceNameReferenceTypeSpec implements ReferenceTypeSpec {
return true; return true;
} catch(AbsentInformationException exc) { } catch(AbsentInformationException exc) {
} catch(ObjectCollectedException exc) { } catch(ObjectCollectedException exc) {
} catch(InvalidLineNumberException exc) {
// } catch(ClassNotPreparedException exc) {
// -- should not happen, so don't catch this ---
} }
} }
} catch(AbsentInformationException exc) { } catch(AbsentInformationException exc) {
...@@ -59,10 +57,12 @@ class SourceNameReferenceTypeSpec implements ReferenceTypeSpec { ...@@ -59,10 +57,12 @@ class SourceNameReferenceTypeSpec implements ReferenceTypeSpec {
return false; return false;
} }
@Override
public int hashCode() { public int hashCode() {
return sourceName.hashCode() + linenumber; return sourceName.hashCode() + linenumber;
} }
@Override
public boolean equals(Object obj) { public boolean equals(Object obj) {
if (obj instanceof SourceNameReferenceTypeSpec) { if (obj instanceof SourceNameReferenceTypeSpec) {
SourceNameReferenceTypeSpec spec = (SourceNameReferenceTypeSpec)obj; SourceNameReferenceTypeSpec spec = (SourceNameReferenceTypeSpec)obj;
...@@ -74,6 +74,7 @@ class SourceNameReferenceTypeSpec implements ReferenceTypeSpec { ...@@ -74,6 +74,7 @@ class SourceNameReferenceTypeSpec implements ReferenceTypeSpec {
} }
} }
@Override
public String toString() { public String toString() {
return sourceName + "@" + linenumber; return sourceName + "@" + linenumber;
} }
......
...@@ -25,10 +25,9 @@ ...@@ -25,10 +25,9 @@
package com.sun.tools.example.debug.bdi; package com.sun.tools.example.debug.bdi;
import java.util.EventObject;
public class SpecErrorEvent extends SpecEvent { public class SpecErrorEvent extends SpecEvent {
private static final long serialVersionUID = 8162634387866409578L;
private Exception reason; private Exception reason;
public SpecErrorEvent(EventRequestSpec eventRequestSpec, public SpecErrorEvent(EventRequestSpec eventRequestSpec,
......
...@@ -31,6 +31,7 @@ import com.sun.jdi.request.EventRequest; ...@@ -31,6 +31,7 @@ import com.sun.jdi.request.EventRequest;
public class SpecEvent extends EventObject { public class SpecEvent extends EventObject {
private static final long serialVersionUID = 4820735456787276230L;
private EventRequestSpec eventRequestSpec; private EventRequestSpec eventRequestSpec;
public SpecEvent(EventRequestSpec eventRequestSpec) { public SpecEvent(EventRequestSpec eventRequestSpec) {
......
...@@ -26,7 +26,6 @@ ...@@ -26,7 +26,6 @@
package com.sun.tools.example.debug.bdi; package com.sun.tools.example.debug.bdi;
import com.sun.jdi.ThreadGroupReference; import com.sun.jdi.ThreadGroupReference;
import com.sun.jdi.ThreadReference;
import java.util.List; import java.util.List;
import java.util.Stack; import java.util.Stack;
import java.util.ArrayList; import java.util.ArrayList;
...@@ -73,10 +72,12 @@ public class ThreadGroupIterator implements Iterator<ThreadGroupReference> { ...@@ -73,10 +72,12 @@ public class ThreadGroupIterator implements Iterator<ThreadGroupReference> {
} }
} }
@Override
public boolean hasNext() { public boolean hasNext() {
return !stack.isEmpty(); return !stack.isEmpty();
} }
@Override
public ThreadGroupReference next() { public ThreadGroupReference next() {
return nextThreadGroup(); return nextThreadGroup();
} }
...@@ -87,6 +88,7 @@ public class ThreadGroupIterator implements Iterator<ThreadGroupReference> { ...@@ -87,6 +88,7 @@ public class ThreadGroupIterator implements Iterator<ThreadGroupReference> {
return tg; return tg;
} }
@Override
public void remove() { public void remove() {
throw new UnsupportedOperationException(); throw new UnsupportedOperationException();
} }
......
...@@ -26,9 +26,6 @@ ...@@ -26,9 +26,6 @@
package com.sun.tools.example.debug.bdi; package com.sun.tools.example.debug.bdi;
import com.sun.jdi.*; import com.sun.jdi.*;
import java.util.List;
import java.util.ArrayList;
import java.util.Iterator;
//### Should handle target VM death or connection failure cleanly. //### Should handle target VM death or connection failure cleanly.
......
...@@ -43,6 +43,7 @@ public class ThreadIterator implements Iterator<ThreadReference> { ...@@ -43,6 +43,7 @@ public class ThreadIterator implements Iterator<ThreadReference> {
tgi = new ThreadGroupIterator(tgl); tgi = new ThreadGroupIterator(tgl);
} }
@Override
public boolean hasNext() { public boolean hasNext() {
while (it == null || !it.hasNext()) { while (it == null || !it.hasNext()) {
if (!tgi.hasNext()) { if (!tgi.hasNext()) {
...@@ -53,6 +54,7 @@ public class ThreadIterator implements Iterator<ThreadReference> { ...@@ -53,6 +54,7 @@ public class ThreadIterator implements Iterator<ThreadReference> {
return true; return true;
} }
@Override
public ThreadReference next() { public ThreadReference next() {
return it.next(); return it.next();
} }
...@@ -61,6 +63,7 @@ public class ThreadIterator implements Iterator<ThreadReference> { ...@@ -61,6 +63,7 @@ public class ThreadIterator implements Iterator<ThreadReference> {
return next(); return next();
} }
@Override
public void remove() { public void remove() {
throw new UnsupportedOperationException(); throw new UnsupportedOperationException();
} }
......
...@@ -26,9 +26,6 @@ ...@@ -26,9 +26,6 @@
package com.sun.tools.example.debug.bdi; //### does it belong here? package com.sun.tools.example.debug.bdi; //### does it belong here?
import com.sun.jdi.*; import com.sun.jdi.*;
import com.sun.tools.jdi.*;
import java.util.*;
import java.io.*;
public class Utils { public class Utils {
......
...@@ -25,4 +25,7 @@ ...@@ -25,4 +25,7 @@
package com.sun.tools.example.debug.bdi; package com.sun.tools.example.debug.bdi;
public class VMLaunchFailureException extends Exception {} public class VMLaunchFailureException extends Exception {
private static final long serialVersionUID = -2439646729274310108L;
}
...@@ -25,4 +25,7 @@ ...@@ -25,4 +25,7 @@
package com.sun.tools.example.debug.bdi; package com.sun.tools.example.debug.bdi;
public class VMNotInterruptedException extends Exception {} public class VMNotInterruptedException extends Exception {
private static final long serialVersionUID = 8111074582188765600L;
}
...@@ -25,9 +25,6 @@ ...@@ -25,9 +25,6 @@
package com.sun.tools.example.debug.bdi; package com.sun.tools.example.debug.bdi;
import com.sun.jdi.*;
import com.sun.jdi.request.*;
public abstract class WatchpointSpec extends EventRequestSpec { public abstract class WatchpointSpec extends EventRequestSpec {
final String fieldId; final String fieldId;
...@@ -40,31 +37,38 @@ public abstract class WatchpointSpec extends EventRequestSpec { ...@@ -40,31 +37,38 @@ public abstract class WatchpointSpec extends EventRequestSpec {
// } // }
} }
@Override
void notifySet(SpecListener listener, SpecEvent evt) { void notifySet(SpecListener listener, SpecEvent evt) {
listener.watchpointSet(evt); listener.watchpointSet(evt);
} }
@Override
void notifyDeferred(SpecListener listener, SpecEvent evt) { void notifyDeferred(SpecListener listener, SpecEvent evt) {
listener.watchpointDeferred(evt); listener.watchpointDeferred(evt);
} }
@Override
void notifyResolved(SpecListener listener, SpecEvent evt) { void notifyResolved(SpecListener listener, SpecEvent evt) {
listener.watchpointResolved(evt); listener.watchpointResolved(evt);
} }
@Override
void notifyDeleted(SpecListener listener, SpecEvent evt) { void notifyDeleted(SpecListener listener, SpecEvent evt) {
listener.watchpointDeleted(evt); listener.watchpointDeleted(evt);
} }
@Override
void notifyError(SpecListener listener, SpecErrorEvent evt) { void notifyError(SpecListener listener, SpecErrorEvent evt) {
listener.watchpointError(evt); listener.watchpointError(evt);
} }
@Override
public int hashCode() { public int hashCode() {
return refSpec.hashCode() + fieldId.hashCode() + return refSpec.hashCode() + fieldId.hashCode() +
getClass().hashCode(); getClass().hashCode();
} }
@Override
public boolean equals(Object obj) { public boolean equals(Object obj) {
if (obj instanceof WatchpointSpec) { if (obj instanceof WatchpointSpec) {
WatchpointSpec watchpoint = (WatchpointSpec)obj; WatchpointSpec watchpoint = (WatchpointSpec)obj;
...@@ -77,6 +81,7 @@ public abstract class WatchpointSpec extends EventRequestSpec { ...@@ -77,6 +81,7 @@ public abstract class WatchpointSpec extends EventRequestSpec {
} }
} }
@Override
public String errorMessageFor(Exception e) { public String errorMessageFor(Exception e) {
if (e instanceof NoSuchFieldException) { if (e instanceof NoSuchFieldException) {
return ("No field " + fieldId + " in " + refSpec); return ("No field " + fieldId + " in " + refSpec);
......
...@@ -33,6 +33,7 @@ import java.util.*; ...@@ -33,6 +33,7 @@ import java.util.*;
public abstract class AbstractEventSet extends EventObject implements EventSet { public abstract class AbstractEventSet extends EventObject implements EventSet {
private static final long serialVersionUID = 2772717574222076977L;
private final EventSet jdiEventSet; private final EventSet jdiEventSet;
final Event oneEvent; final Event oneEvent;
...@@ -81,6 +82,7 @@ public abstract class AbstractEventSet extends EventObject implements EventSet { ...@@ -81,6 +82,7 @@ public abstract class AbstractEventSet extends EventObject implements EventSet {
// Implement Mirror // Implement Mirror
@Override
public VirtualMachine virtualMachine() { public VirtualMachine virtualMachine() {
return jdiEventSet.virtualMachine(); return jdiEventSet.virtualMachine();
} }
...@@ -105,10 +107,12 @@ public abstract class AbstractEventSet extends EventObject implements EventSet { ...@@ -105,10 +107,12 @@ public abstract class AbstractEventSet extends EventObject implements EventSet {
return jdiEventSet.suspendPolicy(); return jdiEventSet.suspendPolicy();
} }
@Override
public void resume() { public void resume() {
jdiEventSet.resume(); jdiEventSet.resume();
} }
@Override
public int suspendPolicy() { public int suspendPolicy() {
return jdiEventSet.suspendPolicy(); return jdiEventSet.suspendPolicy();
} }
...@@ -128,6 +132,7 @@ public abstract class AbstractEventSet extends EventObject implements EventSet { ...@@ -128,6 +132,7 @@ public abstract class AbstractEventSet extends EventObject implements EventSet {
/** /**
* Return an iterator specific to {@link Event} objects. * Return an iterator specific to {@link Event} objects.
*/ */
@Override
public EventIterator eventIterator() { public EventIterator eventIterator() {
return jdiEventSet.eventIterator(); return jdiEventSet.eventIterator();
} }
...@@ -142,6 +147,7 @@ public abstract class AbstractEventSet extends EventObject implements EventSet { ...@@ -142,6 +147,7 @@ public abstract class AbstractEventSet extends EventObject implements EventSet {
* *
* @return the number of elements in this set (its cardinality). * @return the number of elements in this set (its cardinality).
*/ */
@Override
public int size() { public int size() {
return jdiEventSet.size(); return jdiEventSet.size();
} }
...@@ -151,6 +157,7 @@ public abstract class AbstractEventSet extends EventObject implements EventSet { ...@@ -151,6 +157,7 @@ public abstract class AbstractEventSet extends EventObject implements EventSet {
* *
* @return <tt>true</tt> if this set contains no elements. * @return <tt>true</tt> if this set contains no elements.
*/ */
@Override
public boolean isEmpty() { public boolean isEmpty() {
return jdiEventSet.isEmpty(); return jdiEventSet.isEmpty();
} }
...@@ -163,6 +170,7 @@ public abstract class AbstractEventSet extends EventObject implements EventSet { ...@@ -163,6 +170,7 @@ public abstract class AbstractEventSet extends EventObject implements EventSet {
* *
* @return <tt>true</tt> if this set contains the specified element. * @return <tt>true</tt> if this set contains the specified element.
*/ */
@Override
public boolean contains(Object o) { public boolean contains(Object o) {
return jdiEventSet.contains(o); return jdiEventSet.contains(o);
} }
...@@ -174,6 +182,7 @@ public abstract class AbstractEventSet extends EventObject implements EventSet { ...@@ -174,6 +182,7 @@ public abstract class AbstractEventSet extends EventObject implements EventSet {
* *
* @return an iterator over the elements in this set. * @return an iterator over the elements in this set.
*/ */
@Override
public Iterator<Event> iterator() { public Iterator<Event> iterator() {
return jdiEventSet.iterator(); return jdiEventSet.iterator();
} }
...@@ -184,6 +193,7 @@ public abstract class AbstractEventSet extends EventObject implements EventSet { ...@@ -184,6 +193,7 @@ public abstract class AbstractEventSet extends EventObject implements EventSet {
* *
* @return an array containing all of the elements in this set. * @return an array containing all of the elements in this set.
*/ */
@Override
public Object[] toArray() { public Object[] toArray() {
return jdiEventSet.toArray(); return jdiEventSet.toArray();
} }
...@@ -202,6 +212,7 @@ public abstract class AbstractEventSet extends EventObject implements EventSet { ...@@ -202,6 +212,7 @@ public abstract class AbstractEventSet extends EventObject implements EventSet {
* @throws ArrayStoreException the runtime type of a is not a supertype * @throws ArrayStoreException the runtime type of a is not a supertype
* of the runtime type of every element in this set. * of the runtime type of every element in this set.
*/ */
@Override
public <T> T[] toArray(T a[]) { public <T> T[] toArray(T a[]) {
return jdiEventSet.toArray(a); return jdiEventSet.toArray(a);
} }
...@@ -217,6 +228,7 @@ public abstract class AbstractEventSet extends EventObject implements EventSet { ...@@ -217,6 +228,7 @@ public abstract class AbstractEventSet extends EventObject implements EventSet {
* @return <tt>true</tt> if this set contains all of the elements of the * @return <tt>true</tt> if this set contains all of the elements of the
* specified collection. * specified collection.
*/ */
@Override
public boolean containsAll(Collection<?> c) { public boolean containsAll(Collection<?> c) {
return jdiEventSet.containsAll(c); return jdiEventSet.containsAll(c);
} }
...@@ -224,21 +236,27 @@ public abstract class AbstractEventSet extends EventObject implements EventSet { ...@@ -224,21 +236,27 @@ public abstract class AbstractEventSet extends EventObject implements EventSet {
// Make the rest of Set unmodifiable // Make the rest of Set unmodifiable
@Override
public boolean add(Event e){ public boolean add(Event e){
throw new UnsupportedOperationException(); throw new UnsupportedOperationException();
} }
@Override
public boolean remove(Object o) { public boolean remove(Object o) {
throw new UnsupportedOperationException(); throw new UnsupportedOperationException();
} }
@Override
public boolean addAll(Collection<? extends Event> coll) { public boolean addAll(Collection<? extends Event> coll) {
throw new UnsupportedOperationException(); throw new UnsupportedOperationException();
} }
@Override
public boolean removeAll(Collection<?> coll) { public boolean removeAll(Collection<?> coll) {
throw new UnsupportedOperationException(); throw new UnsupportedOperationException();
} }
@Override
public boolean retainAll(Collection<?> coll) { public boolean retainAll(Collection<?> coll) {
throw new UnsupportedOperationException(); throw new UnsupportedOperationException();
} }
@Override
public void clear() { public void clear() {
throw new UnsupportedOperationException(); throw new UnsupportedOperationException();
} }
......
...@@ -25,15 +25,17 @@ ...@@ -25,15 +25,17 @@
package com.sun.tools.example.debug.event; package com.sun.tools.example.debug.event;
import com.sun.jdi.*;
import com.sun.jdi.event.*; import com.sun.jdi.event.*;
public class AccessWatchpointEventSet extends WatchpointEventSet { public class AccessWatchpointEventSet extends WatchpointEventSet {
private static final long serialVersionUID = -2620394219156607673L;
AccessWatchpointEventSet(EventSet jdiEventSet) { AccessWatchpointEventSet(EventSet jdiEventSet) {
super(jdiEventSet); super(jdiEventSet);
} }
@Override
public void notify(JDIListener listener) { public void notify(JDIListener listener) {
listener.accessWatchpoint(this); listener.accessWatchpoint(this);
} }
......
...@@ -30,6 +30,8 @@ import com.sun.jdi.event.*; ...@@ -30,6 +30,8 @@ import com.sun.jdi.event.*;
public class ClassPrepareEventSet extends AbstractEventSet { public class ClassPrepareEventSet extends AbstractEventSet {
private static final long serialVersionUID = 5958493423581010491L;
ClassPrepareEventSet(EventSet jdiEventSet) { ClassPrepareEventSet(EventSet jdiEventSet) {
super(jdiEventSet); super(jdiEventSet);
} }
...@@ -55,6 +57,7 @@ public class ClassPrepareEventSet extends AbstractEventSet { ...@@ -55,6 +57,7 @@ public class ClassPrepareEventSet extends AbstractEventSet {
return ((ClassPrepareEvent)oneEvent).referenceType(); return ((ClassPrepareEvent)oneEvent).referenceType();
} }
@Override
public void notify(JDIListener listener) { public void notify(JDIListener listener) {
listener.classPrepare(this); listener.classPrepare(this);
} }
......
...@@ -25,11 +25,12 @@ ...@@ -25,11 +25,12 @@
package com.sun.tools.example.debug.event; package com.sun.tools.example.debug.event;
import com.sun.jdi.*;
import com.sun.jdi.event.*; import com.sun.jdi.event.*;
public class ClassUnloadEventSet extends AbstractEventSet { public class ClassUnloadEventSet extends AbstractEventSet {
private static final long serialVersionUID = 8370341450345835866L;
ClassUnloadEventSet(EventSet jdiEventSet) { ClassUnloadEventSet(EventSet jdiEventSet) {
super(jdiEventSet); super(jdiEventSet);
} }
...@@ -48,6 +49,7 @@ public class ClassUnloadEventSet extends AbstractEventSet { ...@@ -48,6 +49,7 @@ public class ClassUnloadEventSet extends AbstractEventSet {
return ((ClassUnloadEvent)oneEvent).classSignature(); return ((ClassUnloadEvent)oneEvent).classSignature();
} }
@Override
public void notify(JDIListener listener) { public void notify(JDIListener listener) {
listener.classUnload(this); listener.classUnload(this);
} }
......
...@@ -30,6 +30,8 @@ import com.sun.jdi.event.*; ...@@ -30,6 +30,8 @@ import com.sun.jdi.event.*;
public class ExceptionEventSet extends LocatableEventSet { public class ExceptionEventSet extends LocatableEventSet {
private static final long serialVersionUID = 5328140167954640711L;
ExceptionEventSet(EventSet jdiEventSet) { ExceptionEventSet(EventSet jdiEventSet) {
super(jdiEventSet); super(jdiEventSet);
} }
...@@ -75,6 +77,7 @@ public class ExceptionEventSet extends LocatableEventSet { ...@@ -75,6 +77,7 @@ public class ExceptionEventSet extends LocatableEventSet {
return ((ExceptionEvent)oneEvent).catchLocation(); return ((ExceptionEvent)oneEvent).catchLocation();
} }
@Override
public void notify(JDIListener listener) { public void notify(JDIListener listener) {
listener.exception(this); listener.exception(this);
} }
......
...@@ -33,36 +33,47 @@ package com.sun.tools.example.debug.event; ...@@ -33,36 +33,47 @@ package com.sun.tools.example.debug.event;
*/ */
public class JDIAdapter implements JDIListener { public class JDIAdapter implements JDIListener {
@Override
public void accessWatchpoint(AccessWatchpointEventSet e) { public void accessWatchpoint(AccessWatchpointEventSet e) {
} }
@Override
public void classPrepare(ClassPrepareEventSet e) { public void classPrepare(ClassPrepareEventSet e) {
} }
@Override
public void classUnload(ClassUnloadEventSet e) { public void classUnload(ClassUnloadEventSet e) {
} }
@Override
public void exception(ExceptionEventSet e) { public void exception(ExceptionEventSet e) {
} }
@Override
public void locationTrigger(LocationTriggerEventSet e) { public void locationTrigger(LocationTriggerEventSet e) {
} }
@Override
public void modificationWatchpoint(ModificationWatchpointEventSet e) { public void modificationWatchpoint(ModificationWatchpointEventSet e) {
} }
@Override
public void threadDeath(ThreadDeathEventSet e) { public void threadDeath(ThreadDeathEventSet e) {
} }
@Override
public void threadStart(ThreadStartEventSet e) { public void threadStart(ThreadStartEventSet e) {
} }
@Override
public void vmDeath(VMDeathEventSet e) { public void vmDeath(VMDeathEventSet e) {
} }
@Override
public void vmDisconnect(VMDisconnectEventSet e) { public void vmDisconnect(VMDisconnectEventSet e) {
} }
@Override
public void vmStart(VMStartEventSet e) { public void vmStart(VMStartEventSet e) {
} }
......
...@@ -33,6 +33,8 @@ import com.sun.jdi.event.*; ...@@ -33,6 +33,8 @@ import com.sun.jdi.event.*;
*/ */
public abstract class LocatableEventSet extends AbstractEventSet { public abstract class LocatableEventSet extends AbstractEventSet {
private static final long serialVersionUID = 1027131209997915620L;
LocatableEventSet(EventSet jdiEventSet) { LocatableEventSet(EventSet jdiEventSet) {
super(jdiEventSet); super(jdiEventSet);
} }
......
...@@ -25,15 +25,17 @@ ...@@ -25,15 +25,17 @@
package com.sun.tools.example.debug.event; package com.sun.tools.example.debug.event;
import com.sun.jdi.*;
import com.sun.jdi.event.*; import com.sun.jdi.event.*;
public class LocationTriggerEventSet extends LocatableEventSet { public class LocationTriggerEventSet extends LocatableEventSet {
private static final long serialVersionUID = -3674631710485872487L;
LocationTriggerEventSet(EventSet jdiEventSet) { LocationTriggerEventSet(EventSet jdiEventSet) {
super(jdiEventSet); super(jdiEventSet);
} }
@Override
public void notify(JDIListener listener) { public void notify(JDIListener listener) {
listener.locationTrigger(this); listener.locationTrigger(this);
} }
......
...@@ -30,6 +30,8 @@ import com.sun.jdi.event.*; ...@@ -30,6 +30,8 @@ import com.sun.jdi.event.*;
public class ModificationWatchpointEventSet extends WatchpointEventSet { public class ModificationWatchpointEventSet extends WatchpointEventSet {
private static final long serialVersionUID = -680889300856154719L;
ModificationWatchpointEventSet(EventSet jdiEventSet) { ModificationWatchpointEventSet(EventSet jdiEventSet) {
super(jdiEventSet); super(jdiEventSet);
} }
...@@ -42,6 +44,7 @@ public class ModificationWatchpointEventSet extends WatchpointEventSet { ...@@ -42,6 +44,7 @@ public class ModificationWatchpointEventSet extends WatchpointEventSet {
return ((ModificationWatchpointEvent)oneEvent).valueToBe(); return ((ModificationWatchpointEvent)oneEvent).valueToBe();
} }
@Override
public void notify(JDIListener listener) { public void notify(JDIListener listener) {
listener.modificationWatchpoint(this); listener.modificationWatchpoint(this);
} }
......
...@@ -30,6 +30,8 @@ import com.sun.jdi.event.*; ...@@ -30,6 +30,8 @@ import com.sun.jdi.event.*;
public class ThreadDeathEventSet extends AbstractEventSet { public class ThreadDeathEventSet extends AbstractEventSet {
private static final long serialVersionUID = -8801604712308151331L;
ThreadDeathEventSet(EventSet jdiEventSet) { ThreadDeathEventSet(EventSet jdiEventSet) {
super(jdiEventSet); super(jdiEventSet);
} }
...@@ -44,6 +46,7 @@ public class ThreadDeathEventSet extends AbstractEventSet { ...@@ -44,6 +46,7 @@ public class ThreadDeathEventSet extends AbstractEventSet {
return ((ThreadDeathEvent)oneEvent).thread(); return ((ThreadDeathEvent)oneEvent).thread();
} }
@Override
public void notify(JDIListener listener) { public void notify(JDIListener listener) {
listener.threadDeath(this); listener.threadDeath(this);
} }
......
...@@ -30,6 +30,8 @@ import com.sun.jdi.event.*; ...@@ -30,6 +30,8 @@ import com.sun.jdi.event.*;
public class ThreadStartEventSet extends AbstractEventSet { public class ThreadStartEventSet extends AbstractEventSet {
private static final long serialVersionUID = -3802096132294933502L;
ThreadStartEventSet(EventSet jdiEventSet) { ThreadStartEventSet(EventSet jdiEventSet) {
super(jdiEventSet); super(jdiEventSet);
} }
...@@ -44,6 +46,7 @@ public class ThreadStartEventSet extends AbstractEventSet { ...@@ -44,6 +46,7 @@ public class ThreadStartEventSet extends AbstractEventSet {
return ((ThreadStartEvent)oneEvent).thread(); return ((ThreadStartEvent)oneEvent).thread();
} }
@Override
public void notify(JDIListener listener) { public void notify(JDIListener listener) {
listener.threadStart(this); listener.threadStart(this);
} }
......
...@@ -29,10 +29,13 @@ import com.sun.jdi.event.*; ...@@ -29,10 +29,13 @@ import com.sun.jdi.event.*;
public class VMDeathEventSet extends AbstractEventSet { public class VMDeathEventSet extends AbstractEventSet {
private static final long serialVersionUID = 1163097303940092229L;
VMDeathEventSet(EventSet jdiEventSet) { VMDeathEventSet(EventSet jdiEventSet) {
super(jdiEventSet); super(jdiEventSet);
} }
@Override
public void notify(JDIListener listener) { public void notify(JDIListener listener) {
listener.vmDeath(this); listener.vmDeath(this);
} }
......
...@@ -29,10 +29,13 @@ import com.sun.jdi.event.*; ...@@ -29,10 +29,13 @@ import com.sun.jdi.event.*;
public class VMDisconnectEventSet extends AbstractEventSet { public class VMDisconnectEventSet extends AbstractEventSet {
private static final long serialVersionUID = 7968123152344675342L;
VMDisconnectEventSet(EventSet jdiEventSet) { VMDisconnectEventSet(EventSet jdiEventSet) {
super(jdiEventSet); super(jdiEventSet);
} }
@Override
public void notify(JDIListener listener) { public void notify(JDIListener listener) {
listener.vmDisconnect(this); listener.vmDisconnect(this);
} }
......
...@@ -30,6 +30,8 @@ import com.sun.jdi.event.*; ...@@ -30,6 +30,8 @@ import com.sun.jdi.event.*;
public class VMStartEventSet extends AbstractEventSet { public class VMStartEventSet extends AbstractEventSet {
private static final long serialVersionUID = -3384957227835478191L;
VMStartEventSet(EventSet jdiEventSet) { VMStartEventSet(EventSet jdiEventSet) {
super(jdiEventSet); super(jdiEventSet);
} }
...@@ -44,6 +46,7 @@ public class VMStartEventSet extends AbstractEventSet { ...@@ -44,6 +46,7 @@ public class VMStartEventSet extends AbstractEventSet {
return ((VMStartEvent)oneEvent).thread(); return ((VMStartEvent)oneEvent).thread();
} }
@Override
public void notify(JDIListener listener) { public void notify(JDIListener listener) {
listener.vmStart(this); listener.vmStart(this);
} }
......
...@@ -30,6 +30,8 @@ import com.sun.jdi.event.*; ...@@ -30,6 +30,8 @@ import com.sun.jdi.event.*;
public abstract class WatchpointEventSet extends LocatableEventSet { public abstract class WatchpointEventSet extends LocatableEventSet {
private static final long serialVersionUID = 5606285209703845409L;
WatchpointEventSet(EventSet jdiEventSet) { WatchpointEventSet(EventSet jdiEventSet) {
super(jdiEventSet); super(jdiEventSet);
} }
......
...@@ -78,6 +78,7 @@ public class Token { ...@@ -78,6 +78,7 @@ public class Token {
/** /**
* Returns the image. * Returns the image.
*/ */
@Override
public final String toString() public final String toString()
{ {
return image; return image;
......
...@@ -32,6 +32,8 @@ public class TokenMgrError extends Error ...@@ -32,6 +32,8 @@ public class TokenMgrError extends Error
* Ordinals for various reasons why an Error of this type can be thrown. * Ordinals for various reasons why an Error of this type can be thrown.
*/ */
private static final long serialVersionUID = -6236440836177601522L;
/** /**
* Lexical error occured. * Lexical error occured.
*/ */
...@@ -136,6 +138,7 @@ public class TokenMgrError extends Error ...@@ -136,6 +138,7 @@ public class TokenMgrError extends Error
* *
* from this method for such cases in the release version of your parser. * from this method for such cases in the release version of your parser.
*/ */
@Override
public String getMessage() { public String getMessage() {
return super.getMessage(); return super.getMessage();
} }
......
...@@ -31,6 +31,7 @@ import java.util.EventObject; ...@@ -31,6 +31,7 @@ import java.util.EventObject;
public class CurrentFrameChangedEvent extends EventObject { public class CurrentFrameChangedEvent extends EventObject {
private static final long serialVersionUID = 4214479486546762179L;
private ThreadInfo tinfo; private ThreadInfo tinfo;
private int index; private int index;
private boolean invalidate; private boolean invalidate;
......
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册