[jira] [Commented] (JAMES-1808) if (character > 128) should be changed to if (character >= 128)

2021-09-04 Thread Benoit Tellier (Jira)


[ 
https://issues.apache.org/jira/browse/JAMES-1808?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17409955#comment-17409955
 ] 

Benoit Tellier commented on JAMES-1808:
---

https://github.com/apache/james-project/pull/634 fixes this.

> if (character > 128) should be changed to if (character >= 128)
> ---
>
> Key: JAMES-1808
> URL: https://issues.apache.org/jira/browse/JAMES-1808
> Project: James Server
>  Issue Type: Bug
>  Components: IMAPServer
>Affects Versions: 3.0.0-beta5
>Reporter: Paul Lee
>Priority: Minor
> Fix For: 3.0.0
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> There is a conditional code block as follows in the class 
> 'ImapResponseComposerImpl' of the package 'org.apache.james.imap.encode.base' 
> in the 'protocols-imap' project.
> // 7-bit ASCII only
> if (character > 128) {
> buffer.write(BYTE_QUESTION);
> } else {
> buffer.write((byte) character);
> }
> An equals(=) sign should be included in the conditional since the range of 
> US-ASCII is from 0 to 127(not including 128).



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org
For additional commands, e-mail: server-dev-h...@james.apache.org



[jira] [Commented] (JAMES-1808) if (character > 128) should be changed to if (character >= 128)

2021-09-04 Thread Benoit Tellier (Jira)


[ 
https://issues.apache.org/jira/browse/JAMES-1808?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17409866#comment-17409866
 ] 

Benoit Tellier commented on JAMES-1808:
---

Hello there,

This is a clear report, and it has sadly not been fixed for years (litteraly)

I propose myself to fix this.

Regards,

Benoit

> if (character > 128) should be changed to if (character >= 128)
> ---
>
> Key: JAMES-1808
> URL: https://issues.apache.org/jira/browse/JAMES-1808
> Project: James Server
>  Issue Type: Bug
>  Components: IMAPServer
>Affects Versions: 3.0.0-beta5
>Reporter: Paul Lee
>Priority: Minor
> Fix For: 3.0.0
>
>
> There is a conditional code block as follows in the class 
> 'ImapResponseComposerImpl' of the package 'org.apache.james.imap.encode.base' 
> in the 'protocols-imap' project.
> // 7-bit ASCII only
> if (character > 128) {
> buffer.write(BYTE_QUESTION);
> } else {
> buffer.write((byte) character);
> }
> An equals(=) sign should be included in the conditional since the range of 
> US-ASCII is from 0 to 127(not including 128).



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org
For additional commands, e-mail: server-dev-h...@james.apache.org



[jira] [Commented] (JAMES-1808) if (character > 128) should be changed to if (character >= 128)

2016-07-25 Thread Paul Lee (JIRA)

[ 
https://issues.apache.org/jira/browse/JAMES-1808?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15392225#comment-15392225
 ] 

Paul Lee commented on JAMES-1808:
-

Unfortunately, I don't have any failing test case. I inadvertently watched the 
code and noticed that it was theoretically wrong and just reported it.

By the way, I'm curious if the code block is really necessary. I know that 
US-ASCII characters are only allowed by the standard, but isn't it just O.K to 
leave non-ASCII characters as is without converting them to question marks?

> if (character > 128) should be changed to if (character >= 128)
> ---
>
> Key: JAMES-1808
> URL: https://issues.apache.org/jira/browse/JAMES-1808
> Project: James Server
>  Issue Type: Bug
>  Components: IMAPServer
>Affects Versions: 3.0.0-beta5
>Reporter: Paul Lee
>Priority: Minor
> Fix For: 3.0.0-beta5
>
>
> There is a conditional code block as follows in the class 
> 'ImapResponseComposerImpl' of the package 'org.apache.james.imap.encode.base' 
> in the 'protocols-imap' project.
> // 7-bit ASCII only
> if (character > 128) {
> buffer.write(BYTE_QUESTION);
> } else {
> buffer.write((byte) character);
> }
> An equals(=) sign should be included in the conditional since the range of 
> US-ASCII is from 0 to 127(not including 128).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org
For additional commands, e-mail: server-dev-h...@james.apache.org



[jira] [Commented] (JAMES-1808) if (character > 128) should be changed to if (character >= 128)

2016-07-25 Thread Matthieu Baechler (JIRA)

[ 
https://issues.apache.org/jira/browse/JAMES-1808?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15392185#comment-15392185
 ] 

Matthieu Baechler commented on JAMES-1808:
--

Thank you very much for you report. Do you have a failing test case for that ? 
(MPT test, unit test, or even a copy/paste of an imap session)

> if (character > 128) should be changed to if (character >= 128)
> ---
>
> Key: JAMES-1808
> URL: https://issues.apache.org/jira/browse/JAMES-1808
> Project: James Server
>  Issue Type: Bug
>  Components: IMAPServer
>Affects Versions: 3.0.0-beta5
>Reporter: Paul Lee
>Priority: Minor
> Fix For: 3.0.0-beta5
>
>
> There is a conditional code block as follows in the class 
> 'ImapResponseComposerImpl' of the package 'org.apache.james.imap.encode.base' 
> in the 'protocols-imap' project.
> // 7-bit ASCII only
> if (character > 128) {
> buffer.write(BYTE_QUESTION);
> } else {
> buffer.write((byte) character);
> }
> An equals(=) sign should be included in the conditional since the range of 
> US-ASCII is from 0 to 127(not including 128).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org
For additional commands, e-mail: server-dev-h...@james.apache.org