提交 b0e5d7eb 编写于 作者: L lana

Merge

...@@ -126,3 +126,4 @@ f097ca2434b1412b12ab4a5c2397ce271bf681e7 jdk7-b147 ...@@ -126,3 +126,4 @@ f097ca2434b1412b12ab4a5c2397ce271bf681e7 jdk7-b147
13e70aa1398eb959c54bc68b783ca0eef1286ad2 jdk8-b02 13e70aa1398eb959c54bc68b783ca0eef1286ad2 jdk8-b02
7989ee9fe673a87f4db3917fa6a005732a6a9b85 jdk8-b03 7989ee9fe673a87f4db3917fa6a005732a6a9b85 jdk8-b03
fc569517f3cf242f90ce3503b743eb5553938946 jdk8-b04 fc569517f3cf242f90ce3503b743eb5553938946 jdk8-b04
0b32369b83d81c226a2e79e730f3a8c0d2595e92 jdk8-b05
...@@ -47,7 +47,7 @@ FILES_copy = $(SERVICETAG_RESOURCES_DIR)/product_registration.xsd \ ...@@ -47,7 +47,7 @@ FILES_copy = $(SERVICETAG_RESOURCES_DIR)/product_registration.xsd \
# Add all properties files to the FILES_copy list # Add all properties files to the FILES_copy list
SWORDFISH_properties := $(shell \ SWORDFISH_properties := $(shell \
$(CD) $(SHARE_SRC)/classes/com/sun/servicetag/resources; \ $(CD) $(SHARE_SRC)/classes/com/sun/servicetag/resources; \
$(FIND) . -name 'javase_*_swordfish.properties' -print ; \ $(FIND) . -name 'javase_*.properties' -print ; \
) )
FILES_copy += $(shell \ FILES_copy += $(shell \
for f in $(SWORDFISH_properties) ; do \ for f in $(SWORDFISH_properties) ; do \
......
...@@ -258,6 +258,15 @@ jprt.make.rule.all.test.targets= \ ...@@ -258,6 +258,15 @@ jprt.make.rule.all.test.targets= \
windows_i586_5.1-product-c1-jdk_security3, \ windows_i586_5.1-product-c1-jdk_security3, \
windows_x64_5.2-product-c2-jdk_security3, \ windows_x64_5.2-product-c2-jdk_security3, \
\ \
solaris_sparc_5.10-product-c1-jdk_sound, \
solaris_sparcv9_5.10-product-c2-jdk_sound, \
solaris_i586_5.10-product-c1-jdk_sound, \
solaris_x64_5.10-product-c2-jdk_sound, \
linux_i586_2.6-product-{c1|c2}-jdk_sound, \
linux_x64_2.6-product-c2-jdk_sound, \
windows_i586_5.1-product-c1-jdk_sound, \
windows_x64_5.2-product-c2-jdk_sound, \
\
solaris_sparc_5.10-product-c1-jdk_swing, \ solaris_sparc_5.10-product-c1-jdk_swing, \
solaris_sparcv9_5.10-product-c2-jdk_swing, \ solaris_sparcv9_5.10-product-c2-jdk_swing, \
solaris_i586_5.10-product-c1-jdk_swing, \ solaris_i586_5.10-product-c1-jdk_swing, \
......
...@@ -763,7 +763,7 @@ class JFIFMarkerSegment extends MarkerSegment { ...@@ -763,7 +763,7 @@ class JFIFMarkerSegment extends MarkerSegment {
} }
} catch (IllegalThumbException e) { } catch (IllegalThumbException e) {
// Should never happen // Should never happen
throw new InternalError("Illegal thumb in setThumbnail!"); throw new InternalError("Illegal thumb in setThumbnail!", e);
} }
} }
......
...@@ -529,21 +529,25 @@ public class MotifFileChooserUI extends BasicFileChooserUI { ...@@ -529,21 +529,25 @@ public class MotifFileChooserUI extends BasicFileChooserUI {
Locale l = fc.getLocale(); Locale l = fc.getLocale();
enterFolderNameLabelText = UIManager.getString("FileChooser.enterFolderNameLabelText",l); enterFolderNameLabelText = UIManager.getString("FileChooser.enterFolderNameLabelText",l);
enterFolderNameLabelMnemonic = UIManager.getInt("FileChooser.enterFolderNameLabelMnemonic"); enterFolderNameLabelMnemonic = getMnemonic("FileChooser.enterFolderNameLabelMnemonic", l);
enterFileNameLabelText = UIManager.getString("FileChooser.enterFileNameLabelText",l); enterFileNameLabelText = UIManager.getString("FileChooser.enterFileNameLabelText",l);
enterFileNameLabelMnemonic = UIManager.getInt("FileChooser.enterFileNameLabelMnemonic"); enterFileNameLabelMnemonic = getMnemonic("FileChooser.enterFileNameLabelMnemonic", l);
filesLabelText = UIManager.getString("FileChooser.filesLabelText",l); filesLabelText = UIManager.getString("FileChooser.filesLabelText",l);
filesLabelMnemonic = UIManager.getInt("FileChooser.filesLabelMnemonic"); filesLabelMnemonic = getMnemonic("FileChooser.filesLabelMnemonic", l);
foldersLabelText = UIManager.getString("FileChooser.foldersLabelText",l); foldersLabelText = UIManager.getString("FileChooser.foldersLabelText",l);
foldersLabelMnemonic = UIManager.getInt("FileChooser.foldersLabelMnemonic"); foldersLabelMnemonic = getMnemonic("FileChooser.foldersLabelMnemonic", l);
pathLabelText = UIManager.getString("FileChooser.pathLabelText",l); pathLabelText = UIManager.getString("FileChooser.pathLabelText",l);
pathLabelMnemonic = UIManager.getInt("FileChooser.pathLabelMnemonic"); pathLabelMnemonic = getMnemonic("FileChooser.pathLabelMnemonic", l);
filterLabelText = UIManager.getString("FileChooser.filterLabelText",l); filterLabelText = UIManager.getString("FileChooser.filterLabelText",l);
filterLabelMnemonic = UIManager.getInt("FileChooser.filterLabelMnemonic"); filterLabelMnemonic = getMnemonic("FileChooser.filterLabelMnemonic", l);
}
private Integer getMnemonic(String key, Locale l) {
return SwingUtilities2.getUIDefaultsInt(key, l);
} }
protected void installIcons(JFileChooser fc) { protected void installIcons(JFileChooser fc) {
......
...@@ -1215,11 +1215,6 @@ public class MotifLookAndFeel extends BasicLookAndFeel ...@@ -1215,11 +1215,6 @@ public class MotifLookAndFeel extends BasicLookAndFeel
"EditorPane.focusInputMap", multilineInputMap, "EditorPane.focusInputMap", multilineInputMap,
"FileChooser.pathLabelMnemonic", new Integer(KeyEvent.VK_P), // 'p'
"FileChooser.filterLabelMnemonic", new Integer (KeyEvent.VK_R), // 'r'
"FileChooser.foldersLabelMnemonic", new Integer (KeyEvent.VK_L), // 'l'
"FileChooser.filesLabelMnemonic", new Integer (KeyEvent.VK_I), // 'i'
"FileChooser.enterFileNameLabelMnemonic", new Integer (KeyEvent.VK_N), // 'n'
"FileChooser.ancestorInputMap", "FileChooser.ancestorInputMap",
new UIDefaults.LazyInputMap(new Object[] { new UIDefaults.LazyInputMap(new Object[] {
"ESCAPE", "cancelSelection" "ESCAPE", "cancelSelection"
......
...@@ -27,10 +27,15 @@ FileChooser.openDialogTitleText=Open ...@@ -27,10 +27,15 @@ FileChooser.openDialogTitleText=Open
FileChooser.updateButtonText=Update FileChooser.updateButtonText=Update
FileChooser.helpButtonText=Help FileChooser.helpButtonText=Help
FileChooser.pathLabelText=Enter path or folder name: FileChooser.pathLabelText=Enter path or folder name:
FileChooser.pathLabelMnemonic=80
FileChooser.filterLabelText=Filter FileChooser.filterLabelText=Filter
FileChooser.filterLabelMnemonic=82
FileChooser.foldersLabelText=Folders FileChooser.foldersLabelText=Folders
FileChooser.foldersLabelMnemonic=76
FileChooser.filesLabelText=Files FileChooser.filesLabelText=Files
FileChooser.filesLabelMnemonic=73
FileChooser.enterFileNameLabelText=Enter file name: FileChooser.enterFileNameLabelText=Enter file name:
FileChooser.enterFileNameLabelMnemonic=78
FileChooser.enterFolderNameLabelText=Enter folder name: FileChooser.enterFolderNameLabelText=Enter folder name:
FileChooser.cancelButtonToolTipText=Abort file chooser dialog. FileChooser.cancelButtonToolTipText=Abort file chooser dialog.
......
...@@ -27,10 +27,15 @@ FileChooser.openDialogTitleText=\u00D6ffnen ...@@ -27,10 +27,15 @@ FileChooser.openDialogTitleText=\u00D6ffnen
FileChooser.updateButtonText=Aktualisieren FileChooser.updateButtonText=Aktualisieren
FileChooser.helpButtonText=Hilfe FileChooser.helpButtonText=Hilfe
FileChooser.pathLabelText=Pfad- oder Ordnernamen eingeben: FileChooser.pathLabelText=Pfad- oder Ordnernamen eingeben:
FileChooser.pathLabelMnemonic=80
FileChooser.filterLabelText=Filter FileChooser.filterLabelText=Filter
FileChooser.filterLabelMnemonic=82
FileChooser.foldersLabelText=Ordner FileChooser.foldersLabelText=Ordner
FileChooser.foldersLabelMnemonic=76
FileChooser.filesLabelText=Dateien FileChooser.filesLabelText=Dateien
FileChooser.filesLabelMnemonic=73
FileChooser.enterFileNameLabelText=Dateinamen eingeben: FileChooser.enterFileNameLabelText=Dateinamen eingeben:
FileChooser.enterFileNameLabelMnemonic=78
FileChooser.enterFolderNameLabelText=Ordnernamen eingeben: FileChooser.enterFolderNameLabelText=Ordnernamen eingeben:
FileChooser.cancelButtonToolTipText=Dialogfeld f\u00FCr Dateiauswahl schlie\u00DFen. FileChooser.cancelButtonToolTipText=Dialogfeld f\u00FCr Dateiauswahl schlie\u00DFen.
......
...@@ -27,10 +27,15 @@ FileChooser.openDialogTitleText=Abrir ...@@ -27,10 +27,15 @@ FileChooser.openDialogTitleText=Abrir
FileChooser.updateButtonText=Actualizar FileChooser.updateButtonText=Actualizar
FileChooser.helpButtonText=Ayuda FileChooser.helpButtonText=Ayuda
FileChooser.pathLabelText=Introducir nombre de la ruta de acceso o carpeta: FileChooser.pathLabelText=Introducir nombre de la ruta de acceso o carpeta:
FileChooser.pathLabelMnemonic=80
FileChooser.filterLabelText=Filtro FileChooser.filterLabelText=Filtro
FileChooser.filterLabelMnemonic=82
FileChooser.foldersLabelText=Carpetas FileChooser.foldersLabelText=Carpetas
FileChooser.foldersLabelMnemonic=76
FileChooser.filesLabelText=Archivos FileChooser.filesLabelText=Archivos
FileChooser.filesLabelMnemonic=73
FileChooser.enterFileNameLabelText=Introducir nombre de archivo: FileChooser.enterFileNameLabelText=Introducir nombre de archivo:
FileChooser.enterFileNameLabelMnemonic=78
FileChooser.enterFolderNameLabelText=Introducir nombre de carpeta: FileChooser.enterFolderNameLabelText=Introducir nombre de carpeta:
FileChooser.cancelButtonToolTipText=Abortar cuadro de di\u00E1logo del selector de archivos. FileChooser.cancelButtonToolTipText=Abortar cuadro de di\u00E1logo del selector de archivos.
......
...@@ -27,10 +27,15 @@ FileChooser.openDialogTitleText=Ouvrir ...@@ -27,10 +27,15 @@ FileChooser.openDialogTitleText=Ouvrir
FileChooser.updateButtonText=Mettre \u00E0 jour FileChooser.updateButtonText=Mettre \u00E0 jour
FileChooser.helpButtonText=Aide FileChooser.helpButtonText=Aide
FileChooser.pathLabelText=Entrez le chemin ou le nom du dossier : FileChooser.pathLabelText=Entrez le chemin ou le nom du dossier :
FileChooser.pathLabelMnemonic=80
FileChooser.filterLabelText=Filtre FileChooser.filterLabelText=Filtre
FileChooser.filterLabelMnemonic=82
FileChooser.foldersLabelText=Dossiers FileChooser.foldersLabelText=Dossiers
FileChooser.foldersLabelMnemonic=76
FileChooser.filesLabelText=Fichiers FileChooser.filesLabelText=Fichiers
FileChooser.filesLabelMnemonic=73
FileChooser.enterFileNameLabelText=Entrez le nom du fichier : FileChooser.enterFileNameLabelText=Entrez le nom du fichier :
FileChooser.enterFileNameLabelMnemonic=78
FileChooser.enterFolderNameLabelText=Entrez le nom du dossier : FileChooser.enterFolderNameLabelText=Entrez le nom du dossier :
FileChooser.cancelButtonToolTipText=Ferme la bo\u00EEte de dialogue du s\u00E9lecteur de fichiers. FileChooser.cancelButtonToolTipText=Ferme la bo\u00EEte de dialogue du s\u00E9lecteur de fichiers.
......
...@@ -27,10 +27,15 @@ FileChooser.openDialogTitleText=Apri ...@@ -27,10 +27,15 @@ FileChooser.openDialogTitleText=Apri
FileChooser.updateButtonText=Aggiorna FileChooser.updateButtonText=Aggiorna
FileChooser.helpButtonText=? FileChooser.helpButtonText=?
FileChooser.pathLabelText=Percorso o nome cartella: FileChooser.pathLabelText=Percorso o nome cartella:
FileChooser.pathLabelMnemonic=80
FileChooser.filterLabelText=Filtro FileChooser.filterLabelText=Filtro
FileChooser.filterLabelMnemonic=82
FileChooser.foldersLabelText=Cartelle FileChooser.foldersLabelText=Cartelle
FileChooser.foldersLabelMnemonic=76
FileChooser.filesLabelText=File FileChooser.filesLabelText=File
FileChooser.filesLabelMnemonic=73
FileChooser.enterFileNameLabelText=Nome file: FileChooser.enterFileNameLabelText=Nome file:
FileChooser.enterFileNameLabelMnemonic=78
FileChooser.enterFolderNameLabelText=Nome cartella: FileChooser.enterFolderNameLabelText=Nome cartella:
FileChooser.cancelButtonToolTipText=Chiude la finestra di dialogo di selezione file. FileChooser.cancelButtonToolTipText=Chiude la finestra di dialogo di selezione file.
......
...@@ -27,10 +27,15 @@ FileChooser.openDialogTitleText=\u958B\u304F ...@@ -27,10 +27,15 @@ FileChooser.openDialogTitleText=\u958B\u304F
FileChooser.updateButtonText=\u66F4\u65B0 FileChooser.updateButtonText=\u66F4\u65B0
FileChooser.helpButtonText=\u30D8\u30EB\u30D7 FileChooser.helpButtonText=\u30D8\u30EB\u30D7
FileChooser.pathLabelText=\u30D1\u30B9\u307E\u305F\u306F\u30D5\u30A9\u30EB\u30C0\u540D\u3092\u5165\u529B: FileChooser.pathLabelText=\u30D1\u30B9\u307E\u305F\u306F\u30D5\u30A9\u30EB\u30C0\u540D\u3092\u5165\u529B:
FileChooser.pathLabelMnemonic=80
FileChooser.filterLabelText=\u30D5\u30A3\u30EB\u30BF FileChooser.filterLabelText=\u30D5\u30A3\u30EB\u30BF
FileChooser.filterLabelMnemonic=82
FileChooser.foldersLabelText=\u30D5\u30A9\u30EB\u30C0 FileChooser.foldersLabelText=\u30D5\u30A9\u30EB\u30C0
FileChooser.foldersLabelMnemonic=76
FileChooser.filesLabelText=\u30D5\u30A1\u30A4\u30EB FileChooser.filesLabelText=\u30D5\u30A1\u30A4\u30EB
FileChooser.filesLabelMnemonic=73
FileChooser.enterFileNameLabelText=\u30D5\u30A1\u30A4\u30EB\u540D\u3092\u5165\u529B: FileChooser.enterFileNameLabelText=\u30D5\u30A1\u30A4\u30EB\u540D\u3092\u5165\u529B:
FileChooser.enterFileNameLabelMnemonic=78
FileChooser.enterFolderNameLabelText=\u30D5\u30A9\u30EB\u30C0\u540D\u3092\u5165\u529B: FileChooser.enterFolderNameLabelText=\u30D5\u30A9\u30EB\u30C0\u540D\u3092\u5165\u529B:
FileChooser.cancelButtonToolTipText=\u30D5\u30A1\u30A4\u30EB\u30FB\u30C1\u30E5\u30FC\u30B6\u30FB\u30C0\u30A4\u30A2\u30ED\u30B0\u3092\u7D42\u4E86\u3057\u307E\u3059\u3002 FileChooser.cancelButtonToolTipText=\u30D5\u30A1\u30A4\u30EB\u30FB\u30C1\u30E5\u30FC\u30B6\u30FB\u30C0\u30A4\u30A2\u30ED\u30B0\u3092\u7D42\u4E86\u3057\u307E\u3059\u3002
......
...@@ -27,10 +27,15 @@ FileChooser.openDialogTitleText=\uC5F4\uAE30 ...@@ -27,10 +27,15 @@ FileChooser.openDialogTitleText=\uC5F4\uAE30
FileChooser.updateButtonText=\uAC31\uC2E0 FileChooser.updateButtonText=\uAC31\uC2E0
FileChooser.helpButtonText=\uB3C4\uC6C0\uB9D0 FileChooser.helpButtonText=\uB3C4\uC6C0\uB9D0
FileChooser.pathLabelText=\uACBD\uB85C \uB610\uB294 \uD3F4\uB354 \uC774\uB984 \uC785\uB825: FileChooser.pathLabelText=\uACBD\uB85C \uB610\uB294 \uD3F4\uB354 \uC774\uB984 \uC785\uB825:
FileChooser.pathLabelMnemonic=80
FileChooser.filterLabelText=\uD544\uD130 FileChooser.filterLabelText=\uD544\uD130
FileChooser.filterLabelMnemonic=82
FileChooser.foldersLabelText=\uD3F4\uB354 FileChooser.foldersLabelText=\uD3F4\uB354
FileChooser.foldersLabelMnemonic=76
FileChooser.filesLabelText=\uD30C\uC77C FileChooser.filesLabelText=\uD30C\uC77C
FileChooser.filesLabelMnemonic=73
FileChooser.enterFileNameLabelText=\uD30C\uC77C \uC774\uB984 \uC785\uB825: FileChooser.enterFileNameLabelText=\uD30C\uC77C \uC774\uB984 \uC785\uB825:
FileChooser.enterFileNameLabelMnemonic=78
FileChooser.enterFolderNameLabelText=\uD3F4\uB354 \uC774\uB984 \uC785\uB825: FileChooser.enterFolderNameLabelText=\uD3F4\uB354 \uC774\uB984 \uC785\uB825:
FileChooser.cancelButtonToolTipText=\uD30C\uC77C \uC120\uD0DD\uAE30 \uB300\uD654\uC0C1\uC790\uB97C \uC911\uB2E8\uD569\uB2C8\uB2E4. FileChooser.cancelButtonToolTipText=\uD30C\uC77C \uC120\uD0DD\uAE30 \uB300\uD654\uC0C1\uC790\uB97C \uC911\uB2E8\uD569\uB2C8\uB2E4.
......
...@@ -27,10 +27,15 @@ FileChooser.openDialogTitleText=Abrir ...@@ -27,10 +27,15 @@ FileChooser.openDialogTitleText=Abrir
FileChooser.updateButtonText=Atualizar FileChooser.updateButtonText=Atualizar
FileChooser.helpButtonText=Ajuda FileChooser.helpButtonText=Ajuda
FileChooser.pathLabelText=Informar caminho ou nome da pasta: FileChooser.pathLabelText=Informar caminho ou nome da pasta:
FileChooser.pathLabelMnemonic=80
FileChooser.filterLabelText=Filtro FileChooser.filterLabelText=Filtro
FileChooser.filterLabelMnemonic=82
FileChooser.foldersLabelText=Pastas FileChooser.foldersLabelText=Pastas
FileChooser.foldersLabelMnemonic=76
FileChooser.filesLabelText=Arquivos FileChooser.filesLabelText=Arquivos
FileChooser.filesLabelMnemonic=73
FileChooser.enterFileNameLabelText=Informar nome do arquivo: FileChooser.enterFileNameLabelText=Informar nome do arquivo:
FileChooser.enterFileNameLabelMnemonic=78
FileChooser.enterFolderNameLabelText=Informar nome da pasta: FileChooser.enterFolderNameLabelText=Informar nome da pasta:
FileChooser.cancelButtonToolTipText=Abortar caixa de di\u00E1logo do seletor de arquivos. FileChooser.cancelButtonToolTipText=Abortar caixa de di\u00E1logo do seletor de arquivos.
......
...@@ -27,10 +27,15 @@ FileChooser.openDialogTitleText=\u00D6ppna ...@@ -27,10 +27,15 @@ FileChooser.openDialogTitleText=\u00D6ppna
FileChooser.updateButtonText=Uppdatera FileChooser.updateButtonText=Uppdatera
FileChooser.helpButtonText=Hj\u00E4lp FileChooser.helpButtonText=Hj\u00E4lp
FileChooser.pathLabelText=Ange s\u00F6kv\u00E4g eller mappnamn: FileChooser.pathLabelText=Ange s\u00F6kv\u00E4g eller mappnamn:
FileChooser.pathLabelMnemonic=80
FileChooser.filterLabelText=Filter FileChooser.filterLabelText=Filter
FileChooser.filterLabelMnemonic=82
FileChooser.foldersLabelText=Mappar FileChooser.foldersLabelText=Mappar
FileChooser.foldersLabelMnemonic=76
FileChooser.filesLabelText=Filer FileChooser.filesLabelText=Filer
FileChooser.filesLabelMnemonic=73
FileChooser.enterFileNameLabelText=Ange filnamn: FileChooser.enterFileNameLabelText=Ange filnamn:
FileChooser.enterFileNameLabelMnemonic=78
FileChooser.enterFolderNameLabelText=Ange ett mappnamn: FileChooser.enterFolderNameLabelText=Ange ett mappnamn:
FileChooser.cancelButtonToolTipText=Avbryt dialogrutan Filv\u00E4ljare. FileChooser.cancelButtonToolTipText=Avbryt dialogrutan Filv\u00E4ljare.
......
...@@ -27,10 +27,15 @@ FileChooser.openDialogTitleText=\u6253\u5F00 ...@@ -27,10 +27,15 @@ FileChooser.openDialogTitleText=\u6253\u5F00
FileChooser.updateButtonText=\u66F4\u65B0 FileChooser.updateButtonText=\u66F4\u65B0
FileChooser.helpButtonText=\u5E2E\u52A9 FileChooser.helpButtonText=\u5E2E\u52A9
FileChooser.pathLabelText=\u952E\u5165\u8DEF\u5F84\u6216\u6587\u4EF6\u5939\u540D: FileChooser.pathLabelText=\u952E\u5165\u8DEF\u5F84\u6216\u6587\u4EF6\u5939\u540D:
FileChooser.pathLabelMnemonic=80
FileChooser.filterLabelText=\u7B5B\u9009\u5668 FileChooser.filterLabelText=\u7B5B\u9009\u5668
FileChooser.filterLabelMnemonic=82
FileChooser.foldersLabelText=\u6587\u4EF6\u5939 FileChooser.foldersLabelText=\u6587\u4EF6\u5939
FileChooser.foldersLabelMnemonic=76
FileChooser.filesLabelText=\u6587\u4EF6 FileChooser.filesLabelText=\u6587\u4EF6
FileChooser.filesLabelMnemonic=73
FileChooser.enterFileNameLabelText=\u952E\u5165\u6587\u4EF6\u540D: FileChooser.enterFileNameLabelText=\u952E\u5165\u6587\u4EF6\u540D:
FileChooser.enterFileNameLabelMnemonic=78
FileChooser.enterFolderNameLabelText=\u8F93\u5165\u6587\u4EF6\u5939\u540D: FileChooser.enterFolderNameLabelText=\u8F93\u5165\u6587\u4EF6\u5939\u540D:
FileChooser.cancelButtonToolTipText=\u4E2D\u6B62\u6587\u4EF6\u9009\u62E9\u5668\u5BF9\u8BDD\u6846\u3002 FileChooser.cancelButtonToolTipText=\u4E2D\u6B62\u6587\u4EF6\u9009\u62E9\u5668\u5BF9\u8BDD\u6846\u3002
......
...@@ -27,10 +27,15 @@ FileChooser.openDialogTitleText=\u958B\u555F ...@@ -27,10 +27,15 @@ FileChooser.openDialogTitleText=\u958B\u555F
FileChooser.updateButtonText=\u66F4\u65B0 FileChooser.updateButtonText=\u66F4\u65B0
FileChooser.helpButtonText=\u8AAA\u660E FileChooser.helpButtonText=\u8AAA\u660E
FileChooser.pathLabelText=\u8F38\u5165\u8DEF\u5F91\u6216\u8CC7\u6599\u593E\u540D\u7A31: FileChooser.pathLabelText=\u8F38\u5165\u8DEF\u5F91\u6216\u8CC7\u6599\u593E\u540D\u7A31:
FileChooser.pathLabelMnemonic=80
FileChooser.filterLabelText=\u7BE9\u9078 FileChooser.filterLabelText=\u7BE9\u9078
FileChooser.filterLabelMnemonic=82
FileChooser.foldersLabelText=\u8CC7\u6599\u593E FileChooser.foldersLabelText=\u8CC7\u6599\u593E
FileChooser.foldersLabelMnemonic=76
FileChooser.filesLabelText=\u6A94\u6848 FileChooser.filesLabelText=\u6A94\u6848
FileChooser.filesLabelMnemonic=73
FileChooser.enterFileNameLabelText=\u8F38\u5165\u6A94\u6848\u540D\u7A31: FileChooser.enterFileNameLabelText=\u8F38\u5165\u6A94\u6848\u540D\u7A31:
FileChooser.enterFileNameLabelMnemonic=78
FileChooser.enterFolderNameLabelText=\u8F38\u5165\u8CC7\u6599\u593E\u540D\u7A31: FileChooser.enterFolderNameLabelText=\u8F38\u5165\u8CC7\u6599\u593E\u540D\u7A31:
FileChooser.cancelButtonToolTipText=\u4E2D\u6B62\u6A94\u6848\u9078\u64C7\u5668\u5C0D\u8A71\u65B9\u584A\u3002 FileChooser.cancelButtonToolTipText=\u4E2D\u6B62\u6A94\u6848\u9078\u64C7\u5668\u5C0D\u8A71\u65B9\u584A\u3002
......
...@@ -528,16 +528,16 @@ public class WindowsFileChooserUI extends BasicFileChooserUI { ...@@ -528,16 +528,16 @@ public class WindowsFileChooserUI extends BasicFileChooserUI {
Locale l = fc.getLocale(); Locale l = fc.getLocale();
lookInLabelMnemonic = UIManager.getInt("FileChooser.lookInLabelMnemonic"); lookInLabelMnemonic = getMnemonic("FileChooser.lookInLabelMnemonic", l);
lookInLabelText = UIManager.getString("FileChooser.lookInLabelText",l); lookInLabelText = UIManager.getString("FileChooser.lookInLabelText",l);
saveInLabelText = UIManager.getString("FileChooser.saveInLabelText",l); saveInLabelText = UIManager.getString("FileChooser.saveInLabelText",l);
fileNameLabelMnemonic = UIManager.getInt("FileChooser.fileNameLabelMnemonic"); fileNameLabelMnemonic = getMnemonic("FileChooser.fileNameLabelMnemonic", l);
fileNameLabelText = UIManager.getString("FileChooser.fileNameLabelText",l); fileNameLabelText = UIManager.getString("FileChooser.fileNameLabelText",l);
folderNameLabelMnemonic = UIManager.getInt("FileChooser.folderNameLabelMnemonic"); folderNameLabelMnemonic = getMnemonic("FileChooser.folderNameLabelMnemonic", l);
folderNameLabelText = UIManager.getString("FileChooser.folderNameLabelText",l); folderNameLabelText = UIManager.getString("FileChooser.folderNameLabelText",l);
filesOfTypeLabelMnemonic = UIManager.getInt("FileChooser.filesOfTypeLabelMnemonic"); filesOfTypeLabelMnemonic = getMnemonic("FileChooser.filesOfTypeLabelMnemonic", l);
filesOfTypeLabelText = UIManager.getString("FileChooser.filesOfTypeLabelText",l); filesOfTypeLabelText = UIManager.getString("FileChooser.filesOfTypeLabelText",l);
upFolderToolTipText = UIManager.getString("FileChooser.upFolderToolTipText",l); upFolderToolTipText = UIManager.getString("FileChooser.upFolderToolTipText",l);
...@@ -550,6 +550,10 @@ public class WindowsFileChooserUI extends BasicFileChooserUI { ...@@ -550,6 +550,10 @@ public class WindowsFileChooserUI extends BasicFileChooserUI {
viewMenuButtonAccessibleName = UIManager.getString("FileChooser.viewMenuButtonAccessibleName",l); viewMenuButtonAccessibleName = UIManager.getString("FileChooser.viewMenuButtonAccessibleName",l);
} }
private Integer getMnemonic(String key, Locale l) {
return SwingUtilities2.getUIDefaultsInt(key, l);
}
protected void installListeners(JFileChooser fc) { protected void installListeners(JFileChooser fc) {
super.installListeners(fc); super.installListeners(fc);
ActionMap actionMap = getActionMap(); ActionMap actionMap = getActionMap();
......
...@@ -770,9 +770,6 @@ public class WindowsLookAndFeel extends BasicLookAndFeel ...@@ -770,9 +770,6 @@ public class WindowsLookAndFeel extends BasicLookAndFeel
"icons/NewFolder.gif"), "icons/NewFolder.gif"),
"FileChooser.useSystemExtensionHiding", Boolean.TRUE, "FileChooser.useSystemExtensionHiding", Boolean.TRUE,
"FileChooser.lookInLabelMnemonic", Integer.valueOf(KeyEvent.VK_I),
"FileChooser.fileNameLabelMnemonic", Integer.valueOf(KeyEvent.VK_N),
"FileChooser.filesOfTypeLabelMnemonic", Integer.valueOf(KeyEvent.VK_T),
"FileChooser.usesSingleFilePane", Boolean.TRUE, "FileChooser.usesSingleFilePane", Boolean.TRUE,
"FileChooser.noPlacesBar", new DesktopProperty("win.comdlg.noPlacesBar", "FileChooser.noPlacesBar", new DesktopProperty("win.comdlg.noPlacesBar",
Boolean.FALSE), Boolean.FALSE),
......
...@@ -19,10 +19,14 @@ ...@@ -19,10 +19,14 @@
############ FILE CHOOSER STRINGS ############# ############ FILE CHOOSER STRINGS #############
FileChooser.lookInLabelText=Look in: FileChooser.lookInLabelText=Look in:
FileChooser.lookInLabelMnemonic=73
FileChooser.saveInLabelText=Save in: FileChooser.saveInLabelText=Save in:
FileChooser.fileNameLabelText=File name: FileChooser.fileNameLabelText=File name:
FileChooser.fileNameLabelMnemonic=78
FileChooser.folderNameLabelText=Folder name: FileChooser.folderNameLabelText=Folder name:
FileChooser.folderNameLabelMnemonic=78
FileChooser.filesOfTypeLabelText=Files of type: FileChooser.filesOfTypeLabelText=Files of type:
FileChooser.filesOfTypeLabelMnemonic=84
FileChooser.upFolderToolTipText=Up One Level FileChooser.upFolderToolTipText=Up One Level
FileChooser.upFolderAccessibleName=Up FileChooser.upFolderAccessibleName=Up
FileChooser.homeFolderToolTipText=Home FileChooser.homeFolderToolTipText=Home
......
...@@ -19,10 +19,14 @@ ...@@ -19,10 +19,14 @@
############ FILE CHOOSER STRINGS ############# ############ FILE CHOOSER STRINGS #############
FileChooser.lookInLabelText=Suchen in: FileChooser.lookInLabelText=Suchen in:
FileChooser.lookInLabelMnemonic=73
FileChooser.saveInLabelText=Speichern in: FileChooser.saveInLabelText=Speichern in:
FileChooser.fileNameLabelText=Dateiname: FileChooser.fileNameLabelText=Dateiname:
FileChooser.fileNameLabelMnemonic=78
FileChooser.folderNameLabelText=Ordnername: FileChooser.folderNameLabelText=Ordnername:
FileChooser.folderNameLabelMnemonic=78
FileChooser.filesOfTypeLabelText=Dateityp: FileChooser.filesOfTypeLabelText=Dateityp:
FileChooser.filesOfTypeLabelMnemonic=84
FileChooser.upFolderToolTipText=Eine Ebene h\u00F6her FileChooser.upFolderToolTipText=Eine Ebene h\u00F6her
FileChooser.upFolderAccessibleName=Nach oben FileChooser.upFolderAccessibleName=Nach oben
FileChooser.homeFolderToolTipText=Home FileChooser.homeFolderToolTipText=Home
......
...@@ -19,10 +19,14 @@ ...@@ -19,10 +19,14 @@
############ FILE CHOOSER STRINGS ############# ############ FILE CHOOSER STRINGS #############
FileChooser.lookInLabelText=Buscar en: FileChooser.lookInLabelText=Buscar en:
FileChooser.lookInLabelMnemonic=73
FileChooser.saveInLabelText=Guardar en: FileChooser.saveInLabelText=Guardar en:
FileChooser.fileNameLabelText=Nombre de Archivo: FileChooser.fileNameLabelText=Nombre de Archivo:
FileChooser.fileNameLabelMnemonic=78
FileChooser.folderNameLabelText=Nombre de la Carpeta: FileChooser.folderNameLabelText=Nombre de la Carpeta:
FileChooser.folderNameLabelMnemonic=78
FileChooser.filesOfTypeLabelText=Archivos de Tipo: FileChooser.filesOfTypeLabelText=Archivos de Tipo:
FileChooser.filesOfTypeLabelMnemonic=84
FileChooser.upFolderToolTipText=Subir un Nivel FileChooser.upFolderToolTipText=Subir un Nivel
FileChooser.upFolderAccessibleName=Arriba FileChooser.upFolderAccessibleName=Arriba
FileChooser.homeFolderToolTipText=Inicio FileChooser.homeFolderToolTipText=Inicio
......
...@@ -19,10 +19,14 @@ ...@@ -19,10 +19,14 @@
############ FILE CHOOSER STRINGS ############# ############ FILE CHOOSER STRINGS #############
FileChooser.lookInLabelText=Rechercher dans : FileChooser.lookInLabelText=Rechercher dans :
FileChooser.lookInLabelMnemonic=73
FileChooser.saveInLabelText=Enregistrer dans : FileChooser.saveInLabelText=Enregistrer dans :
FileChooser.fileNameLabelText=Nom du fichier : FileChooser.fileNameLabelText=Nom du fichier :
FileChooser.fileNameLabelMnemonic=78
FileChooser.folderNameLabelText=Nom du dossier : FileChooser.folderNameLabelText=Nom du dossier :
FileChooser.folderNameLabelMnemonic=78
FileChooser.filesOfTypeLabelText=Fichiers de type : FileChooser.filesOfTypeLabelText=Fichiers de type :
FileChooser.filesOfTypeLabelMnemonic=84
FileChooser.upFolderToolTipText=Remonte d'un niveau. FileChooser.upFolderToolTipText=Remonte d'un niveau.
FileChooser.upFolderAccessibleName=Monter FileChooser.upFolderAccessibleName=Monter
FileChooser.homeFolderToolTipText=R\u00E9pertoire d'origine FileChooser.homeFolderToolTipText=R\u00E9pertoire d'origine
......
...@@ -19,10 +19,14 @@ ...@@ -19,10 +19,14 @@
############ FILE CHOOSER STRINGS ############# ############ FILE CHOOSER STRINGS #############
FileChooser.lookInLabelText=Cerca in: FileChooser.lookInLabelText=Cerca in:
FileChooser.lookInLabelMnemonic=73
FileChooser.saveInLabelText=Salva in: FileChooser.saveInLabelText=Salva in:
FileChooser.fileNameLabelText=Nome file: FileChooser.fileNameLabelText=Nome file:
FileChooser.fileNameLabelMnemonic=78
FileChooser.folderNameLabelText=Nome della cartella: FileChooser.folderNameLabelText=Nome della cartella:
FileChooser.folderNameLabelMnemonic=78
FileChooser.filesOfTypeLabelText=Tipo file: FileChooser.filesOfTypeLabelText=Tipo file:
FileChooser.filesOfTypeLabelMnemonic=84
FileChooser.upFolderToolTipText=Cartella superiore FileChooser.upFolderToolTipText=Cartella superiore
FileChooser.upFolderAccessibleName=Superiore FileChooser.upFolderAccessibleName=Superiore
FileChooser.homeFolderToolTipText=Home FileChooser.homeFolderToolTipText=Home
......
...@@ -19,10 +19,14 @@ ...@@ -19,10 +19,14 @@
############ FILE CHOOSER STRINGS ############# ############ FILE CHOOSER STRINGS #############
FileChooser.lookInLabelText=\u53C2\u7167: FileChooser.lookInLabelText=\u53C2\u7167:
FileChooser.lookInLabelMnemonic=73
FileChooser.saveInLabelText=\u4FDD\u5B58: FileChooser.saveInLabelText=\u4FDD\u5B58:
FileChooser.fileNameLabelText=\u30D5\u30A1\u30A4\u30EB\u540D: FileChooser.fileNameLabelText=\u30D5\u30A1\u30A4\u30EB\u540D:
FileChooser.fileNameLabelMnemonic=78
FileChooser.folderNameLabelText=\u30D5\u30A9\u30EB\u30C0\u540D: FileChooser.folderNameLabelText=\u30D5\u30A9\u30EB\u30C0\u540D:
FileChooser.folderNameLabelMnemonic=78
FileChooser.filesOfTypeLabelText=\u30D5\u30A1\u30A4\u30EB\u306E\u30BF\u30A4\u30D7: FileChooser.filesOfTypeLabelText=\u30D5\u30A1\u30A4\u30EB\u306E\u30BF\u30A4\u30D7:
FileChooser.filesOfTypeLabelMnemonic=84
FileChooser.upFolderToolTipText=1\u30EC\u30D9\u30EB\u4E0A\u3078 FileChooser.upFolderToolTipText=1\u30EC\u30D9\u30EB\u4E0A\u3078
FileChooser.upFolderAccessibleName=\u4E0A\u3078 FileChooser.upFolderAccessibleName=\u4E0A\u3078
FileChooser.homeFolderToolTipText=\u30DB\u30FC\u30E0 FileChooser.homeFolderToolTipText=\u30DB\u30FC\u30E0
......
...@@ -19,10 +19,14 @@ ...@@ -19,10 +19,14 @@
############ FILE CHOOSER STRINGS ############# ############ FILE CHOOSER STRINGS #############
FileChooser.lookInLabelText=\uAC80\uC0C9 \uC704\uCE58: FileChooser.lookInLabelText=\uAC80\uC0C9 \uC704\uCE58:
FileChooser.lookInLabelMnemonic=73
FileChooser.saveInLabelText=\uC800\uC7A5 \uC704\uCE58: FileChooser.saveInLabelText=\uC800\uC7A5 \uC704\uCE58:
FileChooser.fileNameLabelText=\uD30C\uC77C \uC774\uB984: FileChooser.fileNameLabelText=\uD30C\uC77C \uC774\uB984:
FileChooser.fileNameLabelMnemonic=78
FileChooser.folderNameLabelText=\uD3F4\uB354 \uC774\uB984: FileChooser.folderNameLabelText=\uD3F4\uB354 \uC774\uB984:
FileChooser.folderNameLabelMnemonic=78
FileChooser.filesOfTypeLabelText=\uD30C\uC77C \uC720\uD615: FileChooser.filesOfTypeLabelText=\uD30C\uC77C \uC720\uD615:
FileChooser.filesOfTypeLabelMnemonic=84
FileChooser.upFolderToolTipText=\uD55C \uB808\uBCA8 \uC704\uB85C FileChooser.upFolderToolTipText=\uD55C \uB808\uBCA8 \uC704\uB85C
FileChooser.upFolderAccessibleName=\uC704\uB85C FileChooser.upFolderAccessibleName=\uC704\uB85C
FileChooser.homeFolderToolTipText=\uD648 FileChooser.homeFolderToolTipText=\uD648
......
...@@ -19,10 +19,14 @@ ...@@ -19,10 +19,14 @@
############ FILE CHOOSER STRINGS ############# ############ FILE CHOOSER STRINGS #############
FileChooser.lookInLabelText=Consultar em: FileChooser.lookInLabelText=Consultar em:
FileChooser.lookInLabelMnemonic=73
FileChooser.saveInLabelText=Salvar em: FileChooser.saveInLabelText=Salvar em:
FileChooser.fileNameLabelText=Nome do arquivo: FileChooser.fileNameLabelText=Nome do arquivo:
FileChooser.fileNameLabelMnemonic=78
FileChooser.folderNameLabelText=Nome da pasta: FileChooser.folderNameLabelText=Nome da pasta:
FileChooser.folderNameLabelMnemonic=78
FileChooser.filesOfTypeLabelText=Arquivos do tipo: FileChooser.filesOfTypeLabelText=Arquivos do tipo:
FileChooser.filesOfTypeLabelMnemonic=84
FileChooser.upFolderToolTipText=Um N\u00EDvel Acima FileChooser.upFolderToolTipText=Um N\u00EDvel Acima
FileChooser.upFolderAccessibleName=Acima FileChooser.upFolderAccessibleName=Acima
FileChooser.homeFolderToolTipText=In\u00EDcio FileChooser.homeFolderToolTipText=In\u00EDcio
......
...@@ -19,10 +19,14 @@ ...@@ -19,10 +19,14 @@
############ FILE CHOOSER STRINGS ############# ############ FILE CHOOSER STRINGS #############
FileChooser.lookInLabelText=Leta i: FileChooser.lookInLabelText=Leta i:
FileChooser.lookInLabelMnemonic=73
FileChooser.saveInLabelText=Spara i: FileChooser.saveInLabelText=Spara i:
FileChooser.fileNameLabelText=Filnamn: FileChooser.fileNameLabelText=Filnamn:
FileChooser.fileNameLabelMnemonic=78
FileChooser.folderNameLabelText=Mapp: FileChooser.folderNameLabelText=Mapp:
FileChooser.folderNameLabelMnemonic=78
FileChooser.filesOfTypeLabelText=Filformat: FileChooser.filesOfTypeLabelText=Filformat:
FileChooser.filesOfTypeLabelMnemonic=84
FileChooser.upFolderToolTipText=Upp en niv\u00E5 FileChooser.upFolderToolTipText=Upp en niv\u00E5
FileChooser.upFolderAccessibleName=Upp FileChooser.upFolderAccessibleName=Upp
FileChooser.homeFolderToolTipText=Hem FileChooser.homeFolderToolTipText=Hem
......
...@@ -19,10 +19,14 @@ ...@@ -19,10 +19,14 @@
############ FILE CHOOSER STRINGS ############# ############ FILE CHOOSER STRINGS #############
FileChooser.lookInLabelText=\u67E5\u770B: FileChooser.lookInLabelText=\u67E5\u770B:
FileChooser.lookInLabelMnemonic=73
FileChooser.saveInLabelText=\u4FDD\u5B58: FileChooser.saveInLabelText=\u4FDD\u5B58:
FileChooser.fileNameLabelText=\u6587\u4EF6\u540D: FileChooser.fileNameLabelText=\u6587\u4EF6\u540D:
FileChooser.fileNameLabelMnemonic=78
FileChooser.folderNameLabelText=\u6587\u4EF6\u5939\u540D: FileChooser.folderNameLabelText=\u6587\u4EF6\u5939\u540D:
FileChooser.folderNameLabelMnemonic=78
FileChooser.filesOfTypeLabelText=\u6587\u4EF6\u7C7B\u578B: FileChooser.filesOfTypeLabelText=\u6587\u4EF6\u7C7B\u578B:
FileChooser.filesOfTypeLabelMnemonic=84
FileChooser.upFolderToolTipText=\u5411\u4E0A\u4E00\u7EA7 FileChooser.upFolderToolTipText=\u5411\u4E0A\u4E00\u7EA7
FileChooser.upFolderAccessibleName=\u5411\u4E0A FileChooser.upFolderAccessibleName=\u5411\u4E0A
FileChooser.homeFolderToolTipText=\u4E3B\u76EE\u5F55 FileChooser.homeFolderToolTipText=\u4E3B\u76EE\u5F55
......
...@@ -19,10 +19,14 @@ ...@@ -19,10 +19,14 @@
############ FILE CHOOSER STRINGS ############# ############ FILE CHOOSER STRINGS #############
FileChooser.lookInLabelText=\u67E5\u8A62: FileChooser.lookInLabelText=\u67E5\u8A62:
FileChooser.lookInLabelMnemonic=73
FileChooser.saveInLabelText=\u5132\u5B58\u65BC: FileChooser.saveInLabelText=\u5132\u5B58\u65BC:
FileChooser.fileNameLabelText=\u6A94\u6848\u540D\u7A31: FileChooser.fileNameLabelText=\u6A94\u6848\u540D\u7A31:
FileChooser.fileNameLabelMnemonic=78
FileChooser.folderNameLabelText=\u8CC7\u6599\u593E\u540D\u7A31: FileChooser.folderNameLabelText=\u8CC7\u6599\u593E\u540D\u7A31:
FileChooser.folderNameLabelMnemonic=78
FileChooser.filesOfTypeLabelText=\u6A94\u6848\u985E\u578B: FileChooser.filesOfTypeLabelText=\u6A94\u6848\u985E\u578B:
FileChooser.filesOfTypeLabelMnemonic=84
FileChooser.upFolderToolTipText=\u5F80\u4E0A\u4E00\u5C64 FileChooser.upFolderToolTipText=\u5F80\u4E0A\u4E00\u5C64
FileChooser.upFolderAccessibleName=\u5F80\u4E0A FileChooser.upFolderAccessibleName=\u5F80\u4E0A
FileChooser.homeFolderToolTipText=\u4E3B\u76EE\u9304 FileChooser.homeFolderToolTipText=\u4E3B\u76EE\u9304
......
...@@ -186,7 +186,7 @@ public class SnmpCounter64 extends SnmpValue { ...@@ -186,7 +186,7 @@ public class SnmpCounter64 extends SnmpValue {
newclone = (SnmpCounter64) super.clone() ; newclone = (SnmpCounter64) super.clone() ;
newclone.value = value ; newclone.value = value ;
} catch (CloneNotSupportedException e) { } catch (CloneNotSupportedException e) {
throw new InternalError() ; // vm bug. throw new InternalError(e) ; // vm bug.
} }
return newclone ; return newclone ;
} }
......
...@@ -232,7 +232,7 @@ public class SnmpInt extends SnmpValue { ...@@ -232,7 +232,7 @@ public class SnmpInt extends SnmpValue {
newclone = (SnmpInt) super.clone() ; newclone = (SnmpInt) super.clone() ;
newclone.value = value ; newclone.value = value ;
} catch (CloneNotSupportedException e) { } catch (CloneNotSupportedException e) {
throw new InternalError() ; // vm bug. throw new InternalError(e) ; // vm bug.
} }
return newclone ; return newclone ;
} }
......
...@@ -129,7 +129,7 @@ public class SnmpNull extends SnmpValue { ...@@ -129,7 +129,7 @@ public class SnmpNull extends SnmpValue {
newclone = (SnmpNull) super.clone() ; newclone = (SnmpNull) super.clone() ;
newclone.tag = tag ; newclone.tag = tag ;
} catch (CloneNotSupportedException e) { } catch (CloneNotSupportedException e) {
throw new InternalError() ; // vm bug. throw new InternalError(e) ; // vm bug.
} }
return newclone ; return newclone ;
} }
......
...@@ -250,7 +250,7 @@ public class SnmpString extends SnmpValue { ...@@ -250,7 +250,7 @@ public class SnmpString extends SnmpValue {
newclone.value = new byte[value.length] ; newclone.value = new byte[value.length] ;
System.arraycopy(value, 0, newclone.value, 0, value.length) ; System.arraycopy(value, 0, newclone.value, 0, value.length) ;
} catch (CloneNotSupportedException e) { } catch (CloneNotSupportedException e) {
throw new InternalError() ; // vm bug. throw new InternalError(e) ; // vm bug.
} }
return newclone ; return newclone ;
} }
......
...@@ -921,7 +921,7 @@ class SnmpRequestHandler extends ClientHandler implements SnmpDefinitions { ...@@ -921,7 +921,7 @@ class SnmpRequestHandler extends ClientHandler implements SnmpDefinitions {
SNMP_ADAPTOR_LOGGER.logp(Level.FINEST, dbgTag, SNMP_ADAPTOR_LOGGER.logp(Level.FINEST, dbgTag,
"newTooBigMessage", "Internal error", x); "newTooBigMessage", "Internal error", x);
} }
throw new InternalError() ; throw new InternalError(x) ;
} }
return result ; return result ;
......
/* /*
* 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
...@@ -33,6 +33,7 @@ package com.sun.security.auth.module; ...@@ -33,6 +33,7 @@ package com.sun.security.auth.module;
public class NTSystem { public class NTSystem {
private native void getCurrent(boolean debug); private native void getCurrent(boolean debug);
private native long getImpersonationToken0();
private String userName; private String userName;
private String domain; private String domain;
...@@ -132,10 +133,14 @@ public class NTSystem { ...@@ -132,10 +133,14 @@ public class NTSystem {
* *
* @return an impersonation token for the current NT user. * @return an impersonation token for the current NT user.
*/ */
public long getImpersonationToken() { public synchronized long getImpersonationToken() {
if (impersonationToken == 0) {
impersonationToken = getImpersonationToken0();
}
return impersonationToken; return impersonationToken;
} }
private void loadNative() { private void loadNative() {
System.loadLibrary("jaas_nt"); System.loadLibrary("jaas_nt");
} }
......
...@@ -77,9 +77,7 @@ class BrowserSupport { ...@@ -77,9 +77,7 @@ class BrowserSupport {
result = (Boolean) isDesktopSupportedMethod.invoke(null); result = (Boolean) isDesktopSupportedMethod.invoke(null);
} catch (IllegalAccessException e) { } catch (IllegalAccessException e) {
// should never reach here // should never reach here
InternalError x = throw new InternalError("Desktop.getDesktop() method not found", e);
new InternalError("Desktop.getDesktop() method not found");
x.initCause(e);
} catch (InvocationTargetException e) { } catch (InvocationTargetException e) {
// browser not supported // browser not supported
if (Util.isVerbose()) { if (Util.isVerbose()) {
...@@ -101,28 +99,10 @@ class BrowserSupport { ...@@ -101,28 +99,10 @@ class BrowserSupport {
result = (Boolean) isSupportedMethod.invoke(desktopObj, browseField.get(null)); result = (Boolean) isSupportedMethod.invoke(desktopObj, browseField.get(null));
supported = result.booleanValue(); supported = result.booleanValue();
} }
} catch (ClassNotFoundException e) {
// browser not supported
if (Util.isVerbose()) {
e.printStackTrace();
}
} catch (NoSuchMethodException e) {
// browser not supported
if (Util.isVerbose()) {
e.printStackTrace();
}
} catch (NoSuchFieldException e) {
// browser not supported
if (Util.isVerbose()) {
e.printStackTrace();
}
} catch (IllegalAccessException e) { } catch (IllegalAccessException e) {
// should never reach here // should never reach here
InternalError x = throw new InternalError("Desktop.getDesktop() method not found", e);
new InternalError("Desktop.getDesktop() method not found"); } catch (ReflectiveOperationException e) {
x.initCause(e);
throw x;
} catch (InvocationTargetException e) {
// browser not supported // browser not supported
if (Util.isVerbose()) { if (Util.isVerbose()) {
e.printStackTrace(); e.printStackTrace();
...@@ -175,10 +155,7 @@ class BrowserSupport { ...@@ -175,10 +155,7 @@ class BrowserSupport {
browseMethod.invoke(desktop, uri); browseMethod.invoke(desktop, uri);
} catch (IllegalAccessException e) { } catch (IllegalAccessException e) {
// should never reach here // should never reach here
InternalError x = throw new InternalError("Desktop.getDesktop() method not found", e);
new InternalError("Desktop.getDesktop() method not found");
x.initCause(e);
throw x;
} catch (InvocationTargetException e) { } catch (InvocationTargetException e) {
Throwable x = e.getCause(); Throwable x = e.getCause();
if (x != null) { if (x != null) {
......
...@@ -61,8 +61,8 @@ public class Installer { ...@@ -61,8 +61,8 @@ public class Installer {
private static RegistrationData registration; private static RegistrationData registration;
private static boolean supportRegistration; private static boolean supportRegistration;
private static String registerHtmlParent; private static String registerHtmlParent;
private static Set<Locale> supportedLocales = new HashSet<Locale>(); private static Set<Locale> supportedLocales = new HashSet<>();
private static Properties swordfishProps = null; private static Properties svcTagProps = null;
private static String[] jreArchs = null; private static String[] jreArchs = null;
static { static {
String dir = System.getProperty(SVCTAG_DIR_PATH); String dir = System.getProperty(SVCTAG_DIR_PATH);
...@@ -94,7 +94,7 @@ public class Installer { ...@@ -94,7 +94,7 @@ public class Installer {
boolean cleanup = false; boolean cleanup = false;
try { try {
// Check if we have the swordfish entries for this JRE version // Check if we have the swordfish entries for this JRE version
if (loadSwordfishEntries() == null) { if (loadServiceTagProps() == null) {
return null; return null;
} }
...@@ -144,18 +144,14 @@ public class Installer { ...@@ -144,18 +144,14 @@ public class Installer {
return registration; return registration;
} }
if (regXmlFile.exists()) { if (regXmlFile.exists()) {
BufferedInputStream in = null; try (BufferedInputStream in =
try { new BufferedInputStream(new FileInputStream(regXmlFile)))
in = new BufferedInputStream(new FileInputStream(regXmlFile)); {
registration = RegistrationData.loadFromXML(in); registration = RegistrationData.loadFromXML(in);
} catch (IllegalArgumentException ex) { } catch (IllegalArgumentException ex) {
System.err.println("Error: Bad registration data \"" + System.err.println("Error: Bad registration data \"" +
regXmlFile + "\":" + ex.getMessage()); regXmlFile + "\":" + ex.getMessage());
throw ex; throw ex;
} finally {
if (in != null) {
in.close();
}
} }
} else { } else {
registration = new RegistrationData(); registration = new RegistrationData();
...@@ -186,18 +182,14 @@ public class Installer { ...@@ -186,18 +182,14 @@ public class Installer {
deleteRegistrationHtmlPage(); deleteRegistrationHtmlPage();
getRegistrationHtmlPage(); getRegistrationHtmlPage();
BufferedOutputStream out = null; try (BufferedOutputStream out =
try { new BufferedOutputStream(new FileOutputStream(regXmlFile)))
out = new BufferedOutputStream(new FileOutputStream(regXmlFile)); {
getRegistrationData().storeToXML(out); getRegistrationData().storeToXML(out);
} catch (IllegalArgumentException ex) { } catch (IllegalArgumentException ex) {
System.err.println("Error: Bad registration data \"" + System.err.println("Error: Bad registration data \"" +
regXmlFile + "\":" + ex.getMessage()); regXmlFile + "\":" + ex.getMessage());
throw ex; throw ex;
} finally {
if (out != null) {
out.close();
}
} }
} }
...@@ -206,11 +198,9 @@ public class Installer { ...@@ -206,11 +198,9 @@ public class Installer {
* or empty set if file not exists. * or empty set if file not exists.
*/ */
private static Set<String> getInstalledURNs() throws IOException { private static Set<String> getInstalledURNs() throws IOException {
Set<String> urnSet = new HashSet<String>(); Set<String> urnSet = new HashSet<>();
if (serviceTagFile.exists()) { if (serviceTagFile.exists()) {
BufferedReader in = null; try (BufferedReader in = new BufferedReader(new FileReader(serviceTagFile))) {
try {
in = new BufferedReader(new FileReader(serviceTagFile));
String urn; String urn;
while ((urn = in.readLine()) != null) { while ((urn = in.readLine()) != null) {
urn = urn.trim(); urn = urn.trim();
...@@ -218,10 +208,6 @@ public class Installer { ...@@ -218,10 +208,6 @@ public class Installer {
urnSet.add(urn); urnSet.add(urn);
} }
} }
} finally {
if (in != null) {
in.close();
}
} }
} }
return urnSet; return urnSet;
...@@ -237,9 +223,9 @@ public class Installer { ...@@ -237,9 +223,9 @@ public class Installer {
private static ServiceTag[] getJavaServiceTagArray() throws IOException { private static ServiceTag[] getJavaServiceTagArray() throws IOException {
RegistrationData regData = getRegistrationData(); RegistrationData regData = getRegistrationData();
Set<ServiceTag> svcTags = regData.getServiceTags(); Set<ServiceTag> svcTags = regData.getServiceTags();
Set<ServiceTag> result = new HashSet<ServiceTag>(); Set<ServiceTag> result = new HashSet<>();
Properties props = loadSwordfishEntries(); Properties props = loadServiceTagProps();
String jdkUrn = props.getProperty("servicetag.jdk.urn"); String jdkUrn = props.getProperty("servicetag.jdk.urn");
String jreUrn = props.getProperty("servicetag.jre.urn"); String jreUrn = props.getProperty("servicetag.jre.urn");
for (ServiceTag st : svcTags) { for (ServiceTag st : svcTags) {
...@@ -343,8 +329,7 @@ public class Installer { ...@@ -343,8 +329,7 @@ public class Installer {
} }
private static ServiceTag newServiceTag(String svcTagSource) throws IOException { private static ServiceTag newServiceTag(String svcTagSource) throws IOException {
// Load the swoRDFish information for the service tag creation Properties props = loadServiceTagProps();
Properties props = loadSwordfishEntries();
// Determine the product URN and name // Determine the product URN and name
String productURN; String productURN;
...@@ -442,52 +427,35 @@ public class Installer { ...@@ -442,52 +427,35 @@ public class Installer {
return; return;
} }
PrintWriter out = null; try (PrintWriter out = new PrintWriter(serviceTagFile)) {
try {
out = new PrintWriter(serviceTagFile);
ServiceTag[] javaSvcTags = getJavaServiceTagArray(); ServiceTag[] javaSvcTags = getJavaServiceTagArray();
for (ServiceTag st : javaSvcTags) { for (ServiceTag st : javaSvcTags) {
// Write the instance_run to the servicetag file // Write the instance_run to the servicetag file
String instanceURN = st.getInstanceURN(); String instanceURN = st.getInstanceURN();
out.println(instanceURN); out.println(instanceURN);
} }
} finally {
if (out != null) {
out.close();
}
} }
} }
/** /**
* Load the values associated with the swoRDFish metadata entries * Load the properties for generating Java SE service tags.
* for Java SE. The swoRDFish metadata entries are different for
* different release.
* *
* @param version Version of Java SE * @param version Version of Java SE
*/ */
private static synchronized Properties loadSwordfishEntries() throws IOException { private static synchronized Properties loadServiceTagProps() throws IOException {
if (swordfishProps != null) { if (svcTagProps != null) {
return swordfishProps; return svcTagProps;
} }
// The version string for Java SE 6 is 1.6.0 // For Java SE 8 and later releases, JDK and JRE both use
// We just need the minor number in the version string // the same product number. The sworRDFish metadata were
int version = Util.getJdkVersion(); // for legacy Sun part number.
String filename = "/com/sun/servicetag/resources/javase_servicetag.properties";
String filename = "/com/sun/servicetag/resources/javase_" + try (InputStream in = Installer.class.getResourceAsStream(filename)) {
version + "_swordfish.properties"; svcTagProps = new Properties();
InputStream in = Installer.class.getResourceAsStream(filename); svcTagProps.load(in);
if (in == null) {
return null;
} }
swordfishProps = new Properties(); return svcTagProps;
try {
swordfishProps.load(in);
} finally {
in.close();
}
return swordfishProps;
} }
/** /**
...@@ -546,7 +514,7 @@ public class Installer { ...@@ -546,7 +514,7 @@ public class Installer {
return jreArchs; return jreArchs;
} }
Set<String> archs = new HashSet<String>(); Set<String> archs = new HashSet<>();
String os = System.getProperty("os.name"); String os = System.getProperty("os.name");
if (os.equals("SunOS") || os.equals("Linux")) { if (os.equals("SunOS") || os.equals("Linux")) {
...@@ -681,16 +649,16 @@ public class Installer { ...@@ -681,16 +649,16 @@ public class Installer {
String country = locale.getCountry(); String country = locale.getCountry();
String variant = locale.getVariant(); String variant = locale.getVariant();
List<Locale> locales = new ArrayList<Locale>(3); List<Locale> locales = new ArrayList<>(3);
if (variant.length() > 0) { if (variant.length() > 0) {
locales.add(locale); locales.add(locale);
} }
if (country.length() > 0) { if (country.length() > 0) {
locales.add((locales.size() == 0) ? locales.add((locales.isEmpty()) ?
locale : new Locale(language, country, "")); locale : new Locale(language, country, ""));
} }
if (language.length() > 0) { if (language.length() > 0) {
locales.add((locales.size() == 0) ? locales.add((locales.isEmpty()) ?
locale : new Locale(language, "", "")); locale : new Locale(language, "", ""));
} }
return locales; return locales;
...@@ -788,14 +756,11 @@ public class Installer { ...@@ -788,14 +756,11 @@ public class Installer {
// Format the registration data in one single line // Format the registration data in one single line
StringBuilder payload = new StringBuilder(); StringBuilder payload = new StringBuilder();
String xml = regData.toString().replaceAll("\"", "%22"); String xml = regData.toString().replaceAll("\"", "%22");
BufferedReader reader = new BufferedReader(new StringReader(xml)); try (BufferedReader reader = new BufferedReader(new StringReader(xml))) {
try {
String line = null; String line = null;
while ((line = reader.readLine()) != null) { while ((line = reader.readLine()) != null) {
payload.append(line.trim()); payload.append(line.trim());
} }
} finally {
reader.close();
} }
String resourceFilename = "/com/sun/servicetag/resources/register"; String resourceFilename = "/com/sun/servicetag/resources/register";
......
...@@ -150,9 +150,7 @@ class RegistrationDocument { ...@@ -150,9 +150,7 @@ class RegistrationDocument {
} catch (ParserConfigurationException pce) { } catch (ParserConfigurationException pce) {
// Parser with specific options can't be built // Parser with specific options can't be built
// should not reach here // should not reach here
InternalError x = new InternalError("Error in creating the new document"); throw new InternalError("Error in creating the new document", pce);
x.initCause(pce);
throw x;
} }
} }
...@@ -172,9 +170,7 @@ class RegistrationDocument { ...@@ -172,9 +170,7 @@ class RegistrationDocument {
} catch (ParserConfigurationException pce) { } catch (ParserConfigurationException pce) {
// Parser with specified options can't be built // Parser with specified options can't be built
// should not reach here // should not reach here
InternalError x = new InternalError("Error in creating the new document"); throw new InternalError("Error in creating the new document", pce);
x.initCause(pce);
throw x;
} }
} }
...@@ -195,20 +191,14 @@ class RegistrationDocument { ...@@ -195,20 +191,14 @@ class RegistrationDocument {
new StreamResult(new BufferedWriter(new OutputStreamWriter(os, "UTF-8")))); new StreamResult(new BufferedWriter(new OutputStreamWriter(os, "UTF-8"))));
} catch (UnsupportedEncodingException ue) { } catch (UnsupportedEncodingException ue) {
// Should not reach here // Should not reach here
InternalError x = new InternalError("Error generated during transformation"); throw new InternalError("Error generated during transformation", ue);
x.initCause(ue);
throw x;
} catch (TransformerConfigurationException tce) { } catch (TransformerConfigurationException tce) {
// Error generated by the parser // Error generated by the parser
// Should not reach here // Should not reach here
InternalError x = new InternalError("Error in creating the new document"); throw new InternalError("Error in creating the new document", tce);
x.initCause(tce);
throw x;
} catch (TransformerException te) { } catch (TransformerException te) {
// Error generated by the transformer // Error generated by the transformer
InternalError x = new InternalError("Error generated during transformation"); throw new InternalError("Error generated during transformation", te);
x.initCause(te);
throw x;
} }
} }
......
# 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.
servicetag.jdk.urn = Q8549
servicetag.jdk.name = Java Development Kit
servicetag.jre.urn = Q8549
servicetag.jre.name = Java Runtime Environment
servicetag.parent.urn = Q8549
servicetag.parent.name = Java Platform, Standard Edition
...@@ -19,10 +19,14 @@ ...@@ -19,10 +19,14 @@
############ FILE CHOOSER STRINGS ############# ############ FILE CHOOSER STRINGS #############
FileChooser.lookInLabelText=Look In: FileChooser.lookInLabelText=Look In:
FileChooser.lookInLabelMnemonic=73
FileChooser.saveInLabelText=Save In: FileChooser.saveInLabelText=Save In:
FileChooser.fileNameLabelText=File Name: FileChooser.fileNameLabelText=File Name:
FileChooser.fileNameLabelMnemonic=78
FileChooser.folderNameLabelText=Folder name: FileChooser.folderNameLabelText=Folder name:
FileChooser.folderNameLabelMnemonic=78
FileChooser.filesOfTypeLabelText=Files of Type: FileChooser.filesOfTypeLabelText=Files of Type:
FileChooser.filesOfTypeLabelMnemonic=84
FileChooser.upFolderToolTipText=Up One Level FileChooser.upFolderToolTipText=Up One Level
FileChooser.upFolderAccessibleName=Up FileChooser.upFolderAccessibleName=Up
FileChooser.homeFolderToolTipText=Home FileChooser.homeFolderToolTipText=Home
......
...@@ -19,10 +19,14 @@ ...@@ -19,10 +19,14 @@
############ FILE CHOOSER STRINGS ############# ############ FILE CHOOSER STRINGS #############
FileChooser.lookInLabelText=Suchen in: FileChooser.lookInLabelText=Suchen in:
FileChooser.lookInLabelMnemonic=73
FileChooser.saveInLabelText=Speichern in: FileChooser.saveInLabelText=Speichern in:
FileChooser.fileNameLabelText=Dateiname: FileChooser.fileNameLabelText=Dateiname:
FileChooser.fileNameLabelMnemonic=78
FileChooser.folderNameLabelText=Ordnername: FileChooser.folderNameLabelText=Ordnername:
FileChooser.folderNameLabelMnemonic=78
FileChooser.filesOfTypeLabelText=Dateityp: FileChooser.filesOfTypeLabelText=Dateityp:
FileChooser.filesOfTypeLabelMnemonic=84
FileChooser.upFolderToolTipText=Eine Ebene h\u00F6her FileChooser.upFolderToolTipText=Eine Ebene h\u00F6her
FileChooser.upFolderAccessibleName=Nach oben FileChooser.upFolderAccessibleName=Nach oben
FileChooser.homeFolderToolTipText=Home FileChooser.homeFolderToolTipText=Home
......
...@@ -19,10 +19,14 @@ ...@@ -19,10 +19,14 @@
############ FILE CHOOSER STRINGS ############# ############ FILE CHOOSER STRINGS #############
FileChooser.lookInLabelText=Buscar en: FileChooser.lookInLabelText=Buscar en:
FileChooser.lookInLabelMnemonic=73
FileChooser.saveInLabelText=Guardar en: FileChooser.saveInLabelText=Guardar en:
FileChooser.fileNameLabelText=Nombre de Archivo: FileChooser.fileNameLabelText=Nombre de Archivo:
FileChooser.fileNameLabelMnemonic=78
FileChooser.folderNameLabelText=Nombre de la Carpeta: FileChooser.folderNameLabelText=Nombre de la Carpeta:
FileChooser.folderNameLabelMnemonic=78
FileChooser.filesOfTypeLabelText=Archivos de Tipo: FileChooser.filesOfTypeLabelText=Archivos de Tipo:
FileChooser.filesOfTypeLabelMnemonic=84
FileChooser.upFolderToolTipText=Subir un Nivel FileChooser.upFolderToolTipText=Subir un Nivel
FileChooser.upFolderAccessibleName=Arriba FileChooser.upFolderAccessibleName=Arriba
FileChooser.homeFolderToolTipText=Inicio FileChooser.homeFolderToolTipText=Inicio
......
...@@ -19,10 +19,14 @@ ...@@ -19,10 +19,14 @@
############ FILE CHOOSER STRINGS ############# ############ FILE CHOOSER STRINGS #############
FileChooser.lookInLabelText=Rechercher dans : FileChooser.lookInLabelText=Rechercher dans :
FileChooser.lookInLabelMnemonic=73
FileChooser.saveInLabelText=Enregistrer dans : FileChooser.saveInLabelText=Enregistrer dans :
FileChooser.fileNameLabelText=Nom du fichier : FileChooser.fileNameLabelText=Nom du fichier :
FileChooser.fileNameLabelMnemonic=78
FileChooser.folderNameLabelText=Nom du dossier : FileChooser.folderNameLabelText=Nom du dossier :
FileChooser.folderNameLabelMnemonic=78
FileChooser.filesOfTypeLabelText=Fichiers de type : FileChooser.filesOfTypeLabelText=Fichiers de type :
FileChooser.filesOfTypeLabelMnemonic=84
FileChooser.upFolderToolTipText=Remonte d'un niveau. FileChooser.upFolderToolTipText=Remonte d'un niveau.
FileChooser.upFolderAccessibleName=Monter FileChooser.upFolderAccessibleName=Monter
FileChooser.homeFolderToolTipText=R\u00E9pertoire d'origine FileChooser.homeFolderToolTipText=R\u00E9pertoire d'origine
......
...@@ -19,10 +19,14 @@ ...@@ -19,10 +19,14 @@
############ FILE CHOOSER STRINGS ############# ############ FILE CHOOSER STRINGS #############
FileChooser.lookInLabelText=Cerca in: FileChooser.lookInLabelText=Cerca in:
FileChooser.lookInLabelMnemonic=73
FileChooser.saveInLabelText=Salva in: FileChooser.saveInLabelText=Salva in:
FileChooser.fileNameLabelText=Nome file: FileChooser.fileNameLabelText=Nome file:
FileChooser.fileNameLabelMnemonic=78
FileChooser.folderNameLabelText=Nome della cartella: FileChooser.folderNameLabelText=Nome della cartella:
FileChooser.folderNameLabelMnemonic=78
FileChooser.filesOfTypeLabelText=Tipo file: FileChooser.filesOfTypeLabelText=Tipo file:
FileChooser.filesOfTypeLabelMnemonic=84
FileChooser.upFolderToolTipText=Cartella superiore FileChooser.upFolderToolTipText=Cartella superiore
FileChooser.upFolderAccessibleName=Superiore FileChooser.upFolderAccessibleName=Superiore
FileChooser.homeFolderToolTipText=Home FileChooser.homeFolderToolTipText=Home
......
...@@ -19,10 +19,14 @@ ...@@ -19,10 +19,14 @@
############ FILE CHOOSER STRINGS ############# ############ FILE CHOOSER STRINGS #############
FileChooser.lookInLabelText=\u53C2\u7167: FileChooser.lookInLabelText=\u53C2\u7167:
FileChooser.lookInLabelMnemonic=73
FileChooser.saveInLabelText=\u4FDD\u5B58: FileChooser.saveInLabelText=\u4FDD\u5B58:
FileChooser.fileNameLabelText=\u30D5\u30A1\u30A4\u30EB\u540D: FileChooser.fileNameLabelText=\u30D5\u30A1\u30A4\u30EB\u540D:
FileChooser.fileNameLabelMnemonic=78
FileChooser.folderNameLabelText=\u30D5\u30A9\u30EB\u30C0\u540D: FileChooser.folderNameLabelText=\u30D5\u30A9\u30EB\u30C0\u540D:
FileChooser.folderNameLabelMnemonic=78
FileChooser.filesOfTypeLabelText=\u30D5\u30A1\u30A4\u30EB\u306E\u30BF\u30A4\u30D7: FileChooser.filesOfTypeLabelText=\u30D5\u30A1\u30A4\u30EB\u306E\u30BF\u30A4\u30D7:
FileChooser.filesOfTypeLabelMnemonic=84
FileChooser.upFolderToolTipText=1\u30EC\u30D9\u30EB\u4E0A\u3078 FileChooser.upFolderToolTipText=1\u30EC\u30D9\u30EB\u4E0A\u3078
FileChooser.upFolderAccessibleName=\u4E0A\u3078 FileChooser.upFolderAccessibleName=\u4E0A\u3078
FileChooser.homeFolderToolTipText=\u30DB\u30FC\u30E0 FileChooser.homeFolderToolTipText=\u30DB\u30FC\u30E0
......
...@@ -19,10 +19,14 @@ ...@@ -19,10 +19,14 @@
############ FILE CHOOSER STRINGS ############# ############ FILE CHOOSER STRINGS #############
FileChooser.lookInLabelText=\uAC80\uC0C9 \uC704\uCE58: FileChooser.lookInLabelText=\uAC80\uC0C9 \uC704\uCE58:
FileChooser.lookInLabelMnemonic=73
FileChooser.saveInLabelText=\uC800\uC7A5 \uC704\uCE58: FileChooser.saveInLabelText=\uC800\uC7A5 \uC704\uCE58:
FileChooser.fileNameLabelText=\uD30C\uC77C \uC774\uB984: FileChooser.fileNameLabelText=\uD30C\uC77C \uC774\uB984:
FileChooser.fileNameLabelMnemonic=78
FileChooser.folderNameLabelText=\uD3F4\uB354 \uC774\uB984: FileChooser.folderNameLabelText=\uD3F4\uB354 \uC774\uB984:
FileChooser.folderNameLabelMnemonic=78
FileChooser.filesOfTypeLabelText=\uD30C\uC77C \uC720\uD615: FileChooser.filesOfTypeLabelText=\uD30C\uC77C \uC720\uD615:
FileChooser.filesOfTypeLabelMnemonic=84
FileChooser.upFolderToolTipText=\uD55C \uB808\uBCA8 \uC704\uB85C FileChooser.upFolderToolTipText=\uD55C \uB808\uBCA8 \uC704\uB85C
FileChooser.upFolderAccessibleName=\uC704\uB85C FileChooser.upFolderAccessibleName=\uC704\uB85C
FileChooser.homeFolderToolTipText=\uD648 FileChooser.homeFolderToolTipText=\uD648
......
...@@ -19,10 +19,14 @@ ...@@ -19,10 +19,14 @@
############ FILE CHOOSER STRINGS ############# ############ FILE CHOOSER STRINGS #############
FileChooser.lookInLabelText=Consultar Em: FileChooser.lookInLabelText=Consultar Em:
FileChooser.lookInLabelMnemonic=73
FileChooser.saveInLabelText=Salvar Em: FileChooser.saveInLabelText=Salvar Em:
FileChooser.fileNameLabelText=Nome do Arquivo: FileChooser.fileNameLabelText=Nome do Arquivo:
FileChooser.fileNameLabelMnemonic=78
FileChooser.folderNameLabelText=Nome da pasta: FileChooser.folderNameLabelText=Nome da pasta:
FileChooser.folderNameLabelMnemonic=78
FileChooser.filesOfTypeLabelText=Arquivos do Tipo: FileChooser.filesOfTypeLabelText=Arquivos do Tipo:
FileChooser.filesOfTypeLabelMnemonic=84
FileChooser.upFolderToolTipText=Um N\u00EDvel Acima FileChooser.upFolderToolTipText=Um N\u00EDvel Acima
FileChooser.upFolderAccessibleName=Acima FileChooser.upFolderAccessibleName=Acima
FileChooser.homeFolderToolTipText=In\u00EDcio FileChooser.homeFolderToolTipText=In\u00EDcio
......
...@@ -19,10 +19,14 @@ ...@@ -19,10 +19,14 @@
############ FILE CHOOSER STRINGS ############# ############ FILE CHOOSER STRINGS #############
FileChooser.lookInLabelText=Leta i: FileChooser.lookInLabelText=Leta i:
FileChooser.lookInLabelMnemonic=73
FileChooser.saveInLabelText=Spara i: FileChooser.saveInLabelText=Spara i:
FileChooser.fileNameLabelText=Filnamn: FileChooser.fileNameLabelText=Filnamn:
FileChooser.fileNameLabelMnemonic=78
FileChooser.folderNameLabelText=Mapp: FileChooser.folderNameLabelText=Mapp:
FileChooser.folderNameLabelMnemonic=78
FileChooser.filesOfTypeLabelText=Filformat: FileChooser.filesOfTypeLabelText=Filformat:
FileChooser.filesOfTypeLabelMnemonic=84
FileChooser.upFolderToolTipText=Upp en niv\u00E5 FileChooser.upFolderToolTipText=Upp en niv\u00E5
FileChooser.upFolderAccessibleName=Upp FileChooser.upFolderAccessibleName=Upp
FileChooser.homeFolderToolTipText=Hem FileChooser.homeFolderToolTipText=Hem
......
...@@ -19,10 +19,14 @@ ...@@ -19,10 +19,14 @@
############ FILE CHOOSER STRINGS ############# ############ FILE CHOOSER STRINGS #############
FileChooser.lookInLabelText=\u67E5\u770B: FileChooser.lookInLabelText=\u67E5\u770B:
FileChooser.lookInLabelMnemonic=73
FileChooser.saveInLabelText=\u4FDD\u5B58: FileChooser.saveInLabelText=\u4FDD\u5B58:
FileChooser.fileNameLabelText=\u6587\u4EF6\u540D: FileChooser.fileNameLabelText=\u6587\u4EF6\u540D:
FileChooser.fileNameLabelMnemonic=78
FileChooser.folderNameLabelText=\u6587\u4EF6\u5939\u540D: FileChooser.folderNameLabelText=\u6587\u4EF6\u5939\u540D:
FileChooser.folderNameLabelMnemonic=78
FileChooser.filesOfTypeLabelText=\u6587\u4EF6\u7C7B\u578B: FileChooser.filesOfTypeLabelText=\u6587\u4EF6\u7C7B\u578B:
FileChooser.filesOfTypeLabelMnemonic=84
FileChooser.upFolderToolTipText=\u5411\u4E0A\u4E00\u7EA7 FileChooser.upFolderToolTipText=\u5411\u4E0A\u4E00\u7EA7
FileChooser.upFolderAccessibleName=\u5411\u4E0A FileChooser.upFolderAccessibleName=\u5411\u4E0A
FileChooser.homeFolderToolTipText=\u4E3B\u76EE\u5F55 FileChooser.homeFolderToolTipText=\u4E3B\u76EE\u5F55
......
...@@ -19,10 +19,14 @@ ...@@ -19,10 +19,14 @@
############ FILE CHOOSER STRINGS ############# ############ FILE CHOOSER STRINGS #############
FileChooser.lookInLabelText=\u67E5\u8A62: FileChooser.lookInLabelText=\u67E5\u8A62:
FileChooser.lookInLabelMnemonic=73
FileChooser.saveInLabelText=\u5132\u5B58\u65BC: FileChooser.saveInLabelText=\u5132\u5B58\u65BC:
FileChooser.fileNameLabelText=\u6A94\u6848\u540D\u7A31: FileChooser.fileNameLabelText=\u6A94\u6848\u540D\u7A31:
FileChooser.fileNameLabelMnemonic=78
FileChooser.folderNameLabelText=\u8CC7\u6599\u593E\u540D\u7A31: FileChooser.folderNameLabelText=\u8CC7\u6599\u593E\u540D\u7A31:
FileChooser.folderNameLabelMnemonic=78
FileChooser.filesOfTypeLabelText=\u6A94\u6848\u985E\u578B: FileChooser.filesOfTypeLabelText=\u6A94\u6848\u985E\u578B:
FileChooser.filesOfTypeLabelMnemonic=84
FileChooser.upFolderToolTipText=\u5F80\u4E0A\u4E00\u5C64 FileChooser.upFolderToolTipText=\u5F80\u4E0A\u4E00\u5C64
FileChooser.upFolderAccessibleName=\u5F80\u4E0A FileChooser.upFolderAccessibleName=\u5F80\u4E0A
FileChooser.homeFolderToolTipText=\u4E3B\u76EE\u9304 FileChooser.homeFolderToolTipText=\u4E3B\u76EE\u9304
......
...@@ -137,7 +137,7 @@ public class BufferCapabilities implements Cloneable { ...@@ -137,7 +137,7 @@ public class BufferCapabilities implements Cloneable {
return super.clone(); return super.clone();
} catch (CloneNotSupportedException e) { } catch (CloneNotSupportedException e) {
// Since we implement Cloneable, this should never happen // Since we implement Cloneable, this should never happen
throw new InternalError(); throw new InternalError(e);
} }
} }
......
...@@ -3776,11 +3776,10 @@ public abstract class Component implements ImageObserver, MenuContainer, ...@@ -3776,11 +3776,10 @@ public abstract class Component implements ImageObserver, MenuContainer,
createBufferStrategy(numBuffers, bufferCaps); createBufferStrategy(numBuffers, bufferCaps);
return; // Success return; // Success
} catch (AWTException e) { } catch (AWTException e) {
// Failed
}
// Code should never reach here (an unaccelerated blitting // Code should never reach here (an unaccelerated blitting
// strategy should always work) // strategy should always work)
throw new InternalError("Could not create a buffer strategy"); throw new InternalError("Could not create a buffer strategy", e);
}
} }
/** /**
...@@ -7910,7 +7909,7 @@ public abstract class Component implements ImageObserver, MenuContainer, ...@@ -7910,7 +7909,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
res = toFocus.requestFocusInWindow(CausedFocusEvent.Cause.TRAVERSAL_BACKWARD); res = toFocus.requestFocusInWindow(CausedFocusEvent.Cause.TRAVERSAL_BACKWARD);
} }
} }
if (!res) { if (clearOnFailure && !res) {
if (focusLog.isLoggable(PlatformLogger.FINER)) { if (focusLog.isLoggable(PlatformLogger.FINER)) {
focusLog.finer("clear global focus owner"); focusLog.finer("clear global focus owner");
} }
......
...@@ -653,7 +653,7 @@ public class GridBagConstraints implements Cloneable, java.io.Serializable { ...@@ -653,7 +653,7 @@ public class GridBagConstraints implements Cloneable, java.io.Serializable {
return c; return c;
} catch (CloneNotSupportedException e) { } catch (CloneNotSupportedException e) {
// this shouldn't happen, since we are Cloneable // this shouldn't happen, since we are Cloneable
throw new InternalError(); throw new InternalError(e);
} }
} }
......
...@@ -74,7 +74,7 @@ public class ImageCapabilities implements Cloneable { ...@@ -74,7 +74,7 @@ public class ImageCapabilities implements Cloneable {
return super.clone(); return super.clone();
} catch (CloneNotSupportedException e) { } catch (CloneNotSupportedException e) {
// Since we implement Cloneable, this should never happen // Since we implement Cloneable, this should never happen
throw new InternalError(); throw new InternalError(e);
} }
} }
......
...@@ -177,7 +177,7 @@ public class Insets implements Cloneable, java.io.Serializable { ...@@ -177,7 +177,7 @@ public class Insets implements Cloneable, java.io.Serializable {
return super.clone(); return super.clone();
} catch (CloneNotSupportedException e) { } catch (CloneNotSupportedException e) {
// this shouldn't happen, since we are Cloneable // this shouldn't happen, since we are Cloneable
throw new InternalError(); throw new InternalError(e);
} }
} }
/** /**
......
...@@ -361,7 +361,7 @@ public final class JobAttributes implements Cloneable { ...@@ -361,7 +361,7 @@ public final class JobAttributes implements Cloneable {
return super.clone(); return super.clone();
} catch (CloneNotSupportedException e) { } catch (CloneNotSupportedException e) {
// Since we implement Cloneable, this should never happen // Since we implement Cloneable, this should never happen
throw new InternalError(); throw new InternalError(e);
} }
} }
......
...@@ -969,7 +969,7 @@ public final class PageAttributes implements Cloneable { ...@@ -969,7 +969,7 @@ public final class PageAttributes implements Cloneable {
return super.clone(); return super.clone();
} catch (CloneNotSupportedException e) { } catch (CloneNotSupportedException e) {
// Since we implement Cloneable, this should never happen // Since we implement Cloneable, this should never happen
throw new InternalError(); throw new InternalError(e);
} }
} }
......
...@@ -1276,7 +1276,7 @@ public class RenderingHints ...@@ -1276,7 +1276,7 @@ public class RenderingHints
} }
} catch (CloneNotSupportedException e) { } catch (CloneNotSupportedException e) {
// this shouldn't happen, since we are Cloneable // this shouldn't happen, since we are Cloneable
throw new InternalError(); throw new InternalError(e);
} }
return rh; return rh;
......
...@@ -753,7 +753,7 @@ public final class TextLayout implements Cloneable { ...@@ -753,7 +753,7 @@ public final class TextLayout implements Cloneable {
return super.clone(); return super.clone();
} }
catch (CloneNotSupportedException e) { catch (CloneNotSupportedException e) {
throw new InternalError(); throw new InternalError(e);
} }
} }
......
...@@ -3856,7 +3856,7 @@ public class AffineTransform implements Cloneable, java.io.Serializable { ...@@ -3856,7 +3856,7 @@ public class AffineTransform implements Cloneable, java.io.Serializable {
return super.clone(); return super.clone();
} catch (CloneNotSupportedException e) { } catch (CloneNotSupportedException e) {
// this shouldn't happen, since we are Cloneable // this shouldn't happen, since we are Cloneable
throw new InternalError(); throw new InternalError(e);
} }
} }
......
...@@ -1569,7 +1569,7 @@ public abstract class CubicCurve2D implements Shape, Cloneable { ...@@ -1569,7 +1569,7 @@ public abstract class CubicCurve2D implements Shape, Cloneable {
return super.clone(); return super.clone();
} catch (CloneNotSupportedException e) { } catch (CloneNotSupportedException e) {
// this shouldn't happen, since we are Cloneable // this shouldn't happen, since we are Cloneable
throw new InternalError(); throw new InternalError(e);
} }
} }
} }
...@@ -108,7 +108,7 @@ public abstract class Dimension2D implements Cloneable { ...@@ -108,7 +108,7 @@ public abstract class Dimension2D implements Cloneable {
return super.clone(); return super.clone();
} catch (CloneNotSupportedException e) { } catch (CloneNotSupportedException e) {
// this shouldn't happen, since we are Cloneable // this shouldn't happen, since we are Cloneable
throw new InternalError(); throw new InternalError(e);
} }
} }
} }
...@@ -1122,7 +1122,7 @@ public abstract class Line2D implements Shape, Cloneable { ...@@ -1122,7 +1122,7 @@ public abstract class Line2D implements Shape, Cloneable {
return super.clone(); return super.clone();
} catch (CloneNotSupportedException e) { } catch (CloneNotSupportedException e) {
// this shouldn't happen, since we are Cloneable // this shouldn't happen, since we are Cloneable
throw new InternalError(); throw new InternalError(e);
} }
} }
} }
...@@ -393,7 +393,7 @@ public abstract class Point2D implements Cloneable { ...@@ -393,7 +393,7 @@ public abstract class Point2D implements Cloneable {
return super.clone(); return super.clone();
} catch (CloneNotSupportedException e) { } catch (CloneNotSupportedException e) {
// this shouldn't happen, since we are Cloneable // this shouldn't happen, since we are Cloneable
throw new InternalError(); throw new InternalError(e);
} }
} }
......
...@@ -1395,7 +1395,7 @@ public abstract class QuadCurve2D implements Shape, Cloneable { ...@@ -1395,7 +1395,7 @@ public abstract class QuadCurve2D implements Shape, Cloneable {
return super.clone(); return super.clone();
} catch (CloneNotSupportedException e) { } catch (CloneNotSupportedException e) {
// this shouldn't happen, since we are Cloneable // this shouldn't happen, since we are Cloneable
throw new InternalError(); throw new InternalError(e);
} }
} }
} }
...@@ -391,7 +391,7 @@ public abstract class RectangularShape implements Shape, Cloneable { ...@@ -391,7 +391,7 @@ public abstract class RectangularShape implements Shape, Cloneable {
return super.clone(); return super.clone();
} catch (CloneNotSupportedException e) { } catch (CloneNotSupportedException e) {
// this shouldn't happen, since we are Cloneable // this shouldn't happen, since we are Cloneable
throw new InternalError(); throw new InternalError(e);
} }
} }
} }
...@@ -252,7 +252,7 @@ public class ImageFilter implements ImageConsumer, Cloneable { ...@@ -252,7 +252,7 @@ public class ImageFilter implements ImageConsumer, Cloneable {
return super.clone(); return super.clone();
} catch (CloneNotSupportedException e) { } catch (CloneNotSupportedException e) {
// this shouldn't happen, since we are Cloneable // this shouldn't happen, since we are Cloneable
throw new InternalError(); throw new InternalError(e);
} }
} }
} }
...@@ -147,7 +147,7 @@ public class Kernel implements Cloneable { ...@@ -147,7 +147,7 @@ public class Kernel implements Cloneable {
return super.clone(); return super.clone();
} catch (CloneNotSupportedException e) { } catch (CloneNotSupportedException e) {
// this shouldn't happen, since we are Cloneable // this shouldn't happen, since we are Cloneable
throw new InternalError(); throw new InternalError(e);
} }
} }
} }
...@@ -478,7 +478,7 @@ public class ObjectStreamClass implements Serializable { ...@@ -478,7 +478,7 @@ public class ObjectStreamClass implements Serializable {
fieldRefl = getReflector(fields, this); fieldRefl = getReflector(fields, this);
} catch (InvalidClassException ex) { } catch (InvalidClassException ex) {
// field mismatches impossible when matching local fields vs. self // field mismatches impossible when matching local fields vs. self
throw new InternalError(); throw new InternalError(ex);
} }
if (deserializeEx == null) { if (deserializeEx == null) {
...@@ -941,7 +941,7 @@ public class ObjectStreamClass implements Serializable { ...@@ -941,7 +941,7 @@ public class ObjectStreamClass implements Serializable {
return cons.newInstance(); return cons.newInstance();
} catch (IllegalAccessException ex) { } catch (IllegalAccessException ex) {
// should not occur, as access checks have been suppressed // should not occur, as access checks have been suppressed
throw new InternalError(); throw new InternalError(ex);
} }
} else { } else {
throw new UnsupportedOperationException(); throw new UnsupportedOperationException();
...@@ -969,7 +969,7 @@ public class ObjectStreamClass implements Serializable { ...@@ -969,7 +969,7 @@ public class ObjectStreamClass implements Serializable {
} }
} catch (IllegalAccessException ex) { } catch (IllegalAccessException ex) {
// should not occur, as access checks have been suppressed // should not occur, as access checks have been suppressed
throw new InternalError(); throw new InternalError(ex);
} }
} else { } else {
throw new UnsupportedOperationException(); throw new UnsupportedOperationException();
...@@ -1000,7 +1000,7 @@ public class ObjectStreamClass implements Serializable { ...@@ -1000,7 +1000,7 @@ public class ObjectStreamClass implements Serializable {
} }
} catch (IllegalAccessException ex) { } catch (IllegalAccessException ex) {
// should not occur, as access checks have been suppressed // should not occur, as access checks have been suppressed
throw new InternalError(); throw new InternalError(ex);
} }
} else { } else {
throw new UnsupportedOperationException(); throw new UnsupportedOperationException();
...@@ -1028,7 +1028,7 @@ public class ObjectStreamClass implements Serializable { ...@@ -1028,7 +1028,7 @@ public class ObjectStreamClass implements Serializable {
} }
} catch (IllegalAccessException ex) { } catch (IllegalAccessException ex) {
// should not occur, as access checks have been suppressed // should not occur, as access checks have been suppressed
throw new InternalError(); throw new InternalError(ex);
} }
} else { } else {
throw new UnsupportedOperationException(); throw new UnsupportedOperationException();
...@@ -1053,11 +1053,11 @@ public class ObjectStreamClass implements Serializable { ...@@ -1053,11 +1053,11 @@ public class ObjectStreamClass implements Serializable {
throw (ObjectStreamException) th; throw (ObjectStreamException) th;
} else { } else {
throwMiscException(th); throwMiscException(th);
throw new InternalError(); // never reached throw new InternalError(th); // never reached
} }
} catch (IllegalAccessException ex) { } catch (IllegalAccessException ex) {
// should not occur, as access checks have been suppressed // should not occur, as access checks have been suppressed
throw new InternalError(); throw new InternalError(ex);
} }
} else { } else {
throw new UnsupportedOperationException(); throw new UnsupportedOperationException();
...@@ -1082,11 +1082,11 @@ public class ObjectStreamClass implements Serializable { ...@@ -1082,11 +1082,11 @@ public class ObjectStreamClass implements Serializable {
throw (ObjectStreamException) th; throw (ObjectStreamException) th;
} else { } else {
throwMiscException(th); throwMiscException(th);
throw new InternalError(); // never reached throw new InternalError(th); // never reached
} }
} catch (IllegalAccessException ex) { } catch (IllegalAccessException ex) {
// should not occur, as access checks have been suppressed // should not occur, as access checks have been suppressed
throw new InternalError(); throw new InternalError(ex);
} }
} else { } else {
throw new UnsupportedOperationException(); throw new UnsupportedOperationException();
...@@ -1774,7 +1774,7 @@ public class ObjectStreamClass implements Serializable { ...@@ -1774,7 +1774,7 @@ public class ObjectStreamClass implements Serializable {
} }
return hash; return hash;
} catch (IOException ex) { } catch (IOException ex) {
throw new InternalError(); throw new InternalError(ex);
} catch (NoSuchAlgorithmException ex) { } catch (NoSuchAlgorithmException ex) {
throw new SecurityException(ex.getMessage()); throw new SecurityException(ex.getMessage());
} }
......
...@@ -83,7 +83,7 @@ class CharacterName { ...@@ -83,7 +83,7 @@ class CharacterName {
dis.readFully(strPool); dis.readFully(strPool);
refStrPool = new SoftReference<>(strPool); refStrPool = new SoftReference<>(strPool);
} catch (Exception x) { } catch (Exception x) {
throw new InternalError(x.getMessage()); throw new InternalError(x.getMessage(), x);
} finally { } finally {
try { try {
if (dis != null) if (dis != null)
......
...@@ -974,8 +974,7 @@ public final ...@@ -974,8 +974,7 @@ public final
descriptor = (String) enclosingInfo[2]; descriptor = (String) enclosingInfo[2];
assert((name != null && descriptor != null) || name == descriptor); assert((name != null && descriptor != null) || name == descriptor);
} catch (ClassCastException cce) { } catch (ClassCastException cce) {
throw (InternalError) throw new InternalError("Invalid type in enclosing method information", cce);
new InternalError("Invalid type in enclosing method information").initCause(cce);
} }
} }
...@@ -1241,8 +1240,7 @@ public final ...@@ -1241,8 +1240,7 @@ public final
try { try {
return getName().substring(enclosingClass.getName().length()); return getName().substring(enclosingClass.getName().length());
} catch (IndexOutOfBoundsException ex) { } catch (IndexOutOfBoundsException ex) {
throw (InternalError) throw new InternalError("Malformed class name", ex);
new InternalError("Malformed class name").initCause(ex);
} }
} }
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* 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
* under the terms of the GNU General Public License version 2 only, asP * under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this * published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided * particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code. * by Oracle in the LICENSE file that accompanied this code.
......
...@@ -27,7 +27,6 @@ package java.lang.invoke; ...@@ -27,7 +27,6 @@ package java.lang.invoke;
import sun.invoke.empty.Empty; import sun.invoke.empty.Empty;
import sun.misc.Unsafe; import sun.misc.Unsafe;
import static java.lang.invoke.MethodHandleStatics.*;
import static java.lang.invoke.MethodHandles.Lookup.IMPL_LOOKUP; import static java.lang.invoke.MethodHandles.Lookup.IMPL_LOOKUP;
/** /**
...@@ -244,8 +243,8 @@ public class CallSite { ...@@ -244,8 +243,8 @@ public class CallSite {
try { try {
GET_TARGET = IMPL_LOOKUP. GET_TARGET = IMPL_LOOKUP.
findVirtual(CallSite.class, "getTarget", MethodType.methodType(MethodHandle.class)); findVirtual(CallSite.class, "getTarget", MethodType.methodType(MethodHandle.class));
} catch (ReflectiveOperationException ignore) { } catch (ReflectiveOperationException e) {
throw new InternalError(); throw new InternalError(e);
} }
} }
......
...@@ -88,7 +88,7 @@ class Invokers { ...@@ -88,7 +88,7 @@ class Invokers {
try { try {
invoker = IMPL_LOOKUP.findVirtual(MethodHandle.class, name, targetType); invoker = IMPL_LOOKUP.findVirtual(MethodHandle.class, name, targetType);
} catch (ReflectiveOperationException ex) { } catch (ReflectiveOperationException ex) {
throw new InternalError("JVM cannot find invoker for "+targetType); throw new InternalError("JVM cannot find invoker for "+targetType, ex);
} }
assert(invokerType(targetType) == invoker.type()); assert(invokerType(targetType) == invoker.type());
assert(!invoker.isVarargsCollector()); assert(!invoker.isVarargsCollector());
......
...@@ -382,7 +382,7 @@ import static java.lang.invoke.MethodHandleStatics.*; ...@@ -382,7 +382,7 @@ import static java.lang.invoke.MethodHandleStatics.*;
try { try {
return (MemberName) super.clone(); return (MemberName) super.clone();
} catch (CloneNotSupportedException ex) { } catch (CloneNotSupportedException ex) {
throw new InternalError(); throw new InternalError(ex);
} }
} }
......
...@@ -108,9 +108,7 @@ import java.security.PrivilegedAction; ...@@ -108,9 +108,7 @@ import java.security.PrivilegedAction;
return new IllegalArgumentException(message(message, obj, obj2)); return new IllegalArgumentException(message(message, obj, obj2));
} }
/*non-public*/ static Error uncaughtException(Exception ex) { /*non-public*/ static Error uncaughtException(Exception ex) {
Error err = new InternalError("uncaught exception"); throw new InternalError("uncaught exception", ex);
err.initCause(ex);
return err;
} }
private static String message(String message, Object obj) { private static String message(String message, Object obj) {
if (obj != null) message = message + ": " + obj; if (obj != null) message = message + ": " + obj;
......
...@@ -461,7 +461,7 @@ class MethodTypeForm { ...@@ -461,7 +461,7 @@ class MethodTypeForm {
// Trigger adapter creation. // Trigger adapter creation.
genericInvoker = InvokeGeneric.generalInvokerOf(erasedType); genericInvoker = InvokeGeneric.generalInvokerOf(erasedType);
} catch (Exception ex) { } catch (Exception ex) {
Error err = new InternalError("Exception while resolving inexact invoke"); Error err = new InternalError("Exception while resolving inexact invoke", ex);
err.initCause(ex); err.initCause(ex);
throw err; throw err;
} }
......
...@@ -610,7 +610,7 @@ public class Proxy implements java.io.Serializable { ...@@ -610,7 +610,7 @@ public class Proxy implements java.io.Serializable {
IllegalAccessException | IllegalAccessException |
InstantiationException | InstantiationException |
InvocationTargetException e) { InvocationTargetException e) {
throw new InternalError(e.toString()); throw new InternalError(e.toString(), e);
} }
} }
......
...@@ -48,7 +48,7 @@ package java.lang.reflect; ...@@ -48,7 +48,7 @@ package java.lang.reflect;
* *
* @since 1.5 * @since 1.5
*/ */
public interface TypeVariable<D extends GenericDeclaration> extends Type { public interface TypeVariable<D extends GenericDeclaration> extends Type, AnnotatedElement {
/** /**
* Returns an array of {@code Type} objects representing the * Returns an array of {@code Type} objects representing the
* upper bound(s) of this type variable. Note that if no upper bound is * upper bound(s) of this type variable. Note that if no upper bound is
......
/* /*
* Copyright (c) 1996, 2007, 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
...@@ -31,6 +31,7 @@ package java.math; ...@@ -31,6 +31,7 @@ package java.math;
import java.util.Random; import java.util.Random;
import java.io.*; import java.io.*;
import java.util.Arrays;
/** /**
* Immutable arbitrary-precision integers. All operations behave as if * Immutable arbitrary-precision integers. All operations behave as if
...@@ -353,27 +354,17 @@ public class BigInteger extends Number implements Comparable<BigInteger> { ...@@ -353,27 +354,17 @@ public class BigInteger extends Number implements Comparable<BigInteger> {
mag = trustedStripLeadingZeroInts(magnitude); mag = trustedStripLeadingZeroInts(magnitude);
} }
// Constructs a new BigInteger using a char array with radix=10 /*
BigInteger(char[] val) { * Constructs a new BigInteger using a char array with radix=10.
* Sign is precalculated outside and not allowed in the val.
*/
BigInteger(char[] val, int sign, int len) {
int cursor = 0, numDigits; int cursor = 0, numDigits;
int len = val.length;
// Check for leading minus sign
int sign = 1;
if (val[0] == '-') {
if (len == 1)
throw new NumberFormatException("Zero length BigInteger");
sign = -1;
cursor = 1;
} else if (val[0] == '+') {
if (len == 1)
throw new NumberFormatException("Zero length BigInteger");
cursor = 1;
}
// Skip leading zeros and compute number of digits in magnitude // Skip leading zeros and compute number of digits in magnitude
while (cursor < len && Character.digit(val[cursor], 10) == 0) while (cursor < len && Character.digit(val[cursor], 10) == 0) {
cursor++; cursor++;
}
if (cursor == len) { if (cursor == len) {
signum = 0; signum = 0;
mag = ZERO.mag; mag = ZERO.mag;
...@@ -382,7 +373,6 @@ public class BigInteger extends Number implements Comparable<BigInteger> { ...@@ -382,7 +373,6 @@ public class BigInteger extends Number implements Comparable<BigInteger> {
numDigits = len - cursor; numDigits = len - cursor;
signum = sign; signum = sign;
// Pre-allocate array of expected size // Pre-allocate array of expected size
int numWords; int numWords;
if (len < 10) { if (len < 10) {
...@@ -1057,6 +1047,73 @@ public class BigInteger extends Number implements Comparable<BigInteger> { ...@@ -1057,6 +1047,73 @@ public class BigInteger extends Number implements Comparable<BigInteger> {
return new BigInteger(resultMag, cmp == signum ? 1 : -1); return new BigInteger(resultMag, cmp == signum ? 1 : -1);
} }
/**
* Package private methods used by BigDecimal code to add a BigInteger
* with a long. Assumes val is not equal to INFLATED.
*/
BigInteger add(long val) {
if (val == 0)
return this;
if (signum == 0)
return valueOf(val);
if (Long.signum(val) == signum)
return new BigInteger(add(mag, Math.abs(val)), signum);
int cmp = compareMagnitude(val);
if (cmp == 0)
return ZERO;
int[] resultMag = (cmp > 0 ? subtract(mag, Math.abs(val)) : subtract(Math.abs(val), mag));
resultMag = trustedStripLeadingZeroInts(resultMag);
return new BigInteger(resultMag, cmp == signum ? 1 : -1);
}
/**
* Adds the contents of the int array x and long value val. This
* method allocates a new int array to hold the answer and returns
* a reference to that array. Assumes x.length &gt; 0 and val is
* non-negative
*/
private static int[] add(int[] x, long val) {
int[] y;
long sum = 0;
int xIndex = x.length;
int[] result;
int highWord = (int)(val >>> 32);
if (highWord==0) {
result = new int[xIndex];
sum = (x[--xIndex] & LONG_MASK) + val;
result[xIndex] = (int)sum;
} else {
if (xIndex == 1) {
result = new int[2];
sum = val + (x[0] & LONG_MASK);
result[1] = (int)sum;
result[0] = (int)(sum >>> 32);
return result;
} else {
result = new int[xIndex];
sum = (x[--xIndex] & LONG_MASK) + (val & LONG_MASK);
result[xIndex] = (int)sum;
sum = (x[--xIndex] & LONG_MASK) + (highWord & LONG_MASK) + (sum >>> 32);
result[xIndex] = (int)sum;
}
}
// Copy remainder of longer number while carry propagation is required
boolean carry = (sum >>> 32 != 0);
while (xIndex > 0 && carry)
carry = ((result[--xIndex] = x[xIndex] + 1) == 0);
// Copy remainder of longer number
while (xIndex > 0)
result[--xIndex] = x[xIndex];
// Grow result if necessary
if (carry) {
int bigger[] = new int[result.length + 1];
System.arraycopy(result, 0, bigger, 1, result.length);
bigger[0] = 0x01;
return bigger;
}
return result;
}
/** /**
* Adds the contents of the int arrays x and y. This method allocates * Adds the contents of the int arrays x and y. This method allocates
* a new int array to hold the answer and returns a reference to that * a new int array to hold the answer and returns a reference to that
...@@ -1074,14 +1131,17 @@ public class BigInteger extends Number implements Comparable<BigInteger> { ...@@ -1074,14 +1131,17 @@ public class BigInteger extends Number implements Comparable<BigInteger> {
int yIndex = y.length; int yIndex = y.length;
int result[] = new int[xIndex]; int result[] = new int[xIndex];
long sum = 0; long sum = 0;
if(yIndex==1) {
sum = (x[--xIndex] & LONG_MASK) + (y[0] & LONG_MASK) ;
result[xIndex] = (int)sum;
} else {
// Add common parts of both numbers // Add common parts of both numbers
while(yIndex > 0) { while(yIndex > 0) {
sum = (x[--xIndex] & LONG_MASK) + sum = (x[--xIndex] & LONG_MASK) +
(y[--yIndex] & LONG_MASK) + (sum >>> 32); (y[--yIndex] & LONG_MASK) + (sum >>> 32);
result[xIndex] = (int)sum; result[xIndex] = (int)sum;
} }
}
// Copy remainder of longer number while carry propagation is required // Copy remainder of longer number while carry propagation is required
boolean carry = (sum >>> 32 != 0); boolean carry = (sum >>> 32 != 0);
while (xIndex > 0 && carry) while (xIndex > 0 && carry)
...@@ -1101,6 +1161,71 @@ public class BigInteger extends Number implements Comparable<BigInteger> { ...@@ -1101,6 +1161,71 @@ public class BigInteger extends Number implements Comparable<BigInteger> {
return result; return result;
} }
private static int[] subtract(long val, int[] little) {
int highWord = (int)(val >>> 32);
if (highWord==0) {
int result[] = new int[1];
result[0] = (int)(val - (little[0] & LONG_MASK));
return result;
} else {
int result[] = new int[2];
if(little.length==1) {
long difference = ((int)val & LONG_MASK) - (little[0] & LONG_MASK);
result[1] = (int)difference;
// Subtract remainder of longer number while borrow propagates
boolean borrow = (difference >> 32 != 0);
if(borrow) {
result[0] = highWord - 1;
} else { // Copy remainder of longer number
result[0] = highWord;
}
return result;
} else { // little.length==2
long difference = ((int)val & LONG_MASK) - (little[1] & LONG_MASK);
result[1] = (int)difference;
difference = (highWord & LONG_MASK) - (little[0] & LONG_MASK) + (difference >> 32);
result[0] = (int)difference;
return result;
}
}
}
/**
* Subtracts the contents of the second argument (val) from the
* first (big). The first int array (big) must represent a larger number
* than the second. This method allocates the space necessary to hold the
* answer.
* assumes val &gt;= 0
*/
private static int[] subtract(int[] big, long val) {
int highWord = (int)(val >>> 32);
int bigIndex = big.length;
int result[] = new int[bigIndex];
long difference = 0;
if (highWord==0) {
difference = (big[--bigIndex] & LONG_MASK) - val;
result[bigIndex] = (int)difference;
} else {
difference = (big[--bigIndex] & LONG_MASK) - (val & LONG_MASK);
result[bigIndex] = (int)difference;
difference = (big[--bigIndex] & LONG_MASK) - (highWord & LONG_MASK) + (difference >> 32);
result[bigIndex] = (int)difference;
}
// Subtract remainder of longer number while borrow propagates
boolean borrow = (difference >> 32 != 0);
while (bigIndex > 0 && borrow)
borrow = ((result[--bigIndex] = big[bigIndex] - 1) == -1);
// Copy remainder of longer number
while (bigIndex > 0)
result[--bigIndex] = big[bigIndex];
return result;
}
/** /**
* Returns a BigInteger whose value is {@code (this - val)}. * Returns a BigInteger whose value is {@code (this - val)}.
* *
...@@ -1165,11 +1290,39 @@ public class BigInteger extends Number implements Comparable<BigInteger> { ...@@ -1165,11 +1290,39 @@ public class BigInteger extends Number implements Comparable<BigInteger> {
public BigInteger multiply(BigInteger val) { public BigInteger multiply(BigInteger val) {
if (val.signum == 0 || signum == 0) if (val.signum == 0 || signum == 0)
return ZERO; return ZERO;
int resultSign = signum == val.signum ? 1 : -1;
if (val.mag.length == 1) {
return multiplyByInt(mag,val.mag[0], resultSign);
}
if(mag.length == 1) {
return multiplyByInt(val.mag,mag[0], resultSign);
}
int[] result = multiplyToLen(mag, mag.length, int[] result = multiplyToLen(mag, mag.length,
val.mag, val.mag.length, null); val.mag, val.mag.length, null);
result = trustedStripLeadingZeroInts(result); result = trustedStripLeadingZeroInts(result);
return new BigInteger(result, signum == val.signum ? 1 : -1); return new BigInteger(result, resultSign);
}
private static BigInteger multiplyByInt(int[] x, int y, int sign) {
if(Integer.bitCount(y)==1) {
return new BigInteger(shiftLeft(x,Integer.numberOfTrailingZeros(y)), sign);
}
int xlen = x.length;
int[] rmag = new int[xlen + 1];
long carry = 0;
long yl = y & LONG_MASK;
int rstart = rmag.length - 1;
for (int i = xlen - 1; i >= 0; i--) {
long product = (x[i] & LONG_MASK) * yl + carry;
rmag[rstart--] = (int)product;
carry = product >>> 32;
}
if (carry == 0L) {
rmag = java.util.Arrays.copyOfRange(rmag, 1, rmag.length);
} else {
rmag[rstart] = (int)carry;
}
return new BigInteger(rmag, sign);
} }
/** /**
...@@ -1339,8 +1492,8 @@ public class BigInteger extends Number implements Comparable<BigInteger> { ...@@ -1339,8 +1492,8 @@ public class BigInteger extends Number implements Comparable<BigInteger> {
a = new MutableBigInteger(this.mag), a = new MutableBigInteger(this.mag),
b = new MutableBigInteger(val.mag); b = new MutableBigInteger(val.mag);
a.divide(b, q); a.divide(b, q, false);
return q.toBigInteger(this.signum == val.signum ? 1 : -1); return q.toBigInteger(this.signum * val.signum);
} }
/** /**
...@@ -1460,14 +1613,12 @@ public class BigInteger extends Number implements Comparable<BigInteger> { ...@@ -1460,14 +1613,12 @@ public class BigInteger extends Number implements Comparable<BigInteger> {
} else { // Array must be resized } else { // Array must be resized
if (nBits <= (32-bitsInHighWord)) { if (nBits <= (32-bitsInHighWord)) {
int result[] = new int[nInts+len]; int result[] = new int[nInts+len];
for (int i=0; i<len; i++) System.arraycopy(a, 0, result, 0, len);
result[i] = a[i];
primitiveLeftShift(result, result.length, nBits); primitiveLeftShift(result, result.length, nBits);
return result; return result;
} else { } else {
int result[] = new int[nInts+len+1]; int result[] = new int[nInts+len+1];
for (int i=0; i<len; i++) System.arraycopy(a, 0, result, 0, len);
result[i] = a[i];
primitiveRightShift(result, result.length, 32 - nBits); primitiveRightShift(result, result.length, 32 - nBits);
return result; return result;
} }
...@@ -1755,9 +1906,7 @@ public class BigInteger extends Number implements Comparable<BigInteger> { ...@@ -1755,9 +1906,7 @@ public class BigInteger extends Number implements Comparable<BigInteger> {
b = montReduce(b, mod, modLen, inv); b = montReduce(b, mod, modLen, inv);
// Set t to high half of b // Set t to high half of b
int[] t = new int[modLen]; int[] t = Arrays.copyOf(b, modLen);
for(int i=0; i<modLen; i++)
t[i] = b[i];
// Fill in the table with odd powers of the base // Fill in the table with odd powers of the base
for (int i=1; i<tblmask; i++) { for (int i=1; i<tblmask; i++) {
...@@ -1854,14 +2003,11 @@ public class BigInteger extends Number implements Comparable<BigInteger> { ...@@ -1854,14 +2003,11 @@ public class BigInteger extends Number implements Comparable<BigInteger> {
// Convert result out of Montgomery form and return // Convert result out of Montgomery form and return
int[] t2 = new int[2*modLen]; int[] t2 = new int[2*modLen];
for(int i=0; i<modLen; i++) System.arraycopy(b, 0, t2, modLen, modLen);
t2[i+modLen] = b[i];
b = montReduce(t2, mod, modLen, inv); b = montReduce(t2, mod, modLen, inv);
t2 = new int[modLen]; t2 = Arrays.copyOf(b, modLen);
for(int i=0; i<modLen; i++)
t2[i] = b[i];
return new BigInteger(1, t2); return new BigInteger(1, t2);
} }
...@@ -2002,8 +2148,7 @@ public class BigInteger extends Number implements Comparable<BigInteger> { ...@@ -2002,8 +2148,7 @@ public class BigInteger extends Number implements Comparable<BigInteger> {
// Copy remaining ints of mag // Copy remaining ints of mag
int numInts = (p + 31) >>> 5; int numInts = (p + 31) >>> 5;
int[] mag = new int[numInts]; int[] mag = new int[numInts];
for (int i=0; i<numInts; i++) System.arraycopy(this.mag, (this.mag.length - numInts), mag, 0, numInts);
mag[i] = this.mag[i + (this.mag.length - numInts)];
// Mask out any excess bits // Mask out any excess bits
int excessBits = (numInts << 5) - p; int excessBits = (numInts << 5) - p;
...@@ -2069,7 +2214,12 @@ public class BigInteger extends Number implements Comparable<BigInteger> { ...@@ -2069,7 +2214,12 @@ public class BigInteger extends Number implements Comparable<BigInteger> {
return shiftRight(-n); return shiftRight(-n);
} }
} }
int[] newMag = shiftLeft(mag, n);
return new BigInteger(newMag, signum);
}
private static int[] shiftLeft(int[] mag, int n) {
int nInts = n >>> 5; int nInts = n >>> 5;
int nBits = n & 0x1f; int nBits = n & 0x1f;
int magLen = mag.length; int magLen = mag.length;
...@@ -2077,8 +2227,7 @@ public class BigInteger extends Number implements Comparable<BigInteger> { ...@@ -2077,8 +2227,7 @@ public class BigInteger extends Number implements Comparable<BigInteger> {
if (nBits == 0) { if (nBits == 0) {
newMag = new int[magLen + nInts]; newMag = new int[magLen + nInts];
for (int i=0; i<magLen; i++) System.arraycopy(mag, 0, newMag, 0, magLen);
newMag[i] = mag[i];
} else { } else {
int i = 0; int i = 0;
int nBits2 = 32 - nBits; int nBits2 = 32 - nBits;
...@@ -2094,8 +2243,7 @@ public class BigInteger extends Number implements Comparable<BigInteger> { ...@@ -2094,8 +2243,7 @@ public class BigInteger extends Number implements Comparable<BigInteger> {
newMag[i++] = mag[j++] << nBits | mag[j] >>> nBits2; newMag[i++] = mag[j++] << nBits | mag[j] >>> nBits2;
newMag[i] = mag[j] << nBits; newMag[i] = mag[j] << nBits;
} }
return newMag;
return new BigInteger(newMag, signum);
} }
/** /**
...@@ -2132,9 +2280,7 @@ public class BigInteger extends Number implements Comparable<BigInteger> { ...@@ -2132,9 +2280,7 @@ public class BigInteger extends Number implements Comparable<BigInteger> {
if (nBits == 0) { if (nBits == 0) {
int newMagLen = magLen - nInts; int newMagLen = magLen - nInts;
newMag = new int[newMagLen]; newMag = Arrays.copyOf(mag, newMagLen);
for (int i=0; i<newMagLen; i++)
newMag[i] = mag[i];
} else { } else {
int i = 0; int i = 0;
int highBits = mag[0] >>> nBits; int highBits = mag[0] >>> nBits;
...@@ -2405,7 +2551,7 @@ public class BigInteger extends Number implements Comparable<BigInteger> { ...@@ -2405,7 +2551,7 @@ public class BigInteger extends Number implements Comparable<BigInteger> {
if (signum < 0) { if (signum < 0) {
// Check if magnitude is a power of two // Check if magnitude is a power of two
boolean pow2 = (Integer.bitCount(mag[0]) == 1); boolean pow2 = (Integer.bitCount(mag[0]) == 1);
for(int i=1; i< len && pow2; i++) for (int i=1; i< len && pow2; i++)
pow2 = (mag[i] == 0); pow2 = (mag[i] == 0);
n = (pow2 ? magBitLength -1 : magBitLength); n = (pow2 ? magBitLength -1 : magBitLength);
...@@ -2529,6 +2675,49 @@ public class BigInteger extends Number implements Comparable<BigInteger> { ...@@ -2529,6 +2675,49 @@ public class BigInteger extends Number implements Comparable<BigInteger> {
return 0; return 0;
} }
/**
* Version of compareMagnitude that compares magnitude with long value.
* val can't be Long.MIN_VALUE.
*/
final int compareMagnitude(long val) {
assert val != Long.MIN_VALUE;
int[] m1 = mag;
int len = m1.length;
if(len > 2) {
return 1;
}
if (val < 0) {
val = -val;
}
int highWord = (int)(val >>> 32);
if (highWord==0) {
if (len < 1)
return -1;
if (len > 1)
return 1;
int a = m1[0];
int b = (int)val;
if (a != b) {
return ((a & LONG_MASK) < (b & LONG_MASK))? -1 : 1;
}
return 0;
} else {
if (len < 2)
return -1;
int a = m1[0];
int b = highWord;
if (a != b) {
return ((a & LONG_MASK) < (b & LONG_MASK))? -1 : 1;
}
a = m1[1];
b = (int)val;
if (a != b) {
return ((a & LONG_MASK) < (b & LONG_MASK))? -1 : 1;
}
return 0;
}
}
/** /**
* Compares this BigInteger with the specified Object for equality. * Compares this BigInteger with the specified Object for equality.
* *
...@@ -3114,25 +3303,35 @@ public class BigInteger extends Number implements Comparable<BigInteger> { ...@@ -3114,25 +3303,35 @@ public class BigInteger extends Number implements Comparable<BigInteger> {
} }
// Commit final fields via Unsafe // Commit final fields via Unsafe
unsafe.putIntVolatile(this, signumOffset, sign); UnsafeHolder.putSign(this, sign);
// Calculate mag field from magnitude and discard magnitude // Calculate mag field from magnitude and discard magnitude
unsafe.putObjectVolatile(this, magOffset, UnsafeHolder.putMag(this, stripLeadingZeroBytes(magnitude));
stripLeadingZeroBytes(magnitude));
} }
// Support for resetting final fields while deserializing // Support for resetting final fields while deserializing
private static final sun.misc.Unsafe unsafe = sun.misc.Unsafe.getUnsafe(); private static class UnsafeHolder {
private static final sun.misc.Unsafe unsafe;
private static final long signumOffset; private static final long signumOffset;
private static final long magOffset; private static final long magOffset;
static { static {
try { try {
unsafe = sun.misc.Unsafe.getUnsafe();
signumOffset = unsafe.objectFieldOffset signumOffset = unsafe.objectFieldOffset
(BigInteger.class.getDeclaredField("signum")); (BigInteger.class.getDeclaredField("signum"));
magOffset = unsafe.objectFieldOffset magOffset = unsafe.objectFieldOffset
(BigInteger.class.getDeclaredField("mag")); (BigInteger.class.getDeclaredField("mag"));
} catch (Exception ex) { } catch (Exception ex) {
throw new Error(ex); throw new ExceptionInInitializerError(ex);
}
}
static void putSign(BigInteger bi, int sign) {
unsafe.putIntVolatile(bi, signumOffset, sign);
}
static void putMag(BigInteger bi, int[] magnitude) {
unsafe.putObjectVolatile(bi, magOffset, magnitude);
} }
} }
......
...@@ -457,10 +457,10 @@ abstract class AbstractPlainSocketImpl extends SocketImpl ...@@ -457,10 +457,10 @@ abstract class AbstractPlainSocketImpl extends SocketImpl
} }
/* /*
* If connection has been reset then return 0 to indicate * If connection has been reset or shut down for input, then return 0
* there are no buffered bytes. * to indicate there are no buffered bytes.
*/ */
if (isConnectionReset()) { if (isConnectionReset() || shut_rd) {
return 0; return 0;
} }
......
...@@ -174,9 +174,7 @@ class DatagramSocket implements java.io.Closeable { ...@@ -174,9 +174,7 @@ class DatagramSocket implements java.io.Closeable {
* @see SecurityManager#checkListen * @see SecurityManager#checkListen
*/ */
public DatagramSocket() throws SocketException { public DatagramSocket() throws SocketException {
// create a datagram socket. this(new InetSocketAddress(0));
createImpl();
bind(new InetSocketAddress(0));
} }
/** /**
...@@ -221,7 +219,12 @@ class DatagramSocket implements java.io.Closeable { ...@@ -221,7 +219,12 @@ class DatagramSocket implements java.io.Closeable {
// create a datagram socket. // create a datagram socket.
createImpl(); createImpl();
if (bindaddr != null) { if (bindaddr != null) {
try {
bind(bindaddr); bind(bindaddr);
} finally {
if (!isBound())
close();
}
} }
} }
......
...@@ -162,7 +162,12 @@ class MulticastSocket extends DatagramSocket { ...@@ -162,7 +162,12 @@ class MulticastSocket extends DatagramSocket {
setReuseAddress(true); setReuseAddress(true);
if (bindaddr != null) { if (bindaddr != null) {
try {
bind(bindaddr); bind(bindaddr);
} finally {
if (!isBound())
close();
}
} }
} }
......
...@@ -28,7 +28,6 @@ package java.net; ...@@ -28,7 +28,6 @@ package java.net;
import java.io.InputStream; import java.io.InputStream;
import java.io.OutputStream; import java.io.OutputStream;
import java.io.IOException; import java.io.IOException;
import java.io.InterruptedIOException;
import java.nio.channels.SocketChannel; import java.nio.channels.SocketChannel;
import java.security.AccessController; import java.security.AccessController;
import java.security.PrivilegedExceptionAction; import java.security.PrivilegedExceptionAction;
...@@ -421,10 +420,13 @@ class Socket implements java.io.Closeable { ...@@ -421,10 +420,13 @@ class Socket implements java.io.Closeable {
createImpl(stream); createImpl(stream);
if (localAddr != null) if (localAddr != null)
bind(localAddr); bind(localAddr);
if (address != null)
connect(address); connect(address);
} catch (IOException e) { } catch (IOException | IllegalArgumentException | SecurityException e) {
try {
close(); close();
} catch (IOException ce) {
e.addSuppressed(ce);
}
throw e; throw e;
} }
} }
...@@ -1436,8 +1438,9 @@ class Socket implements java.io.Closeable { ...@@ -1436,8 +1438,9 @@ class Socket implements java.io.Closeable {
* Any data sent to the input stream side of the socket is acknowledged * Any data sent to the input stream side of the socket is acknowledged
* and then silently discarded. * and then silently discarded.
* <p> * <p>
* If you read from a socket input stream after invoking * If you read from a socket input stream after invoking this method on the
* shutdownInput() on the socket, the stream will return EOF. * socket, the stream's {@code available} method will return 0, and its
* {@code read} methods will return {@code -1} (end of stream).
* *
* @exception IOException if an I/O error occurs when shutting down this * @exception IOException if an I/O error occurs when shutting down this
* socket. * socket.
......
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册