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
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public final class Base64Variants
*/
public final static Base64Variant MODIFIED_FOR_URL;
static {
StringBuffer sb = new StringBuffer(STD_BASE64_ALPHABET);
StringBuilder sb = new StringBuilder(STD_BASE64_ALPHABET);
// Replace plus with hyphen, slash with underscore (and no padding)
sb.setCharAt(sb.indexOf("+"), '-');
sb.setCharAt(sb.indexOf("/"), '_');
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/fasterxml/jackson/core/JsonFactory.java
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ public static int collectDefaults() {
* and this reuse only works within context of a single
* factory instance.
*/
public JsonFactory() { this((ObjectCodec) null); }
public JsonFactory() { this(null); }

public JsonFactory(ObjectCodec oc) { _objectCodec = oc; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@ public JsonGenerationException(String msg)

public JsonGenerationException(String msg, Throwable rootCause)
{
super(msg, (JsonLocation)null, rootCause);
super(msg, null, rootCause);
}
}
8 changes: 1 addition & 7 deletions src/main/java/com/fasterxml/jackson/core/Version.java
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,7 @@ public Version(int major, int minor, int patchLevel, String snapshotInfo,
public String getArtifactId() { return _artifactId; }

public String toFullString() {
return new StringBuilder()
.append(_groupId)
.append('/')
.append(_artifactId)
.append('/')
.append(toString())
.toString();
return _groupId + '/' + _artifactId + '/' + toString();
}

@Override
Expand Down
4 changes: 1 addition & 3 deletions src/main/java/com/fasterxml/jackson/core/io/UTF32Reader.java
Original file line number Diff line number Diff line change
Expand Up @@ -201,9 +201,7 @@ private boolean loadMore(int available) throws IOException {
// Bytes that need to be moved to the beginning of buffer?
if (available > 0) {
if (_ptr > 0) {
for (int i = 0; i < available; ++i) {
_buffer[i] = _buffer[_ptr+i];
}
System.arraycopy(_buffer, _ptr, _buffer, 0, available);
_ptr = 0;
}
_length = available;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2792,7 +2792,7 @@ protected char _decodeEscaped() throws IOException
}
int c = (int) _inputBuffer[_inputPtr++];

switch ((int) c) {
switch (c) {
// First, ones that are mapped
case 'b':
return '\b';
Expand Down Expand Up @@ -2838,7 +2838,7 @@ protected char _decodeEscaped() throws IOException

protected int _decodeCharForError(int firstByte) throws IOException
{
int c = (int) firstByte;
int c = firstByte;
if (c < 0) { // if >= 0, is ascii and fine as is
int needed;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1049,9 +1049,7 @@ private static Name constructName(int hash, String name, int[] quads, int qlen)
}
// Otherwise, need to copy the incoming buffer
int[] buf = new int[qlen];
for (int i = 0; i < qlen; ++i) {
buf[i] = quads[i];
}
System.arraycopy(quads, 0, buf, 0, qlen);
return new NameN(name, hash, buf, qlen);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -700,7 +700,7 @@ private char[] resultArray()
final char[] result = carr(size);
if (_segments != null) {
for (int i = 0, len = _segments.size(); i < len; ++i) {
char[] curr = (char[]) _segments.get(i);
char[] curr = _segments.get(i);
int currLen = curr.length;
System.arraycopy(curr, 0, result, offset, currLen);
offset += currLen;
Expand Down