Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add impsort-maven-plugin to ensure Java imports are well sorted. #1282

Merged
merged 5 commits into from
Jul 13, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove wildcard(*) import in all code.
  • Loading branch information
sbernard31 committed Jul 13, 2022

Unverified

The committer email address is not verified.
commit c82280c0d8e58a6a076f3cc7c1396b6aa60bc044
Original file line number Diff line number Diff line change
@@ -17,7 +17,12 @@
*******************************************************************************/
package org.eclipse.leshan.client.object;

import static org.eclipse.leshan.core.LwM2mId.*;
import static org.eclipse.leshan.core.LwM2mId.OSCORE_AEAD_ALGORITHM;
import static org.eclipse.leshan.core.LwM2mId.OSCORE_HMAC_ALGORITHM;
import static org.eclipse.leshan.core.LwM2mId.OSCORE_MASTER_SALT;
import static org.eclipse.leshan.core.LwM2mId.OSCORE_MASTER_SECRET;
import static org.eclipse.leshan.core.LwM2mId.OSCORE_RECIPIENT_ID;
import static org.eclipse.leshan.core.LwM2mId.OSCORE_SENDER_ID;

import java.util.Arrays;
import java.util.List;
Original file line number Diff line number Diff line change
@@ -16,7 +16,16 @@
*******************************************************************************/
package org.eclipse.leshan.client.object;

import static org.eclipse.leshan.core.LwM2mId.*;
import static org.eclipse.leshan.core.LwM2mId.OSCORE;
import static org.eclipse.leshan.core.LwM2mId.SEC_BOOTSTRAP;
import static org.eclipse.leshan.core.LwM2mId.SEC_CERTIFICATE_USAGE;
import static org.eclipse.leshan.core.LwM2mId.SEC_OSCORE_SECURITY_MODE;
import static org.eclipse.leshan.core.LwM2mId.SEC_PUBKEY_IDENTITY;
import static org.eclipse.leshan.core.LwM2mId.SEC_SECRET_KEY;
import static org.eclipse.leshan.core.LwM2mId.SEC_SECURITY_MODE;
import static org.eclipse.leshan.core.LwM2mId.SEC_SERVER_ID;
import static org.eclipse.leshan.core.LwM2mId.SEC_SERVER_PUBKEY;
import static org.eclipse.leshan.core.LwM2mId.SEC_SERVER_URI;

import java.util.Arrays;
import java.util.List;
Original file line number Diff line number Diff line change
@@ -18,7 +18,29 @@
package org.eclipse.leshan.client.servers;

import static org.eclipse.leshan.client.servers.ServerIdentity.SYSTEM;
import static org.eclipse.leshan.core.LwM2mId.*;
import static org.eclipse.leshan.core.LwM2mId.DEVICE;
import static org.eclipse.leshan.core.LwM2mId.DVC_SUPPORTED_BINDING;
import static org.eclipse.leshan.core.LwM2mId.OSCORE;
import static org.eclipse.leshan.core.LwM2mId.OSCORE_AEAD_ALGORITHM;
import static org.eclipse.leshan.core.LwM2mId.OSCORE_HMAC_ALGORITHM;
import static org.eclipse.leshan.core.LwM2mId.OSCORE_MASTER_SALT;
import static org.eclipse.leshan.core.LwM2mId.OSCORE_MASTER_SECRET;
import static org.eclipse.leshan.core.LwM2mId.OSCORE_RECIPIENT_ID;
import static org.eclipse.leshan.core.LwM2mId.OSCORE_SENDER_ID;
import static org.eclipse.leshan.core.LwM2mId.SECURITY;
import static org.eclipse.leshan.core.LwM2mId.SEC_BOOTSTRAP;
import static org.eclipse.leshan.core.LwM2mId.SEC_CERTIFICATE_USAGE;
import static org.eclipse.leshan.core.LwM2mId.SEC_OSCORE_SECURITY_MODE;
import static org.eclipse.leshan.core.LwM2mId.SEC_PUBKEY_IDENTITY;
import static org.eclipse.leshan.core.LwM2mId.SEC_SECRET_KEY;
import static org.eclipse.leshan.core.LwM2mId.SEC_SECURITY_MODE;
import static org.eclipse.leshan.core.LwM2mId.SEC_SERVER_ID;
import static org.eclipse.leshan.core.LwM2mId.SEC_SERVER_PUBKEY;
import static org.eclipse.leshan.core.LwM2mId.SEC_SERVER_URI;
import static org.eclipse.leshan.core.LwM2mId.SERVER;
import static org.eclipse.leshan.core.LwM2mId.SRV_BINDING;
import static org.eclipse.leshan.core.LwM2mId.SRV_LIFETIME;
import static org.eclipse.leshan.core.LwM2mId.SRV_SERVER_ID;

import java.io.ByteArrayInputStream;
import java.io.IOException;
Original file line number Diff line number Diff line change
@@ -15,7 +15,8 @@
*******************************************************************************/
package org.eclipse.leshan.client.util;

import static org.junit.Assert.*;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;

import java.util.Arrays;
import java.util.Collections;
Original file line number Diff line number Diff line change
@@ -16,7 +16,8 @@
*******************************************************************************/
package org.eclipse.leshan.client.util;

import static org.junit.Assert.*;
import static org.junit.Assert.assertArrayEquals;
import static org.junit.Assert.assertEquals;

import java.util.ArrayList;
import java.util.Arrays;
Original file line number Diff line number Diff line change
@@ -15,8 +15,21 @@
*******************************************************************************/
package org.eclipse.leshan.client.demo;

import static org.eclipse.leshan.client.object.Security.*;
import static org.eclipse.leshan.core.LwM2mId.*;
import static org.eclipse.leshan.client.object.Security.noSec;
import static org.eclipse.leshan.client.object.Security.noSecBootstap;
import static org.eclipse.leshan.client.object.Security.oscoreOnly;
import static org.eclipse.leshan.client.object.Security.oscoreOnlyBootstrap;
import static org.eclipse.leshan.client.object.Security.psk;
import static org.eclipse.leshan.client.object.Security.pskBootstrap;
import static org.eclipse.leshan.client.object.Security.rpk;
import static org.eclipse.leshan.client.object.Security.rpkBootstrap;
import static org.eclipse.leshan.client.object.Security.x509;
import static org.eclipse.leshan.client.object.Security.x509Bootstrap;
import static org.eclipse.leshan.core.LwM2mId.DEVICE;
import static org.eclipse.leshan.core.LwM2mId.LOCATION;
import static org.eclipse.leshan.core.LwM2mId.OSCORE;
import static org.eclipse.leshan.core.LwM2mId.SECURITY;
import static org.eclipse.leshan.core.LwM2mId.SERVER;

import java.io.File;
import java.io.PrintWriter;
Original file line number Diff line number Diff line change
@@ -15,7 +15,8 @@
*******************************************************************************/
package org.eclipse.leshan.core;

import static org.junit.Assert.*;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;

import org.eclipse.leshan.core.LwM2m.LwM2mVersion;
import org.eclipse.leshan.core.LwM2m.Version;
Original file line number Diff line number Diff line change
@@ -15,7 +15,9 @@
*******************************************************************************/
package org.eclipse.leshan.core.datatype;

import static org.eclipse.leshan.core.util.datatype.NumberUtil.*;
import static org.eclipse.leshan.core.util.datatype.NumberUtil.longToInt;
import static org.eclipse.leshan.core.util.datatype.NumberUtil.numberToLong;
import static org.eclipse.leshan.core.util.datatype.NumberUtil.numberToULong;
import static org.junit.Assert.assertEquals;

import java.math.BigDecimal;
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package org.eclipse.leshan.core.link.attributes;

import static org.junit.Assert.*;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;

import org.eclipse.leshan.core.LwM2m.Version;
import org.eclipse.leshan.core.link.lwm2m.attributes.AssignationLevel;
Original file line number Diff line number Diff line change
@@ -15,7 +15,8 @@
*******************************************************************************/
package org.eclipse.leshan.core.model;

import static org.junit.Assert.*;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull;

import java.io.IOException;
import java.util.ArrayList;
Original file line number Diff line number Diff line change
@@ -15,7 +15,8 @@
*******************************************************************************/
package org.eclipse.leshan.core.node;

import static org.junit.Assert.*;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotEquals;

import java.util.HashMap;
import java.util.Map;
Original file line number Diff line number Diff line change
@@ -15,7 +15,11 @@
*******************************************************************************/
package org.eclipse.leshan.core.node;

import static org.junit.Assert.*;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertThrows;
import static org.junit.Assert.assertTrue;

import java.util.Arrays;
import java.util.HashSet;
Original file line number Diff line number Diff line change
@@ -16,7 +16,13 @@
*******************************************************************************/
package org.eclipse.leshan.core.node.codec;

import static org.junit.Assert.*;
import static org.junit.Assert.assertArrayEquals;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;

import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
Original file line number Diff line number Diff line change
@@ -15,7 +15,14 @@
*******************************************************************************/
package org.eclipse.leshan.core.request;

import static org.eclipse.leshan.core.request.ContentFormat.*;
import static org.eclipse.leshan.core.request.ContentFormat.CBOR;
import static org.eclipse.leshan.core.request.ContentFormat.JSON;
import static org.eclipse.leshan.core.request.ContentFormat.LINK;
import static org.eclipse.leshan.core.request.ContentFormat.OPAQUE;
import static org.eclipse.leshan.core.request.ContentFormat.SENML_CBOR;
import static org.eclipse.leshan.core.request.ContentFormat.SENML_JSON;
import static org.eclipse.leshan.core.request.ContentFormat.TEXT;
import static org.eclipse.leshan.core.request.ContentFormat.TLV;
import static org.junit.Assert.assertEquals;

import java.util.Arrays;
Original file line number Diff line number Diff line change
@@ -15,7 +15,8 @@
*******************************************************************************/
package org.eclipse.leshan.core.request.argument;

import static org.junit.Assert.*;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull;

import org.junit.Test;

Original file line number Diff line number Diff line change
@@ -15,7 +15,10 @@
*******************************************************************************/
package org.eclipse.leshan.core.request.argument;

import static org.junit.Assert.*;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;

import org.junit.Test;

Original file line number Diff line number Diff line change
@@ -15,7 +15,9 @@
*******************************************************************************/
package org.eclipse.leshan.core.request.argument;

import static org.junit.Assert.*;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNull;

import java.util.Collection;
import java.util.Iterator;
Original file line number Diff line number Diff line change
@@ -15,9 +15,12 @@
*******************************************************************************/
package org.eclipse.leshan.core.response;

import static org.eclipse.leshan.core.ResponseCode.*;
import static org.eclipse.leshan.core.ResponseCode.CHANGED;
import static org.eclipse.leshan.core.ResponseCode.CONTENT;
import static org.eclipse.leshan.core.node.LwM2mSingleResource.newResource;
import static org.junit.Assert.*;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertThrows;

import java.util.Arrays;
import java.util.Collection;
Original file line number Diff line number Diff line change
@@ -15,7 +15,9 @@
*******************************************************************************/
package org.eclipse.leshan.core.tlv;

import static org.junit.Assert.*;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;

import java.nio.ByteBuffer;
import java.util.Arrays;
Original file line number Diff line number Diff line change
@@ -15,7 +15,8 @@
*******************************************************************************/
package org.eclipse.leshan.core.tlv;

import static org.junit.Assert.*;
import static org.junit.Assert.assertArrayEquals;
import static org.junit.Assert.assertEquals;

import java.nio.ByteBuffer;
import java.util.Date;
Original file line number Diff line number Diff line change
@@ -17,10 +17,14 @@
package org.eclipse.leshan.integration.tests;

import static org.eclipse.leshan.integration.tests.util.IntegrationTestHelper.linkSerializer;
import static org.eclipse.leshan.integration.tests.util.SecureIntegrationTestHelper.*;
import static org.eclipse.leshan.integration.tests.util.SecureIntegrationTestHelper.GOOD_PSK_ID;
import static org.eclipse.leshan.integration.tests.util.SecureIntegrationTestHelper.GOOD_PSK_KEY;
import static org.eclipse.leshan.integration.tests.util.SecureIntegrationTestHelper.getServerOscoreSetting;
import static org.hamcrest.CoreMatchers.hasItems;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.junit.Assert.*;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;

import java.util.HashMap;
import java.util.Map;
Original file line number Diff line number Diff line change
@@ -22,7 +22,8 @@
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.core.Is.is;
import static org.hamcrest.core.IsInstanceOf.instanceOf;
import static org.junit.Assert.*;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;

import org.eclipse.californium.core.coap.Request;
import org.eclipse.californium.core.coap.Response;
Original file line number Diff line number Diff line change
@@ -17,12 +17,14 @@

package org.eclipse.leshan.integration.tests;

import static org.eclipse.leshan.core.ResponseCode.*;
import static org.eclipse.leshan.core.ResponseCode.CONTENT;
import static org.eclipse.leshan.core.ResponseCode.NOT_FOUND;
import static org.eclipse.leshan.integration.tests.util.IntegrationTestHelper.linkSerializer;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.core.Is.is;
import static org.hamcrest.core.IsInstanceOf.instanceOf;
import static org.junit.Assert.*;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;

import org.eclipse.californium.core.coap.Response;
import org.eclipse.leshan.core.link.Link;
Original file line number Diff line number Diff line change
@@ -22,7 +22,8 @@
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.core.Is.is;
import static org.hamcrest.core.IsInstanceOf.instanceOf;
import static org.junit.Assert.*;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;

import org.eclipse.californium.core.coap.Response;
import org.eclipse.leshan.core.ResponseCode;
Original file line number Diff line number Diff line change
@@ -18,7 +18,8 @@
package org.eclipse.leshan.integration.tests;

import static org.eclipse.leshan.integration.tests.util.IntegrationTestHelper.linkParser;
import static org.junit.Assert.*;
import static org.junit.Assert.assertArrayEquals;
import static org.junit.Assert.assertEquals;

import org.eclipse.leshan.core.link.LinkParseException;
import org.eclipse.leshan.core.request.ReadRequest;
Original file line number Diff line number Diff line change
@@ -18,11 +18,18 @@

package org.eclipse.leshan.integration.tests;

import static org.eclipse.leshan.integration.tests.util.IntegrationTestHelper.*;
import static org.eclipse.leshan.integration.tests.util.IntegrationTestHelper.LIFETIME;
import static org.eclipse.leshan.integration.tests.util.IntegrationTestHelper.linkParser;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.core.Is.is;
import static org.hamcrest.core.IsInstanceOf.instanceOf;
import static org.junit.Assert.*;
import static org.junit.Assert.assertArrayEquals;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;

import java.io.IOException;
import java.net.InetSocketAddress;
Original file line number Diff line number Diff line change
@@ -16,8 +16,20 @@
package org.eclipse.leshan.integration.tests;

import static org.eclipse.leshan.integration.tests.util.IntegrationTestHelper.LIFETIME;
import static org.eclipse.leshan.integration.tests.util.SecureIntegrationTestHelper.*;
import static org.junit.Assert.*;
import static org.eclipse.leshan.integration.tests.util.SecureIntegrationTestHelper.BAD_ENDPOINT;
import static org.eclipse.leshan.integration.tests.util.SecureIntegrationTestHelper.BAD_PSK_ID;
import static org.eclipse.leshan.integration.tests.util.SecureIntegrationTestHelper.BAD_PSK_KEY;
import static org.eclipse.leshan.integration.tests.util.SecureIntegrationTestHelper.GOOD_ENDPOINT;
import static org.eclipse.leshan.integration.tests.util.SecureIntegrationTestHelper.GOOD_PSK_ID;
import static org.eclipse.leshan.integration.tests.util.SecureIntegrationTestHelper.GOOD_PSK_KEY;
import static org.eclipse.leshan.integration.tests.util.SecureIntegrationTestHelper.getServerOscoreSetting;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;

import java.io.IOException;
import java.security.PrivateKey;
Original file line number Diff line number Diff line change
@@ -18,7 +18,8 @@
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.core.Is.is;
import static org.hamcrest.core.IsInstanceOf.instanceOf;
import static org.junit.Assert.*;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;

import org.eclipse.californium.core.coap.Response;
import org.eclipse.leshan.core.ResponseCode;
Original file line number Diff line number Diff line change
@@ -21,7 +21,9 @@
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.core.Is.is;
import static org.hamcrest.core.IsInstanceOf.instanceOf;
import static org.junit.Assert.*;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotEquals;
import static org.junit.Assert.assertNotNull;

import java.util.Arrays;
import java.util.Collection;
Loading