Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_jdk
提交
837cb624
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看板
提交
837cb624
编写于
10月 15, 2009
作者:
M
michaelm
浏览文件
操作
浏览文件
下载
差异文件
Merge
上级
2ab4f7dc
04ae560f
变更
13
隐藏空白更改
内联
并排
Showing
13 changed file
with
348 addition
and
18 deletion
+348
-18
src/share/classes/com/sun/naming/internal/ResourceManager.java
...hare/classes/com/sun/naming/internal/ResourceManager.java
+50
-3
src/share/classes/java/lang/Enum.java
src/share/classes/java/lang/Enum.java
+7
-0
src/share/classes/java/lang/reflect/AccessibleObject.java
src/share/classes/java/lang/reflect/AccessibleObject.java
+2
-0
src/share/classes/sun/security/provider/SunEntries.java
src/share/classes/sun/security/provider/SunEntries.java
+1
-1
src/share/classes/sun/security/provider/certpath/CertStoreHelper.java
...asses/sun/security/provider/certpath/CertStoreHelper.java
+68
-0
src/share/classes/sun/security/provider/certpath/OCSP.java
src/share/classes/sun/security/provider/certpath/OCSP.java
+4
-0
src/share/classes/sun/security/provider/certpath/OCSPChecker.java
...e/classes/sun/security/provider/certpath/OCSPChecker.java
+4
-4
src/share/classes/sun/security/provider/certpath/URICertStore.java
.../classes/sun/security/provider/certpath/URICertStore.java
+33
-5
src/share/classes/sun/security/provider/certpath/ldap/LDAPCertStore.java
...es/sun/security/provider/certpath/ldap/LDAPCertStore.java
+2
-1
src/share/classes/sun/security/provider/certpath/ldap/LDAPCertStoreHelper.java
.../security/provider/certpath/ldap/LDAPCertStoreHelper.java
+73
-0
test/java/lang/management/RuntimeMXBean/GetSystemProperties.java
...va/lang/management/RuntimeMXBean/GetSystemProperties.java
+19
-1
test/java/lang/management/RuntimeMXBean/PropertiesTest.java
test/java/lang/management/RuntimeMXBean/PropertiesTest.java
+16
-3
test/java/lang/reflect/DefaultAccessibility.java
test/java/lang/reflect/DefaultAccessibility.java
+69
-0
未找到文件。
src/share/classes/com/sun/naming/internal/ResourceManager.java
浏览文件 @
837cb624
...
...
@@ -25,11 +25,12 @@
package
com.sun.naming.internal
;
import
java.applet.Applet
;
import
java.io.InputStream
;
import
java.io.IOException
;
import
java.net.URL
;
import
java.lang.ref.WeakReference
;
import
java.lang.reflect.Method
;
import
java.lang.reflect.InvocationTargetException
;
import
java.util.Enumeration
;
import
java.util.HashMap
;
import
java.util.Hashtable
;
...
...
@@ -112,6 +113,52 @@ public final class ResourceManager {
private
static
final
WeakHashMap
urlFactoryCache
=
new
WeakHashMap
(
11
);
private
static
final
WeakReference
NO_FACTORY
=
new
WeakReference
(
null
);
/**
* A class to allow JNDI properties be specified as applet parameters
* without creating a static dependency on java.applet.
*/
private
static
class
AppletParameter
{
private
static
final
Class
<?>
clazz
=
getClass
(
"java.applet.Applet"
);
private
static
final
Method
getMethod
=
getMethod
(
clazz
,
"getParameter"
,
String
.
class
);
private
static
Class
<?>
getClass
(
String
name
)
{
try
{
return
Class
.
forName
(
name
,
true
,
null
);
}
catch
(
ClassNotFoundException
e
)
{
return
null
;
}
}
private
static
Method
getMethod
(
Class
<?>
clazz
,
String
name
,
Class
<?>...
paramTypes
)
{
if
(
clazz
!=
null
)
{
try
{
return
clazz
.
getMethod
(
name
,
paramTypes
);
}
catch
(
NoSuchMethodException
e
)
{
throw
new
AssertionError
(
e
);
}
}
else
{
return
null
;
}
}
/**
* Returns the value of the applet's named parameter.
*/
static
Object
get
(
Object
applet
,
String
name
)
{
// if clazz is null then applet cannot be an Applet.
if
(
clazz
==
null
||
!
clazz
.
isInstance
(
applet
))
throw
new
ClassCastException
(
applet
.
getClass
().
getName
());
try
{
return
getMethod
.
invoke
(
applet
,
name
);
}
catch
(
InvocationTargetException
e
)
{
throw
new
AssertionError
(
e
);
}
catch
(
IllegalAccessException
iae
)
{
throw
new
AssertionError
(
iae
);
}
}
}
// There should be no instances of this class.
private
ResourceManager
()
{
...
...
@@ -143,7 +190,7 @@ public final class ResourceManager {
if
(
env
==
null
)
{
env
=
new
Hashtable
(
11
);
}
Applet
applet
=
(
Applet
)
env
.
get
(
Context
.
APPLET
);
Object
applet
=
env
.
get
(
Context
.
APPLET
);
// Merge property values from env param, applet params, and system
// properties. The first value wins: there's no concatenation of
...
...
@@ -157,7 +204,7 @@ public final class ResourceManager {
Object
val
=
env
.
get
(
props
[
i
]);
if
(
val
==
null
)
{
if
(
applet
!=
null
)
{
val
=
applet
.
getParameter
(
props
[
i
]);
val
=
AppletParameter
.
get
(
applet
,
props
[
i
]);
}
if
(
val
==
null
)
{
// Read system property.
...
...
src/share/classes/java/lang/Enum.java
浏览文件 @
837cb624
...
...
@@ -40,10 +40,17 @@ import java.io.ObjectStreamException;
* Edition</i>, <a
* href="http://java.sun.com/docs/books/jls/third_edition/html/classes.html#8.9">§8.9</a>.
*
* <p> Note that when using an enumeration type as the type of a set
* or as the type of the keys in a map, specialized and efficient
* {@linkplain java.util.EnumSet set} and {@linkplain
* java.util.EnumMap map} implementations are available.
*
* @param <E> The enum type subclass
* @author Josh Bloch
* @author Neal Gafter
* @see Class#getEnumConstants()
* @see java.util.EnumSet
* @see java.util.EnumMap
* @since 1.5
*/
public
abstract
class
Enum
<
E
extends
Enum
<
E
>>
...
...
src/share/classes/java/lang/reflect/AccessibleObject.java
浏览文件 @
837cb624
...
...
@@ -44,6 +44,8 @@ import java.lang.annotation.Annotation;
* as Java Object Serialization or other persistence mechanisms, to
* manipulate objects in a manner that would normally be prohibited.
*
* <p>By default, a reflected object is <em>not</em> accessible.
*
* @see Field
* @see Method
* @see Constructor
...
...
src/share/classes/sun/security/provider/SunEntries.java
浏览文件 @
837cb624
...
...
@@ -210,7 +210,7 @@ final class SunEntries {
* CertStores
*/
map
.
put
(
"CertStore.LDAP"
,
"sun.security.provider.certpath.LDAPCertStore"
);
"sun.security.provider.certpath.
ldap.
LDAPCertStore"
);
map
.
put
(
"CertStore.LDAP LDAPSchema"
,
"RFC2587"
);
map
.
put
(
"CertStore.Collection"
,
"sun.security.provider.certpath.CollectionCertStore"
);
...
...
src/share/classes/sun/security/provider/certpath/CertStoreHelper.java
0 → 100644
浏览文件 @
837cb624
/*
* Copyright 2009 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Sun designates this
* particular file as subject to the "Classpath" exception as provided
* by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
* CA 95054 USA or visit www.sun.com if you need additional information or
* have any questions.
*/
package
sun.security.provider.certpath
;
import
java.net.URI
;
import
java.util.Collection
;
import
java.security.NoSuchAlgorithmException
;
import
java.security.InvalidAlgorithmParameterException
;
import
java.security.cert.CertStore
;
import
java.security.cert.X509CertSelector
;
import
java.security.cert.X509CRLSelector
;
import
javax.security.auth.x500.X500Principal
;
import
java.io.IOException
;
/**
* Helper used by URICertStore when delegating to another CertStore to
* fetch certs and CRLs.
*/
public
interface
CertStoreHelper
{
/**
* Returns a CertStore using the given URI as parameters.
*/
CertStore
getCertStore
(
URI
uri
)
throws
NoSuchAlgorithmException
,
InvalidAlgorithmParameterException
;
/**
* Wraps an existing X509CertSelector when needing to avoid DN matching
* issues.
*/
X509CertSelector
wrap
(
X509CertSelector
selector
,
X500Principal
certSubject
,
String
dn
)
throws
IOException
;
/**
* Wraps an existing X509CRLSelector when needing to avoid DN matching
* issues.
*/
X509CRLSelector
wrap
(
X509CRLSelector
selector
,
Collection
<
X500Principal
>
certIssuers
,
String
dn
)
throws
IOException
;
}
src/share/classes/sun/security/provider/certpath/OCSP.java
浏览文件 @
837cb624
...
...
@@ -64,6 +64,8 @@ public final class OCSP {
private
static
final
Debug
debug
=
Debug
.
getInstance
(
"certpath"
);
private
static
final
int
CONNECT_TIMEOUT
=
15000
;
// 15 seconds
private
OCSP
()
{}
/**
...
...
@@ -176,6 +178,8 @@ public final class OCSP {
debug
.
println
(
"connecting to OCSP service at: "
+
url
);
}
HttpURLConnection
con
=
(
HttpURLConnection
)
url
.
openConnection
();
con
.
setConnectTimeout
(
CONNECT_TIMEOUT
);
con
.
setReadTimeout
(
CONNECT_TIMEOUT
);
con
.
setDoOutput
(
true
);
con
.
setDoInput
(
true
);
con
.
setRequestMethod
(
"POST"
);
...
...
src/share/classes/sun/security/provider/certpath/OCSPChecker.java
浏览文件 @
837cb624
...
...
@@ -25,7 +25,6 @@
package
sun.security.provider.certpath
;
import
java.io.IOException
;
import
java.math.BigInteger
;
import
java.util.*
;
import
java.security.AccessController
;
...
...
@@ -335,10 +334,11 @@ class OCSPChecker extends PKIXCertPathChecker {
(
issuerCert
,
currCertImpl
.
getSerialNumberObject
());
response
=
OCSP
.
check
(
Collections
.
singletonList
(
certId
),
uri
,
responderCert
,
pkixParams
.
getDate
());
}
catch
(
IOException
ioe
)
{
// should allow this to pass if network failures are acceptable
}
catch
(
Exception
e
)
{
// Wrap all exceptions in CertPathValidatorException so that
// we can fallback to CRLs, if enabled.
throw
new
CertPathValidatorException
(
"Unable to send OCSP request"
,
io
e
);
(
"Unable to send OCSP request"
,
e
);
}
RevocationStatus
rs
=
(
RevocationStatus
)
response
.
getSingleResponse
(
certId
);
...
...
src/share/classes/sun/security/provider/certpath/URICertStore.java
浏览文件 @
837cb624
...
...
@@ -30,6 +30,8 @@ import java.io.IOException;
import
java.net.HttpURLConnection
;
import
java.net.URI
;
import
java.net.URLConnection
;
import
java.security.AccessController
;
import
java.security.PrivilegedAction
;
import
java.security.InvalidAlgorithmParameterException
;
import
java.security.NoSuchAlgorithmException
;
import
java.security.Provider
;
...
...
@@ -120,6 +122,32 @@ class URICertStore extends CertStoreSpi {
private
CertStore
ldapCertStore
;
private
String
ldapPath
;
/**
* Holder class to lazily load LDAPCertStoreHelper if present.
*/
private
static
class
LDAP
{
private
static
final
String
CERT_STORE_HELPER
=
"sun.security.provider.certpath.ldap.LDAPCertStoreHelper"
;
private
static
final
CertStoreHelper
helper
=
AccessController
.
doPrivileged
(
new
PrivilegedAction
<
CertStoreHelper
>()
{
public
CertStoreHelper
run
()
{
try
{
Class
<?>
c
=
Class
.
forName
(
CERT_STORE_HELPER
,
true
,
null
);
return
(
CertStoreHelper
)
c
.
newInstance
();
}
catch
(
ClassNotFoundException
cnf
)
{
return
null
;
}
catch
(
InstantiationException
e
)
{
throw
new
AssertionError
(
e
);
}
catch
(
IllegalAccessException
e
)
{
throw
new
AssertionError
(
e
);
}
}});
static
CertStoreHelper
helper
()
{
return
helper
;
}
}
/**
* Creates a URICertStore.
*
...
...
@@ -135,9 +163,10 @@ class URICertStore extends CertStoreSpi {
this
.
uri
=
((
URICertStoreParameters
)
params
).
uri
;
// if ldap URI, use an LDAPCertStore to fetch certs and CRLs
if
(
uri
.
getScheme
().
toLowerCase
().
equals
(
"ldap"
))
{
if
(
LDAP
.
helper
()
==
null
)
throw
new
NoSuchAlgorithmException
(
"LDAP not present"
);
ldap
=
true
;
ldapCertStore
=
LDAPCertStore
.
getInstance
(
LDAPCertStore
.
getParameters
(
uri
));
ldapCertStore
=
LDAP
.
helper
().
getCertStore
(
uri
);
ldapPath
=
uri
.
getPath
();
// strip off leading '/'
if
(
ldapPath
.
charAt
(
0
)
==
'/'
)
{
...
...
@@ -219,8 +248,7 @@ class URICertStore extends CertStoreSpi {
if
(
ldap
)
{
X509CertSelector
xsel
=
(
X509CertSelector
)
selector
;
try
{
xsel
=
new
LDAPCertStore
.
LDAPCertSelector
(
xsel
,
xsel
.
getSubject
(),
ldapPath
);
xsel
=
LDAP
.
helper
().
wrap
(
xsel
,
xsel
.
getSubject
(),
ldapPath
);
}
catch
(
IOException
ioe
)
{
throw
new
CertStoreException
(
ioe
);
}
...
...
@@ -340,7 +368,7 @@ class URICertStore extends CertStoreSpi {
if
(
ldap
)
{
X509CRLSelector
xsel
=
(
X509CRLSelector
)
selector
;
try
{
xsel
=
new
LDAPCertStore
.
LDAPCRLSelector
(
xsel
,
null
,
ldapPath
);
xsel
=
LDAP
.
helper
().
wrap
(
xsel
,
null
,
ldapPath
);
}
catch
(
IOException
ioe
)
{
throw
new
CertStoreException
(
ioe
);
}
...
...
src/share/classes/sun/security/provider/certpath/LDAPCertStore.java
→
src/share/classes/sun/security/provider/certpath/
ldap/
LDAPCertStore.java
浏览文件 @
837cb624
...
...
@@ -23,7 +23,7 @@
* have any questions.
*/
package
sun.security.provider.certpath
;
package
sun.security.provider.certpath
.ldap
;
import
java.io.ByteArrayInputStream
;
import
java.io.IOException
;
...
...
@@ -46,6 +46,7 @@ import java.security.cert.*;
import
javax.security.auth.x500.X500Principal
;
import
sun.misc.HexDumpEncoder
;
import
sun.security.provider.certpath.X509CertificatePair
;
import
sun.security.util.Cache
;
import
sun.security.util.Debug
;
import
sun.security.x509.X500Name
;
...
...
src/share/classes/sun/security/provider/certpath/ldap/LDAPCertStoreHelper.java
0 → 100644
浏览文件 @
837cb624
/*
* Copyright 2009 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Sun designates this
* particular file as subject to the "Classpath" exception as provided
* by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
* CA 95054 USA or visit www.sun.com if you need additional information or
* have any questions.
*/
package
sun.security.provider.certpath.ldap
;
import
java.net.URI
;
import
java.util.Collection
;
import
java.security.NoSuchAlgorithmException
;
import
java.security.InvalidAlgorithmParameterException
;
import
java.security.cert.CertStore
;
import
java.security.cert.X509CertSelector
;
import
java.security.cert.X509CRLSelector
;
import
javax.security.auth.x500.X500Principal
;
import
java.io.IOException
;
import
sun.security.provider.certpath.CertStoreHelper
;
/**
* LDAP implementation of CertStoreHelper.
*/
public
class
LDAPCertStoreHelper
implements
CertStoreHelper
{
public
LDAPCertStoreHelper
()
{
}
@Override
public
CertStore
getCertStore
(
URI
uri
)
throws
NoSuchAlgorithmException
,
InvalidAlgorithmParameterException
{
return
LDAPCertStore
.
getInstance
(
LDAPCertStore
.
getParameters
(
uri
));
}
@Override
public
X509CertSelector
wrap
(
X509CertSelector
selector
,
X500Principal
certSubject
,
String
ldapDN
)
throws
IOException
{
return
new
LDAPCertStore
.
LDAPCertSelector
(
selector
,
certSubject
,
ldapDN
);
}
@Override
public
X509CRLSelector
wrap
(
X509CRLSelector
selector
,
Collection
<
X500Principal
>
certIssuers
,
String
ldapDN
)
throws
IOException
{
return
new
LDAPCertStore
.
LDAPCRLSelector
(
selector
,
certIssuers
,
ldapDN
);
}
}
test/java/lang/management/RuntimeMXBean/GetSystemProperties.java
浏览文件 @
837cb624
...
...
@@ -49,6 +49,21 @@ public class GetSystemProperties {
private
static
final
String
VALUE4
=
"test.property.value4"
;
public
static
void
main
(
String
[]
argv
)
throws
Exception
{
// Save a copy of the original system properties
Properties
props
=
System
.
getProperties
();
try
{
// replace the system Properties object for any modification
// in case jtreg caches a copy
System
.
setProperties
(
new
Properties
(
props
));
runTest
();
}
finally
{
// restore original system properties
System
.
setProperties
(
props
);
}
}
private
static
void
runTest
()
throws
Exception
{
RuntimeMXBean
mbean
=
ManagementFactory
.
getRuntimeMXBean
();
// Print all system properties
...
...
@@ -88,7 +103,10 @@ public class GetSystemProperties {
Map
<
String
,
String
>
props2
=
mbean
.
getSystemProperties
();
// expect the system properties returned should be
// same as the one before adding KEY3 and KEY4
props1
.
equals
(
props2
);
if
(!
props1
.
equals
(
props2
))
{
throw
new
RuntimeException
(
"Two copies of system properties "
+
"are expected to be equal"
);
}
System
.
out
.
println
(
"Test passed."
);
}
...
...
test/java/lang/management/RuntimeMXBean/PropertiesTest.java
浏览文件 @
837cb624
...
...
@@ -40,8 +40,21 @@ import java.lang.management.RuntimeMXBean;
public
class
PropertiesTest
{
private
static
int
NUM_MYPROPS
=
3
;
public
static
void
main
(
String
[]
argv
)
throws
Exception
{
Properties
sysProps
=
System
.
getProperties
();
// Save a copy of the original system properties
Properties
props
=
System
.
getProperties
();
try
{
// replace the system Properties object for any modification
// in case jtreg caches a copy
System
.
setProperties
(
new
Properties
(
props
));
runTest
(
props
.
size
());
}
finally
{
// restore original system properties
System
.
setProperties
(
props
);
}
}
private
static
void
runTest
(
int
sysPropsCount
)
throws
Exception
{
// Create a new system properties using the old one
// as the defaults
Properties
myProps
=
new
Properties
(
System
.
getProperties
()
);
...
...
@@ -65,10 +78,10 @@ public class PropertiesTest {
System
.
out
.
println
(
i
++
+
": "
+
key
+
" : "
+
value
);
}
if
(
props
.
size
()
!=
NUM_MYPROPS
+
sysProps
.
size
()
)
{
if
(
props
.
size
()
!=
NUM_MYPROPS
+
sysProps
Count
)
{
throw
new
RuntimeException
(
"Test Failed: "
+
"Expected number of properties = "
+
NUM_MYPROPS
+
sysProps
.
size
()
+
NUM_MYPROPS
+
sysProps
Count
+
" but found = "
+
props
.
size
());
}
}
...
...
test/java/lang/reflect/DefaultAccessibility.java
0 → 100644
浏览文件 @
837cb624
/*
* Copyright 2009 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
* CA 95054 USA or visit www.sun.com if you need additional information or
* have any questions.
*/
/*
* @test
* @bug 6648344
* @summary Test that default accessibility is false
* @author Joseph D. Darcy
*/
import
java.lang.reflect.*
;
public
class
DefaultAccessibility
{
private
DefaultAccessibility
()
{
super
();
}
private
static
int
f
=
42
;
public
static
void
main
(
String
...
args
)
throws
Exception
{
Class
<?>
daClass
=
(
new
DefaultAccessibility
()).
getClass
();
int
elementCount
=
0
;
for
(
Constructor
<?>
ctor
:
daClass
.
getDeclaredConstructors
())
{
elementCount
++;
if
(
ctor
.
isAccessible
())
throw
new
RuntimeException
(
"Unexpected accessibility for constructor "
+
ctor
);
}
for
(
Method
method
:
daClass
.
getDeclaredMethods
())
{
elementCount
++;
if
(
method
.
isAccessible
())
throw
new
RuntimeException
(
"Unexpected accessibility for method "
+
method
);
}
for
(
Field
field
:
daClass
.
getDeclaredFields
())
{
elementCount
++;
if
(
field
.
isAccessible
())
throw
new
RuntimeException
(
"Unexpected accessibility for field "
+
field
);
}
if
(
elementCount
<
3
)
throw
new
RuntimeException
(
"Expected at least three members; only found "
+
elementCount
);
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录