< prev index next >

src/java.base/share/classes/java/util/regex/PatternSyntaxException.java

Print this page
rev 16194 : imported patch XXXXXXX-Use-StringBuilder-appendN-method

*** 1,7 **** /* ! * Copyright (c) 1999, 2008, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this --- 1,7 ---- /* ! * Copyright (c) 1999, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this
*** 112,122 **** } sb.append(nl); sb.append(pattern); if (index >= 0) { sb.append(nl); ! for (int i = 0; i < index; i++) sb.append(' '); sb.append('^'); } return sb.toString(); } --- 112,122 ---- } sb.append(nl); sb.append(pattern); if (index >= 0) { sb.append(nl); ! sb.appendN(' ', index); sb.append('^'); } return sb.toString(); }
< prev index next >