Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: data-integrations/jms-plugins
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 5d9bb4cc201425d5d230553b3a6d851fbaab349a
Choose a base ref
..
head repository: data-integrations/jms-plugins
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 7fe5119726a88962ed99a68555eacbb03e785ec1
Choose a head ref
58 changes: 29 additions & 29 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -128,35 +128,35 @@

<build>
<plugins>
<!-- <plugin>-->
<!-- <groupId>org.apache.maven.plugins</groupId>-->
<!-- <artifactId>maven-checkstyle-plugin</artifactId>-->
<!-- <version>2.17</version>-->
<!-- <executions>-->
<!-- <execution>-->
<!-- <id>validate</id>-->
<!-- <phase>validate</phase>-->
<!-- <configuration>-->
<!-- <configLocation>checkstyle.xml</configLocation>-->
<!-- <suppressionsLocation>suppressions.xml</suppressionsLocation>-->
<!-- <encoding>UTF-8</encoding>-->
<!-- <consoleOutput>true</consoleOutput>-->
<!-- <failsOnError>true</failsOnError>-->
<!-- <includeTestSourceDirectory>true</includeTestSourceDirectory>-->
<!-- </configuration>-->
<!-- <goals>-->
<!-- <goal>check</goal>-->
<!-- </goals>-->
<!-- </execution>-->
<!-- </executions>-->
<!-- <dependencies>-->
<!-- <dependency>-->
<!-- <groupId>com.puppycrawl.tools</groupId>-->
<!-- <artifactId>checkstyle</artifactId>-->
<!-- <version>6.19</version>-->
<!-- </dependency>-->
<!-- </dependencies>-->
<!-- </plugin>-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>2.17</version>
<executions>
<execution>
<id>validate</id>
<phase>validate</phase>
<configuration>
<configLocation>checkstyle.xml</configLocation>
<suppressionsLocation>suppressions.xml</suppressionsLocation>
<encoding>UTF-8</encoding>
<consoleOutput>true</consoleOutput>
<failsOnError>true</failsOnError>
<includeTestSourceDirectory>true</includeTestSourceDirectory>
</configuration>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>com.puppycrawl.tools</groupId>
<artifactId>checkstyle</artifactId>
<version>6.19</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
Original file line number Diff line number Diff line change
@@ -26,6 +26,9 @@
import javax.jms.JMSException;
import javax.jms.Message;

/**
* A class that specifies JMS message properties fields.
*/
public class JMSMessageProperties {

public static void populateProperties(Schema schema, StructuredRecord.Builder builder, Message message,
3 changes: 1 addition & 2 deletions src/main/java/io/cdap/plugin/jms/source/JMSSourceUtils.java
Original file line number Diff line number Diff line change
@@ -329,5 +329,4 @@ private static void populateMetadata(Schema schema, StructuredRecord.Builder rec
recordBuilder.set(JMSMessageParts.METADATA, metadataRecordBuilder.build());
}
}

}
}
Original file line number Diff line number Diff line change
@@ -139,7 +139,8 @@
// );
// Schema schema = Schema.recordOf("record", fields);
//
// JMSStreamingSourceConfig config = getJMSStreamingSourceConfig(false, false, JMSMessageType.MAP, schema.toString());
// JMSStreamingSourceConfig config = getJMSStreamingSourceConfig(false, false, JMSMessageType.MAP,
// schema.toString());
// StructuredRecord actual = JMSSourceUtils.convertJMSMapMessage(mapMessage, config);
//
// StructuredRecord expected = StructuredRecord.builder(schema)
@@ -252,4 +253,4 @@
//// when(mapMessage.getBytes("bytesVal")).thenReturn("Hello World!".getBytes(StandardCharsets.UTF_8));
//// when(mapMessage.getObject("objectVal")).thenReturn(new Object());
// }
//}
//}
Original file line number Diff line number Diff line change
@@ -17,7 +17,7 @@
public class SourceTextMessageTest {

@Test
public void ConvertJMSTextMessage_WithNoMetadataNoPropertiesNoSchema_Successfully() throws JMSException {
public void convertJMSTextMessage_withNoMetadataNoPropertiesNoSchema_successfully() throws JMSException {
String payloadContent = "Hello World!";

TextMessage textMessage = mock(TextMessage.class);
@@ -44,7 +44,7 @@ public void ConvertJMSTextMessage_WithNoMetadataNoPropertiesNoSchema_Successfull
}

@Test
public void ConvertJMSTextMessage_WithMetadataAndPropertiesButNoSchema_Successfully() throws JMSException {
public void convertJMSTextMessage_withMetadataAndPropertiesButNoSchema_successfully() throws JMSException {
String payloadContent = "Hello World!";

TextMessage textMessage = mock(TextMessage.class);
@@ -76,7 +76,7 @@ public void ConvertJMSTextMessage_WithMetadataAndPropertiesButNoSchema_Successfu
}

@Test
public void ConvertJMSTextMessage_WithMetadataAndPropertiesAndSchema_Successfully() throws JMSException {
public void convertJMSTextMessage_withMetadataAndPropertiesAndSchema_successfully() throws JMSException {
String payloadContent = "Hello World!";

TextMessage textMessage = mock(TextMessage.class);
Original file line number Diff line number Diff line change
@@ -30,8 +30,12 @@ public void setDummyInt(int dummyInt) {

@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
DummyObject that = (DummyObject) o;
return dummyInt == that.dummyInt && Objects.equals(dummyStr, that.dummyStr);
}