Remove redundant type parameters
This commit is contained in:
parent
094222bc73
commit
3f20e0d19a
|
@ -121,7 +121,7 @@ public class URISupport {
|
|||
public static Map<String, String> parseQuery(String uri) throws URISyntaxException {
|
||||
try {
|
||||
uri = uri.substring(uri.lastIndexOf("?") + 1); // get only the relevant part of the query
|
||||
Map<String, String> rc = new HashMap<String, String>();
|
||||
Map<String, String> rc = new HashMap<>();
|
||||
if (uri != null && !uri.isEmpty()) {
|
||||
parseParameters(rc, uri.split("&"));
|
||||
parseParameters(rc, uri.split(";"));
|
||||
|
@ -164,7 +164,7 @@ public class URISupport {
|
|||
}
|
||||
else {
|
||||
CompositeData data = URISupport.parseComposite(uri);
|
||||
Map<String, String> parameters = new HashMap<String, String>();
|
||||
Map<String, String> parameters = new HashMap<>();
|
||||
parameters.putAll(data.getParameters());
|
||||
if (parameters.isEmpty()) {
|
||||
parameters = emptyMap();
|
||||
|
@ -402,7 +402,7 @@ public class URISupport {
|
|||
* @return an array containing each inner URI from the composite one.
|
||||
*/
|
||||
private static String[] splitComponents(String str) {
|
||||
List<String> l = new ArrayList<String>();
|
||||
List<String> l = new ArrayList<>();
|
||||
|
||||
int last = 0;
|
||||
int depth = 0;
|
||||
|
|
|
@ -304,7 +304,7 @@ public class JMSQueueControlImpl extends StandardMBean implements JMSQueueContro
|
|||
@Override
|
||||
public String sendTextMessageWithProperties(String properties) throws Exception {
|
||||
String[] kvs = properties.split(",");
|
||||
Map<String, String> props = new HashMap<String, String>();
|
||||
Map<String, String> props = new HashMap<>();
|
||||
for (String kv : kvs) {
|
||||
String[] it = kv.split("=");
|
||||
if (it.length == 2) {
|
||||
|
|
|
@ -52,9 +52,9 @@ public final class JMSOpenTypeSupport {
|
|||
public abstract static class AbstractOpenTypeFactory implements OpenTypeFactory {
|
||||
|
||||
private CompositeType compositeType;
|
||||
private final List<String> itemNamesList = new ArrayList<String>();
|
||||
private final List<String> itemDescriptionsList = new ArrayList<String>();
|
||||
private final List<OpenType> itemTypesList = new ArrayList<OpenType>();
|
||||
private final List<String> itemNamesList = new ArrayList<>();
|
||||
private final List<String> itemDescriptionsList = new ArrayList<>();
|
||||
private final List<OpenType> itemTypesList = new ArrayList<>();
|
||||
|
||||
public CompositeType getCompositeType() throws OpenDataException {
|
||||
if (compositeType == null) {
|
||||
|
@ -87,7 +87,7 @@ public final class JMSOpenTypeSupport {
|
|||
}
|
||||
|
||||
public Map<String, Object> getFields(CompositeDataSupport data) throws OpenDataException {
|
||||
Map<String, Object> rc = new HashMap<String, Object>();
|
||||
Map<String, Object> rc = new HashMap<>();
|
||||
return rc;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -25,9 +25,9 @@ public class PreparedTransactionInfo {
|
|||
|
||||
private final byte[] extraData;
|
||||
|
||||
private final List<RecordInfo> records = new ArrayList<RecordInfo>();
|
||||
private final List<RecordInfo> records = new ArrayList<>();
|
||||
|
||||
private final List<RecordInfo> recordsToDelete = new ArrayList<RecordInfo>();
|
||||
private final List<RecordInfo> recordsToDelete = new ArrayList<>();
|
||||
|
||||
public PreparedTransactionInfo(final long id, final byte[] extraData) {
|
||||
this.id = id;
|
||||
|
|
|
@ -52,9 +52,9 @@ public final class OpenTypeSupport {
|
|||
|
||||
static class MessageOpenTypeFactory {
|
||||
private CompositeType compositeType;
|
||||
private final List<String> itemNamesList = new ArrayList<String>();
|
||||
private final List<String> itemDescriptionsList = new ArrayList<String>();
|
||||
private final List<OpenType> itemTypesList = new ArrayList<OpenType>();
|
||||
private final List<String> itemNamesList = new ArrayList<>();
|
||||
private final List<String> itemDescriptionsList = new ArrayList<>();
|
||||
private final List<OpenType> itemTypesList = new ArrayList<>();
|
||||
|
||||
protected TabularType stringPropertyTabularType;
|
||||
protected TabularType booleanPropertyTabularType;
|
||||
|
@ -239,7 +239,7 @@ public final class OpenTypeSupport {
|
|||
}
|
||||
|
||||
protected CompositeDataSupport createTabularRowValue(TabularType type, String key, Object value) throws OpenDataException {
|
||||
Map<String, Object> fields = new HashMap<String, Object>();
|
||||
Map<String, Object> fields = new HashMap<>();
|
||||
fields.put("key", key);
|
||||
fields.put("value", value);
|
||||
return new CompositeDataSupport(type.getRowType(), fields);
|
||||
|
|
|
@ -1310,9 +1310,9 @@ public abstract class AbstractJournalStorageManager implements StorageManager {
|
|||
|
||||
public JournalLoadInformation loadBindingJournal(final List<QueueBindingInfo> queueBindingInfos,
|
||||
final List<GroupingInfo> groupingInfos) throws Exception {
|
||||
List<RecordInfo> records = new ArrayList<RecordInfo>();
|
||||
List<RecordInfo> records = new ArrayList<>();
|
||||
|
||||
List<PreparedTransactionInfo> preparedTransactions = new ArrayList<PreparedTransactionInfo>();
|
||||
List<PreparedTransactionInfo> preparedTransactions = new ArrayList<>();
|
||||
|
||||
JournalLoadInformation bindingsInfo = bindingsJournal.load(records, preparedTransactions, null);
|
||||
|
||||
|
@ -1521,9 +1521,9 @@ public abstract class AbstractJournalStorageManager implements StorageManager {
|
|||
|
||||
Transaction tx = new TransactionImpl(preparedTransaction.getId(), xid, this);
|
||||
|
||||
List<MessageReference> referencesToAck = new ArrayList<MessageReference>();
|
||||
List<MessageReference> referencesToAck = new ArrayList<>();
|
||||
|
||||
Map<Long, ServerMessage> messages = new HashMap<Long, ServerMessage>();
|
||||
Map<Long, ServerMessage> messages = new HashMap<>();
|
||||
|
||||
// Use same method as load message journal to prune out acks, so they don't get added.
|
||||
// Then have reacknowledge(tx) methods on queue, which needs to add the page size
|
||||
|
@ -1677,7 +1677,7 @@ public abstract class AbstractJournalStorageManager implements StorageManager {
|
|||
switch (b) {
|
||||
case ADD_LARGE_MESSAGE_PENDING: {
|
||||
long messageID = buff.readLong();
|
||||
if (!pendingLargeMessages.remove(new Pair<Long, Long>(recordDeleted.id, messageID))) {
|
||||
if (!pendingLargeMessages.remove(new Pair<>(recordDeleted.id, messageID))) {
|
||||
ActiveMQServerLogger.LOGGER.largeMessageNotFound(recordDeleted.id);
|
||||
}
|
||||
installLargeMessageConfirmationOnTX(tx, recordDeleted.id);
|
||||
|
|
|
@ -26,7 +26,7 @@ import org.apache.activemq.artemis.core.transaction.TransactionOperationAbstract
|
|||
public final class TXLargeMessageConfirmationOperation extends TransactionOperationAbstract {
|
||||
|
||||
private AbstractJournalStorageManager journalStorageManager;
|
||||
public List<Long> confirmedMessages = new LinkedList<Long>();
|
||||
public List<Long> confirmedMessages = new LinkedList<>();
|
||||
|
||||
public TXLargeMessageConfirmationOperation(AbstractJournalStorageManager journalStorageManager) {
|
||||
this.journalStorageManager = journalStorageManager;
|
||||
|
|
Loading…
Reference in New Issue