Project

General

Profile

« Previous | Next » 

Revision 2268

Added by sgarg almost 20 years ago

removed a bug which was pointed out by Bing and fixed by Jing.

View differences:

src/edu/ucsb/nceas/metacat/MetaCatServlet.java
1497 1497
                } catch (NullPointerException npe) {
1498 1498
                }
1499 1499
            }
1500

  
1501 1500
            StringReader xml = new StringReader(doctext[0]);
1502 1501
            boolean validate = false;
1503 1502
            DocumentImplWrapper documentWrapper = null;
......
1674 1673
        }
1675 1674
        System.out.println("before get target line");
1676 1675
        String targetLine = getSchemaLine(xml);
1677
        System.out.println("before get target line");
1676
        System.out.println("after get target line");
1678 1677
        // to see if the second line contain some keywords
1679 1678
        if (targetLine != null
1680 1679
                && (targetLine.indexOf(SCHEMALOCATIONKEYWORD) != -1 || targetLine
......
1759 1758
        char secondPreviousCharacter = '?';
1760 1759
        char previousCharacter = '?';
1761 1760
        char currentCharacter = '?';
1762

  
1763
        while ((currentCharacter = (char) xml.read()) != -1) {
1761
        int tmp = xml.read();
1762
        while (tmp != -1) {
1763
            currentCharacter = (char)tmp;
1764 1764
            //in a comment
1765 1765
            if (currentCharacter == '-' && previousCharacter == '-'
1766 1766
                    && secondPreviousCharacter == '!'
......
1787 1787
            thirdPreviousCharacter = secondPreviousCharacter;
1788 1788
            secondPreviousCharacter = previousCharacter;
1789 1789
            previousCharacter = currentCharacter;
1790

  
1790
            tmp = xml.read();
1791 1791
        }
1792 1792
        secondLine = buffer.toString();
1793 1793
        MetaCatUtil

Also available in: Unified diff