Skip to content

Commit 83125e9

Browse files
committed
typeMeta
1 parent 8db5f00 commit 83125e9

File tree

8 files changed

+503
-93
lines changed

8 files changed

+503
-93
lines changed

java/fory-core/src/test/java/org/apache/fory/xlang/XlangTestBase.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
import java.nio.charset.StandardCharsets;
2727
import java.nio.file.Files;
2828
import java.nio.file.Path;
29+
import java.nio.file.Paths;
2930
import java.nio.file.StandardOpenOption;
3031
import java.time.Instant;
3132
import java.time.LocalDate;
@@ -189,9 +190,8 @@ protected ExecutionContext prepareExecution(String caseName, byte[] payload) thr
189190
}
190191

191192
private Path createDataFile(String caseName, byte[] payload) throws IOException {
192-
Path dataFile = Files.createTempFile(caseName, "data");
193+
Path dataFile = Paths.get("/Users/weipeng/Desktop/data");
193194
writeData(dataFile, payload == null ? new byte[0] : payload);
194-
dataFile.toFile().deleteOnExit();
195195
return dataFile;
196196
}
197197

@@ -394,7 +394,7 @@ public void testMurmurHash3() throws IOException {
394394
runPeer(ctx);
395395
}
396396

397-
private void _testStringSerializer(Fory fory, String caseName) throws IOException {
397+
public void _testStringSerializer(Fory fory, String caseName) throws IOException {
398398
MemoryBuffer buffer = MemoryUtils.buffer(256);
399399
String[] testStrings =
400400
new String[] {

javascript/packages/fory/lib/classResolver.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ export default class ClassResolver {
8585
this.dateSerializer = this.getSerializerById((TypeId.TIMESTAMP));
8686
this.stringSerializer = this.getSerializerById((TypeId.STRING));
8787
this.setSerializer = this.getSerializerById((TypeId.SET));
88-
this.arraySerializer = this.getSerializerById((TypeId.ARRAY));
88+
this.arraySerializer = this.getSerializerById((TypeId.LIST));
8989
this.mapSerializer = this.getSerializerById((TypeId.MAP));
9090
this.uint8ArraySerializer = this.getSerializerById(TypeId.UINT8_ARRAY);
9191
this.uint16ArraySerializer = this.getSerializerById(TypeId.UINT16_ARRAY);

javascript/packages/fory/lib/gen/array.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,4 +57,4 @@ class ArraySerializerGenerator extends CollectionSerializerGenerator {
5757
}
5858
}
5959

60-
CodegenRegistry.register(TypeId.ARRAY, ArraySerializerGenerator);
60+
CodegenRegistry.register(TypeId.LIST, ArraySerializerGenerator);

javascript/packages/fory/lib/gen/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ export class Gen {
8686
this.register(<StructTypeInfo>typeInfo, func()(this.fory, Gen.external, typeInfo, this.regOptions));
8787
}
8888
}
89-
if (typeInfo.typeId === TypeId.ARRAY) {
89+
if (typeInfo.typeId === TypeId.LIST) {
9090
this.traversalContainer((<ArrayTypeInfo>typeInfo).options.inner);
9191
}
9292
if (typeInfo.typeId === TypeId.SET) {

javascript/packages/fory/lib/gen/struct.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ class StructSerializerGenerator extends BaseSerializerGenerator {
9090
const result = this.scope.uniqueName("result");
9191

9292
return `
93-
${
93+
${
9494
this.builder.fory.config.mode === Mode.SchemaConsistent
9595
? `
9696
if (${this.builder.reader.varUInt32()} !== ${computeStructHash(this.typeInfo)}) {

0 commit comments

Comments
 (0)