ARTEMIS-2320 Assorted small code fixes, mostly from IntelliJ autofixes
This commit is contained in:
parent
bd6d5ecd72
commit
b33874488b
|
@ -123,7 +123,7 @@ public final class PasswordMaskingUtil {
|
|||
}
|
||||
|
||||
private static boolean isEncoded(String storedPassword) {
|
||||
return storedPassword == null || (isEncMasked(storedPassword));
|
||||
return storedPassword == null || isEncMasked(storedPassword);
|
||||
}
|
||||
|
||||
public static HashProcessor getHashProcessor() {
|
||||
|
@ -164,7 +164,7 @@ public final class PasswordMaskingUtil {
|
|||
try {
|
||||
// Service load the codec, if a service is available
|
||||
for (SensitiveDataCodec<String> codec : serviceLoader) {
|
||||
if ((codec.getClass().getCanonicalName()).equals(codecClassName)) {
|
||||
if (codec.getClass().getCanonicalName().equals(codecClassName)) {
|
||||
return codec.getClass().newInstance();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -49,7 +49,7 @@ public class ConcurrentAppendOnlyChunkedListTest {
|
|||
final int messages = ELEMENTS;
|
||||
for (int i = 0; i < messages; i++) {
|
||||
Assert.assertEquals(i, chunkedList.size());
|
||||
chunkedList.add((i));
|
||||
chunkedList.add(i);
|
||||
}
|
||||
Assert.assertEquals(messages, chunkedList.size());
|
||||
}
|
||||
|
|
|
@ -56,9 +56,7 @@ public class InflaterReader extends InputStream {
|
|||
}
|
||||
pointer = 0;
|
||||
} catch (DataFormatException e) {
|
||||
IOException e2 = new IOException(e.getMessage());
|
||||
e2.initCause(e);
|
||||
throw e2;
|
||||
throw new IOException(e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ public class SharedEventLoopGroupTest {
|
|||
Thread t1 = new Thread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
sharedEventLoopGroup1.set(SharedEventLoopGroup.getInstance((threadFactory -> customNioEventLoopGroup)));
|
||||
sharedEventLoopGroup1.set(SharedEventLoopGroup.getInstance(threadFactory -> customNioEventLoopGroup));
|
||||
customNioEventLoopGroup.setCyclicBarrier(barrier);
|
||||
sharedEventLoopGroup1.get().shutdownGracefully();
|
||||
customNioEventLoopGroup.setCyclicBarrier(null);
|
||||
|
@ -51,7 +51,7 @@ public class SharedEventLoopGroupTest {
|
|||
public void run() {
|
||||
try {
|
||||
barrier.await();
|
||||
sharedEventLoopGroup2.set(SharedEventLoopGroup.getInstance((threadFactory -> new NioEventLoopGroup(2, threadFactory))));
|
||||
sharedEventLoopGroup2.set(SharedEventLoopGroup.getInstance(threadFactory -> new NioEventLoopGroup(2, threadFactory)));
|
||||
} catch (InterruptedException e) {
|
||||
e.printStackTrace();
|
||||
} catch (BrokenBarrierException e) {
|
||||
|
|
|
@ -82,7 +82,7 @@ rect.graphbox.frame {
|
|||
path.link {
|
||||
fill: none;
|
||||
stroke: #666;
|
||||
stroke-width: 1.5px; b
|
||||
stroke-width: 1.5px;
|
||||
}
|
||||
|
||||
marker.broker {
|
||||
|
|
|
@ -212,7 +212,7 @@ public class ConnectionFactoryURITest {
|
|||
populateConnectorParams(props3, allowableConnectorKeys, sb);
|
||||
sb.append(")?ha=true&clientID=myID");
|
||||
|
||||
ActiveMQConnectionFactory factory = parser.newObject(parser.expandURI((sb.toString())), null);
|
||||
ActiveMQConnectionFactory factory = parser.newObject(parser.expandURI(sb.toString()), null);
|
||||
|
||||
TransportConfiguration[] staticConnectors = factory.getStaticConnectors();
|
||||
Assert.assertEquals(3, staticConnectors.length);
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
<head>
|
||||
<!-- $Id: package.html 71554 2008-04-01 13:25:40Z adrian@jboss.org $ -->
|
||||
<!--
|
||||
<!--
|
||||
Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
contributor license agreements. See the NOTICE file distributed with
|
||||
this work for additional information regarding copyright ownership.
|
||||
|
|
|
@ -14,7 +14,8 @@
|
|||
# KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
import httplib, urlparse
|
||||
import httplib
|
||||
import urlparse
|
||||
|
||||
conn = httplib.HTTPConnection("localhost:8080")
|
||||
conn.request("HEAD", "/queues/orders")
|
||||
|
|
|
@ -14,7 +14,8 @@
|
|||
# KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
import httplib, urlparse
|
||||
import httplib
|
||||
import urlparse
|
||||
|
||||
conn = httplib.HTTPConnection("localhost:8080")
|
||||
conn.request("HEAD", "/queues/orders")
|
||||
|
@ -49,7 +50,7 @@ try:
|
|||
else:
|
||||
raise Exception('failed')
|
||||
finally:
|
||||
if session != None:
|
||||
if session is not None:
|
||||
print "deleting activemq session..."
|
||||
createParsed = urlparse.urlparse(session)
|
||||
conn = httplib.HTTPConnection(createParsed.netloc)
|
||||
|
|
|
@ -250,7 +250,7 @@ public class IdGenerator {
|
|||
*/
|
||||
protected static String getLocalHostName() throws UnknownHostException {
|
||||
try {
|
||||
return (InetAddress.getLocalHost()).getHostName();
|
||||
return InetAddress.getLocalHost().getHostName();
|
||||
} catch (UnknownHostException uhe) {
|
||||
String host = uhe.getMessage(); // host = "hostname: hostname"
|
||||
if (host != null) {
|
||||
|
|
|
@ -180,7 +180,7 @@ public class TokenBucketLimiterImplTest extends ActiveMQTestBase {
|
|||
if (lastRun != 0) {
|
||||
int consumed = tmpValue - lastRun;
|
||||
|
||||
double calculatedRate = consumed * window * 1000 / ((System.currentTimeMillis() - lastTime));
|
||||
double calculatedRate = consumed * window * 1000 / (System.currentTimeMillis() - lastTime);
|
||||
|
||||
if (calculatedRate > rate * error) {
|
||||
System.out.println("got more than " + rate + " tokens / second");
|
||||
|
|
Loading…
Reference in New Issue