Skip to content

Commit

Permalink
Release/v1.102.6 (#19)
Browse files Browse the repository at this point in the history
* start v1.102.3-SNAPSHOT (#12)

* Add SCM info to POM.

* Add SCM info to POM.

* Add CHANGELOG.md

* Redundant description omitted with surefire report.

* Add findbugs plugin for Maven.

* Add Jacoco plugin for Maven.

* Add PMD plugin for Maven.

* Add checkstyle plugin for Maven.

* modify WhitespaceAfter tokens for checkstyle

* Specifying target attribute to external links.

* Add Jacoco rules.

* Speeding up register operation

* remove redundant bit operation

* Add bound check with getDigit()

* modify CHANGELOG

* modify EOL?

* Release 1.102.4 preparation

* Start Release 1.102.5-SNAPSHOT

* update maven-compiler-plugin to 3.6.1

* Add header to Javadoc

* Speed up Arabic-num char conversion

* Add .travis.yml

* put Travis cache directory

* support skipping test explicitly

* Add Travis badge to README

* Update Jacoco plugin

* Release 1.102.6 preparation
  • Loading branch information
olyutorskii committed Feb 18, 2017
1 parent 6974164 commit d417c08
Show file tree
Hide file tree
Showing 7 changed files with 45 additions and 18 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

*.txt text
*.md text
*.yml text

*.html text
*.css text
Expand Down
16 changes: 16 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Travis CI

language: java

sudo: false

jdk:
- oraclejdk8
- oraclejdk7
- openjdk7

cache:
directories:
- $HOME/.m2

# EOF
11 changes: 10 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,17 @@
DoubDabC Changelog
===================

## WIP
Released on 20XX-XX-XX

## v1.102.6
Released on 2017-02-19
- Speed-up Arabic-num converting
- Add .travis.yml for Travis CI #18
- Add header to Javadoc pages

## v1.102.4
Released on 2017-02-XX
Released on 2017-02-02
- Speed-up converting
- Add static code analysis report plugin. (checkstyle,PMD,FindBugs)
- Add code coverage report plugin. (Jacoco)
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# DoubDabC #

[![Build Status](https://travis-ci.org/olyutorskii/DoubDabC.svg?branch=master)]
(https://travis-ci.org/olyutorskii/DoubDabC)

-----------------------------------------------------------------------

## What is DoubDabC ? ##
Expand Down
8 changes: 4 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<groupId>io.github.olyutorskii</groupId>
<artifactId>doubdabc</artifactId>

<version>1.102.4</version>
<version>1.102.6</version>

<packaging>jar</packaging>
<name>DoubDabC</name>
Expand Down Expand Up @@ -93,7 +93,7 @@
<javadoc.locale>en</javadoc.locale>
<findbugs.jvmArgs>-Duser.language=en</findbugs.jvmArgs>

<jacoco-plugin.version>0.7.8</jacoco-plugin.version>
<jacoco-plugin.version>0.7.9</jacoco-plugin.version>

<checkstyle-plugin.version>2.17</checkstyle-plugin.version>
<checkstyleruntime.version>6.19</checkstyleruntime.version>
Expand Down Expand Up @@ -208,7 +208,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.6.0</version>
<version>3.6.1</version>
<configuration>
<source>1.7</source> <!-- for NetBeans IDE -->
<target>1.7</target>
Expand All @@ -225,7 +225,6 @@
<artifactId>maven-surefire-plugin</artifactId>
<version>2.19.1</version>
<configuration>
<skipTests>false</skipTests>
<enableAssertions>true</enableAssertions>
</configuration>
</plugin>
Expand Down Expand Up @@ -411,6 +410,7 @@
<quiet>true</quiet>
<show>protected</show>
<locale>${javadoc.locale}</locale>
<header>${project.name} ${project.version} API</header>
<version>true</version>
</configuration>
<reportSets>
Expand Down
10 changes: 4 additions & 6 deletions src/main/java/io/github/olyutorskii/doubdabc/DecimalOut.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,6 @@
*/
public class DecimalOut {

private static final char[] DECCH_TBL = {
'0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
};


private final BcdRegister decimal;

private final int[] intBuf;
Expand Down Expand Up @@ -70,7 +65,10 @@ private int buildChar(){

for(int idx = 0; idx < precision; idx++){
int digit = this.intBuf[idx];
char decimalCh = DECCH_TBL[digit];

// map [0 - 9](int) to ['0' - '9'](char)
char decimalCh = (char)( digit | 0b0011_0000 );

this.charBuf[idx] = decimalCh;
}

Expand Down
14 changes: 7 additions & 7 deletions src/main/java/io/github/olyutorskii/doubdabc/DecimalText.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,6 @@
*/
public class DecimalText implements CharSequence{

private static final char[] DECCH_TBL = {
'0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
};


private final BcdRegister decimal;
private final int[] intBuf;
private final CharBuffer textOut;
Expand Down Expand Up @@ -72,7 +67,9 @@ public char charAt(int index) throws IndexOutOfBoundsException{
int digitPos = precision - index - 1;
int digit = this.decimal.getDigit(digitPos);

char result = DECCH_TBL[digit];
// map [0 - 9](int) to ['0' - '9'](char)
char result = (char)( digit | 0b0011_0000 );

return result;
}

Expand Down Expand Up @@ -124,7 +121,10 @@ private String encodeText(int start, int end){
this.textOut.clear();
for(int idx = start; idx < end; idx++){
int digit = this.intBuf[idx];
char decimalCh = DECCH_TBL[digit];

// map [0 - 9](int) to ['0' - '9'](char)
char decimalCh = (char)( digit | 0b0011_0000 );

this.textOut.put(decimalCh);
}

Expand Down

1 comment on commit d417c08

@olyutorskii
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AAh... What a silly merge operation

Please sign in to comment.