atlas-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "liutongfeng (JIRA)" <j...@apache.org>
Subject [jira] [Issue Comment Deleted] (ATLAS-134) Some defects found when reviewing the source code.
Date Mon, 05 Oct 2015 00:57:26 GMT

     [ https://issues.apache.org/jira/browse/ATLAS-134?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

liutongfeng updated ATLAS-134:
------------------------------
    Comment: was deleted

(was: I have just checked the trunk code, 
the change for the file TestMetadata.py is not the same as the patch, 
no replace the ':' with ';', so should update again for the issue. )

> 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
>            Assignee: liutongfeng
>            Priority: Minor
>              Labels: patch
>             Fix For: trunk
>
>         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)

Mime
View raw message