Commit fdd9d3c8 authored by kenton@google.com's avatar kenton@google.com

Remove more of the stuff that was supposed to be removed in r190.

parent 323e6321
...@@ -30,8 +30,6 @@ ...@@ -30,8 +30,6 @@
package com.google.protobuf; package com.google.protobuf;
import com.google.protobuf.Internal.ThreadLocalQuickQueue;
import java.io.IOException; import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
import java.io.OutputStream; import java.io.OutputStream;
...@@ -278,9 +276,6 @@ public final class UnknownFieldSet implements MessageLite { ...@@ -278,9 +276,6 @@ public final class UnknownFieldSet implements MessageLite {
* <p>Use {@link UnknownFieldSet#newBuilder()} to construct a {@code Builder}. * <p>Use {@link UnknownFieldSet#newBuilder()} to construct a {@code Builder}.
*/ */
public static final class Builder implements MessageLite.Builder { public static final class Builder implements MessageLite.Builder {
private static ThreadLocalQuickQueue<Builder> builders =
new ThreadLocalQuickQueue<Builder>();
// This constructor should never be called directly (except from 'create'). // This constructor should never be called directly (except from 'create').
private Builder() {} private Builder() {}
...@@ -293,10 +288,7 @@ public final class UnknownFieldSet implements MessageLite { ...@@ -293,10 +288,7 @@ public final class UnknownFieldSet implements MessageLite {
private Field.Builder lastField; private Field.Builder lastField;
private static Builder create() { private static Builder create() {
Builder builder = builders.get().poll(); Builder builder = new Builder();
if (builder == null) {
builder = new Builder();
}
builder.reinitialize(); builder.reinitialize();
return builder; return builder;
} }
...@@ -343,7 +335,6 @@ public final class UnknownFieldSet implements MessageLite { ...@@ -343,7 +335,6 @@ public final class UnknownFieldSet implements MessageLite {
result = new UnknownFieldSet(Collections.unmodifiableMap(fields)); result = new UnknownFieldSet(Collections.unmodifiableMap(fields));
} }
fields = null; fields = null;
builders.get().offer(this);
return result; return result;
} }
...@@ -812,18 +803,11 @@ public final class UnknownFieldSet implements MessageLite { ...@@ -812,18 +803,11 @@ public final class UnknownFieldSet implements MessageLite {
* <p>Use {@link Field#newBuilder()} to construct a {@code Builder}. * <p>Use {@link Field#newBuilder()} to construct a {@code Builder}.
*/ */
public static final class Builder { public static final class Builder {
private static ThreadLocalQuickQueue<Builder> builders =
new ThreadLocalQuickQueue<Builder>();
// This constructor should never be called directly (except from 'create'). // This constructor should never be called directly (except from 'create').
private Builder() {} private Builder() {}
private static Builder create() { private static Builder create() {
Builder builder = builders.get().poll(); Builder builder = new Builder();
if (builder == null) {
builder = new Builder();
}
builder.result = new Field(); builder.result = new Field();
return builder; return builder;
} }
...@@ -866,7 +850,6 @@ public final class UnknownFieldSet implements MessageLite { ...@@ -866,7 +850,6 @@ public final class UnknownFieldSet implements MessageLite {
final Field returnMe = result; final Field returnMe = result;
result = null; result = null;
builders.get().offer(this);
return returnMe; return returnMe;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment