private static Object fillSingletonMapFrom ( Input input , Schema < ? > schema , Object owner , IdStrategy strategy , boolean graph , Object map ) throws IOException { switch ( input . readFieldNumber ( schema ) ) { case 0 : // both are null return map ; case 1 : { // key exists break ; } case 3 : { // key is null final Wrapper wrapper = new Wrapper ( ) ; Object v = input . mergeObject ( wrapper , strategy . OBJECT_SCHEMA ) ; if ( ! graph || ! ( ( GraphInput ) input ) . isCurrentMessageReference ( ) ) v = wrapper . value ; try { fSingletonMap_v . set ( map , v ) ; } catch ( IllegalArgumentException e ) { throw new RuntimeException ( e ) ; } catch ( IllegalAccessException e ) { throw new RuntimeException ( e ) ; } if ( 0 != input . readFieldNumber ( schema ) ) throw new ProtostuffException ( "Corrupt input." ) ; return map ; } default : throw new ProtostuffException ( "Corrupt input." ) ; } final Wrapper wrapper = new Wrapper ( ) ; Object k = input . mergeObject ( wrapper , strategy . OBJECT_SCHEMA ) ; if ( ! graph || ! ( ( GraphInput ) input ) . isCurrentMessageReference ( ) ) k = wrapper . value ; switch ( input . readFieldNumber ( schema ) ) { case 0 : // key exists but null value try { fSingletonMap_k . set ( map , k ) ; } catch ( IllegalArgumentException e ) { throw new RuntimeException ( e ) ; } catch ( IllegalAccessException e ) { throw new RuntimeException ( e ) ; } return map ; case 3 : // key and value exist break ; default : throw new ProtostuffException ( "Corrupt input." ) ; } Object v = input . mergeObject ( wrapper , strategy . OBJECT_SCHEMA ) ; if ( ! graph || ! ( ( GraphInput ) input ) . isCurrentMessageReference ( ) ) v = wrapper . value ; try { fSingletonMap_k . set ( map , k ) ; fSingletonMap_v . set ( map , v ) ; } catch ( IllegalArgumentException e ) { throw new RuntimeException ( e ) ; } catch ( IllegalAccessException e ) { throw new RuntimeException ( e ) ; } if ( 0 != input . readFieldNumber ( schema ) ) throw new ProtostuffException ( "Corrupt input." ) ; return map ; }
Return true to