Skip to content

Commit cf381bc

Browse files
committed
Added checkstyle changes
Added maven2 central repo changes
1 parent e0280ca commit cf381bc

File tree

12 files changed

+107
-99
lines changed

12 files changed

+107
-99
lines changed

.classpath

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,36 @@
1-
<?xml version="1.0" encoding="UTF-8"?>
2-
<classpath>
3-
<classpathentry kind="src" output="target/classes" path="src/main/java">
4-
<attributes>
5-
<attribute name="optional" value="true"/>
6-
<attribute name="maven.pomderived" value="true"/>
7-
</attributes>
8-
</classpathentry>
9-
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">
10-
<attributes>
11-
<attribute name="maven.pomderived" value="true"/>
12-
</attributes>
13-
</classpathentry>
14-
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
15-
<attributes>
16-
<attribute name="optional" value="true"/>
17-
<attribute name="maven.pomderived" value="true"/>
18-
</attributes>
19-
</classpathentry>
20-
<classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources">
21-
<attributes>
22-
<attribute name="maven.pomderived" value="true"/>
23-
</attributes>
24-
</classpathentry>
25-
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6">
26-
<attributes>
27-
<attribute name="maven.pomderived" value="true"/>
28-
</attributes>
29-
</classpathentry>
30-
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
31-
<attributes>
32-
<attribute name="maven.pomderived" value="true"/>
33-
</attributes>
34-
</classpathentry>
35-
<classpathentry kind="output" path="target/classes"/>
36-
</classpath>
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<classpath>
3+
<classpathentry kind="src" output="target/classes" path="src/main/java">
4+
<attributes>
5+
<attribute name="optional" value="true"/>
6+
<attribute name="maven.pomderived" value="true"/>
7+
</attributes>
8+
</classpathentry>
9+
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">
10+
<attributes>
11+
<attribute name="maven.pomderived" value="true"/>
12+
</attributes>
13+
</classpathentry>
14+
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
15+
<attributes>
16+
<attribute name="optional" value="true"/>
17+
<attribute name="maven.pomderived" value="true"/>
18+
</attributes>
19+
</classpathentry>
20+
<classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources">
21+
<attributes>
22+
<attribute name="maven.pomderived" value="true"/>
23+
</attributes>
24+
</classpathentry>
25+
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
26+
<attributes>
27+
<attribute name="maven.pomderived" value="true"/>
28+
</attributes>
29+
</classpathentry>
30+
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
31+
<attributes>
32+
<attribute name="owner.project.facets" value="java"/>
33+
</attributes>
34+
</classpathentry>
35+
<classpathentry kind="output" path="target/classes"/>
36+
</classpath>

.project

Lines changed: 35 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,35 @@
1-
<?xml version="1.0" encoding="UTF-8"?>
2-
<projectDescription>
3-
<name>predict4java</name>
4-
<comment></comment>
5-
<projects>
6-
</projects>
7-
<buildSpec>
8-
<buildCommand>
9-
<name>org.eclipse.jdt.core.javabuilder</name>
10-
<arguments>
11-
</arguments>
12-
</buildCommand>
13-
<buildCommand>
14-
<name>org.eclipse.m2e.core.maven2Builder</name>
15-
<arguments>
16-
</arguments>
17-
</buildCommand>
18-
</buildSpec>
19-
<natures>
20-
<nature>org.eclipse.jdt.core.javanature</nature>
21-
<nature>org.eclipse.m2e.core.maven2Nature</nature>
22-
</natures>
23-
</projectDescription>
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<projectDescription>
3+
<name>predict4java</name>
4+
<comment></comment>
5+
<projects>
6+
</projects>
7+
<buildSpec>
8+
<buildCommand>
9+
<name>org.eclipse.wst.common.project.facet.core.builder</name>
10+
<arguments>
11+
</arguments>
12+
</buildCommand>
13+
<buildCommand>
14+
<name>org.eclipse.jdt.core.javabuilder</name>
15+
<arguments>
16+
</arguments>
17+
</buildCommand>
18+
<buildCommand>
19+
<name>net.sf.eclipsecs.core.CheckstyleBuilder</name>
20+
<arguments>
21+
</arguments>
22+
</buildCommand>
23+
<buildCommand>
24+
<name>org.eclipse.m2e.core.maven2Builder</name>
25+
<arguments>
26+
</arguments>
27+
</buildCommand>
28+
</buildSpec>
29+
<natures>
30+
<nature>org.eclipse.jdt.core.javanature</nature>
31+
<nature>org.eclipse.m2e.core.maven2Nature</nature>
32+
<nature>net.sf.eclipsecs.core.CheckstyleNature</nature>
33+
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
34+
</natures>
35+
</projectDescription>

pom.xml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
<groupId>uk.me.g4dpz</groupId>
77
<artifactId>predict4java</artifactId>
8-
<version>1.1</version>
8+
<version>1.1.1-SNAPSHOT</version>
99
<packaging>jar</packaging>
1010

1111
<name>${project.artifactId}</name>
@@ -14,7 +14,7 @@
1414

1515
<properties>
1616
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
17-
<compiler.source.version>1.6</compiler.source.version>
17+
<compiler.source.version>1.8</compiler.source.version>
1818
</properties>
1919

2020
<licenses>
@@ -178,10 +178,6 @@
178178
</reporting>
179179

180180
<distributionManagement>
181-
<repository>
182-
<id>predict4java-releases</id>
183-
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2</url>
184-
</repository>
185181

186182
<snapshotRepository>
187183
<id>predict4java-staging</id>

src/build/resources/checkstyle.xml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -98,11 +98,6 @@ Standard checks
9898
<module name="IllegalInstantiation"/>
9999
<module name="InnerAssignment"/>
100100
<module name="MissingSwitchDefault"/>
101-
<module name="RedundantThrows">
102-
<property name="allowUnchecked" value="true"/>
103-
<metadata name="com.atlassw.tools.eclipse.checkstyle.comment" value="We allow redundant throws for documentation purposes, but mark as info."/>
104-
<property name="severity" value="info"/>
105-
</module>
106101
<module name="SimplifyBooleanExpression"/>
107102
<module name="SimplifyBooleanReturn"/>
108103
<module name="FinalClass"/>
@@ -128,7 +123,6 @@ Standard checks
128123
<module name="IllegalType">
129124
<property name="tokens" value="METHOD_DEF,PARAMETER_DEF,VARIABLE_DEF"/>
130125
</module>
131-
<module name="JUnitTestCase"/>
132126
<module name="MissingCtor"/>
133127
<module name="ModifiedControlVariable"/>
134128
<module name="MultipleVariableDeclarations"/>
@@ -244,6 +238,5 @@ Standard checks
244238
<metadata name="com.atlassw.tools.eclipse.checkstyle.comment" value="Do not enforce this."/>
245239
<property name="severity" value="ignore"/>
246240
</module>
247-
<module name="NewlineAtEndOfFile"/>
248241
<module name="Translation"/>
249242
</module>

src/main/java/uk/me/g4dpz/satellite/AbstractSatellite.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ public domain through his website (http://www.celestrak.com/).
3535
You should have received a copy of the GNU General Public License
3636
along with this program; if not, visit http://www.fsf.org/
3737
*/
38+
3839
package uk.me.g4dpz.satellite;
3940

4041
import java.io.Serializable;
@@ -757,7 +758,7 @@ public static final Vector4 subtract(final Vector4 v1, final Vector4 v2) {
757758
/**
758759
* Solves Keplers' Equation.
759760
*
760-
* @param temp an array of temporary values we pass ariund as part of the orbit calculation.
761+
* @param temp an array of temporary values we pass around as part of the orbit calculation.
761762
* @param axn
762763
* @param ayn
763764
* @param capu

src/main/java/uk/me/g4dpz/satellite/DeepSpaceSatellite.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1200,3 +1200,4 @@ private DeepSpaceValueObject() {
12001200
}
12011201

12021202
}
1203+

src/main/java/uk/me/g4dpz/satellite/GroundStationPosition.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ public GroundStationPosition(final double latitude, final double longitude,
6969
* @param heightAMSL the height of te ground station above mean sea level, in metres
7070
*/
7171
public GroundStationPosition(final double latitude, final double longitude,
72-
final double heightAMSL, String name) {
72+
final double heightAMSL, final String name) {
7373
this.latitude = latitude;
7474
this.longitude = longitude;
7575
this.heightAMSL = heightAMSL;

src/main/java/uk/me/g4dpz/satellite/TLE.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ public TLE(final String[] tle) throws IllegalArgumentException {
134134
* @param tle the three line elements
135135
* @throws IllegalArgumentException here was something wrong with the TLE
136136
*/
137-
public TLE(final String[] tle, boolean nilStart) throws IllegalArgumentException {
137+
public TLE(final String[] tle, final boolean nilStart) throws IllegalArgumentException {
138138

139139
if (nilStart) {
140140
tle[0] = tle[0].substring(2);

src/test/java/uk/me/g4dpz/satellite/AbstractSatelliteTestBase.java

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,10 @@
3535
*/
3636
public abstract class AbstractSatelliteTestBase {
3737

38-
protected AbstractSatelliteTestBase() {
38+
private static final String TLE_AO51_2 = "2 28375 098.0551 118.9086 0084159 315.8041 043.6444 14.40638450251959";
39+
40+
private static final String TLE_AO51_1 = "1 28375U 04025K 09105.66391970 .00000003 00000-0 13761-4 0 3643";
41+
protected AbstractSatelliteTestBase() {
3942

4043
}
4144

@@ -52,8 +55,8 @@ protected AbstractSatelliteTestBase() {
5255

5356
protected static final String[] LEO_TLE = {
5457
"AO-51 [+]",
55-
"1 28375U 04025K 09105.66391970 .00000003 00000-0 13761-4 0 3643",
56-
"2 28375 098.0551 118.9086 0084159 315.8041 043.6444 14.40638450251959"};
58+
TLE_AO51_1,
59+
TLE_AO51_2};
5760

5861
protected static final String[] DEEP_SPACE_TLE = {
5962
"AO-40",
@@ -82,8 +85,8 @@ protected AbstractSatelliteTestBase() {
8285

8386
protected static final String[] NIL_START_TLE = {
8487
"0 AO-51 [+]",
85-
"1 28375U 04025K 09105.66391970 .00000003 00000-0 13761-4 0 3643",
86-
"2 28375 098.0551 118.9086 0084159 315.8041 043.6444 14.40638450251959"};
88+
TLE_AO51_1,
89+
TLE_AO51_2};
8790

8891
protected static final String LATITUDE = "52.4670";
8992
protected static final String LONGITUDE = "-2.022";

src/test/java/uk/me/g4dpz/satellite/LEOSatelliteTest.java

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,9 @@
4040
*/
4141
public class LEOSatelliteTest extends AbstractSatelliteTestBase {
4242

43-
private static final String ECLIPSE_DEPTH = "-0.2353420";
43+
private static final String FORMAT_6_1F_6_1F = "%6.1f %6.1f";
44+
45+
private static final String ECLIPSE_DEPTH = "-0.2353420";
4446

4547
private static final String THETA_VALUE = "-1.8011516";
4648

@@ -132,11 +134,11 @@ public final void testLEOSatellite() {
132134
Assert.assertFalse(satellitePosition.isEclipsed());
133135
Assert.assertTrue(satellite.willBeSeen(GROUND_STATION));
134136

135-
double[][] rangeCircle = satellitePosition.getRangeCircle();
136-
Assert.assertEquals(" 59.9 355.6", String.format("%6.1f %6.1f", rangeCircle[0][0], rangeCircle[0][1]));
137-
Assert.assertEquals(" 28.8 323.8", String.format("%6.1f %6.1f", rangeCircle[89][0], rangeCircle[89][1]));
138-
Assert.assertEquals(" 4.8 355.2", String.format("%6.1f %6.1f", rangeCircle[179][0], rangeCircle[179][1]));
139-
Assert.assertEquals(" 27.9 27.2", String.format("%6.1f %6.1f", rangeCircle[269][0], rangeCircle[269][1]));
137+
final double[][] rangeCircle = satellitePosition.getRangeCircle();
138+
Assert.assertEquals(" 59.9 355.6", String.format(FORMAT_6_1F_6_1F, rangeCircle[0][0], rangeCircle[0][1]));
139+
Assert.assertEquals(" 28.8 323.8", String.format(FORMAT_6_1F_6_1F, rangeCircle[89][0], rangeCircle[89][1]));
140+
Assert.assertEquals(" 4.8 355.2", String.format(FORMAT_6_1F_6_1F, rangeCircle[179][0], rangeCircle[179][1]));
141+
Assert.assertEquals(" 27.9 27.2", String.format(FORMAT_6_1F_6_1F, rangeCircle[269][0], rangeCircle[269][1]));
140142
}
141143

142144
@Test

src/test/java/uk/me/g4dpz/satellite/SatPassTimeTest.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@
2626
*/
2727
package uk.me.g4dpz.satellite;
2828

29-
import org.junit.Assert;
30-
import org.junit.Test;
3129

3230
/**
3331
* @author David A. B. Johnson, g4dpz

src/test/java/uk/me/g4dpz/satellite/SatPosTest.java

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@
3636
*/
3737
public final class SatPosTest {
3838

39-
/**
39+
private static final String FORMAT_4F = "%4.0f %4.0f";
40+
41+
/**
4042
* Default Constructor.
4143
*/
4244
public SatPosTest() {
@@ -49,19 +51,19 @@ public void footprintCalculatedCorrectly() {
4951
pos.setLongitude(0);
5052
pos.setAltitude(1000);
5153
double[][] rangeCircle = pos.getRangeCircle();
52-
Assert.assertEquals(" 30 0", String.format("%4.0f %4.0f", rangeCircle[0][0], rangeCircle[0][1]));
53-
Assert.assertEquals(" 1 330", String.format("%4.0f %4.0f", rangeCircle[89][0], rangeCircle[89][1]));
54-
Assert.assertEquals(" -30 359", String.format("%4.0f %4.0f", rangeCircle[179][0], rangeCircle[179][1]));
55-
Assert.assertEquals(" -1 30", String.format("%4.0f %4.0f", rangeCircle[269][0], rangeCircle[269][1]));
54+
Assert.assertEquals(" 30 0", String.format(FORMAT_4F, rangeCircle[0][0], rangeCircle[0][1]));
55+
Assert.assertEquals(" 1 330", String.format(FORMAT_4F, rangeCircle[89][0], rangeCircle[89][1]));
56+
Assert.assertEquals(" -30 359", String.format(FORMAT_4F, rangeCircle[179][0], rangeCircle[179][1]));
57+
Assert.assertEquals(" -1 30", String.format(FORMAT_4F, rangeCircle[269][0], rangeCircle[269][1]));
5658

5759

58-
pos.setLatitude(10.0/360.0*2.0*Math.PI);
59-
pos.setLongitude(10.0/360.0*2.0*Math.PI);
60+
pos.setLatitude(10.0 / 360.0 * 2.0 * Math.PI);
61+
pos.setLongitude(10.0 / 360.0 * 2.0 * Math.PI);
6062
pos.setAltitude(1000);
6163
rangeCircle = pos.getRangeCircle();
62-
Assert.assertEquals(" 40 10", String.format("%4.0f %4.0f", rangeCircle[0][0], rangeCircle[0][1]));
63-
Assert.assertEquals(" 9 339", String.format("%4.0f %4.0f", rangeCircle[89][0], rangeCircle[89][1]));
64-
Assert.assertEquals(" -20 9", String.format("%4.0f %4.0f", rangeCircle[179][0], rangeCircle[179][1]));
65-
Assert.assertEquals(" 8 41", String.format("%4.0f %4.0f", rangeCircle[269][0], rangeCircle[269][1]));
64+
Assert.assertEquals(" 40 10", String.format(FORMAT_4F, rangeCircle[0][0], rangeCircle[0][1]));
65+
Assert.assertEquals(" 9 339", String.format(FORMAT_4F, rangeCircle[89][0], rangeCircle[89][1]));
66+
Assert.assertEquals(" -20 9", String.format(FORMAT_4F, rangeCircle[179][0], rangeCircle[179][1]));
67+
Assert.assertEquals(" 8 41", String.format(FORMAT_4F, rangeCircle[269][0], rangeCircle[269][1]));
6668
}
6769
}

0 commit comments

Comments
 (0)