8223898: Forward references to Nashorn

Wed, 06 Nov 2019 17:13:21 +0100

author
hannesw
date
Wed, 06 Nov 2019 17:13:21 +0100
changeset 2548
2e03a91e04b9
parent 2547
5fc91c4182b0
child 2549
2f5ad880fd33

8223898: Forward references to Nashorn
Reviewed-by: sundar, mschoene, rhalade

src/jdk/nashorn/internal/runtime/regexp/RegExpScanner.java file | annotate | diff | comparison | revisions
     1.1 --- a/src/jdk/nashorn/internal/runtime/regexp/RegExpScanner.java	Fri Mar 27 05:14:35 2020 +0000
     1.2 +++ b/src/jdk/nashorn/internal/runtime/regexp/RegExpScanner.java	Wed Nov 06 17:13:21 2019 +0100
     1.3 @@ -1,5 +1,5 @@
     1.4  /*
     1.5 - * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
     1.6 + * Copyright (c) 2010, 2019, Oracle and/or its affiliates. All rights reserved.
     1.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     1.8   *
     1.9   * This code is free software; you can redistribute it and/or modify it
    1.10 @@ -141,14 +141,14 @@
    1.11              throw new PatternSyntaxException(e.getMessage(), string, scanner.position);
    1.12          }
    1.13  
    1.14 -        scanner.processForwardReferences();
    1.15 -
    1.16          // Throw syntax error unless we parsed the entire JavaScript regexp without syntax errors
    1.17          if (scanner.position != string.length()) {
    1.18              final String p = scanner.getStringBuilder().toString();
    1.19              throw new PatternSyntaxException(string, p, p.length() + 1);
    1.20          }
    1.21  
    1.22 +        scanner.processForwardReferences();
    1.23 +
    1.24          return scanner;
    1.25      }
    1.26  

mercurial