f.inheritableFiberLocals = f.inheritableFiberLocals != null
? filterThreadLocalMap(ThreadAccess.toMap(f.inheritableFiberLocals)).keySet().toArray() : null;
f.stack.resumeStack();
kryo.writeClass(output, f.getClass());
new FieldSerializer(kryo, f.getClass()).write(kryo, output, f);
} catch (Throwable t) {
t.printStackTrace();
throw t;
} finally {
ThreadAccess.setThreadLocals(currentThread, tmpThreadLocals);