[ https://issues.apache.org/jira/browse/ATLAS-134?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
liutongfeng updated ATLAS-134: ------------------------------ Attachment: ATLAS-134.patch > Some defects found when reviewing the source code. > -------------------------------------------------- > > Key: ATLAS-134 > URL: https://issues.apache.org/jira/browse/ATLAS-134 > Project: Atlas > Issue Type: Bug > Affects Versions: trunk > Reporter: liutongfeng > Priority: Minor > Attachments: ATLAS-134.patch > > > 1.The second getKeyType() should be getValueType(). > file : ObjectGraphTraversal.java > line : 56 > IDataType keyType = ((DataTypes.MapType) dT).getKeyType(); > IDataType valueType = ((DataTypes.MapType) dT).getKeyType(); > processMap(keyType, valueType, val); > 2.The second getKeyType() should be getValueType(). > file : ObjectGraphWalker.java > line : 94 > IDataType keyType = ((DataTypes.MapType) dT).getKeyType(); > IDataType valueType = ((DataTypes.MapType) dT).getKeyType(); > visitMap(keyType, valueType, val); > 3.When OS is WINDOWS, '/' should be '\\', otherwise the test will fail. > file : TestMetadata.py > line : 52 > if IS_WINDOWS: > java_mock.assert_called_with( > 'org.apache.atlas.Main', > ['-app', 'metadata_home/server/webapp/atlas'], > > 'metadata_home/conf:metadata_home/server/webapp/atlas/WEB-INF/classes:metadata_home/server/webapp/atlas/WEB-INF/lib\\*:metadata_home/libext\\*', > ['-Datlas.log.dir=metadata_home/logs', > '-Datlas.log.file=application.log', '-Datlas.home=metadata_home', > '-Datlas.conf=metadata_home/conf', '-Xmx1024m', > '-Dlog4j.configuration=atlas-log4j.xml'], 'metadata_home/logs') > else: > 4.Should use return. > file : > incubator-atlas\repository\src\main\java\org\apache\atlas\repository\memory\AttributeStores.java > line : 58 > static IAttributeStore createStore(AttributeInfo i) throws > RepositoryException { > switch (i.dataType().getTypeCategory()) { > case PRIMITIVE: > if (i.dataType() == DataTypes.BOOLEAN_TYPE) { > return new BooleanAttributeStore(i); > } else if (i.dataType() == DataTypes.BYTE_TYPE) { > return new ByteAttributeStore(i); > } else if (i.dataType() == DataTypes.SHORT_TYPE) { > new ShortAttributeStore(i); // should be return > } else if (i.dataType() == DataTypes.INT_TYPE) { > return new IntAttributeStore(i); -- This message was sent by Atlassian JIRA (v6.3.4#6332)