Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_jdk
提交
88daf2be
D
dragonwell8_jdk
项目概览
openanolis
/
dragonwell8_jdk
通知
4
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
dragonwell8_jdk
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
88daf2be
编写于
1月 24, 2014
作者:
A
asaha
浏览文件
操作
浏览文件
下载
差异文件
Merge
上级
ecd09e04
9a2d11bd
变更
14
隐藏空白更改
内联
并排
Showing
14 changed file
with
459 addition
and
178 deletion
+459
-178
.hgtags
.hgtags
+1
-0
make/Images.gmk
make/Images.gmk
+24
-22
src/macosx/classes/com/apple/laf/AquaFileChooserUI.java
src/macosx/classes/com/apple/laf/AquaFileChooserUI.java
+58
-4
src/share/classes/com/sun/java/swing/plaf/gtk/GTKFileChooserUI.java
...classes/com/sun/java/swing/plaf/gtk/GTKFileChooserUI.java
+65
-4
src/share/classes/com/sun/java/swing/plaf/motif/MotifFileChooserUI.java
...ses/com/sun/java/swing/plaf/motif/MotifFileChooserUI.java
+64
-4
src/share/classes/com/sun/java/swing/plaf/windows/WindowsFileChooserUI.java
...com/sun/java/swing/plaf/windows/WindowsFileChooserUI.java
+64
-3
src/share/classes/java/util/stream/DoubleStream.java
src/share/classes/java/util/stream/DoubleStream.java
+5
-4
src/share/classes/java/util/stream/IntStream.java
src/share/classes/java/util/stream/IntStream.java
+5
-4
src/share/classes/java/util/stream/LongStream.java
src/share/classes/java/util/stream/LongStream.java
+5
-4
src/share/classes/java/util/stream/Stream.java
src/share/classes/java/util/stream/Stream.java
+22
-18
src/share/classes/javax/swing/plaf/metal/MetalFileChooserUI.java
...re/classes/javax/swing/plaf/metal/MetalFileChooserUI.java
+63
-3
src/share/classes/sun/security/provider/certpath/OCSPResponse.java
.../classes/sun/security/provider/certpath/OCSPResponse.java
+19
-1
src/share/classes/sun/swing/AbstractFilterComboBoxModel.java
src/share/classes/sun/swing/AbstractFilterComboBoxModel.java
+0
-104
src/share/classes/sun/swing/plaf/synth/SynthFileChooserUIImpl.java
.../classes/sun/swing/plaf/synth/SynthFileChooserUIImpl.java
+64
-3
未找到文件。
.hgtags
浏览文件 @
88daf2be
...
...
@@ -247,6 +247,7 @@ e1499442453b6b70af6c2b496fa6d364f68c1d12 jdk8-b122
484e16c0a040efeccbe449d163e9c185e6c2b4db jdk8-b123
ae303640bc1cca06f1c6ac887e6b523ceeb425a6 jdk8-b124
ae303640bc1cca06f1c6ac887e6b523ceeb425a6 jdk8-b125
a9088d517f2fa9919886d3d95023c518b59172b8 jdk8-b126
fa2d5a06308f3f36fb09662fa58070a02352f023 jdk8u5-b01
343f4f8ba0982b3516e33c859b01634d919243c4 jdk8u5-b02
c35571198602a5856280d5c7c10bda4e7b769104 jdk8u5-b03
...
...
make/Images.gmk
浏览文件 @
88daf2be
...
...
@@ -321,9 +321,13 @@ $(JDK_IMAGE_DIR)/jre/lib/ext/meta-index: $(JDKJRE_LIB_TARGETS)
################################################################################
# /man dir
#
# All variables in this section are assigned with simple =, without :, to enable
# more selective overriding from the custom version of this file.
#
# Avoid evaluating this whole section on windows for speed and stability
ifneq ($(OPENJDK_TARGET_OS), windows)
JRE_MAN_PAGES
:
= \
JRE_MAN_PAGES = \
java.1 \
jjs.1 \
keytool.1 \
...
...
@@ -374,28 +378,20 @@ ifneq ($(OPENJDK_TARGET_OS), windows)
wsimport.1 \
xjc.1
ifndef OPENJDK
JDK_MAN_PAGES += \
jvisualvm.1 \
jmc.1 \
#
endif
# This variable is potentially overridden in the closed makefile.
MAN_SRC_BASEDIR ?= $(JDK_TOPDIR)/src
ifeq ($(OPENJDK_TARGET_OS), linux)
MAN_SRC_DIR
:
= $(MAN_SRC_BASEDIR)/linux/doc
MAN1_SUBDIR
:
= man
MAN_SRC_DIR = $(MAN_SRC_BASEDIR)/linux/doc
MAN1_SUBDIR = man
endif
ifeq ($(OPENJDK_TARGET_OS), solaris)
MAN_SRC_DIR := $(MAN_SRC_BASEDIR)/solaris/doc
MAN1_SUBDIR := sun/man/man1
JDK_MAN_PAGES := $(filter-out jmc.1, $(JDK_MAN_PAGES))
MAN_SRC_DIR = $(MAN_SRC_BASEDIR)/solaris/doc
MAN1_SUBDIR = sun/man/man1
endif
ifeq ($(OPENJDK_TARGET_OS), macosx)
MAN_SRC_DIR
:
= $(MAN_SRC_BASEDIR)/bsd/doc
MAN1_SUBDIR
:
= man
MAN_SRC_DIR = $(MAN_SRC_BASEDIR)/bsd/doc
MAN1_SUBDIR = man
endif
$(JRE_IMAGE_DIR)/man/man1/%: $(MAN_SRC_DIR)/$(MAN1_SUBDIR)/%
...
...
@@ -470,33 +466,33 @@ ifneq ($(OPENJDK_TARGET_OS), windows)
endif
ifeq ($(OPENJDK_TARGET_OS), linux)
JRE_MAN_PAGE_LIST
:
= $(addprefix $(JRE_IMAGE_DIR)/man/man1/, $(JRE_MAN_PAGES)) \
JRE_MAN_PAGE_LIST = $(addprefix $(JRE_IMAGE_DIR)/man/man1/, $(JRE_MAN_PAGES)) \
$(addprefix $(JRE_IMAGE_DIR)/man/ja_JP.UTF-8/man1/, $(JRE_MAN_PAGES)) \
$(JRE_IMAGE_DIR)/man/ja
JDK_MAN_PAGE_LIST
:
= $(addprefix $(JDK_IMAGE_DIR)/man/man1/, $(JDK_MAN_PAGES)) \
JDK_MAN_PAGE_LIST = $(addprefix $(JDK_IMAGE_DIR)/man/man1/, $(JDK_MAN_PAGES)) \
$(addprefix $(JDK_IMAGE_DIR)/man/ja_JP.UTF-8/man1/, $(JDK_MAN_PAGES)) \
$(JDK_IMAGE_DIR)/man/ja
endif
ifeq ($(OPENJDK_TARGET_OS), solaris)
JRE_MAN_PAGE_LIST
:
= $(addprefix $(JRE_IMAGE_DIR)/man/man1/, $(JRE_MAN_PAGES)) \
JRE_MAN_PAGE_LIST = $(addprefix $(JRE_IMAGE_DIR)/man/man1/, $(JRE_MAN_PAGES)) \
$(addprefix $(JRE_IMAGE_DIR)/man/ja/man1/, $(JRE_MAN_PAGES)) \
$(addprefix $(JRE_IMAGE_DIR)/man/ja_JP.UTF-8/man1/, $(JRE_MAN_PAGES)) \
$(addprefix $(JRE_IMAGE_DIR)/man/ja_JP.PCK/man1/, $(JRE_MAN_PAGES))
JDK_MAN_PAGE_LIST
:
= $(addprefix $(JDK_IMAGE_DIR)/man/man1/, $(JDK_MAN_PAGES)) \
JDK_MAN_PAGE_LIST = $(addprefix $(JDK_IMAGE_DIR)/man/man1/, $(JDK_MAN_PAGES)) \
$(addprefix $(JDK_IMAGE_DIR)/man/ja/man1/, $(JDK_MAN_PAGES)) \
$(addprefix $(JDK_IMAGE_DIR)/man/ja_JP.UTF-8/man1/, $(JDK_MAN_PAGES)) \
$(addprefix $(JDK_IMAGE_DIR)/man/ja_JP.PCK/man1/, $(JDK_MAN_PAGES))
endif
ifeq ($(OPENJDK_TARGET_OS), macosx)
JRE_MAN_PAGE_LIST
:
= $(addprefix $(JRE_IMAGE_DIR)/man/man1/, $(JRE_MAN_PAGES)) \
JRE_MAN_PAGE_LIST = $(addprefix $(JRE_IMAGE_DIR)/man/man1/, $(JRE_MAN_PAGES)) \
$(addprefix $(JRE_IMAGE_DIR)/man/ja_JP.UTF-8/man1/, $(JRE_MAN_PAGES)) \
$(JRE_IMAGE_DIR)/man/ja
JDK_MAN_PAGE_LIST
:
= $(addprefix $(JDK_IMAGE_DIR)/man/man1/, $(JDK_MAN_PAGES)) \
JDK_MAN_PAGE_LIST = $(addprefix $(JDK_IMAGE_DIR)/man/man1/, $(JDK_MAN_PAGES)) \
$(addprefix $(JDK_IMAGE_DIR)/man/ja_JP.UTF-8/man1/, $(JDK_MAN_PAGES)) \
$(JDK_IMAGE_DIR)/man/ja
endif
...
...
@@ -750,6 +746,13 @@ ifneq ($(POST_STRIP_CMD), )
endif
################################################################################
# Include the custom makefile right here, after all variables have been defined
# so that they may be overridden, but before the main targets are declared, so
# that overriding has an effect.
-include $(CUSTOM_MAKE_DIR)/Images.gmk
################################################################################
# Main targets
...
...
@@ -800,4 +803,3 @@ endif # Profile
.PHONY: default images jre-image jdk-image
-include $(CUSTOM_MAKE_DIR)/Images.gmk
src/macosx/classes/com/apple/laf/AquaFileChooserUI.java
浏览文件 @
88daf2be
...
...
@@ -42,7 +42,6 @@ import javax.swing.filechooser.*;
import
javax.swing.plaf.*
;
import
javax.swing.table.*
;
import
sun.swing.AbstractFilterComboBoxModel
;
import
sun.swing.SwingUtilities2
;
public
class
AquaFileChooserUI
extends
FileChooserUI
{
...
...
@@ -1267,9 +1266,64 @@ public class AquaFileChooserUI extends FileChooserUI {
/**
* Data model for a type-face selection combo-box.
*/
protected
class
FilterComboBoxModel
extends
AbstractFilterComboBoxModel
{
protected
JFileChooser
getFileChooser
()
{
return
AquaFileChooserUI
.
this
.
getFileChooser
();
protected
class
FilterComboBoxModel
extends
DefaultListModel
implements
ComboBoxModel
,
PropertyChangeListener
{
int
selectedIndex
=
-
1
;
protected
FilterComboBoxModel
()
{
super
();
final
FileFilter
filters
[]
=
getFileChooser
().
getChoosableFileFilters
();
for
(
int
i
=
0
;
i
<
filters
.
length
;
i
++)
{
this
.
add
(
i
,
filters
[
i
]);
}
}
public
void
propertyChange
(
final
PropertyChangeEvent
e
)
{
final
String
prop
=
e
.
getPropertyName
();
if
(
prop
==
JFileChooser
.
CHOOSABLE_FILE_FILTER_CHANGED_PROPERTY
)
{
this
.
clear
();
final
FileFilter
filters
[]
=
(
FileFilter
[])
e
.
getNewValue
();
for
(
int
i
=
0
;
i
<
filters
.
length
;
i
++)
{
this
.
add
(
i
,
filters
[
i
]);
}
fireContentsChanged
(
this
,
-
1
,
-
1
);
}
else
if
(
prop
==
JFileChooser
.
FILE_FILTER_CHANGED_PROPERTY
)
{
final
FileFilter
currentFilter
=
(
FileFilter
)
e
.
getNewValue
();
FileFilter
filters
[]
=
getFileChooser
().
getChoosableFileFilters
();
boolean
found
=
false
;
if
(
currentFilter
!=
null
)
{
for
(
final
FileFilter
element
:
filters
)
{
if
(
element
==
currentFilter
)
{
found
=
true
;
}
}
if
(
found
==
false
)
{
getFileChooser
().
addChoosableFileFilter
(
currentFilter
);
}
}
filters
=
getFileChooser
().
getChoosableFileFilters
();
setSelectedItem
(
e
.
getNewValue
());
}
}
public
void
setSelectedItem
(
final
Object
filter
)
{
if
(
filter
!=
null
)
{
selectedIndex
=
this
.
indexOf
(
filter
);
fireContentsChanged
(
this
,
-
1
,
-
1
);
}
}
public
Object
getSelectedItem
()
{
final
Object
returnValue
=
null
;
if
(
this
.
size
()
>
0
)
{
if
((
selectedIndex
!=
-
1
)
&&
(
selectedIndex
<
size
()))
{
return
this
.
get
(
selectedIndex
);
}
}
return
returnValue
;
}
}
...
...
src/share/classes/com/sun/java/swing/plaf/gtk/GTKFileChooserUI.java
浏览文件 @
88daf2be
...
...
@@ -41,7 +41,6 @@ import javax.swing.plaf.basic.BasicDirectoryModel;
import
javax.swing.table.*
;
import
javax.accessibility.*
;
import
sun.swing.AbstractFilterComboBoxModel
;
import
sun.swing.SwingUtilities2
;
import
sun.swing.plaf.synth.*
;
...
...
@@ -1329,9 +1328,71 @@ class GTKFileChooserUI extends SynthFileChooserUI {
/**
* Data model for filter combo-box.
*/
protected
class
FilterComboBoxModel
extends
AbstractFilterComboBoxModel
{
protected
JFileChooser
getFileChooser
()
{
return
GTKFileChooserUI
.
this
.
getFileChooser
();
protected
class
FilterComboBoxModel
extends
AbstractListModel
implements
ComboBoxModel
,
PropertyChangeListener
{
protected
FileFilter
[]
filters
;
protected
FilterComboBoxModel
()
{
super
();
filters
=
getFileChooser
().
getChoosableFileFilters
();
}
public
void
propertyChange
(
PropertyChangeEvent
e
)
{
String
prop
=
e
.
getPropertyName
();
if
(
prop
==
JFileChooser
.
CHOOSABLE_FILE_FILTER_CHANGED_PROPERTY
)
{
filters
=
(
FileFilter
[])
e
.
getNewValue
();
fireContentsChanged
(
this
,
-
1
,
-
1
);
}
else
if
(
prop
==
JFileChooser
.
FILE_FILTER_CHANGED_PROPERTY
)
{
fireContentsChanged
(
this
,
-
1
,
-
1
);
}
}
public
void
setSelectedItem
(
Object
filter
)
{
if
(
filter
!=
null
)
{
getFileChooser
().
setFileFilter
((
FileFilter
)
filter
);
fireContentsChanged
(
this
,
-
1
,
-
1
);
}
}
public
Object
getSelectedItem
()
{
// Ensure that the current filter is in the list.
// NOTE: we shouldnt' have to do this, since JFileChooser adds
// the filter to the choosable filters list when the filter
// is set. Lets be paranoid just in case someone overrides
// setFileFilter in JFileChooser.
FileFilter
currentFilter
=
getFileChooser
().
getFileFilter
();
boolean
found
=
false
;
if
(
currentFilter
!=
null
)
{
for
(
FileFilter
filter
:
filters
)
{
if
(
filter
==
currentFilter
)
{
found
=
true
;
}
}
if
(
found
==
false
)
{
getFileChooser
().
addChoosableFileFilter
(
currentFilter
);
}
}
return
getFileChooser
().
getFileFilter
();
}
public
int
getSize
()
{
if
(
filters
!=
null
)
{
return
filters
.
length
;
}
else
{
return
0
;
}
}
public
Object
getElementAt
(
int
index
)
{
if
(
index
>
getSize
()
-
1
)
{
// This shouldn't happen. Try to recover gracefully.
return
getFileChooser
().
getFileFilter
();
}
if
(
filters
!=
null
)
{
return
filters
[
index
];
}
else
{
return
null
;
}
}
}
}
src/share/classes/com/sun/java/swing/plaf/motif/MotifFileChooserUI.java
浏览文件 @
88daf2be
...
...
@@ -38,7 +38,6 @@ import java.io.File;
import
java.io.IOException
;
import
java.util.*
;
import
sun.awt.shell.ShellFolder
;
import
sun.swing.AbstractFilterComboBoxModel
;
import
sun.swing.SwingUtilities2
;
/**
...
...
@@ -778,9 +777,70 @@ public class MotifFileChooserUI extends BasicFileChooserUI {
/**
* Data model for a type-face selection combo-box.
*/
protected
class
FilterComboBoxModel
extends
AbstractFilterComboBoxModel
{
protected
JFileChooser
getFileChooser
()
{
return
MotifFileChooserUI
.
this
.
getFileChooser
();
protected
class
FilterComboBoxModel
extends
AbstractListModel
<
FileFilter
>
implements
ComboBoxModel
<
FileFilter
>,
PropertyChangeListener
{
protected
FileFilter
[]
filters
;
protected
FilterComboBoxModel
()
{
super
();
filters
=
getFileChooser
().
getChoosableFileFilters
();
}
public
void
propertyChange
(
PropertyChangeEvent
e
)
{
String
prop
=
e
.
getPropertyName
();
if
(
prop
.
equals
(
JFileChooser
.
CHOOSABLE_FILE_FILTER_CHANGED_PROPERTY
))
{
filters
=
(
FileFilter
[])
e
.
getNewValue
();
fireContentsChanged
(
this
,
-
1
,
-
1
);
}
else
if
(
prop
.
equals
(
JFileChooser
.
FILE_FILTER_CHANGED_PROPERTY
))
{
fireContentsChanged
(
this
,
-
1
,
-
1
);
}
}
public
void
setSelectedItem
(
Object
filter
)
{
if
(
filter
!=
null
)
{
getFileChooser
().
setFileFilter
((
FileFilter
)
filter
);
fireContentsChanged
(
this
,
-
1
,
-
1
);
}
}
public
Object
getSelectedItem
()
{
// Ensure that the current filter is in the list.
// NOTE: we shouldnt' have to do this, since JFileChooser adds
// the filter to the choosable filters list when the filter
// is set. Lets be paranoid just in case someone overrides
// setFileFilter in JFileChooser.
FileFilter
currentFilter
=
getFileChooser
().
getFileFilter
();
boolean
found
=
false
;
if
(
currentFilter
!=
null
)
{
for
(
FileFilter
filter
:
filters
)
{
if
(
filter
==
currentFilter
)
{
found
=
true
;
}
}
if
(!
found
)
{
getFileChooser
().
addChoosableFileFilter
(
currentFilter
);
}
}
return
getFileChooser
().
getFileFilter
();
}
public
int
getSize
()
{
if
(
filters
!=
null
)
{
return
filters
.
length
;
}
else
{
return
0
;
}
}
public
FileFilter
getElementAt
(
int
index
)
{
if
(
index
>
getSize
()
-
1
)
{
// This shouldn't happen. Try to recover gracefully.
return
getFileChooser
().
getFileFilter
();
}
if
(
filters
!=
null
)
{
return
filters
[
index
];
}
else
{
return
null
;
}
}
}
...
...
src/share/classes/com/sun/java/swing/plaf/windows/WindowsFileChooserUI.java
浏览文件 @
88daf2be
...
...
@@ -1193,9 +1193,70 @@ public class WindowsFileChooserUI extends BasicFileChooserUI {
/**
* Data model for a type-face selection combo-box.
*/
protected
class
FilterComboBoxModel
extends
AbstractFilterComboBoxModel
{
protected
JFileChooser
getFileChooser
()
{
return
WindowsFileChooserUI
.
this
.
getFileChooser
();
protected
class
FilterComboBoxModel
extends
AbstractListModel
<
FileFilter
>
implements
ComboBoxModel
<
FileFilter
>,
PropertyChangeListener
{
protected
FileFilter
[]
filters
;
protected
FilterComboBoxModel
()
{
super
();
filters
=
getFileChooser
().
getChoosableFileFilters
();
}
public
void
propertyChange
(
PropertyChangeEvent
e
)
{
String
prop
=
e
.
getPropertyName
();
if
(
prop
==
JFileChooser
.
CHOOSABLE_FILE_FILTER_CHANGED_PROPERTY
)
{
filters
=
(
FileFilter
[])
e
.
getNewValue
();
fireContentsChanged
(
this
,
-
1
,
-
1
);
}
else
if
(
prop
==
JFileChooser
.
FILE_FILTER_CHANGED_PROPERTY
)
{
fireContentsChanged
(
this
,
-
1
,
-
1
);
}
}
public
void
setSelectedItem
(
Object
filter
)
{
if
(
filter
!=
null
)
{
getFileChooser
().
setFileFilter
((
FileFilter
)
filter
);
fireContentsChanged
(
this
,
-
1
,
-
1
);
}
}
public
Object
getSelectedItem
()
{
// Ensure that the current filter is in the list.
// NOTE: we shouldnt' have to do this, since JFileChooser adds
// the filter to the choosable filters list when the filter
// is set. Lets be paranoid just in case someone overrides
// setFileFilter in JFileChooser.
FileFilter
currentFilter
=
getFileChooser
().
getFileFilter
();
boolean
found
=
false
;
if
(
currentFilter
!=
null
)
{
for
(
FileFilter
filter
:
filters
)
{
if
(
filter
==
currentFilter
)
{
found
=
true
;
}
}
if
(
found
==
false
)
{
getFileChooser
().
addChoosableFileFilter
(
currentFilter
);
}
}
return
getFileChooser
().
getFileFilter
();
}
public
int
getSize
()
{
if
(
filters
!=
null
)
{
return
filters
.
length
;
}
else
{
return
0
;
}
}
public
FileFilter
getElementAt
(
int
index
)
{
if
(
index
>
getSize
()
-
1
)
{
// This shouldn't happen. Try to recover gracefully.
return
getFileChooser
().
getFileFilter
();
}
if
(
filters
!=
null
)
{
return
filters
[
index
];
}
else
{
return
null
;
}
}
}
...
...
src/share/classes/java/util/stream/DoubleStream.java
浏览文件 @
88daf2be
...
...
@@ -150,10 +150,11 @@ public interface DoubleStream extends BaseStream<Double, DoubleStream> {
/**
* Returns a stream consisting of the results of replacing each element of
* this stream with the contents of the stream produced by applying the
* provided mapping function to each element. (If the result of the mapping
* function is {@code null}, this is treated as if the result was an empty
* stream.)
* this stream with the contents of a mapped stream produced by applying
* the provided mapping function to each element. Each mapped stream is
* {@link java.util.stream.BaseStream#close() closed} after its contents
* have been placed into this stream. (If a mapped stream is {@code null}
* an empty stream is used, instead.)
*
* <p>This is an <a href="package-summary.html#StreamOps">intermediate
* operation</a>.
...
...
src/share/classes/java/util/stream/IntStream.java
浏览文件 @
88daf2be
...
...
@@ -146,10 +146,11 @@ public interface IntStream extends BaseStream<Integer, IntStream> {
/**
* Returns a stream consisting of the results of replacing each element of
* this stream with the contents of the stream produced by applying the
* provided mapping function to each element. (If the result of the mapping
* function is {@code null}, this is treated as if the result was an empty
* stream.)
* this stream with the contents of a mapped stream produced by applying
* the provided mapping function to each element. Each mapped stream is
* {@link java.util.stream.BaseStream#close() closed} after its contents
* have been placed into this stream. (If a mapped stream is {@code null}
* an empty stream is used, instead.)
*
* <p>This is an <a href="package-summary.html#StreamOps">intermediate
* operation</a>.
...
...
src/share/classes/java/util/stream/LongStream.java
浏览文件 @
88daf2be
...
...
@@ -151,10 +151,11 @@ public interface LongStream extends BaseStream<Long, LongStream> {
/**
* Returns a stream consisting of the results of replacing each element of
* this stream with the contents of the stream produced by applying the
* provided mapping function to each element. (If the result of the mapping
* function is {@code null}, this is treated as if the result was an empty
* stream.)
* this stream with the contents of a mapped stream produced by applying
* the provided mapping function to each element. Each mapped stream is
* {@link java.util.stream.BaseStream#close() closed} after its contents
* have been placed into this stream. (If a mapped stream is {@code null}
* an empty stream is used, instead.)
*
* <p>This is an <a href="package-summary.html#StreamOps">intermediate
* operation</a>.
...
...
src/share/classes/java/util/stream/Stream.java
浏览文件 @
88daf2be
...
...
@@ -227,10 +227,11 @@ public interface Stream<T> extends BaseStream<T, Stream<T>> {
/**
* Returns a stream consisting of the results of replacing each element of
* this stream with the contents of the stream produced by applying the
* provided mapping function to each element. (If the result of the mapping
* function is {@code null}, this is treated as if the result was an empty
* stream.)
* this stream with the contents of a mapped stream produced by applying
* the provided mapping function to each element. Each mapped stream is
* {@link java.util.stream.BaseStream#close() closed} after its contents
* have been placed into this stream. (If a mapped stream is {@code null}
* an empty stream is used, instead.)
*
* <p>This is an <a href="package-summary.html#StreamOps">intermediate
* operation</a>.
...
...
@@ -270,10 +271,11 @@ public interface Stream<T> extends BaseStream<T, Stream<T>> {
/**
* Returns an {@code IntStream} consisting of the results of replacing each
* element of this stream with the contents of the stream produced by
* applying the provided mapping function to each element. (If the result
* of the mapping function is {@code null}, this is treated as if the result
* was an empty stream.)
* element of this stream with the contents of a mapped stream produced by
* applying the provided mapping function to each element. Each mapped
* stream is {@link java.util.stream.BaseStream#close() closed} after its
* contents have been placed into this stream. (If a mapped stream is
* {@code null} an empty stream is used, instead.)
*
* <p>This is an <a href="package-summary.html#StreamOps">intermediate
* operation</a>.
...
...
@@ -288,11 +290,12 @@ public interface Stream<T> extends BaseStream<T, Stream<T>> {
IntStream
flatMapToInt
(
Function
<?
super
T
,
?
extends
IntStream
>
mapper
);
/**
* Returns a {@code LongStream} consisting of the results of replacing each
* element of this stream with the contents of the stream produced
* by applying the provided mapping function to each element. (If the result
* of the mapping function is {@code null}, this is treated as if the result
* was an empty stream.)
* Returns an {@code LongStream} consisting of the results of replacing each
* element of this stream with the contents of a mapped stream produced by
* applying the provided mapping function to each element. Each mapped
* stream is {@link java.util.stream.BaseStream#close() closed} after its
* contents have been placed into this stream. (If a mapped stream is
* {@code null} an empty stream is used, instead.)
*
* <p>This is an <a href="package-summary.html#StreamOps">intermediate
* operation</a>.
...
...
@@ -307,11 +310,12 @@ public interface Stream<T> extends BaseStream<T, Stream<T>> {
LongStream
flatMapToLong
(
Function
<?
super
T
,
?
extends
LongStream
>
mapper
);
/**
* Returns a {@code DoubleStream} consisting of the results of replacing each
* element of this stream with the contents of the stream produced
* by applying the provided mapping function to each element. (If the result
* of the mapping function is {@code null}, this is treated as if the result
* was an empty stream.)
* Returns an {@code DoubleStream} consisting of the results of replacing
* each element of this stream with the contents of a mapped stream produced
* by applying the provided mapping function to each element. Each mapped
* stream is {@link java.util.stream.BaseStream#close() closed} after its
* contents have placed been into this stream. (If a mapped stream is
* {@code null} an empty stream is used, instead.)
*
* <p>This is an <a href="package-summary.html#StreamOps">intermediate
* operation</a>.
...
...
src/share/classes/javax/swing/plaf/metal/MetalFileChooserUI.java
浏览文件 @
88daf2be
...
...
@@ -1067,9 +1067,69 @@ public class MetalFileChooserUI extends BasicFileChooserUI {
/**
* Data model for a type-face selection combo-box.
*/
protected
class
FilterComboBoxModel
extends
AbstractFilterComboBoxModel
{
protected
JFileChooser
getFileChooser
()
{
return
MetalFileChooserUI
.
this
.
getFileChooser
();
protected
class
FilterComboBoxModel
extends
AbstractListModel
<
Object
>
implements
ComboBoxModel
<
Object
>,
PropertyChangeListener
{
protected
FileFilter
[]
filters
;
protected
FilterComboBoxModel
()
{
super
();
filters
=
getFileChooser
().
getChoosableFileFilters
();
}
public
void
propertyChange
(
PropertyChangeEvent
e
)
{
String
prop
=
e
.
getPropertyName
();
if
(
prop
==
JFileChooser
.
CHOOSABLE_FILE_FILTER_CHANGED_PROPERTY
)
{
filters
=
(
FileFilter
[])
e
.
getNewValue
();
fireContentsChanged
(
this
,
-
1
,
-
1
);
}
else
if
(
prop
==
JFileChooser
.
FILE_FILTER_CHANGED_PROPERTY
)
{
fireContentsChanged
(
this
,
-
1
,
-
1
);
}
}
public
void
setSelectedItem
(
Object
filter
)
{
if
(
filter
!=
null
)
{
getFileChooser
().
setFileFilter
((
FileFilter
)
filter
);
fireContentsChanged
(
this
,
-
1
,
-
1
);
}
}
public
Object
getSelectedItem
()
{
// Ensure that the current filter is in the list.
// NOTE: we shouldnt' have to do this, since JFileChooser adds
// the filter to the choosable filters list when the filter
// is set. Lets be paranoid just in case someone overrides
// setFileFilter in JFileChooser.
FileFilter
currentFilter
=
getFileChooser
().
getFileFilter
();
boolean
found
=
false
;
if
(
currentFilter
!=
null
)
{
for
(
FileFilter
filter
:
filters
)
{
if
(
filter
==
currentFilter
)
{
found
=
true
;
}
}
if
(
found
==
false
)
{
getFileChooser
().
addChoosableFileFilter
(
currentFilter
);
}
}
return
getFileChooser
().
getFileFilter
();
}
public
int
getSize
()
{
if
(
filters
!=
null
)
{
return
filters
.
length
;
}
else
{
return
0
;
}
}
public
Object
getElementAt
(
int
index
)
{
if
(
index
>
getSize
()
-
1
)
{
// This shouldn't happen. Try to recover gracefully.
return
getFileChooser
().
getFileFilter
();
}
if
(
filters
!=
null
)
{
return
filters
[
index
];
}
else
{
return
null
;
}
}
}
...
...
src/share/classes/sun/security/provider/certpath/OCSPResponse.java
浏览文件 @
88daf2be
/*
* Copyright (c) 2003, 201
3
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 201
4
, 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
...
...
@@ -446,10 +446,28 @@ public final class OCSPResponse {
}
}
else
if
(
responderKeyId
!=
null
)
{
for
(
X509CertImpl
cert
:
certs
)
{
// Match responder's key identifier against the cert's SKID
// This will match if the SKID is encoded using the 160-bit
// SHA-1 hash method as defined in RFC 5280.
KeyIdentifier
certKeyId
=
cert
.
getSubjectKeyId
();
if
(
certKeyId
!=
null
&&
responderKeyId
.
equals
(
certKeyId
))
{
signerCert
=
cert
;
break
;
}
else
{
// The certificate does not have a SKID or may have
// been using a different algorithm (ex: see RFC 7093).
// Check if the responder's key identifier matches
// against a newly generated key identifier of the
// cert's public key using the 160-bit SHA-1 method.
try
{
certKeyId
=
new
KeyIdentifier
(
cert
.
getPublicKey
());
}
catch
(
IOException
e
)
{
// ignore
}
if
(
responderKeyId
.
equals
(
certKeyId
))
{
signerCert
=
cert
;
break
;
}
}
}
}
...
...
src/share/classes/sun/swing/AbstractFilterComboBoxModel.java
已删除
100644 → 0
浏览文件 @
ecd09e04
/*
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package
sun.swing
;
import
javax.swing.AbstractListModel
;
import
javax.swing.ComboBoxModel
;
import
javax.swing.JFileChooser
;
import
javax.swing.filechooser.FileFilter
;
import
java.beans.PropertyChangeEvent
;
import
java.beans.PropertyChangeListener
;
/**
* Data model for a type-face selection combo-box.
*/
public
abstract
class
AbstractFilterComboBoxModel
extends
AbstractListModel
<
FileFilter
>
implements
ComboBoxModel
<
FileFilter
>,
PropertyChangeListener
{
protected
FileFilter
[]
filters
;
protected
AbstractFilterComboBoxModel
()
{
this
.
filters
=
getFileChooser
().
getChoosableFileFilters
();
}
protected
abstract
JFileChooser
getFileChooser
();
@Override
public
void
propertyChange
(
PropertyChangeEvent
event
)
{
String
property
=
event
.
getPropertyName
();
if
(
property
==
JFileChooser
.
CHOOSABLE_FILE_FILTER_CHANGED_PROPERTY
)
{
this
.
filters
=
(
FileFilter
[])
event
.
getNewValue
();
fireContentsChanged
(
this
,
-
1
,
-
1
);
}
else
if
(
property
==
JFileChooser
.
FILE_FILTER_CHANGED_PROPERTY
)
{
fireContentsChanged
(
this
,
-
1
,
-
1
);
}
}
@Override
public
void
setSelectedItem
(
Object
filter
)
{
if
(
filter
!=
null
)
{
getFileChooser
().
setFileFilter
((
FileFilter
)
filter
);
fireContentsChanged
(
this
,
-
1
,
-
1
);
}
}
@Override
public
Object
getSelectedItem
()
{
// Ensure that the current filter is in the list.
// NOTE: we should not have to do this, since JFileChooser adds
// the filter to the choosable filters list when the filter
// is set. Lets be paranoid just in case someone overrides
// setFileFilter in JFileChooser.
FileFilter
currentFilter
=
getFileChooser
().
getFileFilter
();
if
(
currentFilter
!=
null
)
{
for
(
FileFilter
filter
:
this
.
filters
)
{
if
(
filter
==
currentFilter
)
{
return
currentFilter
;
}
}
getFileChooser
().
addChoosableFileFilter
(
currentFilter
);
}
return
currentFilter
;
}
@Override
public
int
getSize
()
{
return
(
this
.
filters
!=
null
)
?
filters
.
length
:
0
;
}
@Override
public
FileFilter
getElementAt
(
int
index
)
{
if
(
index
>=
getSize
())
{
// This shouldn't happen. Try to recover gracefully.
return
getFileChooser
().
getFileFilter
();
}
return
(
this
.
filters
!=
null
)
?
filters
[
index
]
:
null
;
}
}
src/share/classes/sun/swing/plaf/synth/SynthFileChooserUIImpl.java
浏览文件 @
88daf2be
...
...
@@ -923,9 +923,70 @@ public class SynthFileChooserUIImpl extends SynthFileChooserUI {
/**
* Data model for a type-face selection combo-box.
*/
protected
class
FilterComboBoxModel
extends
AbstractFilterComboBoxModel
{
protected
JFileChooser
getFileChooser
()
{
return
SynthFileChooserUIImpl
.
this
.
getFileChooser
();
protected
class
FilterComboBoxModel
extends
AbstractListModel
<
FileFilter
>
implements
ComboBoxModel
<
FileFilter
>,
PropertyChangeListener
{
protected
FileFilter
[]
filters
;
protected
FilterComboBoxModel
()
{
super
();
filters
=
getFileChooser
().
getChoosableFileFilters
();
}
public
void
propertyChange
(
PropertyChangeEvent
e
)
{
String
prop
=
e
.
getPropertyName
();
if
(
prop
==
JFileChooser
.
CHOOSABLE_FILE_FILTER_CHANGED_PROPERTY
)
{
filters
=
(
FileFilter
[])
e
.
getNewValue
();
fireContentsChanged
(
this
,
-
1
,
-
1
);
}
else
if
(
prop
==
JFileChooser
.
FILE_FILTER_CHANGED_PROPERTY
)
{
fireContentsChanged
(
this
,
-
1
,
-
1
);
}
}
public
void
setSelectedItem
(
Object
filter
)
{
if
(
filter
!=
null
)
{
getFileChooser
().
setFileFilter
((
FileFilter
)
filter
);
fireContentsChanged
(
this
,
-
1
,
-
1
);
}
}
public
Object
getSelectedItem
()
{
// Ensure that the current filter is in the list.
// NOTE: we shouldnt' have to do this, since JFileChooser adds
// the filter to the choosable filters list when the filter
// is set. Lets be paranoid just in case someone overrides
// setFileFilter in JFileChooser.
FileFilter
currentFilter
=
getFileChooser
().
getFileFilter
();
boolean
found
=
false
;
if
(
currentFilter
!=
null
)
{
for
(
FileFilter
filter
:
filters
)
{
if
(
filter
==
currentFilter
)
{
found
=
true
;
}
}
if
(
found
==
false
)
{
getFileChooser
().
addChoosableFileFilter
(
currentFilter
);
}
}
return
getFileChooser
().
getFileFilter
();
}
public
int
getSize
()
{
if
(
filters
!=
null
)
{
return
filters
.
length
;
}
else
{
return
0
;
}
}
public
FileFilter
getElementAt
(
int
index
)
{
if
(
index
>
getSize
()
-
1
)
{
// This shouldn't happen. Try to recover gracefully.
return
getFileChooser
().
getFileFilter
();
}
if
(
filters
!=
null
)
{
return
filters
[
index
];
}
else
{
return
null
;
}
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录