Skip to content

Commit

Permalink
errorprone :: MemberName - pickup package (#854)
Browse files Browse the repository at this point in the history
  • Loading branch information
jpdahlke authored Jul 24, 2024
1 parent 7ec2fd8 commit 98f579e
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 23 deletions.
2 changes: 1 addition & 1 deletion src/main/java/emissary/pickup/PickUpPlace.java
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ public boolean processDataFile(File theFile, String fixedName, boolean isOversiz
boolean success = true;
logger.debug("Starting processDataFile in PickUpPlace for {}", theFile);

ObjectTracingService.emitLifecycleEvent(null, fixedName, ObjectTracing.Stage.PickUp, useObjectTraceLogger);
ObjectTracingService.emitLifecycleEvent(null, fixedName, ObjectTracing.Stage.PICK_UP, useObjectTraceLogger);

// Handle oversize data quickly without reading the file
if (isOversize) {
Expand Down
24 changes: 12 additions & 12 deletions src/main/java/emissary/pickup/WorkBundle.java
Original file line number Diff line number Diff line change
Expand Up @@ -124,11 +124,11 @@ public WorkBundle(WorkBundle that) {
*/
public static WorkBundle readFromStream(DataInputStream in) throws IOException {
WorkBundle wb = new WorkBundle();
wb.bundleId = readUTFOrNull(in);
wb.outputRoot = readUTFOrNull(in);
wb.eatPrefix = readUTFOrNull(in);
wb.caseId = readUTFOrNull(in);
wb.sentTo = readUTFOrNull(in);
wb.bundleId = readUtfOrNull(in);
wb.outputRoot = readUtfOrNull(in);
wb.eatPrefix = readUtfOrNull(in);
wb.caseId = readUtfOrNull(in);
wb.sentTo = readUtfOrNull(in);
wb.errorCount = in.readInt();
wb.priority = in.readInt();
wb.simpleMode = in.readBoolean();
Expand All @@ -153,11 +153,11 @@ public static WorkBundle readFromStream(DataInputStream in) throws IOException {
* @throws IOException if there is a problem writing to the stream.
*/
public void writeToStream(DataOutputStream out) throws IOException {
writeUTFOrNull(bundleId, out);
writeUTFOrNull(outputRoot, out);
writeUTFOrNull(eatPrefix, out);
writeUTFOrNull(caseId, out);
writeUTFOrNull(sentTo, out);
writeUtfOrNull(bundleId, out);
writeUtfOrNull(outputRoot, out);
writeUtfOrNull(eatPrefix, out);
writeUtfOrNull(caseId, out);
writeUtfOrNull(sentTo, out);
out.writeInt(errorCount);
out.writeInt(priority);
out.writeBoolean(simpleMode);
Expand All @@ -175,14 +175,14 @@ public void writeToStream(DataOutputStream out) throws IOException {
}

@Nullable
static String readUTFOrNull(DataInputStream in) throws IOException {
static String readUtfOrNull(DataInputStream in) throws IOException {
if (in.readBoolean()) {
return in.readUTF();
}
return null;
}

static void writeUTFOrNull(@Nullable String s, DataOutputStream out) throws IOException {
static void writeUtfOrNull(@Nullable String s, DataOutputStream out) throws IOException {
out.writeBoolean(s != null);
if (s != null) {
out.writeUTF(s);
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/emissary/pickup/WorkUnit.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,16 +43,16 @@ public final class WorkUnit {

public static WorkUnit readFromStream(DataInputStream in) throws IOException {
final WorkUnit u = new WorkUnit(null);
u.fileName = WorkBundle.readUTFOrNull(in);
u.transactionId = WorkBundle.readUTFOrNull(in);
u.fileName = WorkBundle.readUtfOrNull(in);
u.transactionId = WorkBundle.readUtfOrNull(in);
u.failedToParse = in.readBoolean();
u.failedToProcess = in.readBoolean();
return u;
}

public void writeToStream(DataOutputStream out) throws IOException {
WorkBundle.writeUTFOrNull(fileName, out);
WorkBundle.writeUTFOrNull(transactionId, out);
WorkBundle.writeUtfOrNull(fileName, out);
WorkBundle.writeUtfOrNull(transactionId, out);
out.writeBoolean(failedToParse);
out.writeBoolean(failedToProcess);
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/emissary/spi/ObjectTracing.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
public interface ObjectTracing {

enum Stage {
PickUp, DropOff
PICK_UP, DROP_OFF
}

/**
Expand Down
10 changes: 5 additions & 5 deletions src/test/java/emissary/pickup/WorkBundleTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -293,11 +293,11 @@ void testLimitSerDe() throws IOException {
wul.add(new WorkUnit(fileName));
}

WorkBundle.writeUTFOrNull(wb1.bundleId, out);
WorkBundle.writeUTFOrNull(wb1.outputRoot, out);
WorkBundle.writeUTFOrNull(wb1.eatPrefix, out);
WorkBundle.writeUTFOrNull(wb1.caseId, out);
WorkBundle.writeUTFOrNull(wb1.sentTo, out);
WorkBundle.writeUtfOrNull(wb1.bundleId, out);
WorkBundle.writeUtfOrNull(wb1.outputRoot, out);
WorkBundle.writeUtfOrNull(wb1.eatPrefix, out);
WorkBundle.writeUtfOrNull(wb1.caseId, out);
WorkBundle.writeUtfOrNull(wb1.sentTo, out);
out.writeInt(wb1.errorCount);
out.writeInt(wb1.priority);
out.writeBoolean(wb1.simpleMode);
Expand Down

0 comments on commit 98f579e

Please sign in to comment.