Skip to content

Commit

Permalink
#v0.3.3 release - fixed filter issue (closes #92)
Browse files Browse the repository at this point in the history
  • Loading branch information
marvk committed Feb 13, 2022
1 parent 07c14d2 commit b2795c8
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 6 deletions.
12 changes: 11 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Changelog

## [0.3.3](https://github.com/marvk/vatprism/compare/v0.3.2...v0.3.3) - 2022-02-13

### Fixed

- Fixed an issue where filters wouldn't show planes with specific statuses ([#92](https://github.com/marvk/vatprism/issues/92))

### Security

- Update to Log4j (2.17.0 -> 2.17.1)

## [0.3.2](https://github.com/marvk/vatprism/compare/v0.3.1...v0.3.2) - 2022-01-30

### Fixed
Expand Down Expand Up @@ -85,4 +95,4 @@

## [0.1.0](https://github.com/marvk/vatprism/releases/tag/v0.1.0) - 2021-09-13

Initial release
Initial release
6 changes: 3 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@

<properties>
<!--Defaults, should be passed as command line argument for real builds-->
<versionName>0.3.2</versionName>
<versionName>0.3.3</versionName>
<buildNumber>1</buildNumber>

<mainClass>net.marvk.fs.vatsim.map.Application</mainClass>
Expand All @@ -65,7 +65,7 @@
<mvvmfx.version>1.9.0-SNAPSHOT</mvvmfx.version>
<guice.version>5.0.1</guice.version>
<ikonli.version>12.2.0</ikonli.version>
<log4j.version>2.17.0</log4j.version>
<log4j.version>2.17.1</log4j.version>
<geotools.version>25.1</geotools.version>
<vatsim-api.version>1.2.0</vatsim-api.version>
<junit.version>5.8.1</junit.version>
Expand Down Expand Up @@ -456,4 +456,4 @@
</releases>
</repository>
</repositories>
</project>
</project>
12 changes: 11 additions & 1 deletion src/main/java/net/marvk/fs/vatsim/map/data/CallsignParser.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ public Result parse(final VatsimController controller) {
return Result.EMPTY;
}

// final String callsign = "LON_N_CTR";
final String callsign = controller.getCallsign();
final String cid = controller.getCid();

Expand Down Expand Up @@ -73,6 +74,10 @@ public Result parse(final VatsimController controller) {
return Result.EMPTY;
}

// System.out.println("identifier = " + identifier);
// System.out.println("infix = " + infix);
// System.out.println("controllerType = " + controllerType);

Airport airport = null;
UpperInformationRegion uir = null;
FirResult fir = FirResult.EMPTY;
Expand Down Expand Up @@ -105,13 +110,18 @@ public Result parse(final VatsimController controller) {
}
}

return new Result(
final Result result = new Result(
controllerType,
airport,
fir.flightInformationRegionBoundary,
fir.flightInformationRegion,
uir
);

// System.out.println(result);


return result;
}

private FirResult getFir(final VatsimController controller, final String identifier, final String infix, final ControllerType controllerType) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ private static List<FlightInformationRegion> byPrefix(final List<FlightInformati
return byUnknown1(noInfix.getResult(), identifier, infix);
}

// TODO swap these two blocks i think
final QueryResult withInfix = query(list, identifier + "_" + infix, FlightInformationRegion::prefixPositionProperty);
if (withInfix.isOneResult()) {
return withInfix.getResult();
Expand Down Expand Up @@ -139,10 +140,21 @@ private static FlightInformationRegionRepository.QueryResult query(final List<Fl
.stream()
.filter(e -> equalsIgnoreCaseAndDividers(queryExtractor.apply(e).get(), identifier))
.collect(Collectors.toList());
return new FlightInformationRegionRepository.QueryResult(byPrefixPosition);
final QueryResult queryResult = new QueryResult(byPrefixPosition);
if (queryResult.result.size() > 1) {
System.out.println(identifier);
queryResult.result.forEach(System.out::println);
System.out.println(queryResult.result.size());
}

return queryResult;
}

private static boolean equalsIgnoreCaseAndDividers(final String nullableString, final String string) {
// if (nullableString.contains("LON")) {
// System.out.println(nullableString);
// }

if (nullableString == null) {
return false;
}
Expand Down

0 comments on commit b2795c8

Please sign in to comment.