From mime4j-dev-return-2421-archive-asf-public=cust-asf.ponee.io@james.apache.org Wed May 23 12:43:06 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id F2F32180645 for ; Wed, 23 May 2018 12:43:05 +0200 (CEST) Received: (qmail 27111 invoked by uid 500); 23 May 2018 10:43:04 -0000 Mailing-List: contact mime4j-dev-help@james.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: mime4j-dev@james.apache.org Delivered-To: mailing list mime4j-dev@james.apache.org Received: (qmail 27003 invoked by uid 99); 23 May 2018 10:43:03 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 23 May 2018 10:43:03 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 0873118065E for ; Wed, 23 May 2018 10:43:03 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.591 X-Spam-Level: X-Spam-Status: No, score=-0.591 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RCVD_IN_DNSWL_MED=-2.3, SPF_FAIL=0.919, T_RP_MATCHES_RCVD=-0.01] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id C0grdXtQMuON for ; Wed, 23 May 2018 10:43:02 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id B27CB5F6C2 for ; Wed, 23 May 2018 10:43:01 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 12813E014A for ; Wed, 23 May 2018 10:43:01 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 676AF2109C for ; Wed, 23 May 2018 10:43:00 +0000 (UTC) Date: Wed, 23 May 2018 10:43:00 +0000 (UTC) From: "Dmitry Katsubo (JIRA)" To: mime4j-dev@james.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (MIME4J-278) DefaultAddressBuilderTest fails when parsing non-ASCII characters in address line MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/MIME4J-278?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16487067#comment-16487067 ] Dmitry Katsubo commented on MIME4J-278: --------------------------------------- [~BTellier]: The fix you've provided solves the issue. > DefaultAddressBuilderTest fails when parsing non-ASCII characters in address line > --------------------------------------------------------------------------------- > > Key: MIME4J-278 > URL: https://issues.apache.org/jira/browse/MIME4J-278 > Project: James Mime4j > Issue Type: Bug > Components: dom > Affects Versions: 0.8.2 > Reporter: Dmitry Katsubo > Priority: Minor > > I observe non-consistent behaviour of {{DefaultAddressBuilderTest}} in the place it tries to parse non-ASCII address line: > {code:java} > Tests run: 19, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.001 sec <<< FAILURE! - in org.apache.james.mime4j.field.address.DefaultAddressBuilderTest > testParseMailbox(org.apache.james.mime4j.field.address.DefaultAddressBuilderTest) Time elapsed: 0.001 sec <<< ERROR! > org.apache.james.mime4j.field.address.ParseException: Lexical error at line 1, column 8. Encountered: "\u0413" (1043), after : "" > at org.apache.james.mime4j.field.address.DefaultAddressBuilderTest.testParseMailbox(DefaultAddressBuilderTest.java:65) > Caused by: org.apache.james.mime4j.field.address.TokenMgrError: Lexical error at line 1, column 8. Encountered: "\u0413" (1043), after : "" > at org.apache.james.mime4j.field.address.DefaultAddressBuilderTest.testParseMailbox(DefaultAddressBuilderTest.java:65) > {code} > This test fails when I run Maven from command-line, and passes OK when I run it from Eclipse. I suspect that this test is system-codepage dependant, in particular: > * This execution works just fine: > {{mvn -DargLine="-Dfile.encoding=UTF8" clean install}} > * This execution fails with above message: > {{mvn -DargLine="-Dfile.encoding=CP1251" clean install}} > It would be difficult to fix the issue in test as {{DefaultAddressParser.DEFAULT}} is created before any static initializers are executed, but probably the problem is in implementation as parser should work consistent independently of {{file.encoding}} value. -- This message was sent by Atlassian JIRA (v7.6.3#76005)