Skip to content

Commit

Permalink
TEIID-4601 fix the issue with handling byte arrays, which includes im…
Browse files Browse the repository at this point in the history
…proving data type handling in general (#876)
  • Loading branch information
vhalbert authored and shawkins committed Jan 23, 2017
1 parent d2b2205 commit 8d2654d
Show file tree
Hide file tree
Showing 21 changed files with 536 additions and 435 deletions.
Expand Up @@ -51,6 +51,7 @@
import org.teiid.resource.spi.BasicManagedConnectionFactory;
import org.teiid.translator.TranslatorException;
import org.teiid.translator.infinispan.hotrod.InfinispanPlugin;
import org.teiid.translator.infinispan.hotrod.ProtobufDataTypeManager;
import org.teiid.translator.object.CacheNameProxy;
import org.teiid.translator.object.ClassRegistry;
import org.teiid.util.Version;
Expand All @@ -72,7 +73,7 @@ private enum CACHE_TYPE {
private String cacheJndiName = null;
private Class<?> cacheTypeClass = null; // cacheName ==> ClassType
private String cacheTypes = null;
private ClassRegistry methodUtil = new ClassRegistry();
private ClassRegistry methodUtil = new ClassRegistry(new ProtobufDataTypeManager());

private String protobufDefFile = null;
private String messageMarshallers = null;
Expand Down
@@ -0,0 +1,41 @@
/*
* JBoss, Home of Professional Open Source.
* See the COPYRIGHT.txt file distributed with this work for information
* regarding copyright ownership. Some portions may be licensed
* to Red Hat, Inc. under one or more contributor license agreements.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301 USA.
*/
package org.teiid.translator.infinispan.hotrod;


import org.teiid.translator.object.ObjectDataTypeManager;

/**
* @author vhalbert
*
*/
public class ProtobufDataTypeManager extends ObjectDataTypeManager {

@Override
public String getDataTypeName(Class<?> type) {
if (type.isEnum()) {
return super.getDataTypeName(String.class);
}
return super.getDataTypeName(type);
}

}

This file was deleted.

0 comments on commit 8d2654d

Please sign in to comment.