You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@atlas.apache.org by "Suma Shivaprasad (JIRA)" <ji...@apache.org> on 2015/09/21 17:51:05 UTC

[jira] [Commented] (ATLAS-134) Some defects found when reviewing the source code.

    [ https://issues.apache.org/jira/browse/ATLAS-134?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14900866#comment-14900866 ] 

Suma Shivaprasad commented on ATLAS-134:
----------------------------------------

In atlas-start.py, we should have the changes onyl when its windows. That seems to be missed out. Can you pls fix and attach another 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
>              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)