Skip to content

Commit 09c14a1

Browse files
build(deps): bump com.diffplug.spotless:spotless-maven-plugin from 2.44.5 to 2.46.1 in /org.eclipse.lyo.testsuite.build (#108)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Andrew Berezovskyi <[email protected]>
1 parent ccbdf50 commit 09c14a1

File tree

20 files changed

+196
-231
lines changed

20 files changed

+196
-231
lines changed

org.eclipse.lyo.testsuite.build/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@
130130
<plugin>
131131
<groupId>com.diffplug.spotless</groupId>
132132
<artifactId>spotless-maven-plugin</artifactId>
133-
<version>2.44.5</version>
133+
<version>2.46.1</version>
134134
</plugin>
135135
</plugins>
136136
</build>

org.eclipse.lyo.testsuite.server/pom.xml

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,32 @@
5050
<javadoc.opts>-Xdoclint:none</javadoc.opts>
5151
</properties>
5252
</profile>
53+
54+
<profile>
55+
<id>spotless</id>
56+
<activation>
57+
<activeByDefault>true</activeByDefault>
58+
</activation>
59+
<build>
60+
<plugins>
61+
<plugin>
62+
<groupId>com.diffplug.spotless</groupId>
63+
<artifactId>spotless-maven-plugin</artifactId>
64+
<version>2.46.1</version>
65+
<executions>
66+
<execution>
67+
<id>auto-style</id>
68+
<goals>
69+
<goal>apply</goal>
70+
</goals>
71+
<!-- Using validate phase, so this happens before enforce-style -->
72+
<phase>validate</phase>
73+
</execution>
74+
</executions>
75+
</plugin>
76+
</plugins>
77+
</build>
78+
</profile>
5379
</profiles>
5480

5581
<repositories>
@@ -207,7 +233,7 @@
207233
<plugin>
208234
<groupId>com.diffplug.spotless</groupId>
209235
<artifactId>spotless-maven-plugin</artifactId>
210-
<version>2.44.5</version>
236+
<version>2.46.1</version>
211237
<configuration>
212238
<!-- optional: limit format enforcement to just the files changed by this feature branch -->
213239
<!-- <ratchetFrom>origin/main</ratchetFrom>-->
@@ -232,10 +258,10 @@
232258
<java>
233259
<!-- apply a specific flavor of google-java-format and reflow long strings -->
234260
<googleJavaFormat>
235-
<version>1.19.2</version>
261+
<version>1.28.0</version>
236262
<style>AOSP</style>
237263
<reflowLongStrings>true</reflowLongStrings>
238-
<formatJavadoc>false</formatJavadoc>
264+
<formatJavadoc>true</formatJavadoc>
239265
</googleJavaFormat>
240266
</java>
241267
</configuration>

org.eclipse.lyo.testsuite.trs/pom.xml

Lines changed: 31 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@
151151
<plugin>
152152
<groupId>com.diffplug.spotless</groupId>
153153
<artifactId>spotless-maven-plugin</artifactId>
154-
<version>2.44.5</version>
154+
<version>2.46.1</version>
155155
<configuration>
156156
<!-- optional: limit format enforcement to just the files changed by this feature branch -->
157157
<!-- <ratchetFrom>origin/main</ratchetFrom>-->
@@ -176,15 +176,43 @@
176176
<java>
177177
<!-- apply a specific flavor of google-java-format and reflow long strings -->
178178
<googleJavaFormat>
179-
<version>1.19.2</version>
179+
<version>1.28.0</version>
180180
<style>AOSP</style>
181181
<reflowLongStrings>true</reflowLongStrings>
182-
<formatJavadoc>false</formatJavadoc>
182+
<formatJavadoc>true</formatJavadoc>
183183
</googleJavaFormat>
184184
</java>
185185
</configuration>
186186
</plugin>
187187
</plugins>
188188
<testSourceDirectory>${basedir}/src/main/java</testSourceDirectory>
189189
</build>
190+
191+
<profiles>
192+
<profile>
193+
<id>spotless</id>
194+
<activation>
195+
<activeByDefault>true</activeByDefault>
196+
</activation>
197+
<build>
198+
<plugins>
199+
<plugin>
200+
<groupId>com.diffplug.spotless</groupId>
201+
<artifactId>spotless-maven-plugin</artifactId>
202+
<version>2.46.1</version>
203+
<executions>
204+
<execution>
205+
<id>auto-style</id>
206+
<goals>
207+
<goal>apply</goal>
208+
</goals>
209+
<!-- Using validate phase, so this happens before enforce-style -->
210+
<phase>validate</phase>
211+
</execution>
212+
</executions>
213+
</plugin>
214+
</plugins>
215+
</build>
216+
</profile>
217+
</profiles>
190218
</project>

org.eclipse.lyo.testsuite.trs/src/main/java/org/eclipse/lyo/testsuite/oslcv2/trs/BaseTest.java

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,6 @@
1717

1818
package org.eclipse.lyo.testsuite.oslcv2.trs;
1919

20-
import org.apache.jena.rdf.model.Model;
21-
import org.apache.jena.rdf.model.ResIterator;
22-
import org.apache.jena.rdf.model.Resource;
23-
import org.apache.jena.vocabulary.RDF;
2420
import java.io.FileNotFoundException;
2521
import java.io.IOException;
2622
import java.text.MessageFormat;
@@ -30,6 +26,10 @@
3026
import org.apache.http.protocol.DefaultedHttpContext;
3127
import org.apache.http.protocol.HttpContext;
3228
import org.apache.http.protocol.SyncBasicHttpContext;
29+
import org.apache.jena.rdf.model.Model;
30+
import org.apache.jena.rdf.model.ResIterator;
31+
import org.apache.jena.rdf.model.Resource;
32+
import org.apache.jena.vocabulary.RDF;
3333
import org.eclipse.lyo.testsuite.server.trsutils.EasySSLClient;
3434
import org.eclipse.lyo.testsuite.server.trsutils.FetchException;
3535
import org.eclipse.lyo.testsuite.server.trsutils.ITRSVocabulary;
@@ -146,8 +146,8 @@ && getStatementsForProp(trsBaseResource, ITRSVocabulary.CUTOFFEVENT_PROPERTY)
146146
}
147147

148148
/**
149-
* Validates that the RDF graph contains a ldp:Page resource with the appropriate
150-
* properties when the base resource is requested.
149+
* Validates that the RDF graph contains a ldp:Page resource with the appropriate properties
150+
* when the base resource is requested.
151151
*/
152152
@Test
153153
public void testBaseHasLdpPage() {
@@ -204,10 +204,7 @@ public void testBaseHasLdpPage() {
204204
}
205205
}
206206

207-
/**
208-
* Determine if the base resource contains the rdf:type ldp:Container
209-
* property.
210-
*/
207+
/** Determine if the base resource contains the rdf:type ldp:Container property. */
211208
@Test
212209
public void testBaseHasType() {
213210
try {

org.eclipse.lyo.testsuite.trs/src/main/java/org/eclipse/lyo/testsuite/oslcv2/trs/ChangeLogTest.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,6 @@
1616

1717
package org.eclipse.lyo.testsuite.oslcv2.trs;
1818

19-
import org.apache.jena.rdf.model.Model;
20-
import org.apache.jena.rdf.model.RDFNode;
21-
import org.apache.jena.rdf.model.Resource;
22-
import org.apache.jena.rdf.model.Statement;
23-
import org.apache.jena.rdf.model.StmtIterator;
24-
import org.apache.jena.vocabulary.RDF;
2519
import java.io.FileNotFoundException;
2620
import java.io.IOException;
2721
import java.math.BigInteger;
@@ -32,6 +26,12 @@
3226
import org.apache.http.protocol.DefaultedHttpContext;
3327
import org.apache.http.protocol.HttpContext;
3428
import org.apache.http.protocol.SyncBasicHttpContext;
29+
import org.apache.jena.rdf.model.Model;
30+
import org.apache.jena.rdf.model.RDFNode;
31+
import org.apache.jena.rdf.model.Resource;
32+
import org.apache.jena.rdf.model.Statement;
33+
import org.apache.jena.rdf.model.StmtIterator;
34+
import org.apache.jena.vocabulary.RDF;
3535
import org.eclipse.lyo.testsuite.server.trsutils.EasySSLClient;
3636
import org.eclipse.lyo.testsuite.server.trsutils.FetchException;
3737
import org.eclipse.lyo.testsuite.server.trsutils.ITRSVocabulary;

org.eclipse.lyo.testsuite.trs/src/main/java/org/eclipse/lyo/testsuite/oslcv2/trs/TRSTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@
1616

1717
package org.eclipse.lyo.testsuite.oslcv2.trs;
1818

19-
import org.apache.jena.rdf.model.Resource;
20-
import org.apache.jena.vocabulary.RDF;
2119
import java.io.FileNotFoundException;
2220
import java.io.IOException;
2321
import java.text.MessageFormat;
@@ -27,6 +25,8 @@
2725
import org.apache.http.protocol.DefaultedHttpContext;
2826
import org.apache.http.protocol.HttpContext;
2927
import org.apache.http.protocol.SyncBasicHttpContext;
28+
import org.apache.jena.rdf.model.Resource;
29+
import org.apache.jena.vocabulary.RDF;
3030
import org.eclipse.lyo.testsuite.server.trsutils.EasySSLClient;
3131
import org.eclipse.lyo.testsuite.server.trsutils.FetchException;
3232
import org.eclipse.lyo.testsuite.server.trsutils.ITRSVocabulary;

org.eclipse.lyo.testsuite.trs/src/main/java/org/eclipse/lyo/testsuite/server/trsutils/FetchException.java

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,9 @@
1818

1919
import java.io.Serial;
2020

21-
/**
22-
* A exception that is thrown when fetching a resource encounters an exception
23-
*/
21+
/** A exception that is thrown when fetching a resource encounters an exception */
2422
public class FetchException extends Exception {
25-
@Serial
26-
private static final long serialVersionUID = -5064491774183615219L;
23+
@Serial private static final long serialVersionUID = -5064491774183615219L;
2724

2825
public FetchException(String message) {
2926
super(message);

org.eclipse.lyo.testsuite.trs/src/main/java/org/eclipse/lyo/testsuite/server/trsutils/FetchUtil.java

Lines changed: 20 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

1717
package org.eclipse.lyo.testsuite.server.trsutils;
1818

19-
import org.apache.jena.rdf.model.Model;
2019
import java.io.FileNotFoundException;
2120
import java.io.IOException;
2221
import java.net.URISyntaxException;
@@ -36,32 +35,25 @@
3635
import org.apache.http.client.HttpResponseException;
3736
import org.apache.http.client.methods.HttpGet;
3837
import org.apache.http.protocol.HttpContext;
38+
import org.apache.jena.rdf.model.Model;
3939
import org.apache.xerces.impl.dv.util.Base64;
4040

4141
/**
42-
* A class that provides a utility methods to fetch HTTP resources as well as
43-
* process fetch responses
42+
* A class that provides a utility methods to fetch HTTP resources as well as process fetch
43+
* responses
4444
*/
4545
public class FetchUtil {
4646
/**
47-
* Fetches a resource. In case of success, this method
48-
* returns an instance of the {@link Model}.
47+
* Fetches a resource. In case of success, this method returns an instance of the {@link Model}.
4948
*
50-
* @param uri
51-
* resource uri to fetch
52-
* @param httpClient
53-
* client used to fetch the resource
54-
* @param httpContext
55-
* http context to use for the call
56-
* @param acceptType
57-
* value to use in the accept header
58-
* @throws InterruptedException
59-
* if the thread is interrupted
60-
* @throws FetchException
61-
* if an error occurs while fetching the resource.
62-
* @throws IOException
63-
* if an error occurs while updating the retryable error
64-
* information into the error handler
49+
* @param uri resource uri to fetch
50+
* @param httpClient client used to fetch the resource
51+
* @param httpContext http context to use for the call
52+
* @param acceptType value to use in the accept header
53+
* @throws InterruptedException if the thread is interrupted
54+
* @throws FetchException if an error occurs while fetching the resource.
55+
* @throws IOException if an error occurs while updating the retryable error information into
56+
* the error handler
6557
*/
6658
public static Model fetchResource(
6759
String uri, HttpClient httpClient, HttpContext httpContext, String acceptType)
@@ -121,8 +113,7 @@ public static Model fetchResource(
121113
}
122114

123115
/**
124-
* This method performs authentication based on the config.properties'
125-
* AuthType setting.
116+
* This method performs authentication based on the config.properties' AuthType setting.
126117
*
127118
* @param uri
128119
* @param httpClient
@@ -176,8 +167,8 @@ private static Model attemptAuthentication(
176167
}
177168

178169
/**
179-
* This method uses the username and password specified in config.properties
180-
* to attempt basic authentication against a resource server.
170+
* This method uses the username and password specified in config.properties to attempt basic
171+
* authentication against a resource server.
181172
*
182173
* @param httpClient
183174
* @param httpContext
@@ -217,10 +208,9 @@ private static Model performBasicAuthentication(
217208
}
218209

219210
/**
220-
* This method attempts to authenticate with a server using OAuth two
221-
* legged authentication. A functional user with a consumer key and secret
222-
* must have already been created on the resource server and specified in
223-
* the config.properties file.
211+
* This method attempts to authenticate with a server using OAuth two legged authentication. A
212+
* functional user with a consumer key and secret must have already been created on the resource
213+
* server and specified in the config.properties file.
224214
*
225215
* @param httpClient
226216
* @param httpContext
@@ -267,8 +257,8 @@ private static Model perform2LeggedOauth(
267257
}
268258

269259
/**
270-
* A list of the currently supported authentication types. The user specifies
271-
* the desired type in the config.properties' AuthType property.
260+
* A list of the currently supported authentication types. The user specifies the desired type
261+
* in the config.properties' AuthType property.
272262
*/
273263
private enum AuthenticationTypes {
274264
HEADER,

org.eclipse.lyo.testsuite.trs/src/main/java/org/eclipse/lyo/testsuite/server/trsutils/HttpConstants.java

Lines changed: 13 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -6,51 +6,42 @@ private HttpConstants() {}
66

77
/**
88
* General-header field name for <i>Cache-Control</i>. See <a
9-
* href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9"
10-
* >RFC2616 Section 14.9</a>
9+
* href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9" >RFC2616 Section
10+
* 14.9</a>
1111
*/
1212
public static final String CACHE_CONTROL = "Cache-Control"; // $NON-NLS-1$
1313

1414
// alias
1515

1616
/**
1717
* Request-header field name for <i>Accept</i>. See <a
18-
* href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec5.html#sec5.3"
19-
* >RFC2616 Section 5.3</a> and <a
20-
* href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.1"
21-
* >RFC2616 Section 14.1</a>
18+
* href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec5.html#sec5.3" >RFC2616 Section 5.3</a>
19+
* and <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.1" >RFC2616 Section
20+
* 14.1</a>
2221
*/
2322
public static final String ACCEPT = "Accept"; // $NON-NLS-1$
2423

2524
/**
2625
* Response-header field name for <i>Location</i>. See <a
27-
* href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec6.html#sec6.2"
28-
* >RFC2616 Section 6.2</a> and <a
29-
* href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.30"
30-
* >RFC2616 Section 14.30</a>
26+
* href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec6.html#sec6.2" >RFC2616 Section 6.2</a>
27+
* and <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.30" >RFC2616
28+
* Section 14.30</a>
3129
*/
3230
public static final String LOCATION = "Location"; // $NON-NLS-1$
3331

3432
/**
3533
* Entity-header field name for <i>Content-Type</i>. See <a
36-
* href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec7.html#sec7.1"
37-
* >RFC2616 Section 7.1</a> and <a
38-
* href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.17"
39-
* >RFC2616 Section 14.17</a>
34+
* href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec7.html#sec7.1" >RFC2616 Section 7.1</a>
35+
* and <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.17" >RFC2616
36+
* Section 14.17</a>
4037
*/
4138
public static final String CONTENT_TYPE = "Content-Type"; // $NON-NLS-1$
4239

4340
public static final String DEFAULT_ENCODING = "UTF-8"; // $NON-NLS-1$
4441

45-
/**
46-
* The internet media type or MIME type or Content-Type value for an XML
47-
* feed.
48-
*/
42+
/** The internet media type or MIME type or Content-Type value for an XML feed. */
4943
public static final String CT_APPLICATION_RDF_XML = "application/rdf+xml"; // $NON-NLS-1$
5044

51-
/**
52-
* The internet media type or MIME type or Content-Type value for an XML as
53-
* text.
54-
*/
45+
/** The internet media type or MIME type or Content-Type value for an XML as text. */
5546
public static final String CT_TEXT_XML = "text/xml"; // $NON-NLS-1$
5647
}

org.eclipse.lyo.testsuite.trs/src/main/java/org/eclipse/lyo/testsuite/server/trsutils/HttpErrorHandler.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,8 @@ public class HttpErrorHandler {
2727
/**
2828
* Handle a possible HTTP error response.
2929
*
30-
* @param response
31-
* The HTTP response to handle; must not be <code>null</code>
32-
* @throws HttpResponseException
33-
* if the response status code maps to an exception class
30+
* @param response The HTTP response to handle; must not be <code>null</code>
31+
* @throws HttpResponseException if the response status code maps to an exception class
3432
*/
3533
public static void responseToException(HttpResponse response) throws HttpResponseException {
3634
if (response == null)

0 commit comments

Comments
 (0)