Giter Site home page Giter Site logo

openddr-java's People

Contributors

dependabot[bot] avatar keilw avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

jbestanislao

openddr-java's Issues

DeviceAdjuster StringIndexOutOfBoundsException

Hi,

this piece of code throws a StringIndexOutOfBoundsException

Classifier client = new ClassifierBuilder().with(LoaderOption.JAR).build();
Device device = client.classifyDevice("Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_1) AppleWebKit/537.36 (KHTML, like Gecko) Iridium/2018.4 Safari/537.36 Chrome/66.0.3359.130");

The cause lies in the DeviceAdjuster Class - Line 129:

		if (pattern != null) {
			if (pattern.contains(CHROME)) {
				String parts = pattern.substring(pattern.indexOf(CHROME));
				String version = parts.substring(CHROME.length() + 1, parts.indexOf(" "));

the last indexOf(" ") returns -1, as there are no more products in the submitted User-Agent. In my oppinion it should be

parts.indexOf(" ") == -1 ? parts.length() : parts.indexOf(" ")

NPE if URL is not given

OpenDDR Classifier Console null
Exception in thread "main" java.lang.NullPointerException: URL Path cannot be null
at mobi.openddr.classifier.loader.impl.URLResource.(URLResource.java:34)
at mobi.openddr.classifier.loader.LoaderFactory.getLoader(LoaderFactory.java:41)
at mobi.openddr.classifier.Classifier.initDeviceData(Classifier.java:65)
at mobi.openddr.classifier.console.ClassifierConsole.main(ClassifierConsole.java:162)

Make complex types available in client(s)

Currently complex nested types like types in device data are only mentioned but members are not listed. Their detail attributes like tablet etc. should be made visible.

Rename ASPECT_OPERATIVE_SYSTEM

The constant ASPECT_OPERATIVE_SYSTEM and underlying value should be renamed to reflect the change to "operationSystem"

Streamline Classifier Device with data/W3C terms

The Device object of Classifier uses the term "attribute" instead of "property" while the actual device data and W3C Simple API equivalent calls everything a "property".
This should be streamlined to match more naturally with the W3C and OpenDDR data model. "attribute" shall be available deprecated until removed in the next major version (2.0) of the Client APIs.

CI instance

Get the clients running on a CI instance
Travis-CI or Circle CI.

Upgrade to Java 8

Upgrade to Java 8, e.g. use Lambdas or maybe Async Loading where appropriate.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.