diff --git a/README.md b/README.md index f0fdd02..9e1f94c 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,6 @@ logo [![EO principles respected here](https://www.elegantobjects.org/badge.svg)](https://www.elegantobjects.org) -[![Managed by Zerocracy](https://www.0crat.com/badge/C9V3GAG9H.svg)](https://www.0crat.com/p/C9V3GAG9H) [![DevOps By Rultor.com](http://www.rultor.com/b/yegor256/jare)](http://www.rultor.com/p/yegor256/jare) [![We recommend IntelliJ IDEA](https://www.elegantobjects.org/intellij-idea.svg)](https://www.jetbrains.com/idea/) diff --git a/pom.xml b/pom.xml index f64622d..6f162dc 100644 --- a/pom.xml +++ b/pom.xml @@ -168,7 +168,7 @@ software. com.jcabi jcabi-aspects - 0.24.1 + 0.25.1 javax.validation diff --git a/src/main/aspect/.gitkeep b/src/main/aspect/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/src/main/aspect/README.txt b/src/main/aspect/README.txt deleted file mode 100644 index feab572..0000000 --- a/src/main/aspect/README.txt +++ /dev/null @@ -1,29 +0,0 @@ -Copyright (c) 2009-2017, rultor.com -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: 1) Redistributions of source code must retain the above -copyright notice, this list of conditions and the following -disclaimer. 2) 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. 3) Neither the name of the rultor.com nor -the names of its contributors may be used to endorse or promote -products derived from this software without specific prior written -permission. - -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 -THE COPYRIGHT HOLDER OR CONTRIBUTORS 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. - -This directory is an indicator of AspectJ usage in the module. diff --git a/src/main/java/io/jare/Logs.java b/src/main/java/io/jare/Logs.java index b80fc61..88b6fa2 100644 --- a/src/main/java/io/jare/Logs.java +++ b/src/main/java/io/jare/Logs.java @@ -23,7 +23,6 @@ package io.jare; import com.jcabi.aspects.ScheduleWithFixedDelay; -import com.jcabi.aspects.Tv; import com.jcabi.log.Logger; import com.jcabi.s3.Bucket; import com.jcabi.s3.Ocket; @@ -167,7 +166,7 @@ private static void parse(final Map> map, final CharSequence line) { final Matcher matcher = Logs.PTN.matcher(line); if (matcher.find()) { - final String domain = URI.create(matcher.group(Tv.THREE)).getHost(); + final String domain = URI.create(matcher.group(3)).getHost(); if (!map.containsKey(domain)) { map.put(domain, new HashMap<>(0)); } diff --git a/src/main/java/io/jare/dynamo/DyBase.java b/src/main/java/io/jare/dynamo/DyBase.java index f5be2d0..99929a1 100644 --- a/src/main/java/io/jare/dynamo/DyBase.java +++ b/src/main/java/io/jare/dynamo/DyBase.java @@ -23,7 +23,6 @@ package io.jare.dynamo; import com.amazonaws.services.dynamodbv2.model.Select; -import com.jcabi.aspects.Tv; import com.jcabi.dynamo.Conditions; import com.jcabi.dynamo.QueryValve; import com.jcabi.dynamo.Region; @@ -100,7 +99,7 @@ public Iterable all() { .through( new ScanValve() .withAttributeToGet("user", "domain", "total", "usage") - .withLimit(Tv.THOUSAND) + .withLimit(1000) ) .stream() .map(DyDomain::new) diff --git a/src/main/java/io/jare/dynamo/DyUsage.java b/src/main/java/io/jare/dynamo/DyUsage.java index 7707b4d..d3a62d5 100644 --- a/src/main/java/io/jare/dynamo/DyUsage.java +++ b/src/main/java/io/jare/dynamo/DyUsage.java @@ -25,7 +25,6 @@ import com.amazonaws.services.dynamodbv2.model.AttributeAction; import com.amazonaws.services.dynamodbv2.model.AttributeValue; import com.amazonaws.services.dynamodbv2.model.AttributeValueUpdate; -import com.jcabi.aspects.Tv; import com.jcabi.dynamo.Item; import com.jcabi.xml.XML; import com.jcabi.xml.XMLDocument; @@ -93,7 +92,7 @@ public void add(final Date date, final long bytes) throws IOException { new Directives().xpath( String.format( "/usage/day[number(@id) < %d]", - DyUsage.asNumber(DateUtils.addDays(new Date(), -Tv.THIRTY)) + DyUsage.asNumber(DateUtils.addDays(new Date(), -30)) ) ).remove() ).applyQuietly(node); diff --git a/src/main/java/io/jare/dynamo/DyUser.java b/src/main/java/io/jare/dynamo/DyUser.java index 4fd052d..baebf4b 100644 --- a/src/main/java/io/jare/dynamo/DyUser.java +++ b/src/main/java/io/jare/dynamo/DyUser.java @@ -23,7 +23,6 @@ package io.jare.dynamo; import com.amazonaws.services.dynamodbv2.model.Select; -import com.jcabi.aspects.Tv; import com.jcabi.dynamo.Attributes; import com.jcabi.dynamo.Conditions; import com.jcabi.dynamo.QueryValve; @@ -76,7 +75,7 @@ public Iterable mine() { .through( new QueryValve() .withSelect(Select.ALL_ATTRIBUTES) - .withLimit(Tv.HUNDRED) + .withLimit(100) .withConsistentRead(false) .withIndexName("mine") ) diff --git a/src/main/java/io/jare/tk/Destination.java b/src/main/java/io/jare/tk/Destination.java index 1a017b7..81b3a5f 100644 --- a/src/main/java/io/jare/tk/Destination.java +++ b/src/main/java/io/jare/tk/Destination.java @@ -22,7 +22,6 @@ */ package io.jare.tk; -import com.jcabi.aspects.Tv; import java.net.HttpURLConnection; import java.net.URI; import org.takes.HttpException; @@ -75,7 +74,7 @@ public String path() throws HttpException { String.format("URI \"%s\" doesn't have a host", this.uri) ); } - final StringBuilder path = new StringBuilder(Tv.HUNDRED); + final StringBuilder path = new StringBuilder(100); if (this.uri.getRawPath().isEmpty()) { path.append('/'); } else { diff --git a/src/test/java/io/jare/dynamo/DyUsageTest.java b/src/test/java/io/jare/dynamo/DyUsageTest.java index 94db4b6..0e5f376 100644 --- a/src/test/java/io/jare/dynamo/DyUsageTest.java +++ b/src/test/java/io/jare/dynamo/DyUsageTest.java @@ -23,7 +23,6 @@ package io.jare.dynamo; import com.amazonaws.services.dynamodbv2.model.AttributeValue; -import com.jcabi.aspects.Tv; import com.jcabi.dynamo.Attributes; import com.jcabi.dynamo.Item; import com.jcabi.dynamo.Region; @@ -66,7 +65,7 @@ public void recordsUsage() throws Exception { public void ignoresOldData() throws Exception { final Usage usage = new DyUsage(DyUsageTest.item()); usage.add(new Date(), 1L); - usage.add(DateUtils.addDays(new Date(), -Tv.FIFTY), 1L); + usage.add(DateUtils.addDays(new Date(), -50), 1L); MatcherAssert.assertThat(usage.total(), Matchers.equalTo(1L)); } diff --git a/src/test/java/io/jare/dynamo/DyUserITCase.java b/src/test/java/io/jare/dynamo/DyUserITCase.java index 6014e93..19f6736 100644 --- a/src/test/java/io/jare/dynamo/DyUserITCase.java +++ b/src/test/java/io/jare/dynamo/DyUserITCase.java @@ -22,7 +22,6 @@ */ package io.jare.dynamo; -import com.jcabi.aspects.Tv; import io.jare.model.Base; import io.jare.model.Domain; import io.jare.model.User; @@ -68,17 +67,17 @@ public void addsAndRemoveDomains() throws Exception { public void listsMineDomains() throws Exception { final Base base = new DyBase(new Dynamo()); final User user = base.user("willy"); - for (int idx = 0; idx < Tv.TEN; ++idx) { + for (int idx = 0; idx < 10; ++idx) { user.add(String.format("facebook-%d.com", idx)); } final Iterable list = user.mine(); MatcherAssert.assertThat( list, - Matchers.iterableWithSize(Tv.TEN) + Matchers.iterableWithSize(10) ); MatcherAssert.assertThat( list, - Matchers.iterableWithSize(Tv.TEN) + Matchers.iterableWithSize(10) ); }