Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge valhalla:master #275

Closed
Closed
Changes from all commits
Commits
Show all changes
83 commits
Select commit Hold shift + click to select a range
59965c1
8256237: Zero: non-PCH build fails after JDK-8253064
shipilev Nov 11, 2020
ccb48b7
8248188: Add IntrinsicCandidate and API for Base64 decoding
Nov 11, 2020
2f06893
8252526: Remove excessive inclusion of jvmti.h and jvmtiExport.hpp
iklam Nov 12, 2020
14e25e2
8255982: Extend BasicJMapTest to test with different GC Heap
Nov 12, 2020
da48003
8255975: Fix AArch64 OpenJDK build failure with gcc-5
shqking Nov 12, 2020
ec08b3f
8256188: Adjust output of make/autoconf/configure
MBaesken Nov 12, 2020
4df8abc
8255787: Tag container tests that use cGroups with cgroups keyword
Nov 12, 2020
bd8693a
8256181: Remove Allocation of old generation on alternate memory devi…
Nov 12, 2020
70c7b1d
8250607: C2: Filter type in PhiNode::Value() for induction variables …
rwestrel Nov 12, 2020
f7685a4
8256203: Simplify RegMask::Empty
cl4es Nov 12, 2020
19bade0
8256238: Remove Matcher::pass_original_key_for_aes
cl4es Nov 12, 2020
943acd2
8256276: Temporarily disable gtest special_flags
pchilano Nov 12, 2020
c6ab0fd
8255990: Bitmap region of dynamic CDS archive is not unmapped
calvinccheung Nov 12, 2020
3e70aac
8254162: Implementation of Foreign-Memory Access API (Third Incubator)
mcimadamore Nov 12, 2020
1c0b490
8256201: java/awt/FullScreen/FullscreenWindowProps/FullscreenWindowPr…
mrserb Nov 12, 2020
90f9a70
8255546: Missing coverage for javax.smartcardio.CardPermission and Re…
Nov 12, 2020
b5a9c92
8256244: java/lang/ProcessHandle/PermissionTest.java fails with TestN…
Nov 12, 2020
531c56e
8256278: Shenandoah: Avoid num of dead callback from weak processor i…
zhengyu123 Nov 12, 2020
dff26a4
8256063: Module::getPackages on an unnamed module may return packages…
Nov 13, 2020
e32a4ea
8253820: Save test images and dumps with timestamps from client sanit…
shurymury Nov 13, 2020
1d3d64f
8255973: Add more logging to debug JDK-8255917
yminqi Nov 13, 2020
c3139ab
8256220: C1: x86_32 fails with -XX:UseSSE=1 after JDK-8210764 due to …
shipilev Nov 13, 2020
05b8245
8256290: javac/lambda/T8031967.java fails with StackOverflowError on …
shipilev Nov 13, 2020
ea576dd
8254887: C2: assert(cl->trip_count() > 0) failed: peeling a fully unr…
rwestrel Nov 13, 2020
b4d0186
8253525: Implement getInstanceSize/sizeOf intrinsics
shipilev Nov 13, 2020
41139e3
8255964: Add all details to jstack log in jtreg timeout handler
Nov 13, 2020
b0c28fa
8256011: Shenandoah: Don't resurrect finalizably reachable objects
rkennke Nov 13, 2020
8c31bd2
8256275: Optimized build is broken
Nov 13, 2020
5973e91
8253005: Add `@throws IOException` in javadoc for `HttpEchange.sendRe…
pconcannon Nov 13, 2020
c8dd0b5
8256320: ZGC: Update zDebug to support UseCompressedClassPointers
stefank Nov 13, 2020
e9956fe
8256127: Add cross-compiled foreign architectures builds to submit wo…
shipilev Nov 13, 2020
56ea786
8245215: Obsolete InitialBootClassLoaderMetaspaceSize and UseLargePag…
Nov 13, 2020
1c47244
8255244: HttpClient: Response headers contain incorrectly encoded Uni…
dfuch Nov 13, 2020
1e9a432
8256202: Some tweaks for jarsigner tests PosixPermissionsTest and Sym…
RealCLanger Nov 13, 2020
298bce1
8256367: [windows] Better logging for some system calls
tstuefe Nov 16, 2020
6a69e30
8256337: ap01t001.cpp, 67: Received unexpected number of ObjectFree e…
stefank Nov 16, 2020
588caab
8256277: Github Action build on macOS should define OS and Xcode vers…
rwestberg Nov 16, 2020
1103e33
8256354: Github Action build on Windows should define OS and MSVC ver…
rwestberg Nov 16, 2020
ac39489
8256323: Remove HeapRegionManager::update_committed_space()
Nov 16, 2020
8eeb36f
8255883: Avoid duplicated GeneratedMethodAccessor when reflect method…
Nov 16, 2020
c5fe2c1
8244679: JVM/TI GetCurrentContendedMonitor/contmon001 failed due to "…
robehn Nov 16, 2020
c85c9ad
8255992: JFR EventWriter does not use first string from StringPool wi…
jiekang Nov 16, 2020
1d7ed03
8244376: possibly stale comment above "struct SharedGlobals" in synch…
Nov 16, 2020
b8de239
8256380: JDK-8254162 broke 32bit windows build
JornVernee Nov 16, 2020
f611fdf
8254016: Test8237524 fails with -XX:-CompactStrings option
Nov 16, 2020
3675653
8255384: Remove special_runtime_exit_condition() check from SS::block()
pchilano Nov 16, 2020
68fd71d
8256414: add optimized build to submit workflow
iignatev Nov 16, 2020
6e35bcb
8256205: Simplify compiler calling convention handling
cl4es Nov 16, 2020
0357db3
8256287: [windows] add loop fuse to map_or_reserve_memory_aligned
tstuefe Nov 16, 2020
bf84dac
8247781: Day periods support
naotoj Nov 16, 2020
36dbe6f
8256376: The javax/swing/JSpinner/SerializationTest.java fails on hea…
mrserb Nov 16, 2020
eabf3ba
8256037: [TESTBUG] com/sun/jndi/dns/ConfigTests/PortUnreachable.java …
DamonFool Nov 17, 2020
30a2ad5
8254872: Optimize Rotate on AArch64
theRealELiu Nov 17, 2020
c35e1a2
8255947: [macos] Signed macOS jpackage app doesn't filter spurious '-…
Nov 17, 2020
537b40e
8252588: HotSpot Style Guide should permit uniform initialization
Nov 17, 2020
1228517
8256274: C2: Optimize copying of the shared type dictionary
cl4es Nov 17, 2020
4553fa0
8256258: some missing NULL checks or asserts after CodeCache::find_bl…
MBaesken Nov 17, 2020
5dbfae0
8255058: C1: assert(is_virtual()) failed: type check
chhagedorn Nov 17, 2020
6d87856
8256325: Remove duplicate asserts in PhaseMacroExpand::expand_macro_n…
TobiHartmann Nov 17, 2020
a7422ac
8255150: Add utility methods to check long indexes and ranges
rwestrel Nov 17, 2020
adb8561
8253228: [JVMCI] provide more info on fatal JVMCI errors
Nov 17, 2020
53a3188
8202471: (ann) Cannot read type annotations on generic receiver type'…
raphw Nov 17, 2020
3dcde55
8256386: ARM32 tests fail with "bad AD file" after JDK-8223051
shipilev Nov 17, 2020
9d0ee66
8255758: JEP 380 spec clarifications
Michael-Mc-Mahon Nov 17, 2020
9dbbe83
8256146: Cleanup test/jdk/java/nio/channels/DatagramChannel/Connect.java
dfuch Nov 17, 2020
654ad27
8256392: C2: Various Node cleanups
cl4es Nov 17, 2020
3b9c5a3
8255796: Zero: CASE(_new) should replenish TLABs properly
shipilev Nov 17, 2020
c371782
8255553: [PPC64] Introduce and use setbc and setnbc P10 instructions
jrziviani Nov 17, 2020
c255b18
8256216: Enable reproducible builds in jib-profiles
magicus Nov 17, 2020
f2a9d02
8256370: Add asserts to Reference.getInactive()
rkennke Nov 17, 2020
9130ca4
8256401: ZGC: Improve ZList verification
pliden Nov 17, 2020
9efbb46
8256426: Shenandoah: Remove superfluous assert is ShBS::load_referenc…
rkennke Nov 17, 2020
d9dbd5d
8256430: add linux-x64-optimized to regular testing
iignatev Nov 17, 2020
f751738
8256484: ZGC: Rename ZRelocationSetSelector::register_garbage_page()
pliden Nov 17, 2020
eb02184
8134630: make code and comments consistent for stack lock optimization
Nov 17, 2020
ef3ddb1
8255448: Fastdebug JVM crashes with Vector API when PrintAssembly is …
Nov 18, 2020
26a1ec1
8256435: [TESTBUG] java/foreign/TestHandshake.java fails with direct …
nick-arm Nov 18, 2020
7ecf070
8256476: Assert in vmIntrinsics::flags_for with -XX:+Verbose
iklam Nov 18, 2020
c089214
8255368: Math.exp() gives wrong result for large values on x86 32-bit…
xbzhang99 Nov 18, 2020
d309560
8253081: G1 fails on stale objects in archived module graph in Open A…
Nov 18, 2020
6948456
8256461: AbstractFileSystemProvider.getSunPathForSocketCall for empty…
Michael-Mc-Mahon Nov 18, 2020
655bb61
8255936: "parsing found no loops but there are some" assertion failur…
rwestrel Nov 18, 2020
07c20aa
Merge jdk tag 'jdk-16+25' into jep390-merge/jdk-16+25
Nov 21, 2020
File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
The table of contents is too big for display.
Diff view
Diff view

Large diffs are not rendered by default.

@@ -49,6 +49,7 @@ <h1 class="title">HotSpot Coding Style</h1>
<li><a href="#thread_local">thread_local</a></li>
<li><a href="#nullptr">nullptr</a></li>
<li><a href="#atomic">&lt;atomic&gt;</a></li>
<li><a href="#uniform-initialization">Uniform Initialization</a></li>
<li><a href="#additional-permitted-features">Additional Permitted Features</a></li>
<li><a href="#excluded-features">Excluded Features</a></li>
<li><a href="#undecided-features">Undecided Features</a></li>
@@ -275,6 +276,17 @@ <h3 id="atomic">&lt;atomic&gt;</h3>
<p>Do not use facilities provided by the <code>&lt;atomic&gt;</code> header (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2427.html">n2427</a>), (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2752.htm">n2752</a>); instead, use the HotSpot <code>Atomic</code> class and related facilities.</p>
<p>Atomic operations in HotSpot code must have semantics which are consistent with those provided by the JDK's compilers for Java. There are platform-specific implementation choices that a C++ compiler might make or change that are outside the scope of the C++ Standard, and might differ from what the Java compilers implement.</p>
<p>In addition, HotSpot <code>Atomic</code> has a concept of &quot;conservative&quot; memory ordering, which may differ from (may be stronger than) sequentially consistent. There are algorithms in HotSpot that are believed to rely on that ordering.</p>
<h3 id="uniform-initialization">Uniform Initialization</h3>
<p>The use of <em>uniform initialization</em> (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2672.htm">n2672</a>), also known as <em>brace initialization</em>, is permitted.</p>
<p>Some relevant sections from cppreference.com:</p>
<ul>
<li><a href="https://en.cppreference.com/w/cpp/language/initialization">initialization</a></li>
<li><a href="https://en.cppreference.com/w/cpp/language/value_initialization">value initialization</a></li>
<li><a href="https://en.cppreference.com/w/cpp/language/direct_initialization">direct initialization</a></li>
<li><a href="https://en.cppreference.com/w/cpp/language/list_initialization">list initialization</a></li>
<li><a href="https://en.cppreference.com/w/cpp/language/aggregate_initialization">aggregate initialization</a></li>
</ul>
<p>Although related, the use of <code>std::initializer_list</code> remains forbidden, as part of the avoidance of the C++ Standard Library in HotSpot code.</p>
<h3 id="additional-permitted-features">Additional Permitted Features</h3>
<ul>
<li><p><code>constexpr</code> (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2235.pdf">n2235</a>) (<a href="https://isocpp.org/files/papers/N3652.html">n3652</a>)</p></li>
@@ -681,6 +681,23 @@ ordering, which may differ from (may be stronger than) sequentially
consistent. There are algorithms in HotSpot that are believed to rely
on that ordering.

### Uniform Initialization

The use of _uniform initialization_
([n2672](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2672.htm)),
also known as _brace initialization_, is permitted.

Some relevant sections from cppreference.com:

* [initialization](https://en.cppreference.com/w/cpp/language/initialization)
* [value initialization](https://en.cppreference.com/w/cpp/language/value_initialization)
* [direct initialization](https://en.cppreference.com/w/cpp/language/direct_initialization)
* [list initialization](https://en.cppreference.com/w/cpp/language/list_initialization)
* [aggregate initialization](https://en.cppreference.com/w/cpp/language/aggregate_initialization)

Although related, the use of `std::initializer_list` remains forbidden, as
part of the avoidance of the C++ Standard Library in HotSpot code.

### Additional Permitted Features

* `constexpr`
@@ -1,6 +1,6 @@
#!/bin/bash
#
# Copyright (c) 2012, 2019, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2012, 2020, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -49,7 +49,7 @@ export LC_ALL=C
if test "x$CUSTOM_CONFIG_DIR" != x; then
custom_hook=$CUSTOM_CONFIG_DIR/custom-hook.m4
if test ! -e $custom_hook; then
echo "CUSTOM_CONFIG_DIR not pointing to a proper custom config dir."
echo "CUSTOM_CONFIG_DIR ($CUSTOM_CONFIG_DIR) not pointing to a proper custom config dir."
echo "Error: Cannot continue" 1>&2
exit 1
fi
@@ -83,6 +83,7 @@ autoconf_missing_help() {
BREW="`type -p brew 2> /dev/null`"
ZYPPER="`type -p zypper 2> /dev/null`"
CYGWIN="`type -p cygpath 2> /dev/null`"
UNAMEOUT="`uname 2> /dev/null`"

if test "x$ZYPPER" != x; then
PKGHANDLER_COMMAND="sudo zypper install autoconf"
@@ -92,6 +93,8 @@ autoconf_missing_help() {
PKGHANDLER_COMMAND="sudo yum install autoconf"
elif test "x$BREW" != x; then
PKGHANDLER_COMMAND="brew install autoconf"
elif test "x$UNAMEOUT" == xAIX; then
echo "You might be able to fix this by installing autoconf from the 'AIX Toolbox for Linux Applications' (or compile it from the sources)."
elif test "x$CYGWIN" != x; then
PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P autoconf )"
fi
@@ -114,7 +117,7 @@ generate_configure_script() {
AUTOCONF="`type -p autoconf 2> /dev/null`"
if test "x$AUTOCONF" = x; then
echo
echo "Autoconf is not found on the PATH, and AUTOCONF is not set."
echo "Autoconf is not found on the PATH ($PATH), and AUTOCONF is not set."
echo "You need autoconf to be able to generate a runnable configure script."
autoconf_missing_help
echo "Error: Cannot find autoconf" 1>&2
@@ -256,6 +256,13 @@ var getJibProfilesCommon = function (input, data) {
"--disable-jvm-feature-shenandoahgc",
versionArgs(input, common))
};
// Extra settings for release profiles
common.release_profile_base = {
configure_args: [
"--enable-reproducible-build",
"--with-source-date=current",
],
};
// Extra settings for debug profiles
common.debug_suffix = "-debug";
common.debug_profile_base = {
@@ -268,6 +275,12 @@ var getJibProfilesCommon = function (input, data) {
configure_args: ["--with-debug-level=slowdebug"],
labels: "slowdebug"
};
// Extra settings for optimized profiles
common.optimized_suffix = "-optimized";
common.optimized_profile_base = {
configure_args: ["--with-debug-level=optimized"],
labels: "optimized",
};
// Extra settings for openjdk only profiles
common.open_suffix = "-open";
common.open_profile_base = {
@@ -510,6 +523,13 @@ var getJibProfilesProfiles = function (input, common, data) {
profiles[debugName] = concatObjects(profiles[name],
common.slowdebug_profile_base);
});
// Generate optimized versions of all the main profiles
common.main_profile_names.forEach(function (name) {
var optName = name + common.optimized_suffix;
profiles[optName] = concatObjects(profiles[name],
common.optimized_profile_base);
profiles[optName].default_make_targets = [ "hotspot" ];
});
// Generate testmake profiles for the main profile of each build host
// platform. This profile only runs the makefile tests.
// Ant is needed to run the idea project generator test.
@@ -797,6 +817,13 @@ var getJibProfilesProfiles = function (input, common, data) {
});
});

// After creating all derived profiles, we can add the release profile base
// to the main profiles
common.main_profile_names.forEach(function (name) {
profiles[name] = concatObjects(profiles[name],
common.release_profile_base);
});

// Artifacts of JCov profiles
[ "linux-aarch64", "linux-x64", "macosx-x64", "windows-x64" ]
.forEach(function (name) {
@@ -375,6 +375,16 @@ String getCurrencies() {
}
}

// rules
String rule = CLDRConverter.pluralRules.get(id);
if (rule != null) {
myMap.put("PluralRules", rule);
}
rule = CLDRConverter.dayPeriodRules.get(id);
if (rule != null) {
myMap.put("DayPeriodRules", rule);
}

// Remove all duplicates
if (Objects.nonNull(parentsMap)) {
for (Iterator<String> it = myMap.keySet().iterator(); it.hasNext();) {
@@ -522,8 +532,6 @@ private void handleDateTimeFormatPatterns(String[] patternKeys, Map<String, Obje
if (pattern != null) {
// Perform date-time format pattern conversion which is
// applicable to both SimpleDateFormat and j.t.f.DateTimeFormatter.
// For example, character 'B' is mapped with 'a', as 'B' is not
// supported in either SimpleDateFormat or j.t.f.DateTimeFormatter
String transPattern = translateDateFormatLetters(calendarType, pattern, this::convertDateTimePatternLetter);
dateTimePatterns.add(i, transPattern);
// Additionally, perform SDF specific date-time format pattern conversion
@@ -653,17 +661,6 @@ private void convertDateTimePatternLetter(CalendarType calendarType, char cldrLe
// as the best approximation
appendN('y', count, sb);
break;
case 'B':
// 'B' character (day period) is not supported by
// SimpleDateFormat and j.t.f.DateTimeFormatter,
// this is a workaround in which 'B' character
// appearing in CLDR date-time pattern is replaced
// with 'a' character and hence resolved with am/pm strings.
// This workaround is based on the the fallback mechanism
// specified in LDML spec for 'B' character, when a locale
// does not have data for day period ('B')
appendN('a', count, sb);
break;
default:
appendN(cldrLetter, count, sb);
break;
@@ -720,6 +717,17 @@ private void convertSDFLetter(CalendarType calendarType, char cldrLetter, int co
}
break;

case 'B':
// 'B' character (day period) is not supported by SimpleDateFormat,
// this is a workaround in which 'B' character
// appearing in CLDR date-time pattern is replaced
// with 'a' character and hence resolved with am/pm strings.
// This workaround is based on the the fallback mechanism
// specified in LDML spec for 'B' character, when a locale
// does not have data for day period ('B')
appendN('a', count, sb);
break;

default:
appendN(cldrLetter, count, sb);
break;
@@ -70,6 +70,7 @@
private static String TIMEZONE_SOURCE_FILE;
private static String WINZONES_SOURCE_FILE;
private static String PLURALS_SOURCE_FILE;
private static String DAYPERIODRULE_SOURCE_FILE;
static String DESTINATION_DIR = "build/gensrc";

static final String LOCALE_NAME_PREFIX = "locale.displayname.";
@@ -100,6 +101,7 @@
static NumberingSystemsParseHandler handlerNumbering;
static MetaZonesParseHandler handlerMetaZones;
static TimeZoneParseHandler handlerTimeZone;
static DayPeriodRuleParseHandler handlerDayPeriodRule;
private static BundleGenerator bundleGenerator;

// java.base module related
@@ -116,6 +118,10 @@
private static String tzDataDir;
private static final Map<String, String> canonicalTZMap = new HashMap<>();

// rules maps
static Map<String, String> pluralRules;
static Map<String, String> dayPeriodRules;

static enum DraftType {
UNCONFIRMED,
PROVISIONAL,
@@ -248,6 +254,7 @@ public static void main(String[] args) throws Exception {
SPPL_META_SOURCE_FILE = CLDR_BASE + "/supplemental/supplementalMetadata.xml";
WINZONES_SOURCE_FILE = CLDR_BASE + "/supplemental/windowsZones.xml";
PLURALS_SOURCE_FILE = CLDR_BASE + "/supplemental/plurals.xml";
DAYPERIODRULE_SOURCE_FILE = CLDR_BASE + "/supplemental/dayPeriods.xml";

if (BASE_LOCALES.isEmpty()) {
setupBaseLocales("en-US");
@@ -259,6 +266,10 @@ public static void main(String[] args) throws Exception {
parseSupplemental();
parseBCP47();

// rules maps
pluralRules = generateRules(handlerPlurals);
dayPeriodRules = generateRules(handlerDayPeriodRule);

List<Bundle> bundles = readBundleList();
convertBundles(bundles);

@@ -268,9 +279,6 @@ public static void main(String[] args) throws Exception {

// Generate Windows tzmappings
generateWindowsTZMappings();

// Generate Plural rules
generatePluralRules();
}
}

@@ -462,6 +470,10 @@ private static void parseSupplemental() throws Exception {
// Parse plurals
handlerPlurals = new PluralsParseHandler();
parseLDMLFile(new File(PLURALS_SOURCE_FILE), handlerPlurals);

// Parse day period rules
handlerDayPeriodRule = new DayPeriodRuleParseHandler();
parseLDMLFile(new File(DAYPERIODRULE_SOURCE_FILE), handlerDayPeriodRule);
}

// Parsers for data in "bcp47" directory
@@ -809,7 +821,9 @@ private boolean isDigit(char c) {
"TimePatterns",
"DatePatterns",
"DateTimePatterns",
"DateTimePatternChars"
"DateTimePatternChars",
"PluralRules",
"DayPeriodRules",
};

private static Map<String, Object> extractFormatData(Map<String, Object> map, String id) {
@@ -1125,49 +1139,21 @@ public int compare(String t1, String t2) {
}

/**
* Generate ResourceBundle source file for plural rules. The generated
* class is {@code sun.text.resources.PluralRules} which has one public
* two dimensional array {@code rulesArray}. Each array element consists
* of two elements that designate the locale and the locale's plural rules
* string. The latter has the syntax from Unicode Consortium's
* <a href="http://unicode.org/reports/tr35/tr35-numbers.html#Plural_rules_syntax">
* Plural rules syntax</a>. {@code samples} and {@code "other"} are being ommited.
*
* @throws Exception
* Generates rules map for Plural rules and DayPeriod rules. The key is the locale id,
* and the value is rules, defined by the LDML spec. Each rule consists of {@code type:rule}
* notation, concatenated with a ";" as a delimiter.
* @param handler handler containing rules
* @return the map
*/
private static void generatePluralRules() throws Exception {
Files.createDirectories(Paths.get(DESTINATION_DIR, "sun", "text", "resources"));
Files.write(Paths.get(DESTINATION_DIR, "sun", "text", "resources", "PluralRules.java"),
Stream.concat(
Stream.concat(
Stream.of(
"package sun.text.resources;",
"public final class PluralRules {",
" public static final String[][] rulesArray = {"
),
pluralRulesStream().sorted()
),
Stream.of(
" };",
"}"
)
)
.collect(Collectors.toList()),
StandardOpenOption.CREATE, StandardOpenOption.TRUNCATE_EXISTING);
}

private static Stream<String> pluralRulesStream() {
return handlerPlurals.getData().entrySet().stream()
.filter(e -> !(e.getValue()).isEmpty())
.map(e -> {
String loc = e.getKey();
private static Map<String, String> generateRules(AbstractLDMLHandler<Map<String, String>> handler) {
return handler.getData().entrySet().stream()
.collect(Collectors.toMap(Map.Entry::getKey, e -> {
Map<String, String> rules = e.getValue();
return " {\"" + loc + "\", \"" +
rules.entrySet().stream()
.map(rule -> rule.getKey() + ":" + rule.getValue().replaceFirst("@.*", ""))
.map(String::trim)
.collect(Collectors.joining(";")) + "\"},";
});
return rules.entrySet().stream()
.map(rule -> rule.getKey() + ":" + rule.getValue().replaceFirst("@.*", ""))
.map(String::trim)
.collect(Collectors.joining(";"));
}));
}

// for debug
@@ -1188,4 +1174,3 @@ static void dumpMap(Map<String, Object> map) {
.forEach(System.out::println);
}
}