Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
Openfire
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
Openfire
Commits
52dfe9ec
Commit
52dfe9ec
authored
Oct 30, 2015
by
Christian Schudt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove redundant type casts.
parent
dfb69a76
Changes
15
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
20 additions
and
20 deletions
+20
-20
JMXManager.java
src/java/org/jivesoftware/openfire/JMXManager.java
+2
-2
MulticastRouter.java
src/java/org/jivesoftware/openfire/MulticastRouter.java
+1
-1
XMPPServer.java
src/java/org/jivesoftware/openfire/XMPPServer.java
+1
-1
POP3AuthProvider.java
...java/org/jivesoftware/openfire/auth/POP3AuthProvider.java
+1
-1
GraphicUtils.java
...java/org/jivesoftware/openfire/launcher/GraphicUtils.java
+1
-1
ClientTrustManager.java
...ava/org/jivesoftware/openfire/net/ClientTrustManager.java
+1
-1
OCSPChecker.java
src/java/org/jivesoftware/openfire/net/OCSPChecker.java
+1
-1
SASLAuthentication.java
...ava/org/jivesoftware/openfire/net/SASLAuthentication.java
+1
-1
PEPService.java
src/java/org/jivesoftware/openfire/pep/PEPService.java
+1
-1
VerifyPasswordCallback.java
...rg/jivesoftware/openfire/sasl/VerifyPasswordCallback.java
+2
-2
FastDateFormat.java
src/java/org/jivesoftware/util/FastDateFormat.java
+1
-1
WebBean.java
src/java/org/jivesoftware/util/WebBean.java
+3
-3
XMLProperties.java
src/java/org/jivesoftware/util/XMLProperties.java
+1
-1
XMLWriter.java
src/java/org/jivesoftware/util/XMLWriter.java
+2
-2
AdminConsoleTest.java
src/test/java/org/jivesoftware/util/AdminConsoleTest.java
+1
-1
No files found.
src/java/org/jivesoftware/openfire/JMXManager.java
View file @
52dfe9ec
...
@@ -122,8 +122,8 @@ public class JMXManager {
...
@@ -122,8 +122,8 @@ public class JMXManager {
if
(
aCredentials
.
length
<
2
)
{
if
(
aCredentials
.
length
<
2
)
{
throw
new
SecurityException
(
"Credentials should have at least two elements"
);
throw
new
SecurityException
(
"Credentials should have at least two elements"
);
}
}
String
username
=
(
String
)
aCredentials
[
0
];
String
username
=
aCredentials
[
0
];
String
password
=
(
String
)
aCredentials
[
1
];
String
password
=
aCredentials
[
1
];
try
{
try
{
AuthFactory
.
authenticate
(
username
,
password
);
AuthFactory
.
authenticate
(
username
,
password
);
...
...
src/java/org/jivesoftware/openfire/MulticastRouter.java
View file @
52dfe9ec
...
@@ -195,7 +195,7 @@ public class MulticastRouter extends BasicModule implements ServerFeaturesProvid
...
@@ -195,7 +195,7 @@ public class MulticastRouter extends BasicModule implements ServerFeaturesProvid
*/
*/
private
void
sendToRemoteEntity
(
String
domain
)
{
private
void
sendToRemoteEntity
(
String
domain
)
{
// Check if there is cached information about the requested domain
// Check if there is cached information about the requested domain
String
multicastService
=
(
String
)
cache
.
get
(
domain
);
String
multicastService
=
cache
.
get
(
domain
);
if
(
multicastService
!=
null
)
{
if
(
multicastService
!=
null
)
{
sendToRemoteServer
(
domain
,
multicastService
);
sendToRemoteServer
(
domain
,
multicastService
);
}
}
...
...
src/java/org/jivesoftware/openfire/XMPPServer.java
View file @
52dfe9ec
...
@@ -365,7 +365,7 @@ public class XMPPServer {
...
@@ -365,7 +365,7 @@ public class XMPPServer {
// Iterate through all the provided XML properties and set the ones that haven't
// Iterate through all the provided XML properties and set the ones that haven't
// already been touched by setup prior to this method being called.
// already been touched by setup prior to this method being called.
for
(
String
propName
:
(
List
<
String
>)
JiveGlobals
.
getXMLPropertyNames
())
{
for
(
String
propName
:
JiveGlobals
.
getXMLPropertyNames
())
{
if
(
JiveGlobals
.
getProperty
(
propName
)
==
null
)
{
if
(
JiveGlobals
.
getProperty
(
propName
)
==
null
)
{
JiveGlobals
.
setProperty
(
propName
,
JiveGlobals
.
getXMLProperty
(
propName
));
JiveGlobals
.
setProperty
(
propName
,
JiveGlobals
.
getXMLProperty
(
propName
));
}
}
...
...
src/java/org/jivesoftware/openfire/auth/POP3AuthProvider.java
View file @
52dfe9ec
...
@@ -150,7 +150,7 @@ public class POP3AuthProvider implements AuthProvider {
...
@@ -150,7 +150,7 @@ public class POP3AuthProvider implements AuthProvider {
// If cache is enabled, see if the auth is in cache.
// If cache is enabled, see if the auth is in cache.
if
(
authCache
!=
null
&&
authCache
.
containsKey
(
username
))
{
if
(
authCache
!=
null
&&
authCache
.
containsKey
(
username
))
{
String
hash
=
(
String
)
authCache
.
get
(
username
);
String
hash
=
authCache
.
get
(
username
);
if
(
StringUtils
.
hash
(
password
).
equals
(
hash
))
{
if
(
StringUtils
.
hash
(
password
).
equals
(
hash
))
{
return
;
return
;
}
}
...
...
src/java/org/jivesoftware/openfire/launcher/GraphicUtils.java
View file @
52dfe9ec
...
@@ -355,7 +355,7 @@ public final class GraphicUtils {
...
@@ -355,7 +355,7 @@ public final class GraphicUtils {
return
null
;
return
null
;
}
}
Image
image
=
(
Image
)
imageCache
.
get
(
url
.
toString
());
Image
image
=
imageCache
.
get
(
url
.
toString
());
if
(
image
==
null
)
{
if
(
image
==
null
)
{
image
=
Toolkit
.
getDefaultToolkit
().
createImage
(
url
);
image
=
Toolkit
.
getDefaultToolkit
().
createImage
(
url
);
...
...
src/java/org/jivesoftware/openfire/net/ClientTrustManager.java
View file @
52dfe9ec
...
@@ -303,7 +303,7 @@ public class ClientTrustManager implements X509TrustManager {
...
@@ -303,7 +303,7 @@ public class ClientTrustManager implements X509TrustManager {
params
.
addCertPathChecker
(
ocspChecker
);
params
.
addCertPathChecker
(
ocspChecker
);
}
}
PKIXCertPathValidatorResult
cpvResult
=
(
PKIXCertPathValidatorResult
)
cpv
.
validate
(
cp
,
params
);
PKIXCertPathValidatorResult
cpvResult
=
(
PKIXCertPathValidatorResult
)
cpv
.
validate
(
cp
,
params
);
X509Certificate
trustedCert
=
(
X509Certificate
)
cpvResult
.
getTrustAnchor
().
getTrustedCert
();
X509Certificate
trustedCert
=
cpvResult
.
getTrustAnchor
().
getTrustedCert
();
if
(
trustedCert
==
null
)
{
if
(
trustedCert
==
null
)
{
throw
new
CertificateException
(
"certificate path failed: Trusted CA is NULL"
);
throw
new
CertificateException
(
"certificate path failed: Trusted CA is NULL"
);
}
else
{
}
else
{
...
...
src/java/org/jivesoftware/openfire/net/OCSPChecker.java
View file @
52dfe9ec
...
@@ -132,7 +132,7 @@ public class OCSPChecker extends PKIXCertPathChecker {
...
@@ -132,7 +132,7 @@ public class OCSPChecker extends PKIXCertPathChecker {
// Set the issuer certificate if we were passed a chain
// Set the issuer certificate if we were passed a chain
if
(
certIndex
!=
0
)
{
if
(
certIndex
!=
0
)
{
issuerCert
=
(
X509Certificate
)
(
certs
[
certIndex
])
;
issuerCert
=
certs
[
certIndex
]
;
haveIssuerCert
=
true
;
haveIssuerCert
=
true
;
if
(
haveResponderCert
)
{
if
(
haveResponderCert
)
{
...
...
src/java/org/jivesoftware/openfire/net/SASLAuthentication.java
View file @
52dfe9ec
...
@@ -581,7 +581,7 @@ public class SASLAuthentication {
...
@@ -581,7 +581,7 @@ public class SASLAuthentication {
authenticationFailed
(
session
,
Failure
.
NOT_AUTHORIZED
);
authenticationFailed
(
session
,
Failure
.
NOT_AUTHORIZED
);
return
Status
.
failed
;
return
Status
.
failed
;
}
}
principals
.
addAll
(
CertificateManager
.
getClientIdentities
(
(
X509Certificate
)
trusted
));
principals
.
addAll
(
CertificateManager
.
getClientIdentities
(
trusted
));
if
(
principals
.
size
()
==
1
)
{
if
(
principals
.
size
()
==
1
)
{
principal
=
principals
.
get
(
0
);
principal
=
principals
.
get
(
0
);
...
...
src/java/org/jivesoftware/openfire/pep/PEPService.java
View file @
52dfe9ec
...
@@ -481,7 +481,7 @@ public class PEPService implements PubSubService, Cacheable {
...
@@ -481,7 +481,7 @@ public class PEPService implements PubSubService, Cacheable {
Element
items
=
event
.
addElement
(
"items"
);
Element
items
=
event
.
addElement
(
"items"
);
items
.
addAttribute
(
"node"
,
leafLastPublishedItem
.
getNodeID
());
items
.
addAttribute
(
"node"
,
leafLastPublishedItem
.
getNodeID
());
Element
item
=
items
.
addElement
(
"item"
);
Element
item
=
items
.
addElement
(
"item"
);
if
(
((
LeafNode
)
leafLastPublishedItem
.
getNode
()
).
isItemRequired
())
{
if
(
leafLastPublishedItem
.
getNode
(
).
isItemRequired
())
{
item
.
addAttribute
(
"id"
,
leafLastPublishedItem
.
getID
());
item
.
addAttribute
(
"id"
,
leafLastPublishedItem
.
getID
());
}
}
if
(
leafLastPublishedItem
.
getNode
().
isPayloadDelivered
()
&&
leafLastPublishedItem
.
getPayload
()
!=
null
)
{
if
(
leafLastPublishedItem
.
getNode
().
isPayloadDelivered
()
&&
leafLastPublishedItem
.
getPayload
()
!=
null
)
{
...
...
src/java/org/jivesoftware/openfire/sasl/VerifyPasswordCallback.java
View file @
52dfe9ec
...
@@ -52,7 +52,7 @@ public class VerifyPasswordCallback implements Callback, Serializable {
...
@@ -52,7 +52,7 @@ public class VerifyPasswordCallback implements Callback, Serializable {
* @param password the password to verify.
* @param password the password to verify.
*/
*/
public
VerifyPasswordCallback
(
char
[]
password
)
{
public
VerifyPasswordCallback
(
char
[]
password
)
{
this
.
password
=
(
password
==
null
?
null
:
(
char
[])
password
.
clone
());
this
.
password
=
(
password
==
null
?
null
:
password
.
clone
());
this
.
verified
=
false
;
this
.
verified
=
false
;
}
}
...
@@ -61,7 +61,7 @@ public class VerifyPasswordCallback implements Callback, Serializable {
...
@@ -61,7 +61,7 @@ public class VerifyPasswordCallback implements Callback, Serializable {
* @return the retrieved password, which may be null.
* @return the retrieved password, which may be null.
*/
*/
public
char
[]
getPassword
()
{
public
char
[]
getPassword
()
{
return
(
password
==
null
?
null
:
(
char
[])
password
.
clone
());
return
(
password
==
null
?
null
:
password
.
clone
());
}
}
/**
/**
...
...
src/java/org/jivesoftware/util/FastDateFormat.java
View file @
52dfe9ec
...
@@ -211,7 +211,7 @@ public class FastDateFormat {
...
@@ -211,7 +211,7 @@ public class FastDateFormat {
key
=
new
Pair
(
key
,
locale
);
key
=
new
Pair
(
key
,
locale
);
}
}
FastDateFormat
format
=
(
FastDateFormat
)
cDateInstanceCache
.
get
(
key
);
FastDateFormat
format
=
cDateInstanceCache
.
get
(
key
);
if
(
format
==
null
)
{
if
(
format
==
null
)
{
int
ds
;
int
ds
;
...
...
src/java/org/jivesoftware/util/WebBean.java
View file @
52dfe9ec
...
@@ -57,8 +57,8 @@ public abstract class WebBean {
...
@@ -57,8 +57,8 @@ public abstract class WebBean {
public
void
init
(
PageContext
pageContext
){
public
void
init
(
PageContext
pageContext
){
this
.
request
=
(
HttpServletRequest
)
pageContext
.
getRequest
();
this
.
request
=
(
HttpServletRequest
)
pageContext
.
getRequest
();
this
.
response
=
(
HttpServletResponse
)
pageContext
.
getResponse
();
this
.
response
=
(
HttpServletResponse
)
pageContext
.
getResponse
();
this
.
session
=
(
HttpSession
)
pageContext
.
getSession
();
this
.
session
=
pageContext
.
getSession
();
this
.
application
=
(
ServletContext
)
pageContext
.
getServletContext
();
this
.
application
=
pageContext
.
getServletContext
();
this
.
out
=
(
JspWriter
)
pageContext
.
getOut
();
this
.
out
=
pageContext
.
getOut
();
}
}
}
}
\ No newline at end of file
src/java/org/jivesoftware/util/XMLProperties.java
View file @
52dfe9ec
...
@@ -464,7 +464,7 @@ public class XMLProperties {
...
@@ -464,7 +464,7 @@ public class XMLProperties {
toRemove
.
add
(
iter
.
next
());
toRemove
.
add
(
iter
.
next
());
}
}
for
(
iter
=
toRemove
.
iterator
();
iter
.
hasNext
();)
{
for
(
iter
=
toRemove
.
iterator
();
iter
.
hasNext
();)
{
element
.
remove
(
(
Element
)
iter
.
next
());
element
.
remove
(
iter
.
next
());
}
}
// Add the new children.
// Add the new children.
for
(
String
value
:
values
)
{
for
(
String
value
:
values
)
{
...
...
src/java/org/jivesoftware/util/XMLWriter.java
View file @
52dfe9ec
...
@@ -810,7 +810,7 @@ public class XMLWriter extends XMLFilterImpl implements LexicalHandler {
...
@@ -810,7 +810,7 @@ public class XMLWriter extends XMLFilterImpl implements LexicalHandler {
* If it does, then retain whitespace.
* If it does, then retain whitespace.
*/
*/
protected
final
boolean
isElementSpacePreserved
(
Element
element
)
{
protected
final
boolean
isElementSpacePreserved
(
Element
element
)
{
final
Attribute
attr
=
(
Attribute
)
element
.
attribute
(
"space"
);
final
Attribute
attr
=
element
.
attribute
(
"space"
);
boolean
preserveFound
=
preserve
;
//default to global state
boolean
preserveFound
=
preserve
;
//default to global state
if
(
attr
!=
null
)
{
if
(
attr
!=
null
)
{
if
(
"xml"
.
equals
(
attr
.
getNamespacePrefix
())
&&
if
(
"xml"
.
equals
(
attr
.
getNamespacePrefix
())
&&
...
@@ -852,7 +852,7 @@ public class XMLWriter extends XMLFilterImpl implements LexicalHandler {
...
@@ -852,7 +852,7 @@ public class XMLWriter extends XMLFilterImpl implements LexicalHandler {
if
(
buffer
==
null
)
{
if
(
buffer
==
null
)
{
buffer
=
new
StringBuilder
(
lastTextNode
.
getText
()
);
buffer
=
new
StringBuilder
(
lastTextNode
.
getText
()
);
}
}
buffer
.
append
(
((
Text
)
node
)
.
getText
()
);
buffer
.
append
(
node
.
getText
()
);
}
}
}
}
else
{
else
{
...
...
src/test/java/org/jivesoftware/util/AdminConsoleTest.java
View file @
52dfe9ec
...
@@ -32,7 +32,7 @@ public class AdminConsoleTest {
...
@@ -32,7 +32,7 @@ public class AdminConsoleTest {
Class
c
=
AdminConsole
.
class
;
Class
c
=
AdminConsole
.
class
;
Method
init
=
c
.
getDeclaredMethod
(
"load"
,
(
Class
[])
null
);
Method
init
=
c
.
getDeclaredMethod
(
"load"
,
(
Class
[])
null
);
init
.
setAccessible
(
true
);
init
.
setAccessible
(
true
);
init
.
invoke
(
(
Object
)
null
,
(
Object
[])
null
);
init
.
invoke
(
null
,
(
Object
[])
null
);
}
}
@Test
@Test
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment