#22832 closed enhancement (fixed)
[patch] Minor typo fixes, code cleanup
Reported by: | gaben | Owned by: | team |
---|---|---|---|
Priority: | minor | Milestone: | 23.08 |
Component: | Core | Version: | |
Keywords: | Cc: |
Description
I collected these changes along for about a year, it's time to publish.
They are very minor, there shouldn't be any functional change in any of the patches:
- typo fixes
- simplifications, cleanups
- shell file fixes
- rest mixed, skip if not necessary
Attachments (5)
Change History (15)
by , 2 years ago
Attachment: | josm_22832_typo_documentation_fixes.patch added |
---|
by , 2 years ago
Attachment: | josm_22832_minor_fixes.patch added |
---|
by , 2 years ago
Attachment: | josm_22832_shell_fixes.patch added |
---|
by , 2 years ago
Attachment: | josm_22832_general.patch added |
---|
comment:1 by , 2 years ago
Summary: | Minor typo fixes, code cleanup → [patch] Minor typo fixes, code cleanup |
---|
comment:2 by , 21 months ago
Maybe I should put them on GitHub to have better visibility...
-
src/org/openstreetmap/josm/data/osm/OsmUtils.java
Subject: [PATCH] Code cleanup #22832 --- IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 diff --git a/src/org/openstreetmap/josm/data/osm/OsmUtils.java b/src/org/openstreetmap/josm/data/osm/OsmUtils.java
a b 36 36 /** 37 37 * Discouraged synonym for {@link #TRUE_VALUE} 38 38 */ 39 @Deprecated 39 40 public static final String trueval = TRUE_VALUE; 40 41 /** 41 42 * Discouraged synonym for {@link #FALSE_VALUE} 42 43 */ 44 @Deprecated 43 45 public static final String falseval = FALSE_VALUE; 44 46 /** 45 47 * Discouraged synonym for {@link #REVERSE_VALUE} 46 48 */ 49 @Deprecated 47 50 public static final String reverseval = REVERSE_VALUE; 48 51 49 52 private OsmUtils() { … … 53 56 /** 54 57 * Converts a string to a boolean value 55 58 * @param value The string to convert 56 * @return {@link Boolean#TRUE} if that string represents a true value, 57 * {@link Boolean#FALSE} if it represents a false value, 58 * <code>null</code>otherwise.59 * @return {@link Boolean#TRUE} if that string represents a true value,<br> 60 * {@link Boolean#FALSE} if it represents a false value,<br> 61 * {@code null} otherwise. 59 62 */ 60 63 public static Boolean getOsmBoolean(String value) { 61 64 if (value == null) return null; … … 74 77 */ 75 78 public static String getNamedOsmBoolean(String value) { 76 79 Boolean res = getOsmBoolean(value); 77 return res == null ? value : (res ? trueval : falseval);80 return res == null ? value : (res ? TRUE_VALUE : FALSE_VALUE); 78 81 } 79 82 80 83 /**
comment:4 by , 19 months ago
Milestone: | → 23.08 |
---|
comment:7 by , 19 months ago
I can look at the since xxx fixer script next time.
I've got some local modifications, that, among other things, lets me run it against a changelist. Poke me about it next week so I can share it with you.
by , 19 months ago
Attachment: | since_xxx.patch added |
---|
comment:10 by , 19 months ago
Mistakes happen.
Don't worry about it too much -- it was one of the reasons why I wanted to merge this patch early in the cycle. I should have checked the builds earlier though.
ShellCheck suggestions applied, although haven't tested