Skip to content

Commit

Permalink
Fix conflicts #958
Browse files Browse the repository at this point in the history
  • Loading branch information
baudoliver7 committed Nov 30, 2021
2 parents 2c19b2e + c031d76 commit c990e9e
Show file tree
Hide file tree
Showing 19 changed files with 278 additions and 78 deletions.
10 changes: 4 additions & 6 deletions .rultor.yml
Expand Up @@ -2,25 +2,25 @@ assets:
settings.xml: yegor256/home#assets/takes/settings.xml
pubring.gpg: yegor256/home#assets/pubring.gpg
secring.gpg: yegor256/home#assets/secring.gpg
s3cfg: yegor256/home#assets/s3cfg
env:
MAVEN_OPTS: -XX:MaxPermSize=256m -Xmx1g
JAVA_OPTS: -XX:MaxPermSize=256m -Xmx1g
decrypt:
curl-appveyor.cfg: repo/curl-appveyor.cfg.asc
architect:
- paulodamaso
- yegor256
install: |
sudo update-java-alternatives -s java-1.8.0-openjdk-amd64
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
export LANGUAGE=en_US.UTF-8
merge:
script: |
pdd --source=$(pwd) --verbose --file=/dev/null
mvn clean install -Pqulice --errors --settings ../settings.xml
mvn clean site -Psite --errors --settings ../settings.xml
pdd --source=$(pwd) --verbose --file=/dev/null
deploy:
script: |
sudo gem install --no-rdoc --no-ri est
version=$(curl -K ../curl-appveyor.cfg --data "{accountName: 'yegor256', projectSlug: 'takes', branch: 'master'}" https://ci.appveyor.com/api/builds | jq -r '.version')
while true
do status=$(curl -K ../curl-appveyor.cfg https://ci.appveyor.com/api/projects/yegor256/takes/build/${version} | jq -r '.build.status')
Expand All @@ -32,8 +32,6 @@ deploy:
done
mvn clean deploy -Pqulice --errors --settings ../settings.xml
mvn clean
est --dir=./est --verbose --file=takes.xml --format=xml
s3cmd --no-progress put takes.xml --config=../s3cfg s3://est.teamed.io/takes.xml
release:
script: |-
mvn versions:set "-DnewVersion=${tag}"
Expand Down
80 changes: 51 additions & 29 deletions pom.xml
Expand Up @@ -27,14 +27,14 @@ SOFTWARE.
<parent>
<groupId>com.jcabi</groupId>
<artifactId>parent</artifactId>
<version>0.49.5</version>
<version>0.56.0</version>
</parent>
<groupId>org.takes</groupId>
<artifactId>takes</artifactId>
<version>2.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>take</name>
<description>Immutable Java Web Framework</description>
<name>takes</name>
<description>True Object-Oriented and Immutable Java Web Framework</description>
<url>https://github.com/yegor256/takes</url>
<inceptionYear>2015</inceptionYear>
<organization>
Expand All @@ -53,8 +53,8 @@ SOFTWARE.
<id>1</id>
<name>Yegor Bugayenko</name>
<email>yegor256@gmail.com</email>
<organization>Teamed.io</organization>
<organizationUrl>http://www.teamed.io</organizationUrl>
<organization>Zerocracy</organization>
<organizationUrl>https://www.zerocracy.com</organizationUrl>
<roles>
<role>Architect</role>
<role>Developer</role>
Expand All @@ -74,7 +74,7 @@ SOFTWARE.
</scm>
<ciManagement>
<system>rultor</system>
<url>http://www.rultor.com/s/takes</url>
<url>https://www.rultor.com/s/takes</url>
</ciManagement>
<distributionManagement>
<site>
Expand All @@ -86,7 +86,6 @@ SOFTWARE.
<argLine/>
<timestamp>${maven.build.timestamp}</timestamp>
<jdk.version>1.8</jdk.version>
<qulice.version>0.18.19</qulice.version>
</properties>
<dependencies>
<!--
Expand Down Expand Up @@ -178,6 +177,7 @@ SOFTWARE.
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.22</version>
</dependency>
<dependency>
<groupId>org.glassfish.grizzly</groupId>
Expand Down Expand Up @@ -306,21 +306,20 @@ SOFTWARE.
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<argLine>-Djava.awt.headless=true -Dfile.encoding=UTF-8
-Duser.language=en -Duser.country=US ${argLine}
</argLine>
<!--
@todo #1110:1h There are 18 tests that fail now, mostly due to versions
upgrade (or an old Mockito version).
We must fix them ASAP and then remove the next line
-->
<testFailureIgnore>true</testFailureIgnore>
<argLine>-Djava.awt.headless=true -Dfile.encoding=UTF-8 -Duser.language=en -Duser.country=US ${argLine}</argLine>
<excludedGroups>org.takes.misc.PerformanceTests</excludedGroups>
<systemPropertyVariables>
<javax.net.ssl.keyStore>
${project.build.directory}/test-classes/org/takes/http/keystore
</javax.net.ssl.keyStore>
<javax.net.ssl.keyStore>${project.build.directory}/test-classes/org/takes/http/keystore</javax.net.ssl.keyStore>
<javax.net.ssl.keyStorePassword>abc123
</javax.net.ssl.keyStorePassword>
<javax.net.ssl.trustStore>
${project.build.directory}/test-classes/org/takes/http/keystore
</javax.net.ssl.trustStore>
<javax.net.ssl.trustStorePassword>abc123
</javax.net.ssl.trustStorePassword>
<javax.net.ssl.trustStore>${project.build.directory}/test-classes/org/takes/http/keystore</javax.net.ssl.trustStore>
<javax.net.ssl.trustStorePassword>abc123</javax.net.ssl.trustStorePassword>
</systemPropertyVariables>
</configuration>
</plugin>
Expand Down Expand Up @@ -348,7 +347,7 @@ SOFTWARE.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
<version>3.8.1</version>
<configuration>
<source>${jdk.version}</source>
<target>${jdk.version}</target>
Expand All @@ -367,8 +366,7 @@ SOFTWARE.
<goal>verify</goal>
</goals>
<configuration>
<verificationFile>src/verifier/verifications.xml
</verificationFile>
<verificationFile>src/verifier/verifications.xml</verificationFile>
</configuration>
</execution>
</executions>
Expand Down Expand Up @@ -422,7 +420,6 @@ SOFTWARE.
<plugin>
<groupId>com.qulice</groupId>
<artifactId>qulice-maven-plugin</artifactId>
<version>${qulice.version}</version>
<configuration>
<excludes combine.children="append">
<exclude>checkstyle:/src/site/resources/.*</exclude>
Expand Down Expand Up @@ -479,8 +476,7 @@ SOFTWARE.
<version>0.8.6</version>
<configuration>
<output>file</output>
<outputDirectory>${project.build.directory}/coverage
</outputDirectory>
<outputDirectory>${project.build.directory}/coverage</outputDirectory>
</configuration>
<executions>
<execution>
Expand All @@ -497,7 +493,7 @@ SOFTWARE.
<goal>report</goal>
</goals>
<!--
@todo #1067:30m This limits are set according to
@todo #1088:30m This limits are set according to
current metrics. Improve test coverage and
increase a limit, than update this task.
Remove this task when 0.99 is reached for each metric.
Expand All @@ -510,12 +506,12 @@ SOFTWARE.
<limit>
<counter>INSTRUCTION</counter>
<value>COVEREDRATIO</value>
<minimum>0.54</minimum>
<minimum>0.67</minimum>
</limit>
<limit>
<counter>LINE</counter>
<value>COVEREDRATIO</value>
<minimum>0.70</minimum>
<minimum>0.76</minimum>
</limit>
<limit>
<counter>BRANCH</counter>
Expand All @@ -525,12 +521,12 @@ SOFTWARE.
<limit>
<counter>COMPLEXITY</counter>
<value>COVEREDRATIO</value>
<minimum>0.40</minimum>
<minimum>0.52</minimum>
</limit>
<limit>
<counter>METHOD</counter>
<value>COVEREDRATIO</value>
<minimum>0.57</minimum>
<minimum>0.70</minimum>
</limit>
</limits>
</rule>
Expand All @@ -542,5 +538,31 @@ SOFTWARE.
</plugins>
</build>
</profile>
<profile>
<!-- https://stackoverflow.com/questions/52502189/java-11-package-javax-xml-bind-does-not-exist -->
<id>java-xml-bind</id>
<activation>
<jdk>[1.11,)</jdk>
</activation>
<dependencies>
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>2.3.0</version>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-core</artifactId>
<version>2.3.0</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-impl</artifactId>
<version>2.3.0</version>
<scope>runtime</scope>
</dependency>
</dependencies>
</profile>
</profiles>
</project>
7 changes: 4 additions & 3 deletions src/it/file-manager/pom.xml
Expand Up @@ -27,14 +27,14 @@ SOFTWARE.
<parent>
<groupId>com.jcabi</groupId>
<artifactId>parent</artifactId>
<version>0.40.1</version>
<version>0.49.1</version>
</parent>
<groupId>org.takes.test</groupId>
<artifactId>file-manager</artifactId>
<version>1.0-SNAPSHOT</version>
<properties>
<saxon.version>9.1.0.8</saxon.version>
<jdk.version>1.7</jdk.version>
<jdk.version>1.8</jdk.version>
</properties>
<dependencies>
<dependency>
Expand Down Expand Up @@ -70,6 +70,7 @@ SOFTWARE.
<dependency>
<groupId>com.jcabi</groupId>
<artifactId>jcabi-log</artifactId>
<version>0.20.1</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down Expand Up @@ -209,7 +210,7 @@ SOFTWARE.
<plugin>
<groupId>com.qulice</groupId>
<artifactId>qulice-maven-plugin</artifactId>
<version>@qulice.version@</version>
<version>0.19.4</version>
</plugin>
</plugins>
</build>
Expand Down
Expand Up @@ -31,7 +31,7 @@
import java.io.IOException;
import java.net.HttpURLConnection;
import java.net.URI;
import org.apache.commons.io.FileUtils;
import java.nio.file.Files;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
Expand All @@ -57,7 +57,7 @@ public final class AppTest {
@Test
public void justWorks() throws Exception {
final File dir = this.temp.newFolder();
FileUtils.write(new File(dir, "hello.txt"), "hello, world!");
Files.write(new File(dir, "hello.txt").toPath(), "hello, world!".getBytes());
new FtRemote(new App(dir)).exec(
new FtRemote.Script() {
@Override
Expand Down
1 change: 0 additions & 1 deletion src/main/java/org/takes/rq/multipart/RqMtFake.java
Expand Up @@ -65,7 +65,6 @@ public final class RqMtFake implements RqMultipart {
* Fake ctor.
* @param req Fake request header holder
* @param dispositions Fake request body parts
* @throws IOException If fails
*/
public RqMtFake(final Request req, final Request... dispositions) {
this.fake = new Sticky<>(
Expand Down
16 changes: 4 additions & 12 deletions src/main/java/org/takes/rs/Body.java
Expand Up @@ -170,10 +170,12 @@ private void estimate() throws IOException {
/**
* Decorator that will store the content of the underlying Body into a
* temporary File.
*
* <p><b>The content of the Body will be stored into a temporary
* file to be able to read it as many times as we want so use it only
* for large content, for small content use {@link Body.ByteArray}
* instead.</b>
*
* @since 0.32
*/
final class TempFile implements Body {
Expand All @@ -192,6 +194,7 @@ final class TempFile implements Body {
* Constructs a {@code TempFile} with the specified {@link Body}.
* @param body The content of the body to store into a temporary file.
*/
@SuppressWarnings("PMD.ConstructorOnlyInitializesOrCallOtherConstructors")
TempFile(final Body body) {
this.body = body;
this.file = new File(
Expand All @@ -202,6 +205,7 @@ final class TempFile implements Body {
UUID.randomUUID().toString()
)
);
this.file.deleteOnExit();
}

@Override
Expand All @@ -214,18 +218,6 @@ public int length() throws IOException {
return (int) this.file().length();
}

// Needed to remove the file once the Stream object is no more used.
// @checkstyle NoFinalizerCheck (2 lines)
// @checkstyle ProtectedMethodInFinalClassCheck (3 lines)
@Override
protected void finalize() throws Throwable {
try {
Files.delete(Paths.get(this.file.getAbsolutePath()));
} finally {
super.finalize();
}
}

/**
* Gives the {@code File} that contains the content of the underlying
* {@code Body}.
Expand Down
6 changes: 0 additions & 6 deletions src/main/java/org/takes/rs/xe/XeWhen.java
Expand Up @@ -53,12 +53,6 @@ public XeWhen(final boolean condition, final XeSource source) {
public XeSource value() {
return source;
}
},
new Scalar<XeSource>() {
@Override
public XeSource value() throws IOException {
return XeSource.EMPTY;
}
}
);
}
Expand Down
8 changes: 4 additions & 4 deletions src/site/site.xml
Expand Up @@ -26,21 +26,21 @@ SOFTWARE.
<skin>
<groupId>com.jcabi</groupId>
<artifactId>jcabi-maven-skin</artifactId>
<version>1.5.1</version>
<version>1.7.1</version>
</skin>
<bannerLeft>
<name>takes.org</name>
<src>logo.svg</src>
<href>http://www.takes.org/</href>
<href>https://www.takes.org/</href>
<width>96</width>
<height>96</height>
</bannerLeft>
<body>
<head>
<link href="http://www.takes.org/logo.png" rel="shortcut icon"/>
&lt;link href="http://www.takes.org/logo.png" rel="shortcut icon"/&gt;
</head>
<breadcrumbs>
<item name="take.com" href="http://www.takes.org"/>
<item name="take.com" href="https://www.takes.org"/>
</breadcrumbs>
<menu name="Overview">
<item name="Introduction" href="./index.html"/>
Expand Down

0 comments on commit c990e9e

Please sign in to comment.