Skip to content

Commit

Permalink
Fix multiple and missing new lines (#786)
Browse files Browse the repository at this point in the history
* Fix multiple and missing new lines

* Fix multiple and missing new lines
  • Loading branch information
peter-lawrey authored Dec 11, 2023
1 parent 7bd5fb9 commit 12875de
Show file tree
Hide file tree
Showing 228 changed files with 200 additions and 313 deletions.
1 change: 0 additions & 1 deletion README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -1781,7 +1781,6 @@ private static final int MASHALLABLE_VERSION = 1;
----
<1> You will have to remove this line if the class extends `AbstractBytesMarshallable`


=== JLBH Benchmark Performance

To explore the efficiency of the examples above, this link:https://github.com/OpenHFT/Chronicle-Wire/blob/develop/src/test/java/net/openhft/chronicle/wire/TriviallyCopyableJLBH.java[TrivallyCopyableJLBH.java] test was created.
Expand Down
2 changes: 0 additions & 2 deletions demo/src/main/java/run/chronicle/wire/demo/ListLookup.java
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ public static void main(String[] args) {

}


private static final class Data extends SelfDescribingMarshallable {

// Ids can be reused/internalized
Expand Down Expand Up @@ -114,7 +113,6 @@ public String toString() {
}
}


public static <T, U> int binarySearch(final List<T> list,
final Function<? super T, ? extends U> extractor,
final U key,
Expand Down
2 changes: 1 addition & 1 deletion jlbh-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@
# limitations under the License.
#

mvn clean test-compile exec:java -Dexec.mainClass="net.openhft.chronicle.wire.TriviallyCopyableJLBH" -Dexec.classpathScope=test
mvn clean test-compile exec:java -Dexec.mainClass="net.openhft.chronicle.wire.TriviallyCopyableJLBH" -Dexec.classpathScope=test
1 change: 0 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
<relativePath />
</parent>


<artifactId>chronicle-wire</artifactId>
<version>2.25ea2-SNAPSHOT</version>
<name>OpenHFT/Chronicle-Wire</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,6 @@ protected <T> T checkRecycle(T o) {
return o;
}


protected Object actualInvoke(Method method, Object o, Object[] objects) {
try {
return method.invoke(o, objects);
Expand Down
1 change: 0 additions & 1 deletion src/main/java/net/openhft/chronicle/wire/AbstractWire.java
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,6 @@ public void updateHeader(final long position, final boolean metaData, int expect
pos = bytes.writePosition();
}


// clear up to the next 8 bytes to explicitly indicate "no more data" (8 covers int + max padding)
// if there aren't at least 8 bytes remaining, then clear what we can (any new mapping will be 0 anyway)
// also clears any dirty bits left by a failed writer/appender
Expand Down
2 changes: 0 additions & 2 deletions src/main/java/net/openhft/chronicle/wire/ChronicleBitSet.java
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ default void set(int fromIndex, int toIndex, boolean value) {
clear(fromIndex, toIndex);
}


/**
* Returns the value of the bit with the specified index. The value is {@code true} if the bit with the index {@code bitIndex} is currently set in
* this {@code ChronicleBitSet}; otherwise, the result is {@code false}.
Expand Down Expand Up @@ -127,7 +126,6 @@ default boolean isEmpty() {
return true;
}


/**
* Returns the "logical size" of this {@code ChronicleBitSet}: the index of the highest set bit in the {@code ChronicleBitSet} plus one.
* Returns zero if the {@code ChronicleBitSet} contains no set bits.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@

interface CommentAnnotationNotifier {
void hasPrecedingComment(boolean hasCommentAnnotation);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -105,4 +105,4 @@ public void chainedElement(boolean chainedElement) {
public boolean isEmpty() {
return ((WriteDocumentContext) dc).isEmpty();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,4 @@ default ExcerptListener andThen(@NotNull final ExcerptListener after) {
});
}

}
}
2 changes: 1 addition & 1 deletion src/main/java/net/openhft/chronicle/wire/FieldInfo.java
Original file line number Diff line number Diff line change
Expand Up @@ -212,4 +212,4 @@ default void copy(Object source, Object destination) {
}

boolean isEqual(Object a, Object b);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,6 @@ public static Class<?> newClass(String fullClassName,
.createClass();
}


/**
* @param interfaces an interface class
* @return a proxy class from an interface class or null if it can't be created
Expand Down
2 changes: 0 additions & 2 deletions src/main/java/net/openhft/chronicle/wire/JSONWire.java
Original file line number Diff line number Diff line change
Expand Up @@ -717,7 +717,6 @@ public JSONWire rawText(CharSequence value) {
return (JSONWire) super.marshallable(map, (Class) String.class, vClass, leaf);
}


public @NotNull JSONWire time(final LocalTime localTime) {
// Todo: fix quoted text
return (JSONWire) super.time(localTime);
Expand Down Expand Up @@ -773,7 +772,6 @@ public <E> E object(@Nullable E using, @Nullable Class clazz, boolean bestEffort
return useTypes ? parseType(using, clazz, bestEffort) : super.object(using, clazz, bestEffort);
}


@Override
public Class typePrefix() {
return super.typePrefix();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,4 +129,4 @@ default void doWriteHistory(DocumentContext dc) {
* {@link Marshallable#writeMarshallable(net.openhft.chronicle.wire.WireOut)}
*/
boolean isDirty();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ public long parse(CharSequence text) {
return parse.getSeconds() * 1000_000 + parse.getNano() / 1000;
}


/**
* Converts a duration represented in microseconds to a {@link Duration} object.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ public interface ReadDocumentContext extends DocumentContext {
* Sets the read position for this {@code ReadDocumentContext}.
*/
void closeReadPosition(long readPosition);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,4 @@ public static String generatedPackageName(String classFullName) {

return PREPEND_PACKAGE ? PACKAGE_PREFIX : "";
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -523,4 +523,4 @@ public Demarshallable readResolve() {
return demarshallable;
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,4 @@ public interface SerializationStrategy<T> {
*/
@NotNull
BracketType bracketType();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ public class TextMethodTester<T> implements YamlTester {

public static final boolean SINGLE_THREADED_CHECK_DISABLED = !Jvm.getBoolean("yaml.tester.single.threaded.check.enabled", false);


private static final boolean DUMP_TESTS = Jvm.getBoolean("dump.tests");
public static final Consumer<InvocationTargetRuntimeException> DEFAULT_INVOCATION_TARGET_RUNTIME_EXCEPTION_CONSUMER =
e -> Jvm.warn().on(TextMethodTester.class, "Exception calling target method. Continuing", e);
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/net/openhft/chronicle/wire/TriConsumer.java
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,4 @@ default TriConsumer<T, U, V> andThen(@NotNull TriConsumer<? super T, ? super U,
after.accept(t, u, v);
};
}
}
}
3 changes: 1 addition & 2 deletions src/main/java/net/openhft/chronicle/wire/ValueOut.java
Original file line number Diff line number Diff line change
Expand Up @@ -582,7 +582,6 @@ default WireOut array(@NotNull WriteValue writer, @NotNull Class arrayType) {
return sequence(writer);
}


/**
* Write a {@link WriteMarshallable} value.
*/
Expand Down Expand Up @@ -1324,4 +1323,4 @@ public void writeMarshallable(@NotNull WireOut wire) throws InvalidMarshallableE
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ public VanillaMethodReader(MarshallableIn in,
this(in, ignoreDefault, defaultParselet, SKIP_READABLE_BYTES, methodReaderInterceptorReturns, metaDataHandler, objects);
}


public VanillaMethodReader(MarshallableIn in,
boolean ignoreDefault,
WireParselet defaultParselet,
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/net/openhft/chronicle/wire/WireCommon.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
package net.openhft.chronicle.wire;

import net.openhft.chronicle.bytes.Bytes;
import net.openhft.chronicle.bytes.HexDumpBytesDescription;
import net.openhft.chronicle.bytes.CommonMarshallable;
import net.openhft.chronicle.bytes.HexDumpBytesDescription;
import net.openhft.chronicle.core.pool.ClassLookup;
import net.openhft.chronicle.core.values.*;
import net.openhft.chronicle.threads.Pauser;
Expand Down Expand Up @@ -188,4 +188,4 @@ default void notCompleteIsNotPresent(boolean notCompleteArePresent) {
* Reset the state of the wire
*/
void reset();
}
}
3 changes: 1 addition & 2 deletions src/main/java/net/openhft/chronicle/wire/WireMarshaller.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@
import net.openhft.chronicle.core.UnsafeMemory;
import net.openhft.chronicle.core.io.*;
import net.openhft.chronicle.core.scoped.ScopedResource;
import net.openhft.chronicle.core.util.ClassLocal;
import net.openhft.chronicle.core.util.ClassNotFoundRuntimeException;
import net.openhft.chronicle.core.util.ObjectUtils;
import net.openhft.chronicle.core.util.StringUtils;
import net.openhft.chronicle.core.util.ClassLocal;
import net.openhft.chronicle.core.values.IntValue;
import net.openhft.chronicle.core.values.LongValue;
import org.jetbrains.annotations.NotNull;
Expand Down Expand Up @@ -2476,5 +2476,4 @@ protected void copy(Object from, Object to) {
}
}


}
2 changes: 1 addition & 1 deletion src/main/java/net/openhft/chronicle/wire/WireParser.java
Original file line number Diff line number Diff line change
Expand Up @@ -99,4 +99,4 @@ default VanillaWireParser register(WireKey key, WireParselet valueInConsumer) {
@NotNull
VanillaWireParser register(String keyName, WireParselet valueInConsumer);

}
}
3 changes: 0 additions & 3 deletions src/main/java/net/openhft/chronicle/wire/Wires.java
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,6 @@ public static CharSequence asText(@NotNull WireIn wireIn, Bytes<?> output) {
}
}


private static Wire newJsonWire(Bytes bytes) {
return new JSONWire(bytes).useTypes(true).trimFirstCurly(false).useTextDocuments();
}
Expand Down Expand Up @@ -298,7 +297,6 @@ private static Bytes<?> asType(@NotNull WireIn wireIn, Function<Bytes, Wire> wir
}
}


/**
* @deprecated Use {@link #asJson(WireIn, Bytes)} instead
*/
Expand All @@ -316,7 +314,6 @@ private static Wire newTextWire(Bytes bytes) {
return new TextWire(bytes).addTimeStamps(true);
}


/**
* @deprecated Use {@link #acquireStringBuilderScoped()} instead
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ public interface WriteDocumentContext extends DocumentContext {
void chainedElement(boolean chainedElement);

boolean isEmpty();
}
}
2 changes: 1 addition & 1 deletion src/main/java/net/openhft/chronicle/wire/WriteValue.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ public interface WriteValue {
* Writes a value to the provided {@link ValueOut}.
*/
void writeValue(ValueOut out) throws InvalidMarshallableException;
}
}
1 change: 0 additions & 1 deletion src/main/java/net/openhft/chronicle/wire/YamlWire.java
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,6 @@ static Object readNumberOrTextFrom(char bq, final @Nullable StringBuilder s) {
return s;
}


private static boolean leaveUnparsed(char bq, @Nullable StringBuilder s) {
return s == null
|| bq != 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

package net.openhft.chronicle.wire.channel;


import net.openhft.chronicle.core.io.ClosedIORuntimeException;
import net.openhft.chronicle.core.io.InvalidMarshallableException;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
import java.util.concurrent.TimeUnit;
import java.util.function.Function;


/**
* Represents the entry point for a Chronicle Gateway, which is responsible for accepting
* incoming connections and handling requests according to a defined protocol.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ public String hostname() {
public int port() {
return port;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -75,4 +75,4 @@ public static CloseableEventHandler createEventHandler(@NotNull final Supplier<?
return new InternalAutoTailers.EventHandlerPoller(tailerSupplier, excerptListener);
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -184,4 +184,4 @@ static <E> Builder<E> builder(@NotNull final Class<E> elementType) {
return new DocumentExtractorBuilder<>(elementType);
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -139,4 +139,4 @@ default ToDoubleDocumentExtractor filter(@NotNull final DoublePredicate predicat

// peek

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -143,4 +143,4 @@ static ToLongDocumentExtractor extractingIndex() {
return (wire, index) -> index;
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@
* <p>
* The classes in this package and any sub-package are subject to change at any time for any reason.
*/
package net.openhft.chronicle.wire.domestic;
package net.openhft.chronicle.wire.domestic;
Original file line number Diff line number Diff line change
Expand Up @@ -236,4 +236,4 @@ public static <V> BinaryOperator<V> throwingMerger() {
};
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ Reduction<Map<String, MarketData>> latest = Reduction.of(
replacingMerger()) <5>
);
ChronicleQueue q = SingleChronicleQueueBuilder.builder()
.path("market-data-queue")
.appenderListener(latest) <6>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,4 +168,4 @@ <A> Reduction<DoubleSupplier> reducing(@NotNull final Supplier<A> supplier,
@NotNull final ToDoubleFunction<A> finisher);

}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -153,5 +153,4 @@ public int hashCode() {
}
}


}
}
Original file line number Diff line number Diff line change
Expand Up @@ -270,4 +270,4 @@ public static PrimitiveIterator.OfDouble iteratorOfDouble(@NotNull final Marshal
return new StreamsUtil.ExcerptIteratorOfDouble(documentProvider, extractor);
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ public void close() {
}
};


public HTTPMarshallableOut(MarshallableOutBuilder builder, WireType wireType) {
this.url = builder.url();

Expand Down
Loading

0 comments on commit 12875de

Please sign in to comment.