Skip to content

Instantly share code, notes, and snippets.

@Alien2150
Created June 9, 2015 11:50
Show Gist options
  • Save Alien2150/afb191d31c73b6aefafa to your computer and use it in GitHub Desktop.
Save Alien2150/afb191d31c73b6aefafa to your computer and use it in GitHub Desktop.
Patch Shellstorm
Index: src/main/java/com/github/jsgilmore/protoshell/ProtoSerializer.java
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- src/main/java/com/github/jsgilmore/protoshell/ProtoSerializer.java (revision a36f11a9d6db50521e878bbe1a82aca5faa04fda)
+++ src/main/java/com/github/jsgilmore/protoshell/ProtoSerializer.java (revision )
@@ -39,12 +39,14 @@
public static Logger LOG = Logger.getLogger(ProtoSerializer.class);
private DataOutputStream processIn;
private InputStream processOut;
+ private static final long serialVersionUID = 1L;
public void initialize(OutputStream processIn, InputStream processOut) {
this.processIn = new DataOutputStream(processIn);
this.processOut = processOut;
}
+ @SuppressWarnings({"rawtypes","unchecked"})
public Number connect(Map conf, TopologyContext context) throws IOException, NoOutputException {
ShellMessages.Context.Builder setupInfo = ShellMessages.Context.newBuilder()
.setPidDir(context.getPIDDir());
@@ -129,7 +131,7 @@
spoutProto.clearId();
} else {
spoutProto.setCommand(msg.getCommand());
- spoutProto.setId(msg.getId());
+ spoutProto.setId(msg.getId().toString());
}
writeMessage(spoutProto.build());
}
@@ -147,6 +149,7 @@
processIn.flush();
}
+ @SuppressWarnings("rawtypes")
private Object readMessage(Parser parser) throws IOException {
Object message = parser.parseDelimitedFrom(processOut);
if (message == null) {
Index: src/main/java/com/github/jsgilmore/protoshell/ShellMessages.java
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- src/main/java/com/github/jsgilmore/protoshell/ShellMessages.java (revision a36f11a9d6db50521e878bbe1a82aca5faa04fda)
+++ src/main/java/com/github/jsgilmore/protoshell/ShellMessages.java (revision )
@@ -1284,7 +1284,7 @@
java.lang.Iterable<? extends com.github.jsgilmore.protoshell.ShellMessages.TaskComponentMapping> values) {
if (taskComponentMappingsBuilder_ == null) {
ensureTaskComponentMappingsIsMutable();
- super.addAll(values, taskComponentMappings_);
+ Builder.addAll(values, taskComponentMappings_);
onChanged();
} else {
taskComponentMappingsBuilder_.addAllMessages(values);
@@ -2936,7 +2936,7 @@
java.lang.Iterable<? extends com.github.jsgilmore.protoshell.ShellMessages.Conf> values) {
if (confsBuilder_ == null) {
ensureConfsIsMutable();
- super.addAll(values, confs_);
+ Builder.addAll(values, confs_);
onChanged();
} else {
confsBuilder_.addAllMessages(values);
@@ -4937,7 +4937,7 @@
public Builder addAllContents(
java.lang.Iterable<? extends com.google.protobuf.ByteString> values) {
ensureContentsIsMutable();
- super.addAll(values, contents_);
+ Builder.addAll(values, contents_);
onChanged();
return this;
}
@@ -5406,7 +5406,7 @@
public Builder addAllTaskIds(
java.lang.Iterable<? extends java.lang.Integer> values) {
ensureTaskIdsIsMutable();
- super.addAll(values, taskIds_);
+ Builder.addAll(values, taskIds_);
onChanged();
return this;
}
@@ -7092,7 +7092,7 @@
public Builder addAllAnchors(
java.lang.Iterable<java.lang.String> values) {
ensureAnchorsIsMutable();
- super.addAll(values, anchors_);
+ Builder.addAll(values, anchors_);
onChanged();
return this;
}
@@ -7976,7 +7976,7 @@
public Builder addAllContents(
java.lang.Iterable<? extends com.google.protobuf.ByteString> values) {
ensureContentsIsMutable();
- super.addAll(values, contents_);
+ Builder.addAll(values, contents_);
onChanged();
return this;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment