Skip to content

Commit 495cc65

Browse files
committed
[GR-19887] JLine and Jansi libs update.
PullRequest: fastr/2331
2 parents ed73e4c + 4a3a551 commit 495cc65

File tree

8 files changed

+278
-365
lines changed

8 files changed

+278
-365
lines changed

3rd_party_licenses.txt

Lines changed: 3 additions & 220 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ The following software may be included in this product:
99

1010
================================================================================
1111

12-
JLine 2.14.6
12+
JLine 3.13
1313

14-
Copyright (c) 2002-2016, the original author or authors.
14+
Copyright (c) 2002-2018, the original author or authors.
1515
All rights reserved.
1616

17-
http://www.opensource.org/licenses/bsd-license.php
17+
https://opensource.org/licenses/BSD-3-Clause
1818

1919
Redistribution and use in source and binary forms, with or
2020
without modification, are permitted provided that the following
@@ -53,223 +53,6 @@ All XZ for Java files have been put into the public domain.
5353

5454
================================================================================
5555

56-
Jansi 1.17.1
57-
58-
(Copyright for Jansi; from URL: https://github.com/fusesource/jansi/blob/jansi-
59-
project-1.17.1/jansi/pom.xml)
60-
61-
Copyright (C) 2009-2017 the original author(s).
62-
Licensed under the Apache License, Version 2.0 (the "License");
63-
you may not use this file except in compliance with the License.
64-
You may obtain a copy of the License at
65-
http://www.apache.org/licenses/LICENSE-2.0
66-
Unless required by applicable law or agreed to in writing, software
67-
distributed under the License is distributed on an "AS IS" BASIS,
68-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
69-
See the License for the specific language governing permissions and
70-
limitations under the License.
71-
72-
(Copyright for 4th party dependency hawtjni; from
73-
https://github.com/fusesource/hawtjni/blob/master/pom.xml)
74-
75-
Copyright (C) 2009-2011 FuseSource Corp.
76-
http://fusesource.com
77-
78-
Licensed under the Apache License, Version 2.0 (the "License");
79-
you may not use this file except in compliance with the License.
80-
You may obtain a copy of the License at
81-
http://www.apache.org/licenses/LICENSE-2.0
82-
Unless required by applicable law or agreed to in writing, software
83-
distributed under the License is distributed on an "AS IS" BASIS,
84-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
85-
See the License for the specific language governing permissions and
86-
limitations under the License.
87-
88-
(License from http://www.apache.org/licenses/LICENSE-2.0)
89-
90-
Apache License
91-
92-
Version 2.0, January 2004
93-
94-
http://www.apache.org/licenses/
95-
96-
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
97-
98-
1. Definitions.
99-
100-
"License" shall mean the terms and conditions for use, reproduction, and
101-
distribution as defined by Sections 1 through 9 of this document.
102-
103-
"Licensor" shall mean the copyright owner or entity authorized by the copyright
104-
owner that is granting the License.
105-
106-
"Legal Entity" shall mean the union of the acting entity and all other entities
107-
that control, are controlled by, or are under common control with that entity.
108-
For the purposes of this definition, "control" means (i) the power, direct or
109-
indirect, to cause the direction or management of such entity, whether by
110-
contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the
111-
outstanding shares, or (iii) beneficial ownership of such entity.
112-
113-
"You" (or "Your") shall mean an individual or Legal Entity exercising
114-
permissions granted by this License.
115-
116-
"Source" form shall mean the preferred form for making modifications, including
117-
but not limited to software source code, documentation source, and configuration
118-
files.
119-
120-
"Object" form shall mean any form resulting from mechanical transformation or
121-
translation of a Source form, including but not limited to compiled object code,
122-
generated documentation, and conversions to other media types.
123-
124-
"Work" shall mean the work of authorship, whether in Source or Object form, made
125-
available under the License, as indicated by a copyright notice that is
126-
included in or attached to the work (an example is provided in the Appendix
127-
below).
128-
129-
"Derivative Works" shall mean any work, whether in Source or Object form, that
130-
is based on (or derived from) the Work and for which the editorial revisions,
131-
annotations, elaborations, or other modifications represent, as a whole, an
132-
original work of authorship. For the purposes of this License, Derivative Works
133-
shall not include works that remain separable from, or merely link (or bind by
134-
name) to the interfaces of, the Work and Derivative Works thereof.
135-
136-
"Contribution" shall mean any work of authorship, including the original version
137-
of the Work and any modifications or additions to that Work or Derivative Works
138-
thereof, that is intentionally submitted to Licensor for inclusion in the Work
139-
by the copyright owner or by an individual or Legal Entity authorized to submit
140-
on behalf of the copyright owner. For the purposes of this definition,
141-
"submitted" means any form of electronic, verbal, or written communication sent
142-
to the Licensor or its representatives, including but not limited to
143-
communication on electronic mailing lists, source code control systems, and
144-
issue tracking systems that are managed by, or on behalf of, the Licensor for
145-
the purpose of discussing and improving the Work, but excluding communication
146-
that is conspicuously marked or otherwise designated in writing by the copyright
147-
owner as "Not a Contribution."
148-
149-
"Contributor" shall mean Licensor and any individual or Legal Entity on behalf
150-
of whom a Contribution has been received by Licensor and subsequently
151-
incorporated within the Work.
152-
153-
2. Grant of Copyright License. Subject to the terms and conditions of this
154-
License, each Contributor hereby grants to You a perpetual, worldwide, non-
155-
exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce,
156-
prepare Derivative Works of, publicly display, publicly perform, sublicense, and
157-
distribute the Work and such Derivative Works in Source or Object form.
158-
159-
3. Grant of Patent License. Subject to the terms and conditions of this License,
160-
each Contributor hereby grants to You a perpetual, worldwide, non-exclusive,
161-
no-charge, royalty-free, irrevocable (except as stated in this section) patent
162-
license to make, have made, use, offer to sell, sell, import, and otherwise
163-
transfer the Work, where such license applies only to those patent claims
164-
licensable by such Contributor that are necessarily infringed by their
165-
Contribution(s) alone or by combination of their Contribution(s) with the Work
166-
to which such Contribution(s) was submitted. If You institute patent litigation
167-
against any entity (including a cross-claim or counterclaim in a lawsuit)
168-
alleging that the Work or a Contribution incorporated within the Work
169-
constitutes direct or contributory patent infringement, then any patent licenses
170-
granted to You under this License for that Work shall terminate as of the date
171-
such litigation is filed.
172-
173-
4. Redistribution. You may reproduce and distribute copies of the Work or
174-
Derivative Works thereof in any medium, with or without modifications, and in
175-
Source or Object form, provided that You meet the following conditions:
176-
177-
You must give any other recipients of the Work or Derivative Works a copy of
178-
this License; and
179-
You must cause any modified files to carry prominent notices stating that You
180-
changed the files; and
181-
You must retain, in the Source form of any Derivative Works that You distribute,
182-
all copyright, patent, trademark, and attribution notices from the Source form
183-
of the Work, excluding those notices that do not pertain to any part of the
184-
Derivative Works; and
185-
If the Work includes a "NOTICE" text file as part of its distribution, then any
186-
Derivative Works that You distribute must include a readable copy of the
187-
attribution notices contained within such NOTICE file, excluding those notices
188-
that do not pertain to any part of the Derivative Works, in at least one of the
189-
following places: within a NOTICE text file distributed as part of the
190-
Derivative Works; within the Source form or documentation, if provided along
191-
with the Derivative Works; or, within a display generated by the Derivative
192-
Works, if and wherever such third-party notices normally appear. The contents of
193-
the NOTICE file are for informational purposes only and do not modify the
194-
License. You may add Your own attribution notices within Derivative Works that
195-
You distribute, alongside or as an addendum to the NOTICE text from the Work,
196-
provided that such additional attribution notices cannot be construed as
197-
modifying the License.
198-
199-
You may add Your own copyright statement to Your modifications and may provide
200-
additional or different license terms and conditions for use, reproduction, or
201-
distribution of Your modifications, or for any such Derivative Works as a whole,
202-
provided Your use, reproduction, and distribution of the Work otherwise
203-
complies with the conditions stated in this License.
204-
5. Submission of Contributions. Unless You explicitly state otherwise, any
205-
Contribution intentionally submitted for inclusion in the Work by You to the
206-
Licensor shall be under the terms and conditions of this License, without any
207-
additional terms or conditions. Notwithstanding the above, nothing herein shall
208-
supersede or modify the terms of any separate license agreement you may have
209-
executed with Licensor regarding such Contributions.
210-
211-
6. Trademarks. This License does not grant permission to use the trade names,
212-
trademarks, service marks, or product names of the Licensor, except as required
213-
for reasonable and customary use in describing the origin of the Work and
214-
reproducing the content of the NOTICE file.
215-
216-
7. Disclaimer of Warranty. Unless required by applicable law or agreed to in
217-
writing, Licensor provides the Work (and each Contributor provides its
218-
Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
219-
KIND, either express or implied, including, without limitation, any warranties
220-
or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
221-
PARTICULAR PURPOSE. You are solely responsible for determining the
222-
appropriateness of using or redistributing the Work and assume any risks
223-
associated with Your exercise of permissions under this License.
224-
225-
8. Limitation of Liability. In no event and under no legal theory, whether in
226-
tort (including negligence), contract, or otherwise, unless required by
227-
applicable law (such as deliberate and grossly negligent acts) or agreed to in
228-
writing, shall any Contributor be liable to You for damages, including any
229-
direct, indirect, special, incidental, or consequential damages of any character
230-
arising as a result of this License or out of the use or inability to use the
231-
Work (including but not limited to damages for loss of goodwill, work stoppage,
232-
computer failure or malfunction, or any and all other commercial damages or
233-
losses), even if such Contributor has been advised of the possibility of such
234-
damages.
235-
236-
9. Accepting Warranty or Additional Liability. While redistributing the Work or
237-
Derivative Works thereof, You may choose to offer, and charge a fee for,
238-
acceptance of support, warranty, indemnity, or other liability obligations
239-
and/or rights consistent with this License. However, in accepting such
240-
obligations, You may act only on Your own behalf and on Your sole
241-
responsibility, not on behalf of any other Contributor, and only if You agree to
242-
indemnify, defend, and hold each Contributor harmless for any liability
243-
incurred by, or claims asserted against, such Contributor by reason of your
244-
accepting any such warranty or additional liability.
245-
246-
END OF TERMS AND CONDITIONS
247-
248-
APPENDIX: HOW TO APPLY THE APACHE LICENSE TO YOUR WORK
249-
To apply the Apache License to your work, attach the following boilerplate
250-
notice, with the fields enclosed by brackets "[]" replaced with your own
251-
identifying information. (Don't include the brackets!) The text should be
252-
enclosed in the appropriate comment syntax for the file format. We also
253-
recommend that a file or class name and description of purpose be included on
254-
the same "printed page" as the copyright notice for easier identification within
255-
third-party archives.
256-
257-
Copyright [yyyy] [name of copyright owner]
258-
259-
Licensed under the Apache License, Version 2.0 (the "License");
260-
you may not use this file except in compliance with the License.
261-
You may obtain a copy of the License at
262-
263-
http://www.apache.org/licenses/LICENSE-2.0
264-
265-
Unless required by applicable law or agreed to in writing, software
266-
distributed under the License is distributed on an "AS IS" BASIS,
267-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
268-
See the License for the specific language governing permissions and
269-
limitations under the License.
270-
271-
================================================================================
272-
27356
ANTLR 4.7.2
27457

27558
antlr4 4.7.2

com.oracle.truffle.r.launcher/src/com/oracle/truffle/r/launcher/ConsoleHandler.java

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2013, 2019, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2013, 2020, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -86,20 +86,28 @@ public static ConsoleHandler createConsoleHandler(RCmdOptions options, Delegatin
8686
* should be lazy, as these may not be necessary and can cause hangs if stdin has
8787
* been redirected.
8888
*/
89-
Supplier<ConsoleHandler> delegateFactory = useReadLine ? () -> new JLineConsoleHandler(inStream, outStream, rsp.isSlave())
89+
Supplier<ConsoleHandler> delegateFactory = useReadLine ? () -> createJLineConsoleHandler(inStream, outStream, rsp.isSlave())
9090
: () -> new DefaultConsoleHandler(inStream, outStream, isInteractive);
9191
useDelegatingWrapper.setDelegate(delegateFactory);
9292
return useDelegatingWrapper;
9393
} else {
9494
if (useReadLine) {
95-
return new JLineConsoleHandler(inStream, outStream, rsp.isSlave());
95+
return createJLineConsoleHandler(inStream, outStream, rsp.isSlave());
9696
} else {
9797
return new DefaultConsoleHandler(inStream, outStream, isInteractive);
9898
}
9999
}
100100
}
101101
}
102102

103+
private static ConsoleHandler createJLineConsoleHandler(InputStream inStream, OutputStream outStream, boolean noPromtp) throws RuntimeException {
104+
try {
105+
return new JLineConsoleHandler(inStream, outStream, noPromtp);
106+
} catch (IOException ex) {
107+
throw new RuntimeException(ex);
108+
}
109+
}
110+
103111
/**
104112
* Read a line of input, newline is <b>NOT</b> included in result.
105113
*/

0 commit comments

Comments
 (0)