提交 4ae86a3d 编写于 作者: I igerasim

8199547: Exception to Pattern Syntax

Reviewed-by: rriggs
上级 facd3ae0
/*
* Copyright (c) 1999, 2008, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1999, 2018, 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
......@@ -113,7 +113,7 @@ public class PatternSyntaxException
}
sb.append(nl);
sb.append(pattern);
if (index >= 0) {
if (index >= 0 && pattern != null && index < pattern.length()) {
sb.append(nl);
for (int i = 0; i < index; i++) sb.append(' ');
sb.append('^');
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册