Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 3 additions & 16 deletions src/main/java/com/amazon/ion/impl/lite/IonSystemLite.java
Original file line number Diff line number Diff line change
@@ -1,18 +1,5 @@
/*
* Copyright 2007-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/

// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
package com.amazon.ion.impl.lite;

import static com.amazon.ion.SymbolTable.UNKNOWN_SYMBOL_ID;
Expand Down Expand Up @@ -72,10 +59,10 @@ final class IonSystemLite
/** Not null. */
private final IonCatalog _catalog;
private final IonLoader _loader;

/** Immutable. */
private final IonTextWriterBuilder myTextWriterBuilder;
/** Immutable. */

private final _Private_IonBinaryWriterBuilder myBinaryWriterBuilder;
/** Immutable. **/
private final IonReaderBuilder myReaderBuilder;
Expand Down
42 changes: 12 additions & 30 deletions src/main/java/com/amazon/ion/system/IonSystemBuilder.java
Original file line number Diff line number Diff line change
@@ -1,18 +1,5 @@
/*
* Copyright 2007-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/

// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
package com.amazon.ion.system;

import static com.amazon.ion.impl.lite._Private_LiteDomTrampoline.newLiteSystem;
Expand Down Expand Up @@ -104,7 +91,7 @@ public static IonSystemBuilder standard()
IonCatalog myCatalog;
boolean myStreamCopyOptimized = false;

IonTextWriterBuilder textWriterBuilder = IonTextWriterBuilder.standard().withCharsetAscii();
IonTextWriterBuilder textWriterBuilder = IonTextWriterBuilder.standard();
IonBinaryWriterBuilder binaryWriterBuilder = IonBinaryWriterBuilder.standard();
IonReaderBuilder readerBuilder = IonReaderBuilder.standard();

Expand Down Expand Up @@ -282,8 +269,7 @@ public final IonSystemBuilder withStreamCopyOptimized(boolean optimized)

/**
* Gets the text writer builder whose options will be used when building an
* {@link IonSystem}. By default, {@link IonTextWriterBuilder#standard()}
* using {@code US-ASCII} encoding will be used.
* {@link IonSystem}. By default, {@link IonTextWriterBuilder#standard()} will be used.
*
* @see #setIonTextWriterBuilder(IonTextWriterBuilder)
* @see #withIonTextWriterBuilder(IonTextWriterBuilder)
Expand All @@ -294,13 +280,10 @@ public final IonTextWriterBuilder getIonTextWriterBuilder() {

/**
* Sets the text writer builder whose options will be used when building
* an {@link IonSystem}. The writer builder's catalog will never be used; the
* catalog provided to {@link #setCatalog(IonCatalog)} or
* {@link #withCatalog(IonCatalog)} will always be used instead.
* an {@link IonSystem}.
*
* @param builder the writer builder to use in built systems.
* If null, each system will be built with {@link IonTextWriterBuilder#standard()}
* using {@code US-ASCII} encoding.
* If unset, each system will be built with {@link IonTextWriterBuilder#standard()}.
*
* @see #getIonTextWriterBuilder()
* @see #withIonTextWriterBuilder(IonTextWriterBuilder)
Expand All @@ -320,8 +303,7 @@ public final void setIonTextWriterBuilder(IonTextWriterBuilder builder) {
* always be used instead.
*
* @param builder the writer builder to use in built systems.
* If null, each system will be built with {@link IonTextWriterBuilder#standard()}
* using {@code US-ASCII} encoding.
* If unset, each system will be built with {@link IonTextWriterBuilder#standard()}.
*
* @see #getIonTextWriterBuilder()
* @see #setIonTextWriterBuilder(IonTextWriterBuilder)
Expand Down Expand Up @@ -354,7 +336,7 @@ public final IonBinaryWriterBuilder getIonBinaryWriterBuilder() {
* {@link #withCatalog(IonCatalog)} will always be used instead.
*
* @param builder the writer builder to use in built systems.
* If null, each system will be built with {@link IonBinaryWriterBuilder#standard()}.
* If unset, each system will be built with {@link IonBinaryWriterBuilder#standard()}.
*
* @see #getIonBinaryWriterBuilder()
* @see #withIonBinaryWriterBuilder(IonBinaryWriterBuilder)
Expand All @@ -374,7 +356,7 @@ public final void setIonBinaryWriterBuilder(IonBinaryWriterBuilder builder) {
* always be used instead.
*
* @param builder the writer builder to use in built systems.
* If null, each system will be built with {@link IonBinaryWriterBuilder#standard()}.
* If unset, each system will be built with {@link IonBinaryWriterBuilder#standard()}.
*
* @see #getIonBinaryWriterBuilder()
* @see #setIonBinaryWriterBuilder(IonBinaryWriterBuilder)
Expand Down Expand Up @@ -407,7 +389,7 @@ public final IonReaderBuilder getReaderBuilder() {
* {@link #withCatalog(IonCatalog)} will always be used instead.
*
* @param builder the reader builder to use in built systems.
* If null, each system will be built with {@link IonReaderBuilder#standard()}.
* If unset, each system will be built with {@link IonReaderBuilder#standard()}.
*
* @see #getReaderBuilder()
* @see #withReaderBuilder(IonReaderBuilder)
Expand All @@ -427,7 +409,7 @@ public final void setReaderBuilder(IonReaderBuilder builder) {
* always be used instead.
*
* @param builder the reader builder to use in built systems.
* If null, each system will be built with {@link IonReaderBuilder#standard()}.
* If unset, each system will be built with {@link IonReaderBuilder#standard()}.
*
* @see #getReaderBuilder()
* @see #setReaderBuilder(IonReaderBuilder)
Expand Down Expand Up @@ -462,7 +444,7 @@ public final IonSystem build()
SymbolTable systemSymtab = _Private_Utils.systemSymtab(1);
bwb.setInitialSymbolTable(systemSymtab);
// This is what we need, more or less.
// bwb = bwb.fillDefaults();
// bwb = bwb.fillDefaults();

return newLiteSystem(twb, (_Private_IonBinaryWriterBuilder) bwb, rb);
}
Expand Down