< prev index next >

src/hotspot/share/classfile/classListParser.cpp

Print this page




  77     if (fgets(_line, sizeof(_line), _file) == NULL) {
  78       return false;
  79     }
  80     ++ _line_no;
  81     _line_len = (int)strlen(_line);
  82     if (_line_len > _max_allowed_line_len) {
  83       error("input line too long (must be no longer than %d chars)", _max_allowed_line_len);
  84     }
  85     if (*_line == '#') { // comment
  86       continue;
  87     }
  88     break;
  89   }
  90 
  91   _id = _unspecified;
  92   _super = _unspecified;
  93   _interfaces->clear();
  94   _source = NULL;
  95   _interfaces_specified = false;
  96 






  97   {
  98     int len = (int)strlen(_line);
  99     int i;
 100     // Replace \t\r\n with ' '
 101     for (i=0; i<len; i++) {
 102       if (_line[i] == '\t' || _line[i] == '\r' || _line[i] == '\n') {
 103         _line[i] = ' ';
 104       }
 105     }
 106 
 107     // Remove trailing newline/space
 108     while (len > 0) {
 109       if (_line[len-1] == ' ') {
 110         _line[len-1] = '\0';
 111         len --;
 112       } else {
 113         break;
 114       }
 115     }
 116     _line_len = len;




  77     if (fgets(_line, sizeof(_line), _file) == NULL) {
  78       return false;
  79     }
  80     ++ _line_no;
  81     _line_len = (int)strlen(_line);
  82     if (_line_len > _max_allowed_line_len) {
  83       error("input line too long (must be no longer than %d chars)", _max_allowed_line_len);
  84     }
  85     if (*_line == '#') { // comment
  86       continue;
  87     }
  88     break;
  89   }
  90 
  91   _id = _unspecified;
  92   _super = _unspecified;
  93   _interfaces->clear();
  94   _source = NULL;
  95   _interfaces_specified = false;
  96 
  97   _lambda_format = false;
  98   if (strstr(_line, "LF_RESOLVE") != NULL) {
  99     _lambda_format = true;
 100     return true;   
 101   }
 102     
 103   {
 104     int len = (int)strlen(_line);
 105     int i;
 106     // Replace \t\r\n with ' '
 107     for (i=0; i<len; i++) {
 108       if (_line[i] == '\t' || _line[i] == '\r' || _line[i] == '\n') {
 109         _line[i] = ' ';
 110       }
 111     }
 112 
 113     // Remove trailing newline/space
 114     while (len > 0) {
 115       if (_line[len-1] == ' ') {
 116         _line[len-1] = '\0';
 117         len --;
 118       } else {
 119         break;
 120       }
 121     }
 122     _line_len = len;


< prev index next >