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
9d3b8cfa
Commit
9d3b8cfa
authored
Oct 29, 2015
by
Christian Schudt
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #333 from sco0ter/appendchar
Prefer StringBuilder.append(char) over append(String).
parents
7e90fbfc
78bbd89f
Changes
25
Show whitespace changes
Inline
Side-by-side
Showing
25 changed files
with
131 additions
and
131 deletions
+131
-131
AuthCheckFilter.java
src/java/org/jivesoftware/admin/AuthCheckFilter.java
+1
-1
SchemaManager.java
src/java/org/jivesoftware/database/SchemaManager.java
+1
-1
AuditManagerImpl.java
...org/jivesoftware/openfire/audit/spi/AuditManagerImpl.java
+1
-1
ClearspaceVCardTranslator.java
...ftware/openfire/clearspace/ClearspaceVCardTranslator.java
+1
-1
PluginServlet.java
...va/org/jivesoftware/openfire/container/PluginServlet.java
+2
-2
FlashCrossDomainServlet.java
...g/jivesoftware/openfire/http/FlashCrossDomainServlet.java
+3
-3
LdapAuthorizationMapping.java
.../jivesoftware/openfire/ldap/LdapAuthorizationMapping.java
+1
-1
LdapGroupProvider.java
...ava/org/jivesoftware/openfire/ldap/LdapGroupProvider.java
+4
-4
LdapManager.java
src/java/org/jivesoftware/openfire/ldap/LdapManager.java
+8
-8
LdapUserProvider.java
...java/org/jivesoftware/openfire/ldap/LdapUserProvider.java
+4
-4
MultiUserChatServiceImpl.java
...vesoftware/openfire/muc/spi/MultiUserChatServiceImpl.java
+2
-2
DNSUtil.java
src/java/org/jivesoftware/openfire/net/DNSUtil.java
+35
-35
SASLAuthentication.java
...ava/org/jivesoftware/openfire/net/SASLAuthentication.java
+33
-33
SocketReadingMode.java
...java/org/jivesoftware/openfire/net/SocketReadingMode.java
+3
-3
StanzaHandler.java
src/java/org/jivesoftware/openfire/net/StanzaHandler.java
+1
-1
XMLLightweightParser.java
...a/org/jivesoftware/openfire/nio/XMLLightweightParser.java
+1
-1
PubSubModule.java
src/java/org/jivesoftware/openfire/pubsub/PubSubModule.java
+1
-1
PubSubPersistenceManager.java
...ivesoftware/openfire/pubsub/PubSubPersistenceManager.java
+2
-2
PublishedItem.java
src/java/org/jivesoftware/openfire/pubsub/PublishedItem.java
+1
-1
LocalClientSession.java
...org/jivesoftware/openfire/session/LocalClientSession.java
+3
-3
LocalIncomingServerSession.java
...software/openfire/session/LocalIncomingServerSession.java
+6
-6
DefaultUserProvider.java
...a/org/jivesoftware/openfire/user/DefaultUserProvider.java
+2
-2
JDBCUserProvider.java
...java/org/jivesoftware/openfire/user/JDBCUserProvider.java
+5
-5
LocaleUtils.java
src/java/org/jivesoftware/util/LocaleUtils.java
+3
-3
StringUtils.java
src/java/org/jivesoftware/util/StringUtils.java
+7
-7
No files found.
src/java/org/jivesoftware/admin/AuthCheckFilter.java
View file @
9d3b8cfa
...
...
@@ -170,7 +170,7 @@ public class AuthCheckFilter implements Filter {
buf
.
append
(
request
.
getRequestURI
());
String
qs
=
request
.
getQueryString
();
if
(
qs
!=
null
)
{
buf
.
append
(
"?"
).
append
(
qs
);
buf
.
append
(
'?'
).
append
(
qs
);
}
}
catch
(
Exception
e
)
{
...
...
src/java/org/jivesoftware/database/SchemaManager.java
View file @
9d3b8cfa
...
...
@@ -385,7 +385,7 @@ public class SchemaManager {
}
// Ignore comments and blank lines.
if
(
isSQLCommandPart
(
line
))
{
command
.
append
(
" "
).
append
(
line
);
command
.
append
(
' '
).
append
(
line
);
}
if
(
line
.
trim
().
endsWith
(
";"
))
{
break
;
...
...
src/java/org/jivesoftware/openfire/audit/spi/AuditManagerImpl.java
View file @
9d3b8cfa
...
...
@@ -221,7 +221,7 @@ public class AuditManagerImpl extends BasicModule implements AuditManager {
ignoreString
.
append
(
username
);
}
else
{
ignoreString
.
append
(
","
).
append
(
username
);
ignoreString
.
append
(
','
).
append
(
username
);
}
}
JiveGlobals
.
setProperty
(
"xmpp.audit.ignore"
,
ignoreString
.
toString
());
...
...
src/java/org/jivesoftware/openfire/clearspace/ClearspaceVCardTranslator.java
View file @
9d3b8cfa
...
...
@@ -960,7 +960,7 @@ class ClearspaceVCardTranslator {
private
void
translateAddressField
(
Element
addressElement
,
String
vCardFieldName
,
String
fieldName
,
StringBuilder
sb
)
{
String
field
=
addressElement
.
elementTextTrim
(
vCardFieldName
);
if
(
field
!=
null
&&
!
""
.
equals
(
field
))
{
sb
.
append
(
fieldName
).
append
(
":"
).
append
(
field
).
append
(
","
);
sb
.
append
(
fieldName
).
append
(
':'
).
append
(
field
).
append
(
','
);
}
}
...
...
src/java/org/jivesoftware/openfire/container/PluginServlet.java
View file @
9d3b8cfa
...
...
@@ -547,7 +547,7 @@ public class PluginServlet extends HttpServlet {
for
(
URL
url
:
pluginClassloader
.
getURLs
())
{
File
file
=
new
File
(
url
.
getFile
());
classpath
.
append
(
file
.
getAbsolutePath
()).
append
(
";"
);
classpath
.
append
(
file
.
getAbsolutePath
()).
append
(
';'
);
}
// Load all jars from lib
...
...
@@ -568,7 +568,7 @@ public class PluginServlet extends HttpServlet {
classpath
.
append
(
openfireLib
.
getAbsolutePath
()).
append
(
"//jasper-runtime.jar;"
);
if
(
pluginEnv
.
getClassesDir
()
!=
null
)
{
classpath
.
append
(
pluginEnv
.
getClassesDir
().
getAbsolutePath
()).
append
(
";"
);
classpath
.
append
(
pluginEnv
.
getClassesDir
().
getAbsolutePath
()).
append
(
';'
);
}
return
classpath
.
toString
();
}
...
...
src/java/org/jivesoftware/openfire/http/FlashCrossDomainServlet.java
View file @
9d3b8cfa
...
...
@@ -156,7 +156,7 @@ public class FlashCrossDomainServlet extends HttpServlet {
}
if
(
XMPPServer
.
getInstance
().
getConnectionManager
().
getClientSSLListenerPort
()
>
0
)
{
if
(
multiple
)
{
builder
.
append
(
","
);
builder
.
append
(
','
);
}
builder
.
append
(
XMPPServer
.
getInstance
().
getConnectionManager
().
getClientSSLListenerPort
());
multiple
=
true
;
...
...
@@ -166,14 +166,14 @@ public class FlashCrossDomainServlet extends HttpServlet {
// ports for http-binding may not be strictly needed in here, but it doesn't hurt
if
(
HttpBindManager
.
getInstance
().
getHttpBindUnsecurePort
()
>
0
)
{
if
(
multiple
)
{
builder
.
append
(
","
);
builder
.
append
(
','
);
}
builder
.
append
(
HttpBindManager
.
getInstance
().
getHttpBindUnsecurePort
());
multiple
=
true
;
}
if
(
HttpBindManager
.
getInstance
().
isHttpsBindActive
())
{
if
(
multiple
)
{
builder
.
append
(
","
);
builder
.
append
(
','
);
}
builder
.
append
(
HttpBindManager
.
getInstance
().
getHttpBindSecurePort
());
}
...
...
src/java/org/jivesoftware/openfire/ldap/LdapAuthorizationMapping.java
View file @
9d3b8cfa
...
...
@@ -79,7 +79,7 @@ public class LdapAuthorizationMapping implements AuthorizationMapping {
princSearchFilter
=
JiveGlobals
.
getProperty
(
"ldap.princSearchFilter"
);
StringBuilder
filter
=
new
StringBuilder
();
if
(
princSearchFilter
==
null
)
{
filter
.
append
(
"("
).
append
(
princField
).
append
(
"={0})"
);
filter
.
append
(
'('
).
append
(
princField
).
append
(
"={0})"
);
}
else
{
filter
.
append
(
"(&("
).
append
(
princField
).
append
(
"={0})("
);
filter
.
append
(
princSearchFilter
).
append
(
"))"
);
...
...
src/java/org/jivesoftware/openfire/ldap/LdapGroupProvider.java
View file @
9d3b8cfa
...
...
@@ -165,7 +165,7 @@ public class LdapGroupProvider extends AbstractGroupProvider {
StringBuilder
filter
=
new
StringBuilder
();
filter
.
append
(
"(&"
);
filter
.
append
(
MessageFormat
.
format
(
manager
.
getGroupSearchFilter
(),
"*"
));
filter
.
append
(
"("
).
append
(
key
).
append
(
"="
).
append
(
LdapManager
.
sanitizeSearchFilter
(
value
));
filter
.
append
(
'('
).
append
(
key
).
append
(
'='
).
append
(
LdapManager
.
sanitizeSearchFilter
(
value
));
filter
.
append
(
"))"
);
if
(
Log
.
isDebugEnabled
())
{
Log
.
debug
(
"Trying to find group names using query: "
+
filter
.
toString
());
...
...
@@ -191,7 +191,7 @@ public class LdapGroupProvider extends AbstractGroupProvider {
StringBuilder
filter
=
new
StringBuilder
();
// Make the query be a wildcard search by default. So, if the user searches for
// "Test", make the sanitized search be "Test*" instead.
filter
.
append
(
"("
).
append
(
manager
.
getGroupNameField
()).
append
(
"="
)
filter
.
append
(
'('
).
append
(
manager
.
getGroupNameField
()).
append
(
'='
)
.
append
(
LdapManager
.
sanitizeSearchFilter
(
query
)).
append
(
"*)"
);
// Perform the LDAP query
return
manager
.
retrieveList
(
...
...
@@ -268,9 +268,9 @@ public class LdapGroupProvider extends AbstractGroupProvider {
StringBuilder
userFilter
=
new
StringBuilder
();
userFilter
.
append
(
"(&("
);
userFilter
.
append
(
ldapName
.
get
(
ldapName
.
size
()
-
1
));
userFilter
.
append
(
")"
);
userFilter
.
append
(
')'
);
userFilter
.
append
(
MessageFormat
.
format
(
manager
.
getSearchFilter
(),
"*"
));
userFilter
.
append
(
")"
);
userFilter
.
append
(
')'
);
NamingEnumeration
usrAnswer
=
ctx
.
search
(
""
,
userFilter
.
toString
(),
searchControls
);
if
(
usrAnswer
!=
null
&&
usrAnswer
.
hasMoreElements
())
{
...
...
src/java/org/jivesoftware/openfire/ldap/LdapManager.java
View file @
9d3b8cfa
...
...
@@ -1191,11 +1191,11 @@ public class LdapManager {
// Create a correctly-encoded ldap URL for the PROVIDER_URL
ldapURL
.
append
(
"ldap://"
);
ldapURL
.
append
(
host
);
ldapURL
.
append
(
":"
);
ldapURL
.
append
(
':'
);
ldapURL
.
append
(
port
);
ldapURL
.
append
(
"/"
);
ldapURL
.
append
(
'/'
);
ldapURL
.
append
(
baseDN
);
ldapURL
.
append
(
" "
);
ldapURL
.
append
(
' '
);
}
return
ldapURL
.
toString
();
}
...
...
@@ -1224,7 +1224,7 @@ public class LdapManager {
this
.
hosts
=
hosts
;
StringBuilder
hostProperty
=
new
StringBuilder
();
for
(
String
host
:
hosts
)
{
hostProperty
.
append
(
host
).
append
(
","
);
hostProperty
.
append
(
host
).
append
(
','
);
}
if
(!
hosts
.
isEmpty
())
{
// Remove the last comma
...
...
@@ -1604,11 +1604,11 @@ public class LdapManager {
public
String
getSearchFilter
()
{
StringBuilder
filter
=
new
StringBuilder
();
if
(
searchFilter
==
null
)
{
filter
.
append
(
"("
).
append
(
usernameField
).
append
(
"={0})"
);
filter
.
append
(
'('
).
append
(
usernameField
).
append
(
"={0})"
);
}
else
{
filter
.
append
(
"(&("
).
append
(
usernameField
).
append
(
"={0})"
);
filter
.
append
(
searchFilter
).
append
(
")"
);
filter
.
append
(
searchFilter
).
append
(
')'
);
}
return
filter
.
toString
();
}
...
...
@@ -1784,11 +1784,11 @@ public class LdapManager {
public
String
getGroupSearchFilter
()
{
StringBuilder
groupFilter
=
new
StringBuilder
();
if
(
groupSearchFilter
==
null
)
{
groupFilter
.
append
(
"("
).
append
(
groupNameField
).
append
(
"={0})"
);
groupFilter
.
append
(
'('
).
append
(
groupNameField
).
append
(
"={0})"
);
}
else
{
groupFilter
.
append
(
"(&("
).
append
(
groupNameField
).
append
(
"={0})"
);
groupFilter
.
append
(
groupSearchFilter
).
append
(
")"
);
groupFilter
.
append
(
groupSearchFilter
).
append
(
')'
);
}
return
groupFilter
.
toString
();
}
...
...
src/java/org/jivesoftware/openfire/ldap/LdapUserProvider.java
View file @
9d3b8cfa
...
...
@@ -295,7 +295,7 @@ public class LdapUserProvider implements UserProvider {
//are returned from the directory
filter
.
append
(
"(&("
);
filter
.
append
(
MessageFormat
.
format
(
manager
.
getSearchFilter
(),
"*"
));
filter
.
append
(
")"
);
filter
.
append
(
')'
);
if
(
fields
.
size
()
>
1
)
{
filter
.
append
(
"(|"
);
}
...
...
@@ -303,13 +303,13 @@ public class LdapUserProvider implements UserProvider {
String
attribute
=
searchFields
.
get
(
field
);
// Make the query be a wildcard search by default. So, if the user searches for
// "John", make the sanitized search be "John*" instead.
filter
.
append
(
"("
).
append
(
attribute
).
append
(
"="
)
filter
.
append
(
'('
).
append
(
attribute
).
append
(
'='
)
.
append
(
LdapManager
.
sanitizeSearchFilter
(
query
)).
append
(
"*)"
);
}
if
(
fields
.
size
()
>
1
)
{
filter
.
append
(
")"
);
filter
.
append
(
')'
);
}
filter
.
append
(
")"
);
filter
.
append
(
')'
);
List
<
String
>
userlist
=
manager
.
retrieveList
(
manager
.
getUsernameField
(),
filter
.
toString
(),
...
...
src/java/org/jivesoftware/openfire/muc/spi/MultiUserChatServiceImpl.java
View file @
9d3b8cfa
...
...
@@ -1559,7 +1559,7 @@ public class MultiUserChatServiceImpl implements Component, MultiUserChatService
for
(
int
i
=
0
;
i
<
array
.
length
;
i
++)
{
buf
.
append
(
array
[
i
]);
if
(
i
!=
array
.
length
-
1
)
{
buf
.
append
(
","
);
buf
.
append
(
','
);
}
}
return
buf
.
toString
();
...
...
@@ -1574,7 +1574,7 @@ public class MultiUserChatServiceImpl implements Component, MultiUserChatService
private
static
String
fromCollection
(
Collection
<
JID
>
coll
)
{
StringBuilder
buf
=
new
StringBuilder
();
for
(
JID
elem:
coll
)
{
buf
.
append
(
elem
.
toBareJID
()).
append
(
","
);
buf
.
append
(
elem
.
toBareJID
()).
append
(
','
);
}
int
endPos
=
buf
.
length
()
>
1
?
buf
.
length
()
-
1
:
0
;
return
buf
.
substring
(
0
,
endPos
);
...
...
src/java/org/jivesoftware/openfire/net/DNSUtil.java
View file @
9d3b8cfa
...
...
@@ -165,11 +165,11 @@ public class DNSUtil {
StringBuilder
sb
=
new
StringBuilder
(
100
);
for
(
String
key
:
internalDNS
.
keySet
())
{
if
(
sb
.
length
()
>
0
)
{
sb
.
append
(
","
);
sb
.
append
(
','
);
}
sb
.
append
(
"{"
).
append
(
key
).
append
(
","
);
sb
.
append
(
internalDNS
.
get
(
key
).
getHost
()).
append
(
":"
);
sb
.
append
(
internalDNS
.
get
(
key
).
getPort
()).
append
(
"}"
);
sb
.
append
(
'{'
).
append
(
key
).
append
(
','
);
sb
.
append
(
internalDNS
.
get
(
key
).
getHost
()).
append
(
':'
);
sb
.
append
(
internalDNS
.
get
(
key
).
getPort
()).
append
(
'}'
);
}
return
sb
.
toString
();
}
...
...
src/java/org/jivesoftware/openfire/net/SASLAuthentication.java
View file @
9d3b8cfa
...
...
@@ -722,7 +722,7 @@ public class SASLAuthentication {
reply
.
append
(
"<success xmlns=\"urn:ietf:params:xml:ns:xmpp-sasl\""
);
if
(
successData
!=
null
)
{
String
successData_b64
=
StringUtils
.
encodeBase64
(
successData
).
trim
();
reply
.
append
(
">"
).
append
(
successData_b64
).
append
(
"</success>"
);
reply
.
append
(
'>'
).
append
(
successData_b64
).
append
(
"</success>"
);
}
else
{
reply
.
append
(
"/>"
);
...
...
src/java/org/jivesoftware/openfire/net/SocketReadingMode.java
View file @
9d3b8cfa
...
...
@@ -259,9 +259,9 @@ abstract class SocketReadingMode {
sb
.
append
(
"<stream:stream "
);
}
sb
.
append
(
"xmlns:stream=\"http://etherx.jabber.org/streams\" xmlns=\""
);
sb
.
append
(
socketReader
.
getNamespace
()).
append
(
"\""
);
sb
.
append
(
socketReader
.
getNamespace
()).
append
(
'\"'
);
if
(
socketReader
.
getExtraNamespaces
()
!=
null
)
{
sb
.
append
(
" "
);
sb
.
append
(
' '
);
sb
.
append
(
socketReader
.
getExtraNamespaces
());
}
sb
.
append
(
" from=\""
);
...
...
@@ -271,7 +271,7 @@ abstract class SocketReadingMode {
sb
.
append
(
"\" xml:lang=\""
);
sb
.
append
(
socketReader
.
connection
.
getLanguage
());
sb
.
append
(
"\" version=\""
);
sb
.
append
(
Session
.
MAJOR_VERSION
).
append
(
"."
).
append
(
Session
.
MINOR_VERSION
);
sb
.
append
(
Session
.
MAJOR_VERSION
).
append
(
'.'
).
append
(
Session
.
MINOR_VERSION
);
sb
.
append
(
"\">"
);
return
sb
.
toString
();
}
...
...
src/java/org/jivesoftware/openfire/net/StanzaHandler.java
View file @
9d3b8cfa
...
...
@@ -582,7 +582,7 @@ public abstract class StanzaHandler {
sb
.
append
(
"\" xml:lang=\""
);
sb
.
append
(
connection
.
getLanguage
());
sb
.
append
(
"\" version=\""
);
sb
.
append
(
Session
.
MAJOR_VERSION
).
append
(
"."
).
append
(
Session
.
MINOR_VERSION
);
sb
.
append
(
Session
.
MAJOR_VERSION
).
append
(
'.'
).
append
(
Session
.
MINOR_VERSION
);
sb
.
append
(
"\">"
);
return
sb
.
toString
();
}
...
...
src/java/org/jivesoftware/openfire/nio/XMLLightweightParser.java
View file @
9d3b8cfa
...
...
@@ -353,7 +353,7 @@ class XMLLightweightParser {
}
else
if
(
status
==
XMLLightweightParser
.
HEAD
)
{
if
(
ch
==
' '
||
ch
==
'>'
)
{
// Append > to head to allow searching </tag>
head
.
append
(
">"
);
head
.
append
(
'>'
);
if
(
ch
==
'>'
)
status
=
XMLLightweightParser
.
OUTSIDE
;
else
...
...
src/java/org/jivesoftware/openfire/pubsub/PubSubModule.java
View file @
9d3b8cfa
...
...
@@ -756,7 +756,7 @@ public class PubSubModule extends BasicModule implements ServerItemsProvider, Di
for
(
int
i
=
0
;
i
<
array
.
length
;
i
++)
{
buf
.
append
(
array
[
i
]);
if
(
i
!=
array
.
length
-
1
)
{
buf
.
append
(
","
);
buf
.
append
(
','
);
}
}
return
buf
.
toString
();
...
...
src/java/org/jivesoftware/openfire/pubsub/PubSubPersistenceManager.java
View file @
9d3b8cfa
...
...
@@ -1818,14 +1818,14 @@ public class PubSubPersistenceManager {
private
static
String
encodeWithComma
(
Collection
<
String
>
strings
)
{
StringBuilder
sb
=
new
StringBuilder
(
90
);
for
(
String
group
:
strings
)
{
sb
.
append
(
group
).
append
(
","
);
sb
.
append
(
group
).
append
(
','
);
}
if
(!
strings
.
isEmpty
())
{
sb
.
setLength
(
sb
.
length
()-
1
);
}
else
{
// Add a blank so an empty string is never replaced with NULL (oracle...arggg!!!)
sb
.
append
(
" "
);
sb
.
append
(
' '
);
}
return
sb
.
toString
();
}
...
...
src/java/org/jivesoftware/openfire/pubsub/PublishedItem.java
View file @
9d3b8cfa
...
...
@@ -308,6 +308,6 @@ public class PublishedItem implements Serializable {
*/
public
static
String
getItemKey
(
String
nodeId
,
String
itemId
)
{
return
new
StringBuilder
(
nodeId
)
.
append
(
":"
).
append
(
itemId
).
toString
();
.
append
(
':'
).
append
(
itemId
).
toString
();
}
}
src/java/org/jivesoftware/openfire/session/LocalClientSession.java
View file @
9d3b8cfa
...
...
@@ -300,7 +300,7 @@ public class LocalClientSession extends LocalSession implements ClientSession {
// Don't include version info if the version is 0.0.
if
(
majorVersion
!=
0
)
{
sb
.
append
(
"\" version=\""
);
sb
.
append
(
majorVersion
).
append
(
"."
).
append
(
minorVersion
);
sb
.
append
(
majorVersion
).
append
(
'.'
).
append
(
minorVersion
);
}
sb
.
append
(
"\">"
);
connection
.
deliverRawText
(
sb
.
toString
());
...
...
src/java/org/jivesoftware/openfire/session/LocalIncomingServerSession.java
View file @
9d3b8cfa
...
...
@@ -139,7 +139,7 @@ public class LocalIncomingServerSession extends LocalServerSession implements In
if
(
serverVersion
[
0
]
>=
1
)
{
openingStream
.
append
(
" version=\"1.0\">"
);
}
else
{
openingStream
.
append
(
">"
);
openingStream
.
append
(
'>'
);
}
connection
.
deliverRawText
(
openingStream
.
toString
());
...
...
src/java/org/jivesoftware/openfire/user/DefaultUserProvider.java
View file @
9d3b8cfa
...
...
@@ -500,10 +500,10 @@ public class DefaultUserProvider implements UserProvider {
sb
.
delete
(
0
,
sb
.
length
());
count
=
0
;
}
sb
.
append
(
element
).
append
(
","
);
sb
.
append
(
element
).
append
(
','
);
count
++;
}
sb
.
append
(
"."
);
sb
.
append
(
'.'
);
Log
.
debug
(
callingMethod
+
" results: "
+
sb
.
toString
());
}
}
src/java/org/jivesoftware/openfire/user/JDBCUserProvider.java
View file @
9d3b8cfa
...
...
@@ -319,7 +319,7 @@ public class JDBCUserProvider implements UserProvider {
sql
.
append
(
searchSQL
);
boolean
first
=
true
;
if
(
fields
.
contains
(
"Username"
))
{
sql
.
append
(
" "
);
sql
.
append
(
' '
);
sql
.
append
(
usernameField
);
sql
.
append
(
" LIKE ?"
);
queries
++;
...
...
@@ -329,7 +329,7 @@ public class JDBCUserProvider implements UserProvider {
if
(!
first
)
{
sql
.
append
(
" AND"
);
}
sql
.
append
(
" "
);
sql
.
append
(
' '
);
sql
.
append
(
nameField
);
sql
.
append
(
" LIKE ?"
);
queries
++;
...
...
@@ -339,7 +339,7 @@ public class JDBCUserProvider implements UserProvider {
if
(!
first
)
{
sql
.
append
(
" AND"
);
}
sql
.
append
(
" "
);
sql
.
append
(
' '
);
sql
.
append
(
emailField
);
sql
.
append
(
" LIKE ?"
);
queries
++;
...
...
@@ -416,10 +416,10 @@ public class JDBCUserProvider implements UserProvider {
sb
.
delete
(
0
,
sb
.
length
());
count
=
0
;
}
sb
.
append
(
element
).
append
(
","
);
sb
.
append
(
element
).
append
(
','
);
count
++;
}
sb
.
append
(
"."
);
sb
.
append
(
'.'
);
Log
.
debug
(
callingMethod
+
" results: "
+
sb
.
toString
());
}
...
...
src/java/org/jivesoftware/util/LocaleUtils.java
View file @
9d3b8cfa
...
...
@@ -307,7 +307,7 @@ public class LocaleUtils {
offset
+=
(
int
)
JiveConstants
.
HOUR
;
}
buf
.
append
(
"("
);
buf
.
append
(
'('
);
if
(
offset
<
0
)
{
buf
.
append
(
"GMT-"
);
}
...
...
@@ -317,9 +317,9 @@ public class LocaleUtils {
offset
=
Math
.
abs
(
offset
);
int
hours
=
offset
/
(
int
)
JiveConstants
.
HOUR
;
int
minutes
=
(
offset
%
(
int
)
JiveConstants
.
HOUR
)
/
(
int
)
JiveConstants
.
MINUTE
;
buf
.
append
(
hours
).
append
(
":"
);
buf
.
append
(
hours
).
append
(
':'
);
if
(
minutes
<
10
)
{
buf
.
append
(
"0"
).
append
(
minutes
);
buf
.
append
(
'0'
).
append
(
minutes
);
}
else
{
buf
.
append
(
minutes
);
...
...
src/java/org/jivesoftware/util/StringUtils.java
View file @
9d3b8cfa
...
...
@@ -458,7 +458,7 @@ public class StringUtils {
for
(
i
=
0
;
i
<
bytes
.
length
;
i
++)
{
if
(((
int
)
bytes
[
i
]
&
0xff
)
<
0x10
)
{
buf
.
append
(
"0"
);
buf
.
append
(
'0'
);
}
buf
.
append
(
Long
.
toString
((
int
)
bytes
[
i
]
&
0xff
,
16
));
}
...
...
@@ -1010,7 +1010,7 @@ public class StringUtils {
else
if
(
delta
<
JiveConstants
.
HOUR
)
{
long
mins
=
delta
/
JiveConstants
.
MINUTE
;
StringBuilder
sb
=
new
StringBuilder
();
sb
.
append
(
mins
).
append
(
" "
);
sb
.
append
(
mins
).
append
(
' '
);
sb
.
append
((
mins
==
1
)
?
LocaleUtils
.
getLocalizedString
(
"global.minute"
)
:
LocaleUtils
.
getLocalizedString
(
"global.minutes"
));
return
sb
.
toString
();
}
...
...
@@ -1019,10 +1019,10 @@ public class StringUtils {
delta
-=
hours
*
JiveConstants
.
HOUR
;
long
mins
=
delta
/
JiveConstants
.
MINUTE
;
StringBuilder
sb
=
new
StringBuilder
();
sb
.
append
(
hours
).
append
(
" "
);
sb
.
append
(
hours
).
append
(
' '
);
sb
.
append
((
hours
==
1
)
?
LocaleUtils
.
getLocalizedString
(
"global.hour"
)
:
LocaleUtils
.
getLocalizedString
(
"global.hours"
));
sb
.
append
(
", "
);
sb
.
append
(
mins
).
append
(
" "
);
sb
.
append
(
mins
).
append
(
' '
);
sb
.
append
((
mins
==
1
)
?
LocaleUtils
.
getLocalizedString
(
"global.minute"
)
:
LocaleUtils
.
getLocalizedString
(
"global.minutes"
));
return
sb
.
toString
();
}
else
{
...
...
@@ -1032,13 +1032,13 @@ public class StringUtils {
delta
-=
hours
*
JiveConstants
.
HOUR
;
long
mins
=
delta
/
JiveConstants
.
MINUTE
;
StringBuilder
sb
=
new
StringBuilder
();
sb
.
append
(
days
).
append
(
" "
);
sb
.
append
(
days
).
append
(
' '
);
sb
.
append
((
days
==
1
)
?
LocaleUtils
.
getLocalizedString
(
"global.day"
)
:
LocaleUtils
.
getLocalizedString
(
"global.days"
));
sb
.
append
(
", "
);
sb
.
append
(
hours
).
append
(
" "
);
sb
.
append
(
hours
).
append
(
' '
);
sb
.
append
((
hours
==
1
)
?
LocaleUtils
.
getLocalizedString
(
"global.hour"
)
:
LocaleUtils
.
getLocalizedString
(
"global.hours"
));
sb
.
append
(
", "
);
sb
.
append
(
mins
).
append
(
" "
);
sb
.
append
(
mins
).
append
(
' '
);
sb
.
append
((
mins
==
1
)
?
LocaleUtils
.
getLocalizedString
(
"global.minute"
)
:
LocaleUtils
.
getLocalizedString
(
"global.minutes"
));
return
sb
.
toString
();
}
...
...
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