Skip to content

Commit d816758

Browse files
committed
HHH-17404 : removed dead code
1 parent a069e55 commit d816758

File tree

11 files changed

+192
-686
lines changed

11 files changed

+192
-686
lines changed

hibernate-core/src/main/java/org/hibernate/dialect/JsonHelper.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
import org.hibernate.type.descriptor.jdbc.AggregateJdbcType;
3737
import org.hibernate.type.descriptor.jdbc.ArrayJdbcType;
3838
import org.hibernate.type.descriptor.jdbc.JdbcType;
39-
import org.hibernate.type.format.JsonDocumentItem;
39+
import org.hibernate.type.format.JsonDocumentItemType;
4040
import org.hibernate.type.format.JsonDocumentReader;
4141
import org.hibernate.type.format.JsonDocumentReaderFactory;
4242
import org.hibernate.type.format.JsonDocumentWriter;
@@ -258,7 +258,7 @@ private static <X> X consumeJsonDocumentItems(JsonDocumentReader reader, Embedda
258258
objectArrays.push( objectArrayResult );
259259

260260
while(reader.hasNext()) {
261-
JsonDocumentItem.JsonDocumentItemType type = reader.next();
261+
JsonDocumentItemType type = reader.next();
262262
switch (type) {
263263
case VALUE_KEY:
264264
currentKeyName = reader.getObjectKeyName();
@@ -431,12 +431,12 @@ public static <X> X arrayFromString(
431431
JsonValueJDBCTypeAdapter adapter = JsonValueJDBCTypeAdapterFactory.getAdapter(reader,false);
432432

433433
assert reader.hasNext():"Invalid array string";
434-
assert reader.next() == JsonDocumentItem.JsonDocumentItemType.ARRAY_START:"Invalid start of array";
434+
assert reader.next() == JsonDocumentItemType.ARRAY_START:"Invalid start of array";
435435
boolean endArrayFound = false;
436436
while(reader.hasNext()) {
437-
JsonDocumentItem.JsonDocumentItemType type = reader.next();
437+
JsonDocumentItemType type = reader.next();
438438
switch ( type ) {
439-
case JsonDocumentItem.JsonDocumentItemType.ARRAY_END:
439+
case JsonDocumentItemType.ARRAY_END:
440440
endArrayFound=true;
441441
break;
442442
case NULL_VALUE:

hibernate-core/src/main/java/org/hibernate/dialect/OracleOsonJacksonJdbcType.java

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -149,21 +149,12 @@ private X fromOson(InputStream osonBytes, WrapperOptions options) throws Excepti
149149
// and build the array.(as opposed to let Jackson do it as we do not
150150
// have a proper object definition at that stage).
151151
OracleJsonParser osonParser = new OracleJsonFactory().createJsonBinaryParser( osonBytes );
152-
153-
154-
//ObjectArrayOsonDocumentHandler handler = new ObjectArrayOsonDocumentHandler( getEmbeddableMappingType(),
155-
// options);
156-
//OsonHelper.consumeOsonTokens(osonParser, osonParser.next(), handler);
157-
158-
//osonBytes.reset();
159-
//OracleJsonParser osonParser2 = new OracleJsonFactory().createJsonBinaryParser( osonBytes);
160152
Object[] objects = JsonHelper.deserialize(
161153
getEmbeddableMappingType(),
162154
osonParser,
163155
javaType.getJavaTypeClass() != Object[].class,
164156
options
165157
);
166-
//Object[] objects2 = (Object[]) handler.getObjectArray();
167158
return (X) objects;
168159
}
169160

hibernate-core/src/main/java/org/hibernate/dialect/OsonHelper.java

Lines changed: 0 additions & 104 deletions
This file was deleted.

hibernate-core/src/main/java/org/hibernate/type/format/JsonDocumentHandler.java

Lines changed: 0 additions & 62 deletions
This file was deleted.

hibernate-core/src/main/java/org/hibernate/type/format/JsonDocumentItem.java

Lines changed: 0 additions & 87 deletions
This file was deleted.
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
/*
2+
* SPDX-License-Identifier: LGPL-2.1-or-later
3+
* Copyright Red Hat Inc. and Hibernate Authors
4+
*/
5+
package org.hibernate.type.format;
6+
7+
/**
8+
* Json item types
9+
*/
10+
public enum JsonDocumentItemType {
11+
/**
12+
* Start of a Json Object '{'
13+
*/
14+
OBJECT_START,
15+
/**
16+
* end of a Json Object '}'
17+
*/
18+
OBJECT_END,
19+
/**
20+
* Start of a Json array '['
21+
*/
22+
ARRAY_START,
23+
/**
24+
* End of a Json array ']'
25+
*/
26+
ARRAY_END,
27+
/**
28+
* key of Json attribute
29+
*/
30+
VALUE_KEY,
31+
/**
32+
* boolean value within Json object or array
33+
*/
34+
BOOLEAN_VALUE,
35+
/**
36+
* null value within Json object or array
37+
*/
38+
NULL_VALUE,
39+
/**
40+
* numeric value within Json object or array
41+
*/
42+
NUMERIC_VALUE,
43+
/**
44+
* String (quoted) value within Json object or array
45+
*/
46+
VALUE
47+
}

hibernate-core/src/main/java/org/hibernate/type/format/JsonDocumentReader.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@
7979
*
8080
* @author Emmanuel Jannetti
8181
*/
82-
public interface JsonDocumentReader extends Iterator<JsonDocumentItem.JsonDocumentItemType> {
82+
public interface JsonDocumentReader extends Iterator<JsonDocumentItemType> {
8383
default void forEachRemaining() {
8484
throw new UnsupportedOperationException("forEachRemaining");
8585
}

0 commit comments

Comments
 (0)