[PATCH] JMC-4326 : "ItemHandlerPage" - Columns should exist even though there is no data

Miro Wengner miro.wengner at gmail.com
Mon Aug 27 07:56:42 UTC 2018


Hi Marcus and everyone,

  here is my patch.
test scenario:
 1. mvn clean package, mvn verify -> SUCCESS
 2. I’ve created different reading and changed columns visibilities, page state has been persisted and displayed after starting JCM again.

Kind Regards,
Miro

patch:
diff -r c4c637714f61 application/org.openjdk.jmc.flightrecorder.ui/src/main/java/org/openjdk/jmc/flightrecorder/ui/pages/itemhandler/AttributeComponentConfiguration.java
--- a/application/org.openjdk.jmc.flightrecorder.ui/src/main/java/org/openjdk/jmc/flightrecorder/ui/pages/itemhandler/AttributeComponentConfiguration.java	Tue Aug 21 20:36:23 2018 +0200
+++ b/application/org.openjdk.jmc.flightrecorder.ui/src/main/java/org/openjdk/jmc/flightrecorder/ui/pages/itemhandler/AttributeComponentConfiguration.java	Sun Aug 26 23:09:22 2018 +0200
@@ -79,7 +79,7 @@

 	private void forEachType(IItemCollection items) {
 		if (items != null) {
-			ItemCollectionToolkit.stream(items).filter(IItemIterable::hasItems).map(IItemIterable::getType)
+			ItemCollectionToolkit.stream(items).map(IItemIterable::getType)
 					.forEach(type -> {
 						allTypes.put(type.getIdentifier(), type);
 						for (IAttribute<?> a : type.getAttributes()) {
diff -r c4c637714f61 application/org.openjdk.jmc.flightrecorder.ui/src/main/java/org/openjdk/jmc/flightrecorder/ui/pages/itemhandler/ItemHandlerPage.java
--- a/application/org.openjdk.jmc.flightrecorder.ui/src/main/java/org/openjdk/jmc/flightrecorder/ui/pages/itemhandler/ItemHandlerPage.java	Tue Aug 21 20:36:23 2018 +0200
+++ b/application/org.openjdk.jmc.flightrecorder.ui/src/main/java/org/openjdk/jmc/flightrecorder/ui/pages/itemhandler/ItemHandlerPage.java	Sun Aug 26 23:09:22 2018 +0200
@@ -215,7 +215,7 @@
 		private final ItemListAndChart itemListAndChart;
 		private IRange<IQuantity> currentRange;
 		private IItemCollection filteredItems;
-		AttributeComponentConfiguration acc;
+		private AttributeComponentConfiguration acc;
 		private IItemCollection selectionItems;
 		private String[] topics;




More information about the jmc-dev mailing list