Removed libs/dist and tweaks to use the latest ObjectPool

This commit is contained in:
nathan 2016-02-10 00:28:19 +01:00
parent 276d366d12
commit 046ae3dd75
4 changed files with 29 additions and 36 deletions

16
LICENSE
View File

@ -13,22 +13,16 @@
Copyright 2010, dorkbox, llc
- hawtjni - Apache 2.0 License
https://github.com/fusesource/hawtjni
Copyright Hiram Chirino
- Jansi - Apache 2.0 License
https://github.com/fusesource/jansi
Copyright Hiram Chirino
- JLine2 - BSD 2-clause License
https://github.com/jline/jline2
Copyright 2002-2006, Marc Prud'hommeaux <mwp1@cornell.edu>
Copyright 2002-2012, the original author or authors
- JNA - Apache 2.0 License
https://github.com/twall/jna
Copyright 2011, Timothy Wall
- SLF4J - MIT License
http://www.slf4j.org
Copyright 2004-2008, QOS.ch

View File

@ -1,22 +0,0 @@
BSD License
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL <ORGANIZATION> BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

View File

@ -26,3 +26,25 @@ Note: If you use the attached JNA/JAnsi libraries, you **MUST** load the respect
Note: This project was inspired (and some parts heavily modified) by the excellent
JLine library, and includes utility classes/methods from a variety of sources.
```
<h4>We now release to maven!</h4>
There is a hard dependency in the POM file for the utilities library, which is an extremely small subset of a much larger library; including only what is *necessary* for this particular project to function.
This project is **kept in sync** with the utilities library, so "jar hell" is not an issue. Please note that the util library (in it's entirety) is not added since there are **many** dependencies that are not *necessary* for this project. No reason to require a massive amount of dependencies for one or two classes/methods.
```
<dependency>
<groupId>com.dorkbox</groupId>
<artifactId>Annotations</artifactId>
<version>1.5</version>
</dependency>
```
Or if you don't want to use Maven, you can access the files directly here:
https://oss.sonatype.org/content/repositories/releases/com/dorkbox/Annotations/
https://oss.sonatype.org/content/repositories/releases/com/dorkbox/Annotations-Dorkbox-Util/

View File

@ -22,7 +22,6 @@ import dorkbox.util.input.posix.UnixTerminal;
import dorkbox.util.input.unsupported.UnsupportedTerminal;
import dorkbox.util.input.windows.WindowsTerminal;
import dorkbox.util.objectPool.ObjectPool;
import dorkbox.util.objectPool.ObjectPoolFactory;
import org.fusesource.jansi.Ansi;
import org.fusesource.jansi.AnsiConsole;
import org.slf4j.Logger;
@ -44,7 +43,7 @@ class InputConsole {
private static final InputConsole consoleProxyReader = new InputConsole();
private static final char[] emptyLine = new char[0];
// this is run by our init...
// this is run when init is called
static {
AnsiConsole.systemInstall();
@ -172,7 +171,7 @@ class InputConsole {
e.printStackTrace();
}
}
this.pool = ObjectPoolFactory.create(new ByteBuffer2Poolable(), readers2);
this.pool = new ObjectPool<ByteBuffer2>(new ByteBuffer2Poolable(), readers2);
String type = System.getProperty(TerminalType.TYPE, TerminalType.AUTO).toLowerCase();
if ("dumb".equals(System.getenv("TERM"))) {