summaryrefslogtreecommitdiff
path: root/src/main/org/apache/tools/ant/filters/StripJavaComments.java
diff options
context:
space:
mode:
authorMagesh Umasankar <umagesh@apache.org>2003-04-23 15:12:13 +0000
committerMagesh Umasankar <umagesh@apache.org>2003-04-23 15:12:13 +0000
commit9eb6d592ed4c5264a19d2f1d5757b799be3597eb (patch)
tree358b535b207a4a81531da285a5f0b09a87b78ffb /src/main/org/apache/tools/ant/filters/StripJavaComments.java
parentb404a282b25f5b01eeb1646495eb2f36f675ebe9 (diff)
downloadant-9eb6d592ed4c5264a19d2f1d5757b799be3597eb.tar.gz
Enable previously disabled head-tail tests.
Make StripJavaComments recognize and retain Mac line endings. PR: 18476 Submitted by: peter.reilly@corvil.com (peter reilly) git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@274506 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/main/org/apache/tools/ant/filters/StripJavaComments.java')
-rw-r--r--src/main/org/apache/tools/ant/filters/StripJavaComments.java8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/main/org/apache/tools/ant/filters/StripJavaComments.java b/src/main/org/apache/tools/ant/filters/StripJavaComments.java
index 04d429ed2..d395185c0 100644
--- a/src/main/org/apache/tools/ant/filters/StripJavaComments.java
+++ b/src/main/org/apache/tools/ant/filters/StripJavaComments.java
@@ -132,15 +132,9 @@ public final class StripJavaComments
if (ch == '/') {
ch = in.read();
if (ch == '/') {
- int prevCh = -1;
- while (ch != '\n' && ch != -1) {
- prevCh = ch;
+ while (ch != '\n' && ch != -1 && ch != '\r') {
ch = in.read();
}
- if ( ch == '\n' && prevCh == '\r' ) {
- readAheadCh = ch;
- ch = prevCh;
- }
} else if (ch == '*') {
while (ch != -1) {
ch = in.read();