﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
22030	[PATCH][RFC] Replace Utils.isStripEmpty with Utils.isBlank in AbstractPrimitive#put	taylor.smock	team	"I've been doing some profiling with Vector tiles, and I've noticed that makes a significant number of allocations.

Looking at the profiler output, it looks like `Utils.isBlank` effectively gets optimized away (tested on Java 8/17). Does anyone know of a reason to keep `Utils.isStripEmpty`?

{{{#!diff
diff --git a/src/org/openstreetmap/josm/data/osm/AbstractPrimitive.java b/src/org/openstreetmap/josm/data/osm/AbstractPrimitive.java
index b4b1e1e339..92b1572a11 100644
--- a/src/org/openstreetmap/josm/data/osm/AbstractPrimitive.java
+++ b/src/org/openstreetmap/josm/data/osm/AbstractPrimitive.java
@@ -584,7 +584,7 @@ public abstract class AbstractPrimitive implements IPrimitive, IFilterablePrimit
     @Override
     public void put(String key, String value) {
         Map<String, String> originalKeys = getKeys();
-        if (key == null || Utils.isStripEmpty(key))
+        if (key == null || Utils.isBlank(key))
             return;
         else if (value == null) {
             remove(key);
}}}

Profiler output:
"	defect	new	normal		Core			performance	
