Skip to content

Commit

Permalink
BZ-748752 Traits are not Serializable
Browse files Browse the repository at this point in the history
  • Loading branch information
sotty authored and etirelli committed Apr 12, 2012
1 parent 6cc05a7 commit 1823178
Showing 1 changed file with 0 additions and 8 deletions.
Expand Up @@ -24,31 +24,23 @@ public TripleBasedBean( Object o, TripleStore store ) {

public void writeExternal(ObjectOutput out) throws IOException {
super.writeExternal( out );
System.out.println(" written a " + this.getClass().getName() + " >> " + object );

int N = getTriplesForSubject( getObject() ).size();
out.writeInt( N );
for ( Triple t : getTriplesForSubject( getObject() ) ) {
System.out.println("Exting " + t );
out.writeObject( new TripleImpl( null, t.getProperty(), t.getValue() ) );
}

}

public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
super.readExternal( in );

System.out.println(" ridden a " + this.getClass().getName() + " >> " + object + " ! " + store);

int N = in.readInt( );
for ( int j = 0; j < N; j++ ) {
Triple t = (Triple) in.readObject();
((TripleImpl) t).setInstance( getObject() );
System.out.println("Inned " + t );
store.put( t, false );
}


}

public Object getObject() {
Expand Down

0 comments on commit 1823178

Please sign in to comment.