Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

initial code removal (limited number of apparently unused code) #858

Merged
merged 2 commits into from
May 16, 2024
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
23 changes: 5 additions & 18 deletions src/main/java/com/amazon/ion/impl/IonReaderTextRawTokensX.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;

import static com.amazon.ion.impl.IonTokenConstsX.CharacterSequence.CHAR_SEQ_ESCAPED_NEWLINE_SEQUENCE_1;
Expand Down Expand Up @@ -1582,11 +1569,11 @@ protected IonType load_number(StringBuilder sb) throws IOException
int c2 = read_char();
if (Radix.HEX.isPrefix(c2)) {
sb.append((char)c);
c = loadRadixValue(sb, has_sign, c2, Radix.HEX);
c = loadRadixValue(sb, c2, Radix.HEX);
return load_finish_number(sb, c, IonTokenConstsX.TOKEN_HEX);
} else if (Radix.BINARY.isPrefix(c2)) {
sb.append((char) c);
c = loadRadixValue(sb, has_sign, c2, Radix.BINARY);
c = loadRadixValue(sb, c2, Radix.BINARY);
return load_finish_number(sb, c, IonTokenConstsX.TOKEN_BINARY);
}
// not a next value, back up and try again
Expand Down Expand Up @@ -1843,7 +1830,7 @@ else if (c == '+' || c == '-') {
return load_finish_number(sb, c, IonTokenConstsX.TOKEN_TIMESTAMP);
}

private final int loadRadixValue(StringBuilder sb, boolean has_sign, int c2, Radix radix)
private final int loadRadixValue(StringBuilder sb, int c2, Radix radix)
throws IOException
{
radix.assertPrefix(c2);
Expand Down
311 changes: 0 additions & 311 deletions src/main/java/com/amazon/ion/impl/IonTextBufferedStream.java

This file was deleted.

31 changes: 2 additions & 29 deletions src/main/java/com/amazon/ion/impl/UnifiedInputStreamX.java
Original file line number Diff line number Diff line change
@@ -1,21 +1,7 @@
/*
* 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;

import com.amazon.ion.impl.IonReaderTextRawTokensX.IonReaderTextTokenException;
import com.amazon.ion.impl.UnifiedSavePointManagerX.SavePoint;
import java.io.Closeable;
import java.io.IOException;
Expand Down Expand Up @@ -383,19 +369,6 @@ public final int read(byte[] dst, int offset, int length) throws IOException
}
return length - remaining;
}
private int read_utf8(int c) throws IOException
{
int len = IonUTF8.getUTF8LengthFromFirstByte(c);
for (int ii=1; ii<len; ii++) {
int c2 = read();
if (c2 == -1) {
throw new IonReaderTextTokenException("invalid UTF8 sequence encountered in stream");
}
c |= (c2 << (ii*8));
}
c = IonUTF8.getScalarFrom4BytesReversed(c);
return c;
}

/**
* the refill method is the key override that is filled in by
Expand Down
Loading