[jira] Created: (OFBIZ-3993) Build and run in openjdk 1.6

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

[jira] Created: (OFBIZ-3993) Build and run in openjdk 1.6

Nicolas Malin (Jira)
Build and run in openjdk 1.6
----------------------------

                 Key: OFBIZ-3993
                 URL: https://issues.apache.org/jira/browse/OFBIZ-3993
             Project: OFBiz
          Issue Type: Bug
    Affects Versions: Release Branch 10.04
         Environment: Fedora 10 + OpenJDK 1.6.0 (build 14.0-16) + OFBiz 10.04
            Reporter: Shi Yusen
         Attachments: ofbiz-10.04-openjdk1.6-patach.txt

OFBiz cannot be built in OpenJDK 1.6.0 reported by [hidden email]:
  build:
     [echo] [build] ========== Start Building Framework (Compile) ==========
  .../...
  classes:
    [javac16] /srv/www/Ofbiz-10.04/common.xml:93: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
    [javac16] Compiling 55 source files to /srv/www/Ofbiz-10.04/applications/product/build/classes
    [javac16] /srv/www/Ofbiz-10.04/applications/product/src/org/ofbiz/product/product/ProductSearchSession.java:1231: cannot find symbol
    [javac16] symbol  : method add(java.util.Map<java.lang.String,java.lang.Object>)
    [javac16] location: interface java.util.List<java.util.Map<java.lang.String,java.lang.String>>
    [javac16]             featureCountList.add(UtilMisc.toMap("productFeatureId", (String) searchResult.get("pfacProductFeatureId"), "productFeatureTypeId", (String) searchResult.get("pfcProductFeatureTypeId"), "description", (String) searchResult.get("pfcDescription"), "featureCount", Long.toString((Long) searchResult.get("featureCount"))));
    [javac16]                             ^
    [javac16] 1 error


--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (OFBIZ-3993) Build and run in openjdk 1.6

Nicolas Malin (Jira)

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

Shi Yusen updated OFBIZ-3993:
-----------------------------

    Attachment: ofbiz-10.04-openjdk1.6-patach.txt

This patch can fix this build problem.

> Build and run in openjdk 1.6
> ----------------------------
>
>                 Key: OFBIZ-3993
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-3993
>             Project: OFBiz
>          Issue Type: Bug
>    Affects Versions: Release Branch 10.04
>         Environment: Fedora 10 + OpenJDK 1.6.0 (build 14.0-16) + OFBiz 10.04
>            Reporter: Shi Yusen
>         Attachments: ofbiz-10.04-openjdk1.6-patach.txt
>
>
> OFBiz cannot be built in OpenJDK 1.6.0 reported by [hidden email]:
>   build:
>      [echo] [build] ========== Start Building Framework (Compile) ==========
>   .../...
>   classes:
>     [javac16] /srv/www/Ofbiz-10.04/common.xml:93: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
>     [javac16] Compiling 55 source files to /srv/www/Ofbiz-10.04/applications/product/build/classes
>     [javac16] /srv/www/Ofbiz-10.04/applications/product/src/org/ofbiz/product/product/ProductSearchSession.java:1231: cannot find symbol
>     [javac16] symbol  : method add(java.util.Map<java.lang.String,java.lang.Object>)
>     [javac16] location: interface java.util.List<java.util.Map<java.lang.String,java.lang.String>>
>     [javac16]             featureCountList.add(UtilMisc.toMap("productFeatureId", (String) searchResult.get("pfacProductFeatureId"), "productFeatureTypeId", (String) searchResult.get("pfcProductFeatureTypeId"), "description", (String) searchResult.get("pfcDescription"), "featureCount", Long.toString((Long) searchResult.get("featureCount"))));
>     [javac16]                             ^
>     [javac16] 1 error

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-3993) Build and run in openjdk 1.6

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

    [ https://issues.apache.org/jira/browse/OFBIZ-3993?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12922048#action_12922048 ]

Jacques Le Roux commented on OFBIZ-3993:
----------------------------------------

Hi Shi,

Interesting, could you explain why casting only the 1st element is enough (when there are more than one), and have you an idea why it's needed at all?

Thanks

> Build and run in openjdk 1.6
> ----------------------------
>
>                 Key: OFBIZ-3993
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-3993
>             Project: OFBiz
>          Issue Type: Bug
>    Affects Versions: Release Branch 10.04
>         Environment: Fedora 10 + OpenJDK 1.6.0 (build 14.0-16) + OFBiz 10.04
>            Reporter: Shi Yusen
>         Attachments: ofbiz-10.04-openjdk1.6-patach.txt
>
>
> OFBiz cannot be built in OpenJDK 1.6.0 reported by [hidden email]:
>   build:
>      [echo] [build] ========== Start Building Framework (Compile) ==========
>   .../...
>   classes:
>     [javac16] /srv/www/Ofbiz-10.04/common.xml:93: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
>     [javac16] Compiling 55 source files to /srv/www/Ofbiz-10.04/applications/product/build/classes
>     [javac16] /srv/www/Ofbiz-10.04/applications/product/src/org/ofbiz/product/product/ProductSearchSession.java:1231: cannot find symbol
>     [javac16] symbol  : method add(java.util.Map<java.lang.String,java.lang.Object>)
>     [javac16] location: interface java.util.List<java.util.Map<java.lang.String,java.lang.String>>
>     [javac16]             featureCountList.add(UtilMisc.toMap("productFeatureId", (String) searchResult.get("pfacProductFeatureId"), "productFeatureTypeId", (String) searchResult.get("pfcProductFeatureTypeId"), "description", (String) searchResult.get("pfcDescription"), "featureCount", Long.toString((Long) searchResult.get("featureCount"))));
>     [javac16]                             ^
>     [javac16] 1 error

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-3993) Build and run in openjdk 1.6

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

    [ https://issues.apache.org/jira/browse/OFBIZ-3993?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12922094#action_12922094 ]

Shi Yusen commented on OFBIZ-3993:
----------------------------------

Hi Jacques,

Do you mean this change:
-                    bodyParts.add(UtilMisc.<String, Object>toMap("content", communicationEvent.getString("content"), "type", communicationEvent.getString("contentMimeTypeId")));
+                    bodyParts.add(UtilMisc.<String, Object>toMap("content", (Object) communicationEvent.getString("content"), "type", communicationEvent.getString("contentMimeTypeId")));
?

The (Object) added will make only method
public static <V, V1 extends V, V2 extends V> Map<String, V> toMap(String name1, V1 value1, String name2, V2 value2)
match the call. Or the new method added in the patch
    public static Map<String, String> toMap(String name1, String value1, String name2, String value2) {
        return new UtilMisc.SimpleMap<String>(name1, value1, name2, value2);
    }
would be used.

My premise in this patch is to make changes as few as possible.

Regards,


> Build and run in openjdk 1.6
> ----------------------------
>
>                 Key: OFBIZ-3993
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-3993
>             Project: OFBiz
>          Issue Type: Bug
>    Affects Versions: Release Branch 10.04
>         Environment: Fedora 10 + OpenJDK 1.6.0 (build 14.0-16) + OFBiz 10.04
>            Reporter: Shi Yusen
>         Attachments: ofbiz-10.04-openjdk1.6-patach.txt
>
>
> OFBiz cannot be built in OpenJDK 1.6.0 reported by [hidden email]:
>   build:
>      [echo] [build] ========== Start Building Framework (Compile) ==========
>   .../...
>   classes:
>     [javac16] /srv/www/Ofbiz-10.04/common.xml:93: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
>     [javac16] Compiling 55 source files to /srv/www/Ofbiz-10.04/applications/product/build/classes
>     [javac16] /srv/www/Ofbiz-10.04/applications/product/src/org/ofbiz/product/product/ProductSearchSession.java:1231: cannot find symbol
>     [javac16] symbol  : method add(java.util.Map<java.lang.String,java.lang.Object>)
>     [javac16] location: interface java.util.List<java.util.Map<java.lang.String,java.lang.String>>
>     [javac16]             featureCountList.add(UtilMisc.toMap("productFeatureId", (String) searchResult.get("pfacProductFeatureId"), "productFeatureTypeId", (String) searchResult.get("pfcProductFeatureTypeId"), "description", (String) searchResult.get("pfcDescription"), "featureCount", Long.toString((Long) searchResult.get("featureCount"))));
>     [javac16]                             ^
>     [javac16] 1 error

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-3993) Build and run in openjdk 1.6

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

    [ https://issues.apache.org/jira/browse/OFBIZ-3993?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12922125#action_12922125 ]

Jacques Le Roux commented on OFBIZ-3993:
----------------------------------------

Ha, too fast! Seeing a repeated pattern I did not catch the new methods added in UtilMisc.java. I will have a new look...

Thanks Shi!

> Build and run in openjdk 1.6
> ----------------------------
>
>                 Key: OFBIZ-3993
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-3993
>             Project: OFBiz
>          Issue Type: Bug
>    Affects Versions: Release Branch 10.04
>         Environment: Fedora 10 + OpenJDK 1.6.0 (build 14.0-16) + OFBiz 10.04
>            Reporter: Shi Yusen
>         Attachments: ofbiz-10.04-openjdk1.6-patach.txt
>
>
> OFBiz cannot be built in OpenJDK 1.6.0 reported by [hidden email]:
>   build:
>      [echo] [build] ========== Start Building Framework (Compile) ==========
>   .../...
>   classes:
>     [javac16] /srv/www/Ofbiz-10.04/common.xml:93: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
>     [javac16] Compiling 55 source files to /srv/www/Ofbiz-10.04/applications/product/build/classes
>     [javac16] /srv/www/Ofbiz-10.04/applications/product/src/org/ofbiz/product/product/ProductSearchSession.java:1231: cannot find symbol
>     [javac16] symbol  : method add(java.util.Map<java.lang.String,java.lang.Object>)
>     [javac16] location: interface java.util.List<java.util.Map<java.lang.String,java.lang.String>>
>     [javac16]             featureCountList.add(UtilMisc.toMap("productFeatureId", (String) searchResult.get("pfacProductFeatureId"), "productFeatureTypeId", (String) searchResult.get("pfcProductFeatureTypeId"), "description", (String) searchResult.get("pfcDescription"), "featureCount", Long.toString((Long) searchResult.get("featureCount"))));
>     [javac16]                             ^
>     [javac16] 1 error

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.