com.fasterxml.jackson.core.util.VersionUtil Java Examples
The following examples show how to use
com.fasterxml.jackson.core.util.VersionUtil.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: NonBlockingJsonParser.java From lams with GNU General Public License v2.0 | 6 votes |
private final JsonToken _startAfterComment(int fromMinorState) throws IOException { // Ok, then, need one more character... if (_inputPtr >= _inputEnd) { _minorState = fromMinorState; return (_currToken = JsonToken.NOT_AVAILABLE); } int ch = _inputBuffer[_inputPtr++] & 0xFF; switch (fromMinorState) { case MINOR_FIELD_LEADING_WS: return _startFieldName(ch); case MINOR_FIELD_LEADING_COMMA: return _startFieldNameAfterComma(ch); case MINOR_VALUE_LEADING_WS: return _startValue(ch); case MINOR_VALUE_EXPECTING_COMMA: return _startValueExpectComma(ch); case MINOR_VALUE_EXPECTING_COLON: return _startValueExpectColon(ch); case MINOR_VALUE_WS_AFTER_COMMA: return _startValueAfterComma(ch); default: } VersionUtil.throwInternal(); return null; }
Example #2
Source File: TypeSerializer.java From lams with GNU General Public License v2.0 | 5 votes |
/** * Factory method for constructing type id value object to pass to * {@link #writeTypePrefix}. */ public WritableTypeId typeId(Object value, JsonToken valueShape) { WritableTypeId typeIdDef = new WritableTypeId(value, valueShape); switch (getTypeInclusion()) { case EXISTING_PROPERTY: typeIdDef.include = WritableTypeId.Inclusion.PAYLOAD_PROPERTY; typeIdDef.asProperty = getPropertyName(); break; case EXTERNAL_PROPERTY: typeIdDef.include = WritableTypeId.Inclusion.PARENT_PROPERTY; typeIdDef.asProperty = getPropertyName(); break; case PROPERTY: typeIdDef.include = WritableTypeId.Inclusion.METADATA_PROPERTY; typeIdDef.asProperty = getPropertyName(); break; case WRAPPER_ARRAY: typeIdDef.include = WritableTypeId.Inclusion.WRAPPER_ARRAY; break; case WRAPPER_OBJECT: typeIdDef.include = WritableTypeId.Inclusion.WRAPPER_OBJECT; break; default: VersionUtil.throwInternal(); } return typeIdDef; }
Example #3
Source File: SqlgStartupManager.java From sqlg with MIT License | 5 votes |
private void updateTopology(String oldVersion) { Version v = Version.unknownVersion(); if (oldVersion != null) { v = VersionUtil.parseVersion(oldVersion, null, null); } if (v.isUnknownVersion() || v.compareTo(new Version(1, 5, 0, null, null, null)) < 0) { if (this.sqlDialect.supportsDeferrableForeignKey()) { upgradeForeignKeysToDeferrable(); } } if (v.isUnknownVersion() || v.compareTo(new Version(2, 0, 0, null, null, null)) < 0) { addPartitionSupportToSqlgSchema(); } }
Example #4
Source File: JsonGeneratorImpl.java From lams with GNU General Public License v2.0 | 4 votes |
@Override public Version version() { return VersionUtil.versionFor(getClass()); }
Example #5
Source File: NonBlockingJsonParser.java From lams with GNU General Public License v2.0 | 4 votes |
@Override protected char _decodeEscaped() throws IOException { VersionUtil.throwInternal(); return ' '; }
Example #6
Source File: NonBlockingJsonParser.java From lams with GNU General Public License v2.0 | 4 votes |
@Override public JsonToken nextToken() throws IOException { // First: regardless of where we really are, need at least one more byte; // can simplify some of the checks by short-circuiting right away if (_inputPtr >= _inputEnd) { if (_closed) { return null; } // note: if so, do not even bother changing state if (_endOfInput) { // except for this special case // End-of-input within (possibly...) started token is bit complicated, // so offline if (_currToken == JsonToken.NOT_AVAILABLE) { return _finishTokenWithEOF(); } return _eofAsNextToken(); } return JsonToken.NOT_AVAILABLE; } // in the middle of tokenization? if (_currToken == JsonToken.NOT_AVAILABLE) { return _finishToken(); } // No: fresh new token; may or may not have existing one _numTypesValid = NR_UNKNOWN; _tokenInputTotal = _currInputProcessed + _inputPtr; // also: clear any data retained so far _binaryValue = null; int ch = _inputBuffer[_inputPtr++] & 0xFF; switch (_majorState) { case MAJOR_INITIAL: return _startDocument(ch); case MAJOR_ROOT: return _startValue(ch); case MAJOR_OBJECT_FIELD_FIRST: // expect field-name or end-object return _startFieldName(ch); case MAJOR_OBJECT_FIELD_NEXT: // expect comma + field-name or end-object return _startFieldNameAfterComma(ch); case MAJOR_OBJECT_VALUE: // expect colon, followed by value return _startValueExpectColon(ch); case MAJOR_ARRAY_ELEMENT_FIRST: // expect value or end-array return _startValue(ch); case MAJOR_ARRAY_ELEMENT_NEXT: // expect leading comma + value or end-array return _startValueExpectComma(ch); default: } VersionUtil.throwInternal(); return null; }
Example #7
Source File: ParserMinimalBase.java From lams with GNU General Public License v2.0 | 4 votes |
protected final void _throwInternal() { VersionUtil.throwInternal(); }
Example #8
Source File: TestVersions.java From jackson-datatypes-collections with Apache License 2.0 | 4 votes |
public void testPackageVersion() { assertEquals(PackageVersion.VERSION, VersionUtil.versionFor(GuavaModule.class)); }
Example #9
Source File: LazyJsonModule.java From emodb with Apache License 2.0 | 4 votes |
@Override public Version version() { return VersionUtil.parseVersion("1.0", "com.bazaarvoice.emodb.common.json", "lazy-json"); }
Example #10
Source File: ConstraintViolationProblemModule.java From problem-spring-web with MIT License | 4 votes |
@Override @SuppressWarnings("deprecation") public Version version() { return VersionUtil.mavenVersionFor(ConstraintViolationProblemModule.class.getClassLoader(), "org.zalando", "problem-violations"); }
Example #11
Source File: MoneyModule.java From jackson-datatype-money with MIT License | 4 votes |
@Override @SuppressWarnings("deprecation") public Version version() { final ClassLoader loader = MoneyModule.class.getClassLoader(); return VersionUtil.mavenVersionFor(loader, "org.zalando", "jackson-datatype-money"); }
Example #12
Source File: ProblemModule.java From problem with MIT License | 4 votes |
@SuppressWarnings("deprecation") @Override public Version version() { return VersionUtil.mavenVersionFor(ProblemModule.class.getClassLoader(), "org.zalando", "jackson-datatype-problem"); }
Example #13
Source File: RabbitMQServerVersion.java From james-project with Apache License 2.0 | 4 votes |
public static RabbitMQServerVersion of(String input) { return new RabbitMQServerVersion(VersionUtil.parseVersion(input, "rabbitmq", "version")); }
Example #14
Source File: ParserMinimalBase.java From openbd-core with GNU General Public License v3.0 | 4 votes |
protected final void _throwInternal() { VersionUtil.throwInternal(); }
Example #15
Source File: JsonGeneratorImpl.java From openbd-core with GNU General Public License v3.0 | 4 votes |
@Override public Version version() { return VersionUtil.versionFor(getClass()); }
Example #16
Source File: KebabCaseEnforcingAnnotationInspector.java From conjure with Apache License 2.0 | 4 votes |
@Override public Version version() { return VersionUtil.parseVersion("0.0.1", "foo", "bar"); }
Example #17
Source File: GeneratorBase.java From openbd-core with GNU General Public License v3.0 | 2 votes |
/** * Implemented with standard version number detection algorithm, typically using * a simple generated class, with information extracted from Maven project file * during build. */ @Override public Version version() { return VersionUtil.versionFor(getClass()); }
Example #18
Source File: JsonGenerator.java From lams with GNU General Public License v2.0 | votes |
protected final void _throwInternal() { VersionUtil.throwInternal(); }
Example #19
Source File: JsonGenerator.java From openbd-core with GNU General Public License v3.0 | votes |
protected final void _throwInternal() { VersionUtil.throwInternal(); }