java – OrientDB在使用Unicode,土耳其语和枚举时遇到问题

我正在使用一个具有枚举类型的lib,这些类似于consts;
Type.SHORT
Type.LONG
Type.FLOAT
Type.STRING

当我在Eclipse中调试时,我收到一个错误

No enum const class Type.STRİNG

当我使用土耳其语系统时,工作i>有一个问题,但因为这是一个枚举const,即使我将每个属性都设置为UTF-8,也没有什么能让STRING成为Eclipse应该寻找的东西.但它仍然在寻找STRİNG,它无法找到,我无法使用它.我该怎么做?

项目>属性>资源>文本文件编码现在是UTF-8.问题仍然存在

编辑:更多信息可能会提供一些我无法得到的线索;
我正在开发OrientDB.这是我的第一次尝试,所以我不知道问题可能出在OrientDB软件包上.但是我使用了很多其他的库,我从未见过这样的问题.这个包中有一个OType枚举,我只是想连接数据库.

String url = "local:database";
    ODatabaSEObjectTx db = new ODatabaSEObjectTx(url).
    Person person = new Person("John");
    db.save(person);
    db.close();

我还没有更多的代码.创建数据库,但后来我得到了java.lang.IllegalArgumentException:

Caused by: java.lang.IllegalArgumentException: No enum const class com.orientechnologies.orient.core.Metadata.schema.OType.STRİNG
    at java.lang.Enum.valueOf(UnkNown Source)
    at com.orientechnologies.orient.core.Metadata.schema.OType.valueOf(OType.java:41)
    at com.orientechnologies.orient.core.sql.OCommandExecutorsqlCreateProperty.parse(OCommandExecutorsqlCreateProperty.java:81)
    at com.orientechnologies.orient.core.sql.OCommandExecutorsqlCreateProperty.parse(OCommandExecutorsqlCreateProperty.java:35)
    at com.orientechnologies.orient.core.sql.OCommandExecutorsqlDelegate.parse(OCommandExecutorsqlDelegate.java:43)
    at com.orientechnologies.orient.core.sql.OCommandExecutorsqlDelegate.parse(OCommandExecutorsqlDelegate.java:28)
    at com.orientechnologies.orient.core.storage.OStorageEmbedded.command(OStorageEmbedded.java:63)
    at com.orientechnologies.orient.core.command.OCommandRequestTextAbstract.execute(OCommandRequestTextAbstract.java:63)
    at com.orientechnologies.orient.core.Metadata.schema.OClassImpl.addProperty(OClassImpl.java:342)
    at com.orientechnologies.orient.core.Metadata.schema.OClassImpl.createProperty(OClassImpl.java:258)
    at com.orientechnologies.orient.core.Metadata.security.OSecurityShared.create(OSecurityShared.java:177)
    at com.orientechnologies.orient.core.Metadata.security.OSecurityProxy.create(OSecurityProxy.java:37)
    at com.orientechnologies.orient.core.Metadata.OMetadata.create(OMetadata.java:70)
    at com.orientechnologies.orient.core.db.record.ODatabaseRecordAbstract.create(ODatabaseRecordAbstract.java:142)
    ... 4 more

这是OType类:http://code.google.com/p/orient/source/browse/trunk/core/src/main/java/com/orientechnologies/orient/core/metadata/schema/OType.java

和其他班级; OCommandExecutorsqlCreateProperty:
http://code.google.com/p/orient/source/browse/trunk/core/src/main/java/com/orientechnologies/orient/core/sql/OCommandExecutorSQLCreateProperty.java

第81行说:type = OType.valueOf(word.toString());

解决方法

我是否正确假设您使用土耳其语区域设置运行此程序?然后看起来这个bug在OCommandExecutorsqlCreateProperty的第118行:
linkedType = OType.valueOf(linked.toupperCase());

您必须指定应使用其上层规则的Locale,可能是Locale.ENGLISH作为toupperCase的参数.

相关文章

最近看了一下学习资料,感觉进制转换其实还是挺有意思的,尤...
/*HashSet 基本操作 * --set:元素是无序的,存入和取出顺序不...
/*list 基本操作 * * List a=new List(); * 增 * a.add(inde...
/* * 内部类 * */ 1 class OutClass{ 2 //定义外部类的成员变...
集合的操作Iterator、Collection、Set和HashSet关系Iterator...
接口中常量的修饰关键字:public,static,final(常量)函数...