[ https://issues.apache.org/jira/browse/THRIFT-2157?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15117977#comment-15117977 ]
ASF GitHub Bot commented on THRIFT-2157: ---------------------------------------- Github user bgould commented on a diff in the pull request: https://github.com/apache/thrift/pull/822#discussion_r50897651 --- Diff: lib/java/src/org/apache/thrift/TSerializable.java --- @@ -0,0 +1,46 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.thrift; + +import java.io.Serializable; + +import org.apache.thrift.protocol.TProtocol; + +/** + * Generic base interface for generated Thrift objects. + * + */ +public interface TSerializable extends Serializable { --- End diff -- I don't think this interface should extend java.io.Serializable. Being able to serialize and deserialize with Thrift suggests nothing about an object's suitability to participate in standard Java serialization. > generated code would cause ClassCastException > --------------------------------------------- > > Key: THRIFT-2157 > URL: https://issues.apache.org/jira/browse/THRIFT-2157 > Project: Thrift > Issue Type: Bug > Components: Java - Compiler > Affects Versions: 0.9.1 > Reporter: Dave Brosius > Priority: Trivial > > Looking at the thrift generated code for cassandra, i'm seeing > msg = (org.apache.thrift.TBase)new > org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, > e.getMessage()); > as seen here > https://git-wip-us.apache.org/repos/asf?p=cassandra.git;a=blob;f=interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java;h=837acfc0e964249fd62720420e8f1f85d966f1a3;hb=8f202895ab9e17c3d6bd4965924fd5f1ffc27f94#l6095 > i don't see how TApplicationException can be cast to TBase, and so i'd expect > a ClassCastException there. -- This message was sent by Atlassian JIRA (v6.3.4#6332)