Skip to content

Commit

Permalink
Tiny tweaks wrt suggested changes
Browse files Browse the repository at this point in the history
  • Loading branch information
cowtowncoder committed Feb 15, 2024
1 parent 3a1342b commit 548db8a
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 7 deletions.
1 change: 1 addition & 0 deletions src/main/java/com/fasterxml/jackson/core/JsonFactory.java
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
@SuppressWarnings("resource")
public class JsonFactory
extends TokenStreamFactory
implements java.io.Serializable
{
private static final long serialVersionUID = 2;

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/fasterxml/jackson/core/JsonParser.java
Original file line number Diff line number Diff line change
Expand Up @@ -1279,7 +1279,7 @@ public Boolean nextBooleanValue() throws IOException {
* @since 2.8
*/
public void finishToken() throws IOException {
// nothing
// nothing to do
}

/*
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/fasterxml/jackson/core/Version.java
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public Version(int major, int minor, int patchLevel, String snapshotInfo,
public boolean isUnknownVersion() { return (this == UNKNOWN_VERSION); }

public boolean isSnapshot() {
return (_snapshotInfo != null) && (!_snapshotInfo.isEmpty());
return (_snapshotInfo != null) && !_snapshotInfo.isEmpty();
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1055,7 +1055,7 @@ protected void convertNumberToInt() throws IOException
if ((_numTypesValid & NR_LONG) != 0) {
// Let's verify its lossless conversion by simple roundtrip
int result = (int) _numberLong;
if ((result) != _numberLong) {
if (result != _numberLong) {
reportOverflowInt(getText(), currentToken());
}
_numberInt = result;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -822,7 +822,7 @@ private final void _writeSegmentedRaw(char[] cbuf, int offset, int len) throws I
inner_loop:
while (true) {
int ch = cbuf[offset];
if (ch >= 0x80) {
if (ch > 0x7F) {
break inner_loop;
}
// !!! TODO: fast(er) writes (roll input, output checks in one)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1150,7 +1150,8 @@ private char[] resultArray() throws IOException
int offset = 0;
final char[] result = carr(size);
if (_segments != null) {
for (char[] curr : _segments) {
for (int i = 0, len = _segments.size(); i < len; ++i) {
char[] curr = _segments.get(i);
int currLen = curr.length;
System.arraycopy(curr, 0, result, offset, currLen);
offset += currLen;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,9 @@ public static Version versionFor(Class<?> cls)
} catch (Exception e) {
throw new IllegalArgumentException("Failed to get Versioned out of "+vClass);
}
} catch (Exception e) { // ok to be missing (not good but acceptable)

} catch (Exception e) {
// ok to be missing (not good but acceptable)
;
}
return (v == null) ? Version.unknownVersion() : v;
}
Expand Down

0 comments on commit 548db8a

Please sign in to comment.