Skip to content

Commit

Permalink
refactor: reorder imports (#1346)
Browse files Browse the repository at this point in the history
  • Loading branch information
timo-a authored Oct 4, 2024
1 parent 39619e3 commit 58a3bbe
Show file tree
Hide file tree
Showing 41 changed files with 62 additions and 74 deletions.
6 changes: 3 additions & 3 deletions src/main/java/tools/jackson/core/JsonGenerator.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,22 @@
*/
package tools.jackson.core;

import static tools.jackson.core.JsonTokenId.*;

import java.io.*;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.Objects;

import tools.jackson.core.JsonParser.NumberType;
import tools.jackson.core.exc.JacksonIOException;
import tools.jackson.core.exc.StreamReadException;
import tools.jackson.core.exc.StreamWriteException;
import tools.jackson.core.exc.JacksonIOException;
import tools.jackson.core.io.CharacterEscapes;
import tools.jackson.core.type.WritableTypeId;
import tools.jackson.core.type.WritableTypeId.Inclusion;
import tools.jackson.core.util.JacksonFeatureSet;

import static tools.jackson.core.JsonTokenId.*;

/**
* Base class that defines public API for writing JSON content.
* Instances are created using factory methods of
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/tools/jackson/core/JsonParser.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@

import tools.jackson.core.async.NonBlockingInputFeeder;
import tools.jackson.core.exc.InputCoercionException;
import tools.jackson.core.exc.StreamReadException;
import tools.jackson.core.exc.JacksonIOException;
import tools.jackson.core.exc.StreamReadException;
import tools.jackson.core.json.JsonFactory;
import tools.jackson.core.json.JsonReadFeature;
import tools.jackson.core.sym.PropertyNameMatcher;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/tools/jackson/core/ObjectWriteContext.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
import java.io.OutputStream;
import java.io.Writer;

import tools.jackson.core.exc.StreamWriteException;
import tools.jackson.core.exc.JacksonIOException;
import tools.jackson.core.exc.StreamWriteException;
import tools.jackson.core.io.CharacterEscapes;
import tools.jackson.core.tree.ArrayTreeNode;
import tools.jackson.core.tree.ObjectTreeNode;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/tools/jackson/core/PrettyPrinter.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@

package tools.jackson.core;

import tools.jackson.core.exc.StreamWriteException;
import tools.jackson.core.exc.JacksonIOException;
import tools.jackson.core.exc.StreamWriteException;
import tools.jackson.core.io.SerializedString;
import tools.jackson.core.util.Separators;

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/tools/jackson/core/TokenStreamFactory.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
import java.util.Objects;

import tools.jackson.core.async.ByteArrayFeeder;
import tools.jackson.core.exc.StreamReadException;
import tools.jackson.core.exc.JacksonIOException;
import tools.jackson.core.exc.StreamReadException;
import tools.jackson.core.io.*;
import tools.jackson.core.json.JsonFactory;
import tools.jackson.core.sym.PropertyNameMatcher;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/tools/jackson/core/base/ParserBase.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@

import tools.jackson.core.*;
import tools.jackson.core.exc.InputCoercionException;
import tools.jackson.core.exc.JacksonIOException;
import tools.jackson.core.exc.StreamConstraintsException;
import tools.jackson.core.exc.StreamReadException;
import tools.jackson.core.exc.JacksonIOException;
import tools.jackson.core.io.ContentReference;
import tools.jackson.core.io.IOContext;
import tools.jackson.core.io.NumberInput;
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/tools/jackson/core/base/ParserMinimalBase.java
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
package tools.jackson.core.base;

import static tools.jackson.core.JsonTokenId.*;

import java.io.IOException;
import java.io.Writer;
import java.math.BigDecimal;
import java.math.BigInteger;

import tools.jackson.core.*;
import tools.jackson.core.exc.InputCoercionException;
import tools.jackson.core.exc.StreamReadException;
import tools.jackson.core.exc.UnexpectedEndOfInputException;
import tools.jackson.core.exc.JacksonIOException;
import tools.jackson.core.exc.StreamConstraintsException;
import tools.jackson.core.exc.StreamReadException;
import tools.jackson.core.exc.UnexpectedEndOfInputException;
import tools.jackson.core.io.IOContext;
import tools.jackson.core.io.NumberInput;
import tools.jackson.core.sym.PropertyNameMatcher;
Expand All @@ -22,6 +20,8 @@
import tools.jackson.core.util.JacksonFeatureSet;
import tools.jackson.core.util.VersionUtil;

import static tools.jackson.core.JsonTokenId.*;

/**
* Intermediate base class used by all Jackson {@link JsonParser}
* implementations, but does not add any additional fields that depend
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package tools.jackson.core.filter;

import static tools.jackson.core.JsonTokenId.*;

import tools.jackson.core.*;
import tools.jackson.core.filter.TokenFilter.Inclusion;
import tools.jackson.core.sym.PropertyNameMatcher;
import tools.jackson.core.util.JsonParserDelegate;

import static tools.jackson.core.JsonTokenId.*;

/**
* Specialized {@link JsonParserDelegate} that allows use of
* {@link TokenFilter} for outputting a subset of content that
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/tools/jackson/core/io/BigDecimalParser.java
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package tools.jackson.core.io;

import ch.randelshofer.fastdoubleparser.JavaBigDecimalParser;

import java.math.BigDecimal;

import ch.randelshofer.fastdoubleparser.JavaBigDecimalParser;

/**
* Internal Jackson Helper class used to implement more optimized parsing of
* {@link BigDecimal} for REALLY big values (over 500 characters).
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/tools/jackson/core/io/BigIntegerParser.java
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package tools.jackson.core.io;

import ch.randelshofer.fastdoubleparser.JavaBigIntegerParser;

import java.math.BigInteger;

import ch.randelshofer.fastdoubleparser.JavaBigIntegerParser;

import static tools.jackson.core.io.BigDecimalParser.MAX_CHARS_TO_REPORT;

/**
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/tools/jackson/core/io/IOContext.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
import tools.jackson.core.StreamReadConstraints;
import tools.jackson.core.StreamWriteConstraints;
import tools.jackson.core.util.BufferRecycler;
import tools.jackson.core.util.TextBuffer;
import tools.jackson.core.util.ReadConstrainedTextBuffer;
import tools.jackson.core.util.TextBuffer;

/**
* To limit number of configuration and state objects to pass, all
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
package tools.jackson.core.json;

import static tools.jackson.core.JsonTokenId.*;

import java.io.*;

import tools.jackson.core.*;
import tools.jackson.core.exc.StreamReadException;
import tools.jackson.core.exc.JacksonIOException;
import tools.jackson.core.exc.StreamReadException;
import tools.jackson.core.io.CharTypes;
import tools.jackson.core.io.IOContext;
import tools.jackson.core.sym.CharsToNameCanonicalizer;
import tools.jackson.core.util.*;

import static tools.jackson.core.JsonTokenId.*;

/**
* This is a concrete implementation of {@link JsonParser}, which is
* based on a {@link java.io.Reader} to handle low-level character
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
import java.io.*;

import tools.jackson.core.*;
import tools.jackson.core.exc.StreamReadException;
import tools.jackson.core.exc.JacksonIOException;
import tools.jackson.core.exc.StreamReadException;
import tools.jackson.core.io.CharTypes;
import tools.jackson.core.io.IOContext;
import tools.jackson.core.sym.ByteQuadsCanonicalizer;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
package tools.jackson.core.json;

import static tools.jackson.core.JsonTokenId.*;

import java.io.*;

import tools.jackson.core.*;
import tools.jackson.core.exc.StreamReadException;
import tools.jackson.core.exc.JacksonIOException;
import tools.jackson.core.exc.StreamReadException;
import tools.jackson.core.io.CharTypes;
import tools.jackson.core.io.IOContext;
import tools.jackson.core.sym.ByteQuadsCanonicalizer;
import tools.jackson.core.sym.PropertyNameMatcher;
import tools.jackson.core.util.*;

import static tools.jackson.core.JsonTokenId.*;

/**
* This is a concrete implementation of {@link JsonParser}, which is
* based on a {@link java.io.InputStream} as the input source.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package tools.jackson.core.json.async;

import static tools.jackson.core.JsonTokenId.*;

import java.io.*;

import tools.jackson.core.*;
Expand All @@ -12,6 +10,8 @@
import tools.jackson.core.sym.ByteQuadsCanonicalizer;
import tools.jackson.core.util.ByteArrayBuilder;

import static tools.jackson.core.JsonTokenId.*;

/**
* Intermediate base class for non-blocking JSON parsers.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import tools.jackson.core.json.JsonFactory;

import static org.assertj.core.api.Assertions.assertThat;

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.fail;

Expand Down
1 change: 0 additions & 1 deletion src/test/java/tools/jackson/core/JsonLocationTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
import tools.jackson.core.json.JsonFactory;

import static org.assertj.core.api.Assertions.assertThat;

import static org.junit.jupiter.api.Assertions.*;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import tools.jackson.core.json.JsonFactory;

import static org.assertj.core.api.Assertions.assertThat;

import static org.junit.jupiter.api.Assertions.fail;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import org.junit.jupiter.api.Test;

import tools.jackson.core.*;
import tools.jackson.core.StreamReadConstraints;
import tools.jackson.core.async.ByteArrayFeeder;
import tools.jackson.core.exc.StreamConstraintsException;
import tools.jackson.core.json.JsonFactory;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package tools.jackson.core.constraints;

import org.junit.jupiter.api.Test;

import java.nio.ByteBuffer;

import org.junit.jupiter.api.Test;

import tools.jackson.core.*;
import tools.jackson.core.json.JsonFactory;
import tools.jackson.core.json.async.NonBlockingByteArrayJsonParser;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
import tools.jackson.core.*;
import tools.jackson.core.json.JsonFactory;

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertArrayEquals;
import static org.junit.jupiter.api.Assertions.assertEquals;

class TestJsonStringEncoder
extends tools.jackson.core.JUnit5TestBase
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,15 @@

package tools.jackson.core.io.schubfach;

import org.junit.jupiter.api.Test;

import java.math.BigInteger;

import org.junit.jupiter.api.Test;

import static java.lang.Double.*;
import static java.lang.Long.numberOfTrailingZeros;
import static java.lang.StrictMath.scalb;
import static java.math.BigInteger.*;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertTrue;
import static org.junit.jupiter.api.Assertions.fail;
import static org.junit.jupiter.api.Assertions.*;
import static tools.jackson.core.io.schubfach.MathUtils.*;

class MathUtilsTest {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import org.junit.jupiter.api.Test;

import tools.jackson.core.*;
import tools.jackson.core.TokenStreamFactory;
import tools.jackson.core.exc.StreamReadException;

import static org.junit.jupiter.api.Assertions.fail;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

import java.io.*;

import tools.jackson.core.*;

import org.junit.jupiter.api.Test;

import tools.jackson.core.*;

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.fail;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
import java.util.Collection;
import java.util.List;

import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.MethodSource;

import tools.jackson.core.JsonParser;
import tools.jackson.core.ObjectReadContext;
import tools.jackson.core.io.SerializedString;
import tools.jackson.core.testsupport.MockDataInput;

import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.MethodSource;

import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertNull;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

import java.io.*;

import tools.jackson.core.*;

import org.junit.jupiter.api.Test;

import tools.jackson.core.*;

import static org.junit.jupiter.api.Assertions.assertEquals;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

import org.junit.jupiter.api.Test;

import tools.jackson.core.JsonToken;
import tools.jackson.core.JsonParser.NumberType;
import tools.jackson.core.JsonToken;
import tools.jackson.core.async.AsyncTestBase;
import tools.jackson.core.exc.InputCoercionException;
import tools.jackson.core.json.JsonFactory;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import org.junit.jupiter.api.Test;

import tools.jackson.core.*;
import tools.jackson.core.JsonPointer;

import static org.junit.jupiter.api.Assertions.*;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package tools.jackson.core.read;

import org.junit.jupiter.api.Test;

import tools.jackson.core.*;
import tools.jackson.core.exc.StreamReadException;

import org.junit.jupiter.api.Test;

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.fail;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package tools.jackson.core.read;

import java.io.*;

import java.net.URL;
import java.nio.charset.StandardCharsets;
import java.util.*;
Expand Down
Loading

0 comments on commit 58a3bbe

Please sign in to comment.