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 {
if
(
aCredentials
.
length
<
2
)
{
throw
new
SecurityException
(
"Credentials should have at least two elements"
);
}
String
username
=
(
String
)
aCredentials
[
0
];
String
password
=
(
String
)
aCredentials
[
1
];
String
username
=
aCredentials
[
0
];
String
password
=
aCredentials
[
1
];
try
{
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
*/
private
void
sendToRemoteEntity
(
String
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
)
{
sendToRemoteServer
(
domain
,
multicastService
);
}
...
...
src/java/org/jivesoftware/openfire/XMPPServer.java
View file @
52dfe9ec
...
...
@@ -365,7 +365,7 @@ public class XMPPServer {
// 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.
for
(
String
propName
:
(
List
<
String
>)
JiveGlobals
.
getXMLPropertyNames
())
{
for
(
String
propName
:
JiveGlobals
.
getXMLPropertyNames
())
{
if
(
JiveGlobals
.
getProperty
(
propName
)
==
null
)
{
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 {
// If cache is enabled, see if the auth is in cache.
if
(
authCache
!=
null
&&
authCache
.
containsKey
(
username
))
{
String
hash
=
(
String
)
authCache
.
get
(
username
);
String
hash
=
authCache
.
get
(
username
);
if
(
StringUtils
.
hash
(
password
).
equals
(
hash
))
{
return
;
}
...
...
src/java/org/jivesoftware/openfire/launcher/GraphicUtils.java
View file @
52dfe9ec
...
...
@@ -355,7 +355,7 @@ public final class GraphicUtils {
return
null
;
}
Image
image
=
(
Image
)
imageCache
.
get
(
url
.
toString
());
Image
image
=
imageCache
.
get
(
url
.
toString
());
if
(
image
==
null
)
{
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 {
params
.
addCertPathChecker
(
ocspChecker
);
}
PKIXCertPathValidatorResult
cpvResult
=
(
PKIXCertPathValidatorResult
)
cpv
.
validate
(
cp
,
params
);
X509Certificate
trustedCert
=
(
X509Certificate
)
cpvResult
.
getTrustAnchor
().
getTrustedCert
();
X509Certificate
trustedCert
=
cpvResult
.
getTrustAnchor
().
getTrustedCert
();
if
(
trustedCert
==
null
)
{
throw
new
CertificateException
(
"certificate path failed: Trusted CA is NULL"
);
}
else
{
...
...
src/java/org/jivesoftware/openfire/net/OCSPChecker.java
View file @
52dfe9ec
...
...
@@ -132,7 +132,7 @@ public class OCSPChecker extends PKIXCertPathChecker {
// Set the issuer certificate if we were passed a chain
if
(
certIndex
!=
0
)
{
issuerCert
=
(
X509Certificate
)
(
certs
[
certIndex
])
;
issuerCert
=
certs
[
certIndex
]
;
haveIssuerCert
=
true
;
if
(
haveResponderCert
)
{
...
...
src/java/org/jivesoftware/openfire/net/SASLAuthentication.java
View file @
52dfe9ec
...
...
@@ -581,7 +581,7 @@ public class SASLAuthentication {
authenticationFailed
(
session
,
Failure
.
NOT_AUTHORIZED
);
return
Status
.
failed
;
}
principals
.
addAll
(
CertificateManager
.
getClientIdentities
(
(
X509Certificate
)
trusted
));
principals
.
addAll
(
CertificateManager
.
getClientIdentities
(
trusted
));
if
(
principals
.
size
()
==
1
)
{
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 {
Element
items
=
event
.
addElement
(
"items"
);
items
.
addAttribute
(
"node"
,
leafLastPublishedItem
.
getNodeID
());
Element
item
=
items
.
addElement
(
"item"
);
if
(
((
LeafNode
)
leafLastPublishedItem
.
getNode
()
).
isItemRequired
())
{
if
(
leafLastPublishedItem
.
getNode
(
).
isItemRequired
())
{
item
.
addAttribute
(
"id"
,
leafLastPublishedItem
.
getID
());
}
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 {
* @param password the password to verify.
*/
public
VerifyPasswordCallback
(
char
[]
password
)
{
this
.
password
=
(
password
==
null
?
null
:
(
char
[])
password
.
clone
());
this
.
password
=
(
password
==
null
?
null
:
password
.
clone
());
this
.
verified
=
false
;
}
...
...
@@ -61,7 +61,7 @@ public class VerifyPasswordCallback implements Callback, Serializable {
* @return the retrieved password, which may be null.
*/
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 {
key
=
new
Pair
(
key
,
locale
);
}
FastDateFormat
format
=
(
FastDateFormat
)
cDateInstanceCache
.
get
(
key
);
FastDateFormat
format
=
cDateInstanceCache
.
get
(
key
);
if
(
format
==
null
)
{
int
ds
;
...
...
src/java/org/jivesoftware/util/WebBean.java
View file @
52dfe9ec
...
...
@@ -57,8 +57,8 @@ public abstract class WebBean {
public
void
init
(
PageContext
pageContext
){
this
.
request
=
(
HttpServletRequest
)
pageContext
.
getRequest
();
this
.
response
=
(
HttpServletResponse
)
pageContext
.
getResponse
();
this
.
session
=
(
HttpSession
)
pageContext
.
getSession
();
this
.
application
=
(
ServletContext
)
pageContext
.
getServletContext
();
this
.
out
=
(
JspWriter
)
pageContext
.
getOut
();
this
.
session
=
pageContext
.
getSession
();
this
.
application
=
pageContext
.
getServletContext
();
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 {
toRemove
.
add
(
iter
.
next
());
}
for
(
iter
=
toRemove
.
iterator
();
iter
.
hasNext
();)
{
element
.
remove
(
(
Element
)
iter
.
next
());
element
.
remove
(
iter
.
next
());
}
// Add the new children.
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 {
* If it does, then retain whitespace.
*/
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
if
(
attr
!=
null
)
{
if
(
"xml"
.
equals
(
attr
.
getNamespacePrefix
())
&&
...
...
@@ -852,7 +852,7 @@ public class XMLWriter extends XMLFilterImpl implements LexicalHandler {
if
(
buffer
==
null
)
{
buffer
=
new
StringBuilder
(
lastTextNode
.
getText
()
);
}
buffer
.
append
(
((
Text
)
node
)
.
getText
()
);
buffer
.
append
(
node
.
getText
()
);
}
}
else
{
...
...
src/test/java/org/jivesoftware/util/AdminConsoleTest.java
View file @
52dfe9ec
...
...
@@ -32,7 +32,7 @@ public class AdminConsoleTest {
Class
c
=
AdminConsole
.
class
;
Method
init
=
c
.
getDeclaredMethod
(
"load"
,
(
Class
[])
null
);
init
.
setAccessible
(
true
);
init
.
invoke
(
(
Object
)
null
,
(
Object
[])
null
);
init
.
invoke
(
null
,
(
Object
[])
null
);
}
@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