From 86b218ebb671f0285e882d54d7453a8eb82cda50 Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Thu, 29 Nov 2018 22:03:35 -0500 Subject: [PATCH 01/41] Add periods to sentences --- .../jenkins/model/Jenkins/projectRelationship-help.jelly | 4 ++-- .../model/Jenkins/projectRelationship-help_bg.properties | 8 ++++---- .../model/Jenkins/projectRelationship-help_da.properties | 4 ++-- .../model/Jenkins/projectRelationship-help_de.properties | 4 ++-- .../model/Jenkins/projectRelationship-help_es.properties | 4 ++-- .../model/Jenkins/projectRelationship-help_et.properties | 4 ++-- .../model/Jenkins/projectRelationship-help_fr.properties | 6 +++--- .../model/Jenkins/projectRelationship-help_it.properties | 4 ++-- .../model/Jenkins/projectRelationship-help_ja.properties | 8 ++++---- .../model/Jenkins/projectRelationship-help_lt.properties | 4 ++-- .../model/Jenkins/projectRelationship-help_nl.properties | 6 +++--- .../Jenkins/projectRelationship-help_pt_BR.properties | 4 ++-- .../model/Jenkins/projectRelationship-help_ru.properties | 4 ++-- .../model/Jenkins/projectRelationship-help_sr.properties | 6 +++--- .../model/Jenkins/projectRelationship-help_tr.properties | 4 ++-- .../Jenkins/projectRelationship-help_zh_TW.properties | 4 ++-- 16 files changed, 39 insertions(+), 39 deletions(-) diff --git a/core/src/main/resources/jenkins/model/Jenkins/projectRelationship-help.jelly b/core/src/main/resources/jenkins/model/Jenkins/projectRelationship-help.jelly index b94f900169..837dc55a9f 100644 --- a/core/src/main/resources/jenkins/model/Jenkins/projectRelationship-help.jelly +++ b/core/src/main/resources/jenkins/model/Jenkins/projectRelationship-help.jelly @@ -35,8 +35,8 @@ THE SOFTWARE. ${%For this feature to work, the following conditions need to be met:}

    -
  1. ${%The upstream project records the fingerprints of its build artifacts}
  2. -
  3. ${%The downstream project records the fingerprints of the upstream files it uses}
  4. +
  5. ${%The upstream project records the fingerprints of its build artifacts.}
  6. +
  7. ${%The downstream project records the fingerprints of the upstream files it uses.}

${%This allows Jenkins to correlate two projects.} diff --git a/core/src/main/resources/jenkins/model/Jenkins/projectRelationship-help_bg.properties b/core/src/main/resources/jenkins/model/Jenkins/projectRelationship-help_bg.properties index 60264c429d..1aecee88e4 100644 --- a/core/src/main/resources/jenkins/model/Jenkins/projectRelationship-help_bg.properties +++ b/core/src/main/resources/jenkins/model/Jenkins/projectRelationship-help_bg.properties @@ -33,12 +33,12 @@ body=\ \u0434\u0430\u043d\u043d\u0438 \u043e\u0442\ \u0446\u0438\u0444\u0440\u043e\u0432\u0438\u0442\u0435\ \u043e\u0442\u043f\u0435\u0447\u0430\u0442\u044a\u0446\u0438. -The\ downstream\ project\ records\ the\ fingerprints\ of\ the\ upstream\ files\ it\ uses=\ - \u041f\u043e\u0441\u043b\u0435\u0434\u0432\u0430\u0449\u0438\u044f\u0442 \u043f\u0440\u043e\u0435\u043a\u0442 \u043f\u0430\u0437\u0438 \u0446\u0438\u0444\u0440\u043e\u0432\u0438\u0442\u0435 \u043e\u0442\u043f\u0435\u0447\u0430\u0442\u044a\u0446\u0438 \u043d\u0430 \u0440\u0435\u0437\u0443\u043b\u0442\u0430\u0442\u0438\u0442\u0435 \u043e\u0442 \u0438\u0437\u0433\u0440\u0430\u0436\u0434\u0430\u043d\u0438\u044f\u0442\u0430 +The\ downstream\ project\ records\ the\ fingerprints\ of\ the\ upstream\ files\ it\ uses.=\ + \u041f\u043e\u0441\u043b\u0435\u0434\u0432\u0430\u0449\u0438\u044f\u0442 \u043f\u0440\u043e\u0435\u043a\u0442 \u043f\u0430\u0437\u0438 \u0446\u0438\u0444\u0440\u043e\u0432\u0438\u0442\u0435 \u043e\u0442\u043f\u0435\u0447\u0430\u0442\u044a\u0446\u0438 \u043d\u0430 \u0440\u0435\u0437\u0443\u043b\u0442\u0430\u0442\u0438\u0442\u0435 \u043e\u0442 \u0438\u0437\u0433\u0440\u0430\u0436\u0434\u0430\u043d\u0438\u044f\u0442\u0430. # What\u2019s "project relationship"? Title=\ \u0412\u0440\u044a\u0437\u043a\u0438 \u0441 \u0434\u0440\u0443\u0433\u0438\u0442\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0438 -The\ upstream\ project\ records\ the\ fingerprints\ of\ its\ build\ artifacts=\ - \u041f\u0440\u0435\u0434\u0448\u0435\u0441\u0442\u0432\u0430\u0449\u0438\u044f\u0442 \u043f\u0440\u043e\u0435\u043a\u0442 \u043f\u0430\u0437\u0438 \u0446\u0438\u0444\u0440\u043e\u0432\u0438\u0442\u0435 \u043e\u0442\u043f\u0435\u0447\u0430\u0442\u044a\u0446\u0438 \u043d\u0430 \u0440\u0435\u0437\u0443\u043b\u0442\u0430\u0442\u0438\u0442\u0435 \u043e\u0442 \u0438\u0437\u0433\u0440\u0430\u0436\u0434\u0430\u043d\u0438\u044f\u0442\u0430 +The\ upstream\ project\ records\ the\ fingerprints\ of\ its\ build\ artifacts.=\ + \u041f\u0440\u0435\u0434\u0448\u0435\u0441\u0442\u0432\u0430\u0449\u0438\u044f\u0442 \u043f\u0440\u043e\u0435\u043a\u0442 \u043f\u0430\u0437\u0438 \u0446\u0438\u0444\u0440\u043e\u0432\u0438\u0442\u0435 \u043e\u0442\u043f\u0435\u0447\u0430\u0442\u044a\u0446\u0438 \u043d\u0430 \u0440\u0435\u0437\u0443\u043b\u0442\u0430\u0442\u0438\u0442\u0435 \u043e\u0442 \u0438\u0437\u0433\u0440\u0430\u0436\u0434\u0430\u043d\u0438\u044f\u0442\u0430. This\ allows\ Jenkins\ to\ correlate\ two\ projects.=\ \u0422\u043e\u0432\u0430 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0432\u0430 \u043d\u0430 Jenkins \u0434\u0430 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438 \u0432\u0440\u044a\u0437\u043a\u0438\u0442\u0435 \u043c\u0435\u0436\u0434\u0443 \u0434\u0432\u0430\u0442\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u0430. diff --git a/core/src/main/resources/jenkins/model/Jenkins/projectRelationship-help_da.properties b/core/src/main/resources/jenkins/model/Jenkins/projectRelationship-help_da.properties index 93e7cb4a0d..d54a3be29d 100644 --- a/core/src/main/resources/jenkins/model/Jenkins/projectRelationship-help_da.properties +++ b/core/src/main/resources/jenkins/model/Jenkins/projectRelationship-help_da.properties @@ -22,9 +22,9 @@ Title=Hvad er et "projektforhold"? For\ this\ feature\ to\ work,\ the\ following\ conditions\ need\ to\ be\ met\:=For at denne feature fungerer skal f\u00f8lgende v\u00e6re opfyldt: -The\ downstream\ project\ records\ the\ fingerprints\ of\ the\ upstream\ files\ it\ uses=Downstream projektet opsamler filfingeraftryk af de upstream filer det benytter +The\ downstream\ project\ records\ the\ fingerprints\ of\ the\ upstream\ files\ it\ uses.=Downstream projektet opsamler filfingeraftryk af de upstream filer det benytter. body=\ Har du projekter der er afh\u00e6ngige af hinanden kan Jenkins f\u00f8lge hvilket byg af upstreamprojektet \ der bruges af hvilket byg af downstream projektet ved at bruge filfingeraftyrk This\ allows\ Jenkins\ to\ correlate\ two\ projects.=Dette tillader Jenkins at korrelere to projekter. -The\ upstream\ project\ records\ the\ fingerprints\ of\ its\ build\ artifacts=Upstream projektet opsamler filfingeraftryk af sine byggeartifakter +The\ upstream\ project\ records\ the\ fingerprints\ of\ its\ build\ artifacts.=Upstream projektet opsamler filfingeraftryk af sine byggeartifakter. diff --git a/core/src/main/resources/jenkins/model/Jenkins/projectRelationship-help_de.properties b/core/src/main/resources/jenkins/model/Jenkins/projectRelationship-help_de.properties index 4bdff159fc..26330f50c2 100644 --- a/core/src/main/resources/jenkins/model/Jenkins/projectRelationship-help_de.properties +++ b/core/src/main/resources/jenkins/model/Jenkins/projectRelationship-help_de.properties @@ -26,6 +26,6 @@ body=\ eines vorgelagerten Projektes für welchen Build eines nachgelagerten Projektes verwendet wurde. Dies geschieht über \ gespeicherte "Fingerabdrücke", die mit Hilfe der Fingerabdruck-Funktion erzeugt wurden. For\ this\ feature\ to\ work,\ the\ following\ conditions\ need\ to\ be\ met\:=Um Projektbeziehungen nachzuverfolgen, müssen folgende Bedingungen erfüllt sein: -The\ upstream\ project\ records\ the\ fingerprints\ of\ its\ build\ artifacts=Das vorgelagerte Projekt zeichnet Fingerabdrücke seiner Build-Artefakte auf. -The\ downstream\ project\ records\ the\ fingerprints\ of\ the\ upstream\ files\ it\ uses=Das nachgelagerte Projekt zeichnet Fingerabdrücke der verwendeten Dateien aus vorgelagerten Projekten auf. +The\ upstream\ project\ records\ the\ fingerprints\ of\ its\ build\ artifacts.=Das vorgelagerte Projekt zeichnet Fingerabdrücke seiner Build-Artefakte auf. +The\ downstream\ project\ records\ the\ fingerprints\ of\ the\ upstream\ files\ it\ uses.=Das nachgelagerte Projekt zeichnet Fingerabdrücke der verwendeten Dateien aus vorgelagerten Projekten auf. This\ allows\ Jenkins\ to\ correlate\ two\ projects.=Diese Aufzeichnungen erlauben es Jenkins, zwei Projekte zueinander in Beziehung zu setzen. diff --git a/core/src/main/resources/jenkins/model/Jenkins/projectRelationship-help_es.properties b/core/src/main/resources/jenkins/model/Jenkins/projectRelationship-help_es.properties index 165c1ab751..fd34299623 100644 --- a/core/src/main/resources/jenkins/model/Jenkins/projectRelationship-help_es.properties +++ b/core/src/main/resources/jenkins/model/Jenkins/projectRelationship-help_es.properties @@ -24,6 +24,6 @@ Title= body=Cuando hay proyectos que dependen unos de otros, Jenkins puede hacer un seguimiento de qu\u00E9 proyectos padres est\u00E1n siendo utilizado por otros proyectos hijos usando un registro de firmas de los ficheros generados. Echa un vistazo a esta pagina: the fingerprint support. This\ allows\ Jenkins\ to\ correlate\ two\ projects.=Esto facilita que Jenkins pueda correlacionar los dos proyectos -The\ upstream\ project\ records\ the\ fingerprints\ of\ its\ build\ artifacts=Que el proyecto padre registre la firma de todos los ficheros que genera. +The\ upstream\ project\ records\ the\ fingerprints\ of\ its\ build\ artifacts.=Que el proyecto padre registre la firma de todos los ficheros que genera. For\ this\ feature\ to\ work,\ the\ following\ conditions\ need\ to\ be\ met\:=Para esta funcionalidad, son necesarias las siguientes condiciones: -The\ downstream\ project\ records\ the\ fingerprints\ of\ the\ upstream\ files\ it\ uses=El proyecto hijo almacena las firmas de los ficheros o artefactos que necesita y que fueron generados por otros proyectos padres. +The\ downstream\ project\ records\ the\ fingerprints\ of\ the\ upstream\ files\ it\ uses.=El proyecto hijo almacena las firmas de los ficheros o artefactos que necesita y que fueron generados por otros proyectos padres. diff --git a/core/src/main/resources/jenkins/model/Jenkins/projectRelationship-help_et.properties b/core/src/main/resources/jenkins/model/Jenkins/projectRelationship-help_et.properties index 99238f34ce..f16d6f0955 100644 --- a/core/src/main/resources/jenkins/model/Jenkins/projectRelationship-help_et.properties +++ b/core/src/main/resources/jenkins/model/Jenkins/projectRelationship-help_et.properties @@ -1,8 +1,8 @@ # This file is under the MIT License by authors For\ this\ feature\ to\ work,\ the\ following\ conditions\ need\ to\ be\ met:=Selle funktsiooni t\u00F6\u00F6tamiseks peavad olema t\u00E4idetud j\u00E4rgnevad tingimused: -The\ downstream\ project\ records\ the\ fingerprints\ of\ the\ upstream\ files\ it\ uses=Allavoolu projekt salvestab nende \u00FClesvoolu failide s\u00F5rmej\u00E4ljed mida ta kasutab -The\ upstream\ project\ records\ the\ fingerprints\ of\ its\ build\ artifacts=\u00DClesvoolu projekt salvestab oma j\u00E4rkude tulemuste s\u00F5rmej\u00E4ljed +The\ downstream\ project\ records\ the\ fingerprints\ of\ the\ upstream\ files\ it\ uses.=Allavoolu projekt salvestab nende \u00FClesvoolu failide s\u00F5rmej\u00E4ljed mida ta kasutab. +The\ upstream\ project\ records\ the\ fingerprints\ of\ its\ build\ artifacts.=\u00DClesvoolu projekt salvestab oma j\u00E4rkude tulemuste s\u00F5rmej\u00E4ljed. This\ allows\ Jenkins\ to\ correlate\ two\ projects.=See lubab Jenkinsil seostada kaks projekti. Title=Mis on "projektide seosed"? body=Kui teil on kaks projekti mis s\u00F5ltuvad \u00FCksteisest, siis suudab Jenkins j\u00E4lgida seda millist \u00FClesvoolu projekti j\u00E4rku kasutatakse mingi allavoolu projekti j\u00E4rgu jaoks, kasutades s\u00F5rmej\u00E4lje toe poolt loodud kirjeid. diff --git a/core/src/main/resources/jenkins/model/Jenkins/projectRelationship-help_fr.properties b/core/src/main/resources/jenkins/model/Jenkins/projectRelationship-help_fr.properties index 05a92c5a82..95eabb720b 100644 --- a/core/src/main/resources/jenkins/model/Jenkins/projectRelationship-help_fr.properties +++ b/core/src/main/resources/jenkins/model/Jenkins/projectRelationship-help_fr.properties @@ -27,8 +27,8 @@ body=\ les enregistrements créés par \ le support de l''empreinte numérique. For\ this\ feature\ to\ work,\ the\ following\ conditions\ need\ to\ be\ met\:=Pour que cette fonctionnalité marche, les conditions suivantes sont requises: -The\ upstream\ project\ records\ the\ fingerprints\ of\ its\ build\ artifacts=Le projet en amont enregistre les empreintes numériques de ses artefacts de build -The\ downstream\ project\ records\ the\ fingerprints\ of\ the\ upstream\ files\ it\ uses=Le projet en aval enregistre les empreintes num\u00E9riques des fichiers amont qu''il utilise -The\ downstream\ project\ records\ the\ fingerprints\ of\ the\ upstream\ jar\ files\ it\ uses=Le projet en aval enregistre les empreintes numériques des fichiers jar en amont qu''il utilise +The\ upstream\ project\ records\ the\ fingerprints\ of\ its\ build\ artifacts.=Le projet en amont enregistre les empreintes numériques de ses artefacts de build. +The\ downstream\ project\ records\ the\ fingerprints\ of\ the\ upstream\ files\ it\ uses.=Le projet en aval enregistre les empreintes num\u00E9riques des fichiers amont qu''il utilise. +The\ downstream\ project\ records\ the\ fingerprints\ of\ the\ upstream\ jar\ files\ it\ uses.=Le projet en aval enregistre les empreintes numériques des fichiers jar en amont qu''il utilise. This\ allows\ Jenkins\ to\ correlate\ two\ projects.=Cela permet à Jenkins de mettre en corrélation deux projets. diff --git a/core/src/main/resources/jenkins/model/Jenkins/projectRelationship-help_it.properties b/core/src/main/resources/jenkins/model/Jenkins/projectRelationship-help_it.properties index 83183391b5..c209d27940 100644 --- a/core/src/main/resources/jenkins/model/Jenkins/projectRelationship-help_it.properties +++ b/core/src/main/resources/jenkins/model/Jenkins/projectRelationship-help_it.properties @@ -20,9 +20,9 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. -The\ downstream\ project\ records\ the\ fingerprints\ of\ the\ upstream\ files\ it\ uses=Il progetto downstream registra le impronte dei file upstream che utilizza +The\ downstream\ project\ records\ the\ fingerprints\ of\ the\ upstream\ files\ it\ uses.=Il progetto downstream registra le impronte dei file upstream che utilizza. Title=Che cos''è una "relazione fra progetti"? -The\ upstream\ project\ records\ the\ fingerprints\ of\ its\ build\ artifacts=Il progetto upstream registra le impronte dei propri artefatti di compilazione +The\ upstream\ project\ records\ the\ fingerprints\ of\ its\ build\ artifacts.=Il progetto upstream registra le impronte dei propri artefatti di compilazione. This\ allows\ Jenkins\ to\ correlate\ two\ projects.=Ciò consente a Jenkins di correlare due progetti. For\ this\ feature\ to\ work,\ the\ following\ conditions\ need\ to\ be\ met\:=Per far sì che questa funzionalità sia operativa devono essere soddisfatte le seguenti condizioni: body=\ diff --git a/core/src/main/resources/jenkins/model/Jenkins/projectRelationship-help_ja.properties b/core/src/main/resources/jenkins/model/Jenkins/projectRelationship-help_ja.properties index 1b333b466d..9e672b26b8 100644 --- a/core/src/main/resources/jenkins/model/Jenkins/projectRelationship-help_ja.properties +++ b/core/src/main/resources/jenkins/model/Jenkins/projectRelationship-help_ja.properties @@ -30,11 +30,11 @@ body=\ For\ this\ feature\ to\ work,\ the\ following\ conditions\ need\ to\ be\ met\:=\ \u3053\u306e\u6a5f\u80fd\u306e\u305f\u3081\u306b\u3001\u4e0b\u8a18\u306e\u6761\u4ef6\u3092\u6e80\u305f\u3059\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 -The\ upstream\ project\ records\ the\ fingerprints\ of\ its\ build\ artifacts=\ - \u4e0a\u6d41\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306f\u6210\u679c\u7269\u3092\u30d3\u30eb\u30c9\u3057\u305f\u6307\u7d0b\u3092\u8a18\u9332\u3057\u307e\u3059\u3002 +The\ upstream\ project\ records\ the\ fingerprints\ of\ its\ build\ artifacts.=\ + \u4e0a\u6d41\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306f\u6210\u679c\u7269\u3092\u30d3\u30eb\u30c9\u3057\u305f\u6307\u7d0b\u3092\u8a18\u9332\u3057\u307e\u3059\u3002. -The\ downstream\ project\ records\ the\ fingerprints\ of\ the\ upstream\ files\ it\ uses=\ - \u4e0b\u6d41\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306f\u4f7f\u7528\u3057\u3066\u3044\u308b\u4e0a\u6d41\u306e\u30d5\u30a1\u30a4\u30eb\u306e\u6307\u7d0b\u3092\u8a18\u9332\u3057\u307e\u3059\u3002 +The\ downstream\ project\ records\ the\ fingerprints\ of\ the\ upstream\ files\ it\ uses.=\ + \u4e0b\u6d41\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306f\u4f7f\u7528\u3057\u3066\u3044\u308b\u4e0a\u6d41\u306e\u30d5\u30a1\u30a4\u30eb\u306e\u6307\u7d0b\u3092\u8a18\u9332\u3057\u307e\u3059\u3002. This\ allows\ Jenkins\ to\ correlate\ two\ projects.=\ \u3053\u308c\u306fJenkins\u306b\u4e8c\u3064\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u76f8\u4e92\u306b\u95a2\u9023\u3055\u305b\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002 diff --git a/core/src/main/resources/jenkins/model/Jenkins/projectRelationship-help_lt.properties b/core/src/main/resources/jenkins/model/Jenkins/projectRelationship-help_lt.properties index 8a336276e7..1a4336fef8 100644 --- a/core/src/main/resources/jenkins/model/Jenkins/projectRelationship-help_lt.properties +++ b/core/src/main/resources/jenkins/model/Jenkins/projectRelationship-help_lt.properties @@ -3,7 +3,7 @@ body=\ Kai turite projektus, kurie priklauso vienas nuo kito, naudodamas \u012fra\u0161us, sukurtus \ pir\u0161t\u0173 antspaud\u0173 palaikymo Jenkinsas gali sekti, kuris ankstesnio projekto vykdymas \ naudojamas kuriame \u017eemesnio projekto vykdyme. -The\ downstream\ project\ records\ the\ fingerprints\ of\ the\ upstream\ files\ it\ uses=V\u0117lesnis projektas registruoja panaudot\u0173 ankstesniojo projekto fail\u0173 antspaudus -The\ upstream\ project\ records\ the\ fingerprints\ of\ its\ build\ artifacts=Ankstesnis projektas registruoja savo vykdymo rezultat\u0173 antspaudus +The\ downstream\ project\ records\ the\ fingerprints\ of\ the\ upstream\ files\ it\ uses.=V\u0117lesnis projektas registruoja panaudot\u0173 ankstesniojo projekto fail\u0173 antspaudus. +The\ upstream\ project\ records\ the\ fingerprints\ of\ its\ build\ artifacts.=Ankstesnis projektas registruoja savo vykdymo rezultat\u0173 antspaudus. This\ allows\ Jenkins\ to\ correlate\ two\ projects.=Tai leid\u017eia Jenkinsus koreliuoti projektus. For\ this\ feature\ to\ work,\ the\ following\ conditions\ need\ to\ be\ met\:=Kad veikt\u0173 \u0161i savyb\u0117, turi b\u016bti patenkintos \u0161ios s\u0105lygos: diff --git a/core/src/main/resources/jenkins/model/Jenkins/projectRelationship-help_nl.properties b/core/src/main/resources/jenkins/model/Jenkins/projectRelationship-help_nl.properties index 09800fd118..d679641c60 100644 --- a/core/src/main/resources/jenkins/model/Jenkins/projectRelationship-help_nl.properties +++ b/core/src/main/resources/jenkins/model/Jenkins/projectRelationship-help_nl.properties @@ -27,7 +27,7 @@ body=\ de hand van de geregistreerd elektronische vingerafdrukken van \ de door een bouwpoging opgeleverde artefacten. For\ this\ feature\ to\ work,\ the\ following\ conditions\ need\ to\ be\ met\:=De volgende voorwaarden dienen voldaan te worden om met deze functionaliteit te werken: -The\ upstream\ project\ records\ the\ fingerprints\ of\ its\ build\ artifacts=Het bovenliggende project registreert elektronische vingerafdrukken van zijn bouwartefacten. -The\ downstream\ project\ records\ the\ fingerprints\ of\ the\ upstream\ files\ it\ uses=Het onderliggend project registreert de vingerafdrukken van de bestanden van het bovenliggende project -The\ downstream\ project\ records\ the\ fingerprints\ of\ the\ upstream\ jar\ files\ it\ uses=Het onderliggende project registreert de elektronische vingerafdrukken van de gebruikte jar bestanden van bovenliggende projecten. +The\ upstream\ project\ records\ the\ fingerprints\ of\ its\ build\ artifacts.=Het bovenliggende project registreert elektronische vingerafdrukken van zijn bouwartefacten. +The\ downstream\ project\ records\ the\ fingerprints\ of\ the\ upstream\ files\ it\ uses.=Het onderliggend project registreert de vingerafdrukken van de bestanden van het bovenliggende project. +The\ downstream\ project\ records\ the\ fingerprints\ of\ the\ upstream\ jar\ files\ it\ uses.=Het onderliggende project registreert de elektronische vingerafdrukken van de gebruikte jar bestanden van bovenliggende projecten. This\ allows\ Jenkins\ to\ correlate\ two\ projects.=Dit stelt Jenkins in staat om 2 projecten met elkaar in verband te brengen. diff --git a/core/src/main/resources/jenkins/model/Jenkins/projectRelationship-help_pt_BR.properties b/core/src/main/resources/jenkins/model/Jenkins/projectRelationship-help_pt_BR.properties index d42583d14a..9940c38ec7 100644 --- a/core/src/main/resources/jenkins/model/Jenkins/projectRelationship-help_pt_BR.properties +++ b/core/src/main/resources/jenkins/model/Jenkins/projectRelationship-help_pt_BR.properties @@ -26,8 +26,8 @@ body=\ usando os registros criados pelo \ suporte de fingerprint. For\ this\ feature\ to\ work,\ the\ following\ conditions\ need\ to\ be\ met\:=Para esta caracter\u00edstica funcionar, as seguintes condi\u00e7\u00f5es s\u00e3o necess\u00e1rias -The\ upstream\ project\ records\ the\ fingerprints\ of\ its\ build\ artifacts=O projeto pai grava os fingerprints de seus artefatos de build +The\ upstream\ project\ records\ the\ fingerprints\ of\ its\ build\ artifacts.=O projeto pai grava os fingerprints de seus artefatos de build. This\ allows\ Jenkins\ to\ correlate\ two\ projects.=Isto permite que o Jenkins correlacione dois projetos. -The\ downstream\ project\ records\ the\ fingerprints\ of\ the\ upstream\ files\ it\ uses=O projeto filho grava o registro no fingerprint do projeto pai +The\ downstream\ project\ records\ the\ fingerprints\ of\ the\ upstream\ files\ it\ uses.=O projeto filho grava o registro no fingerprint do projeto pai. diff --git a/core/src/main/resources/jenkins/model/Jenkins/projectRelationship-help_ru.properties b/core/src/main/resources/jenkins/model/Jenkins/projectRelationship-help_ru.properties index 362972d0fa..0a75984528 100644 --- a/core/src/main/resources/jenkins/model/Jenkins/projectRelationship-help_ru.properties +++ b/core/src/main/resources/jenkins/model/Jenkins/projectRelationship-help_ru.properties @@ -21,8 +21,8 @@ # THE SOFTWARE. For\ this\ feature\ to\ work,\ the\ following\ conditions\ need\ to\ be\ met\:=\u0427\u0442\u043e\u0431\u044b \u0437\u0430\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0430 \u044d\u0442\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u0443\u0434\u043e\u0432\u043b\u0435\u0442\u0432\u043e\u0440\u0435\u043d\u044b \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u044f: -The\ upstream\ project\ records\ the\ fingerprints\ of\ its\ build\ artifacts=\u0412\u043e\u0441\u0445\u043e\u0434\u044f\u0449\u0438\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442 \u043e\u0442\u043f\u0435\u0447\u0430\u0442\u043a\u0438 (fingrprints) \u0441\u0432\u043e\u0438\u0445 \u0430\u0440\u0442\u0435\u0444\u0430\u043a\u0442\u043e\u0432. -The\ downstream\ project\ records\ the\ fingerprints\ of\ the\ upstream\ files\ it\ uses=\u041d\u0438\u0441\u0445\u043e\u0434\u044f\u0449\u0438\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442 \u043e\u0442\u043f\u0435\u0447\u0430\u0442\u043a\u0438 (fingrprints) \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0445 \u0430\u0440\u0442\u0435\u0444\u0430\u043a\u0442\u043e\u0432 \u0432\u043e\u0441\u0445\u043e\u0434\u044f\u0449\u0435\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430. +The\ upstream\ project\ records\ the\ fingerprints\ of\ its\ build\ artifacts.=\u0412\u043e\u0441\u0445\u043e\u0434\u044f\u0449\u0438\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442 \u043e\u0442\u043f\u0435\u0447\u0430\u0442\u043a\u0438 (fingrprints) \u0441\u0432\u043e\u0438\u0445 \u0430\u0440\u0442\u0435\u0444\u0430\u043a\u0442\u043e\u0432. +The\ downstream\ project\ records\ the\ fingerprints\ of\ the\ upstream\ files\ it\ uses.=\u041d\u0438\u0441\u0445\u043e\u0434\u044f\u0449\u0438\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442 \u043e\u0442\u043f\u0435\u0447\u0430\u0442\u043a\u0438 (fingrprints) \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0445 \u0430\u0440\u0442\u0435\u0444\u0430\u043a\u0442\u043e\u0432 \u0432\u043e\u0441\u0445\u043e\u0434\u044f\u0449\u0435\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430. This\ allows\ Jenkins\ to\ correlate\ two\ projects.=\u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 Jenkins \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0435 \u043c\u0435\u0436\u0434\u0443 \u0434\u0432\u0443\u043c\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u043c\u0438. Title=\u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 "\u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432"? body=\ diff --git a/core/src/main/resources/jenkins/model/Jenkins/projectRelationship-help_sr.properties b/core/src/main/resources/jenkins/model/Jenkins/projectRelationship-help_sr.properties index d4ba3a84a7..5b3cc081f2 100644 --- a/core/src/main/resources/jenkins/model/Jenkins/projectRelationship-help_sr.properties +++ b/core/src/main/resources/jenkins/model/Jenkins/projectRelationship-help_sr.properties @@ -3,8 +3,8 @@ Title=\u0428\u0442\u0430 \u0458\u0435 "\u0432\u0435\u0437\u0430 \u043F\u0440\u043E\u0458\u0435\u043A\u0442\u0430"? body=Jenkins \u043C\u043E\u0436\u0435 \u043F\u0440\u0430\u0442\u0438\u0442\u0438 \u0438\u0437\u0433\u0440\u0430\u0434\u045A\u0443 \u043F\u0440\u043E\u0458\u0435\u043A\u0442\u0435 \u043A\u043E\u0458\u0438 \u0437\u0430\u0432\u0438\u0441\u0435 \u0458\u0435\u0434\u0430\u043D \u043E\u0434 \u0434\u0440\u0443\u0433\u043E\u0433 \u043A\u043E\u0440\u0438\u0441\u0442\u0435\u045B\u0438 \u0434\u0438\u0433\u0438\u0442\u0430\u043B\u043D\u0438 \u043E\u0442\u0438\u0441\u0430\u043A. For\ this\ feature\ to\ work,\ the\ following\ conditions\ need\ to\ be\ met\:=\u0414\u0430 \u0431\u0438 \u0442\u043E \u0440\u0430\u0434\u0438\u043B\u043E, \u0442\u0440\u0435\u0431\u0430 \u043E\u0431\u0435\u0437\u0431\u0435\u0434\u0438\u0442\u0438: -The\ upstream\ project\ records\ the\ fingerprints\ of\ its\ build\ artifacts=Upstream \u043F\u0440\u043E\u0458\u0435\u043A\u0430\u0442 \u0447\u0443\u0432\u0430 \u043E\u0442\u0438\u0441\u043A\u0435 \u0441\u0432\u043E\u0458\u0438\u0445 \u0430\u0440\u0442\u0438\u0444\u0430\u043A\u0430\u0442\u0438 \u0438\u0437\u0433\u0440\u0430\u0434\u045A\u0435. -The\ downstream\ project\ records\ the\ fingerprints\ of\ the\ upstream\ files\ it\ uses=Downstream \u043F\u0440\u043E\u0458\u0435\u043A\u0430\u0442 \u0431\u0435\u043B\u0435\u0436\u0438 \u0434\u0438\u0433\u0438\u0442\u0430\u043B\u043D\u0435 \u043E\u0442\u0438\u0441\u043A\u0435 \u0434\u0430\u0442\u043E\u0442\u0435\u043A\u0430 \u043E\u0434 \u043F\u0440\u043E\u0458\u0435\u043A\u0442\u0430 \u043E\u0434 \u043A\u043E\u0433\u0430 \u0437\u0430\u0432\u0438\u0441\u0438. +The\ upstream\ project\ records\ the\ fingerprints\ of\ its\ build\ artifacts.=Upstream \u043F\u0440\u043E\u0458\u0435\u043A\u0430\u0442 \u0447\u0443\u0432\u0430 \u043E\u0442\u0438\u0441\u043A\u0435 \u0441\u0432\u043E\u0458\u0438\u0445 \u0430\u0440\u0442\u0438\u0444\u0430\u043A\u0430\u0442\u0438 \u0438\u0437\u0433\u0440\u0430\u0434\u045A\u0435. +The\ downstream\ project\ records\ the\ fingerprints\ of\ the\ upstream\ files\ it\ uses.=Downstream \u043F\u0440\u043E\u0458\u0435\u043A\u0430\u0442 \u0431\u0435\u043B\u0435\u0436\u0438 \u0434\u0438\u0433\u0438\u0442\u0430\u043B\u043D\u0435 \u043E\u0442\u0438\u0441\u043A\u0435 \u0434\u0430\u0442\u043E\u0442\u0435\u043A\u0430 \u043E\u0434 \u043F\u0440\u043E\u0458\u0435\u043A\u0442\u0430 \u043E\u0434 \u043A\u043E\u0433\u0430 \u0437\u0430\u0432\u0438\u0441\u0438. This\ allows\ Jenkins\ to\ correlate\ two\ projects.=\u041E\u0432\u043E \u043E\u043C\u043E\u0433\u0443\u045B\u0430\u0432\u0430 Jenkins-\u0443 \u0434\u0430 \u0443\u0441\u0442\u0430\u043D\u043E\u0432\u0438 \u0432\u0435\u0437\u0443 \u0438\u0437\u043C\u0435\u0452\u0443 \u0434\u0432\u043E\u0458\u0435 \u043F\u0440\u043E\u0458\u0435\u043A\u0442\u0430. For\ this\ feature\ to\ work,\ the\ following\ conditions\ need\ to\ be\ met=\u0414\u0430 \u0431\u0438 \u0442\u043E \u0440\u0430\u0434\u0438\u043B\u043E, \u043C\u043E\u0440\u0430\u0442\u0435 \u043E\u0431\u0435\u0437\u0431\u0435\u0434\u0438\u0442\u0438: -The\ downstream\ project\ records\ the\ fingerprints\ of\ the\ upstream\ jar\ files\ it\ uses=Downstream \u043F\u0440\u043E\u0458\u0435\u043A\u0430\u0442 \u0431\u0435\u043B\u0435\u0436\u0438 \u0434\u0438\u0433\u0438\u0442\u0430\u043B\u043D\u0435 \u043E\u0442\u0438\u0441\u043A\u0435 jar \u0430\u0440\u0445\u0438\u0432\u0435 \u043E\u0434 \u043F\u0440\u043E\u0458\u0435\u043A\u0442\u0430 \u043E\u0434 \u043A\u043E\u0433\u0430 \u0437\u0430\u0432\u0438\u0441\u0438. +The\ downstream\ project\ records\ the\ fingerprints\ of\ the\ upstream\ jar\ files\ it\ uses.=Downstream \u043F\u0440\u043E\u0458\u0435\u043A\u0430\u0442 \u0431\u0435\u043B\u0435\u0436\u0438 \u0434\u0438\u0433\u0438\u0442\u0430\u043B\u043D\u0435 \u043E\u0442\u0438\u0441\u043A\u0435 jar \u0430\u0440\u0445\u0438\u0432\u0435 \u043E\u0434 \u043F\u0440\u043E\u0458\u0435\u043A\u0442\u0430 \u043E\u0434 \u043A\u043E\u0433\u0430 \u0437\u0430\u0432\u0438\u0441\u0438. diff --git a/core/src/main/resources/jenkins/model/Jenkins/projectRelationship-help_tr.properties b/core/src/main/resources/jenkins/model/Jenkins/projectRelationship-help_tr.properties index e9f0e66118..9885e1fb9c 100644 --- a/core/src/main/resources/jenkins/model/Jenkins/projectRelationship-help_tr.properties +++ b/core/src/main/resources/jenkins/model/Jenkins/projectRelationship-help_tr.properties @@ -26,6 +26,6 @@ body=\ ile olu\u015fturulan kay\u0131tlar\u0131 kullanarak hangi upstream projenin hangi downstream proje taraf\u0131ndan\ kullan\u0131ld\u0131\u011f\u0131n\u0131 takip edebilir. For\ this\ feature\ to\ work,\ the\ following\ conditions\ need\ to\ be\ met\:=Bu\ \u00f6zelli\u011fin\ \u00e7al\u0131\u015fabilmesi\ i\u00e7in\ devam\u0131ndaki\ \u015fartlar\u0131n\ sa\u011flanmas\u0131\ gerekir: -The\ upstream\ project\ records\ the\ fingerprints\ of\ its\ build\ artifacts=Upstream\ proje\, kendi yap\u0131land\u0131rma artefaktlar\u0131n\u0131n\ parmakizlerini\ kaydeder -The\ downstream\ project\ records\ the\ fingerprints\ of\ the\ upstream\ jar\ files\ it\ uses=Downstream\ proje,\ upstream\ projeden\ kulland\u0131\u011f\u0131\ jar\'lar\u0131n\ parmakizini\ kaydeder +The\ upstream\ project\ records\ the\ fingerprints\ of\ its\ build\ artifacts.=Upstream\ proje\, kendi yap\u0131land\u0131rma artefaktlar\u0131n\u0131n\ parmakizlerini\ kaydeder. +The\ downstream\ project\ records\ the\ fingerprints\ of\ the\ upstream\ jar\ files\ it\ uses.=Downstream\ proje,\ upstream\ projeden\ kulland\u0131\u011f\u0131\ jar\'lar\u0131n\ parmakizini\ kaydeder. This\ allows\ Jenkins\ to\ correlate\ two\ projects.=Bu,\ Jenkins\'a\ iki\ projeyi\ kar\u015f\u0131l\u0131kl\u0131\ ili\u015fkilendirme\ yetene\u011fini\ verir. diff --git a/core/src/main/resources/jenkins/model/Jenkins/projectRelationship-help_zh_TW.properties b/core/src/main/resources/jenkins/model/Jenkins/projectRelationship-help_zh_TW.properties index 1f690fe28c..2fcffa4ddb 100644 --- a/core/src/main/resources/jenkins/model/Jenkins/projectRelationship-help_zh_TW.properties +++ b/core/src/main/resources/jenkins/model/Jenkins/projectRelationship-help_zh_TW.properties @@ -27,6 +27,6 @@ body=\ \u9019\u500b\u529f\u80fd\u662f\u7d93\u7531\u6a94\u6848\u6307\u7d0b\u529f\u80fd\u6240\u7522\u751f\u7684\u8a18\u9304\u4f86\u9054\u6210\u3002 For\ this\ feature\ to\ work,\ the\ following\ conditions\ need\ to\ be\ met\:=\u7b26\u5408\u4e0b\u5217\u689d\u4ef6\u624d\u80fd\u4f7f\u7528\u9019\u500b\u529f\u80fd: -The\ upstream\ project\ records\ the\ fingerprints\ of\ its\ build\ artifacts=\u4e0a\u6e38\u5c08\u6848\u8981\u8a18\u9304\u5efa\u7f6e\u6210\u54c1\u7684\u6307\u7d0b -The\ downstream\ project\ records\ the\ fingerprints\ of\ the\ upstream\ files\ it\ uses=\u4e0b\u6e38\u5c08\u6848\u8981\u8a18\u9304\u7528\u5230\u7684\u4e0a\u6e38\u6a94\u6848\u6307\u7d0b +The\ upstream\ project\ records\ the\ fingerprints\ of\ its\ build\ artifacts.=\u4e0a\u6e38\u5c08\u6848\u8981\u8a18\u9304\u5efa\u7f6e\u6210\u54c1\u7684\u6307\u7d0b. +The\ downstream\ project\ records\ the\ fingerprints\ of\ the\ upstream\ files\ it\ uses.=\u4e0b\u6e38\u5c08\u6848\u8981\u8a18\u9304\u7528\u5230\u7684\u4e0a\u6e38\u6a94\u6848\u6307\u7d0b. This\ allows\ Jenkins\ to\ correlate\ two\ projects.=\u5982\u6b64\u4e00\u4f86 Jenkins \u5c31\u80fd\u81ea\u52d5\u95dc\u806f\u9019\u5169\u500b\u5c08\u6848\u3002 From 6712bb11e75dd6d1e37a735e6e63bbcf5416d476 Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Wed, 20 Feb 2019 21:46:50 -0500 Subject: [PATCH 02/41] Make IntelliJ formatter happy --- .../hudson/util/NoOverlapCategoryAxis.java | 23 ++++++++----------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/core/src/main/java/hudson/util/NoOverlapCategoryAxis.java b/core/src/main/java/hudson/util/NoOverlapCategoryAxis.java index 03508ce50d..2f3d86e0cc 100644 --- a/core/src/main/java/hudson/util/NoOverlapCategoryAxis.java +++ b/core/src/main/java/hudson/util/NoOverlapCategoryAxis.java @@ -77,7 +77,7 @@ public class NoOverlapCategoryAxis extends CategoryAxis { g2.setPaint(getTickLabelPaint(tick.getCategory())); CategoryLabelPosition position - = this.getCategoryLabelPositions().getLabelPosition(edge); + = this.getCategoryLabelPositions().getLabelPosition(edge); double x0 = 0.0; double x1 = 0.0; double y0 = 0.0; @@ -89,24 +89,21 @@ public class NoOverlapCategoryAxis extends CategoryAxis { edge); y1 = state.getCursor() - this.getCategoryLabelPositionOffset(); y0 = y1 - state.getMax(); - } - else if (edge == RectangleEdge.BOTTOM) { + } else if (edge == RectangleEdge.BOTTOM) { x0 = getCategoryStart(categoryIndex, ticks.size(), dataArea, edge); x1 = getCategoryEnd(categoryIndex, ticks.size(), dataArea, edge); y0 = state.getCursor() + this.getCategoryLabelPositionOffset(); y1 = y0 + state.getMax(); - } - else if (edge == RectangleEdge.LEFT) { + } else if (edge == RectangleEdge.LEFT) { y0 = getCategoryStart(categoryIndex, ticks.size(), dataArea, edge); y1 = getCategoryEnd(categoryIndex, ticks.size(), dataArea, edge); x1 = state.getCursor() - this.getCategoryLabelPositionOffset(); x0 = x1 - state.getMax(); - } - else if (edge == RectangleEdge.RIGHT) { + } else if (edge == RectangleEdge.RIGHT) { y0 = getCategoryStart(categoryIndex, ticks.size(), dataArea, edge); y1 = getCategoryEnd(categoryIndex, ticks.size(), dataArea, @@ -116,7 +113,7 @@ public class NoOverlapCategoryAxis extends CategoryAxis { } Rectangle2D area = new Rectangle2D.Double(x0, y0, (x1 - x0), (y1 - y0)); - if(r==null || !r.intersects(area)) { + if (r == null || !r.intersects(area)) { Point2D anchorPoint = RectangleAnchor.coordinates(area, position.getCategoryAnchor()); TextBlock block = tick.getLabel(); @@ -130,7 +127,7 @@ public class NoOverlapCategoryAxis extends CategoryAxis { (float) anchorPoint.getY(), position.getAngle()); if (plotState != null && plotState.getOwner() != null) { EntityCollection entities - = plotState.getOwner().getEntityCollection(); + = plotState.getOwner().getEntityCollection(); if (entities != null) { String tooltip = getCategoryLabelToolTip( tick.getCategory()); @@ -140,10 +137,10 @@ public class NoOverlapCategoryAxis extends CategoryAxis { } r = bounds.getBounds2D(); // add margins in all directions - r.add(r.getMaxX() + r.getWidth()/2, r.getCenterY()); - r.add(r.getMinX() - r.getWidth()/2, r.getCenterY()); - r.add(r.getCenterX(), r.getMinY() - r.getHeight()/2); - r.add(r.getCenterX(), r.getMaxX() + r.getHeight()/2); + r.add(r.getMaxX() + r.getWidth() / 2, r.getCenterY()); + r.add(r.getMinX() - r.getWidth() / 2, r.getCenterY()); + r.add(r.getCenterX(), r.getMinY() - r.getHeight() / 2); + r.add(r.getCenterX(), r.getMaxX() + r.getHeight() / 2); } categoryIndex++; From 264980c707c6cafc01369378b1e90d247561df78 Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Wed, 20 Feb 2019 21:51:03 -0500 Subject: [PATCH 03/41] Java 7: omit explit type in favor of <> --- .../main/java/hudson/AbstractMarkupText.java | 2 +- core/src/main/java/hudson/BulkChange.java | 2 +- .../java/hudson/ClassicPluginStrategy.java | 12 ++--- core/src/main/java/hudson/DNSMultiCast.java | 2 +- .../java/hudson/DescriptorExtensionList.java | 4 +- core/src/main/java/hudson/EnvVars.java | 10 ++-- .../main/java/hudson/ExpressionFactory2.java | 2 +- core/src/main/java/hudson/ExtensionList.java | 16 +++--- core/src/main/java/hudson/FilePath.java | 8 +-- core/src/main/java/hudson/Functions.java | 6 +-- core/src/main/java/hudson/Launcher.java | 4 +- core/src/main/java/hudson/Lookup.java | 2 +- core/src/main/java/hudson/Main.java | 2 +- core/src/main/java/hudson/MarkupText.java | 2 +- core/src/main/java/hudson/PermalinkList.java | 2 +- core/src/main/java/hudson/PluginManager.java | 24 ++++----- core/src/main/java/hudson/Util.java | 8 +-- core/src/main/java/hudson/cli/CLICommand.java | 2 +- .../java/hudson/cli/InstallPluginCommand.java | 2 +- .../main/java/hudson/console/ConsoleNote.java | 2 +- .../hudson/diagnosis/MemoryUsageMonitor.java | 2 +- .../diagnosis/NullIdDescriptorMonitor.java | 2 +- .../java/hudson/diagnosis/OldDataMonitor.java | 4 +- .../main/java/hudson/init/InitStrategy.java | 2 +- .../java/hudson/init/TaskMethodFinder.java | 6 +-- .../main/java/hudson/logging/LogRecorder.java | 2 +- .../hudson/logging/LogRecorderManager.java | 4 +- .../java/hudson/logging/WeakLogHandler.java | 2 +- .../main/java/hudson/model/AbstractBuild.java | 26 ++++----- .../main/java/hudson/model/Actionable.java | 8 +-- .../model/AutoCompletionCandidates.java | 2 +- core/src/main/java/hudson/model/Build.java | 2 +- core/src/main/java/hudson/model/Cause.java | 8 +-- .../model/ChoiceParameterDefinition.java | 2 +- core/src/main/java/hudson/model/Computer.java | 24 ++++----- .../java/hudson/model/ComputerPanelBox.java | 2 +- .../main/java/hudson/model/ComputerSet.java | 10 ++-- .../java/hudson/model/DependencyGraph.java | 26 ++++----- .../main/java/hudson/model/Descriptor.java | 16 +++--- .../model/DescriptorVisibilityFilter.java | 4 +- .../java/hudson/model/DownloadService.java | 2 +- core/src/main/java/hudson/model/Executor.java | 6 +-- .../main/java/hudson/model/Fingerprint.java | 30 +++++------ .../main/java/hudson/model/HealthReport.java | 2 +- .../java/hudson/model/ItemGroupMixIn.java | 2 +- core/src/main/java/hudson/model/Items.java | 14 ++--- core/src/main/java/hudson/model/Job.java | 26 ++++----- .../hudson/model/JobPropertyDescriptor.java | 2 +- core/src/main/java/hudson/model/Label.java | 8 +-- core/src/main/java/hudson/model/ListView.java | 26 ++++----- .../main/java/hudson/model/LoadBalancer.java | 4 +- .../hudson/model/MultiStageTimeSeries.java | 2 +- core/src/main/java/hudson/model/MyView.java | 2 +- .../java/hudson/model/MyViewsProperty.java | 4 +- .../main/java/hudson/model/PageDecorator.java | 2 +- .../hudson/model/PaneStatusProperties.java | 2 +- .../hudson/model/ParameterDefinition.java | 2 +- .../java/hudson/model/ParametersAction.java | 6 +-- .../model/ParametersDefinitionProperty.java | 4 +- .../hudson/model/PermalinkProjectAction.java | 2 +- core/src/main/java/hudson/model/Project.java | 2 +- core/src/main/java/hudson/model/Queue.java | 54 +++++++++---------- .../java/hudson/model/ResourceController.java | 2 +- .../main/java/hudson/model/ResourceList.java | 6 +-- core/src/main/java/hudson/model/Result.java | 2 +- core/src/main/java/hudson/model/Run.java | 16 +++--- .../main/java/hudson/model/RunnerStack.java | 4 +- core/src/main/java/hudson/model/Slave.java | 2 +- .../main/java/hudson/model/TaskThread.java | 6 +-- .../model/TransientComputerActionFactory.java | 2 +- .../model/TransientViewActionFactory.java | 2 +- core/src/main/java/hudson/model/TreeView.java | 4 +- .../main/java/hudson/model/UpdateCenter.java | 22 ++++---- .../main/java/hudson/model/UpdateSite.java | 10 ++-- .../java/hudson/model/UsageStatistics.java | 4 +- .../java/hudson/model/UserProperties.java | 2 +- core/src/main/java/hudson/model/View.java | 28 +++++----- .../java/hudson/model/ViewGroupMixIn.java | 2 +- core/src/main/java/hudson/model/ViewJob.java | 6 +-- .../hudson/model/WorkspaceCleanupThread.java | 2 +- .../java/hudson/model/labels/LabelAtom.java | 10 ++-- .../hudson/model/listeners/SCMListener.java | 2 +- .../java/hudson/model/queue/BackFiller.java | 6 +-- .../java/hudson/model/queue/FutureImpl.java | 4 +- .../hudson/model/queue/LoadPredictor.java | 2 +- .../hudson/model/queue/MappingWorksheet.java | 16 +++--- .../java/hudson/model/queue/Timeline.java | 2 +- .../hudson/model/queue/WorkUnitContext.java | 4 +- .../AbstractAsyncNodeMonitorDescriptor.java | 4 +- .../AbstractNodeMonitorDescriptor.java | 2 +- .../hudson/node_monitors/NodeMonitor.java | 2 +- .../main/java/hudson/scm/ChangeLogSet.java | 2 +- .../java/hudson/scm/RepositoryBrowsers.java | 2 +- core/src/main/java/hudson/scm/SCMS.java | 2 +- .../java/hudson/search/ParsedQuickSilver.java | 4 +- core/src/main/java/hudson/search/Search.java | 2 +- .../hudson/search/SearchIndexBuilder.java | 4 +- .../security/AuthorizationStrategy.java | 2 +- .../security/ContainerAuthentication.java | 2 +- .../FederatedLoginServiceUserProperty.java | 2 +- .../main/java/hudson/security/Permission.java | 2 +- .../java/hudson/security/PermissionGroup.java | 8 +-- .../java/hudson/security/SecurityRealm.java | 2 +- .../main/java/hudson/security/SparseACL.java | 2 +- .../src/main/java/hudson/security/WhoAmI.java | 2 +- .../java/hudson/tasks/ArtifactArchiver.java | 2 +- .../src/main/java/hudson/tasks/BuildStep.java | 6 +-- .../hudson/tasks/BuildStepDescriptor.java | 2 +- .../main/java/hudson/tasks/BuildTrigger.java | 4 +- .../main/java/hudson/tasks/Fingerprinter.java | 16 +++--- core/src/main/java/hudson/tasks/Maven.java | 4 +- .../src/main/java/hudson/tasks/Publisher.java | 2 +- core/src/main/java/hudson/tasks/Shell.java | 2 +- .../tools/DownloadFromUrlInstaller.java | 2 +- .../hudson/tools/InstallSourceProperty.java | 2 +- .../hudson/tools/InstallerTranslator.java | 6 +-- .../java/hudson/tools/PropertyDescriptor.java | 2 +- .../java/hudson/tools/ToolDescriptor.java | 2 +- .../java/hudson/tools/ToolInstallation.java | 4 +- .../hudson/tools/ToolInstallerDescriptor.java | 2 +- .../tools/ToolLocationNodeProperty.java | 2 +- .../java/hudson/util/ArgumentListBuilder.java | 2 +- .../main/java/hudson/util/BootFailure.java | 2 +- core/src/main/java/hudson/util/CharSpool.java | 2 +- .../java/hudson/util/ClasspathBuilder.java | 2 +- .../main/java/hudson/util/CompressedFile.java | 2 +- .../main/java/hudson/util/ConsistentHash.java | 13 ++--- .../java/hudson/util/CopyOnWriteList.java | 10 ++-- .../main/java/hudson/util/CopyOnWriteMap.java | 10 ++-- .../java/hudson/util/CyclicGraphDetector.java | 8 +-- .../main/java/hudson/util/DataSetBuilder.java | 10 ++-- .../java/hudson/util/DescribableList.java | 2 +- .../main/java/hudson/util/DescriptorList.java | 2 +- .../main/java/hudson/util/FormValidation.java | 2 +- core/src/main/java/hudson/util/Iterators.java | 4 +- .../src/main/java/hudson/util/JVMBuilder.java | 2 +- .../java/hudson/util/KeyedDataStorage.java | 6 +-- core/src/main/java/hudson/util/Memoizer.java | 2 +- .../hudson/util/MultipartFormDataParser.java | 2 +- core/src/main/java/hudson/util/PackedMap.java | 2 +- .../main/java/hudson/util/PersistedList.java | 6 +-- .../java/hudson/util/PluginServletFilter.java | 4 +- .../main/java/hudson/util/ProcessTree.java | 2 +- .../java/hudson/util/QueryParameterMap.java | 4 +- .../java/hudson/util/RemotingDiagnostics.java | 6 +-- .../util/RobustReflectionConverter.java | 6 +-- core/src/main/java/hudson/util/RunList.java | 8 +-- .../main/java/hudson/util/SecretRewriter.java | 2 +- .../hudson/util/SequentialExecutionQueue.java | 6 +-- core/src/main/java/hudson/util/Service.java | 2 +- .../java/hudson/util/TableNestChecker.java | 8 +-- core/src/main/java/hudson/util/TagCloud.java | 2 +- core/src/main/java/hudson/util/XStream2.java | 6 +-- .../java/hudson/util/jna/RegistryKey.java | 4 +- .../java/hudson/util/spring/BeanBuilder.java | 4 +- .../util/spring/DefaultBeanConfiguration.java | 2 +- .../java/hudson/views/ListViewColumn.java | 4 +- .../main/java/hudson/views/ViewsTabBar.java | 2 +- .../hudson/widgets/BuildHistoryWidget.java | 2 +- .../java/hudson/widgets/HistoryWidget.java | 8 +-- .../hudson/widgets/RenderOnDemandClosure.java | 4 +- .../jenkins/FilePathFilterAggregator.java | 4 +- .../main/java/jenkins/InitReactorRunner.java | 2 +- .../java/jenkins/diagnosis/HsErrPidList.java | 2 +- .../java/jenkins/install/InstallUtil.java | 2 +- .../AsynchronousAdministrativeMonitor.java | 2 +- .../model/ArtifactManagerConfiguration.java | 2 +- core/src/main/java/jenkins/model/Jenkins.java | 54 +++++++++---------- .../model/ModelObjectWithContextMenu.java | 2 +- core/src/main/java/jenkins/model/Nodes.java | 10 ++-- .../jenkins/model/ParameterizedJobMixIn.java | 6 +-- .../java/jenkins/model/PeepholePermalink.java | 2 +- .../java/jenkins/model/RunIdMigrator.java | 10 ++-- .../model/item_category/Categories.java | 2 +- .../model/lazy/AbstractLazyLoadRunMap.java | 12 ++--- .../jenkins/model/lazy/BuildReference.java | 10 ++-- .../model/lazy/BuildReferenceMapAdapter.java | 12 ++--- .../jenkins/model/lazy/LazyBuildMixIn.java | 9 ++-- .../model/lazy/LazyLoadRunMapEntrySet.java | 4 +- .../java/jenkins/model/lazy/SortedList.java | 2 +- .../routines/InetAddressValidator.java | 2 +- .../validator/routines/UrlValidator.java | 2 +- .../LastGrantedAuthoritiesProperty.java | 2 +- .../QueueItemAuthenticatorConfiguration.java | 2 +- .../QueueItemAuthenticatorProvider.java | 2 +- .../jenkins/security/SecurityListener.java | 2 +- .../security/UpdateSiteWarningsMonitor.java | 2 +- .../security/s2m/CallableRejectionConfig.java | 4 +- .../security/s2m/CallableWhitelistConfig.java | 2 +- .../security/s2m/FilePathRuleConfig.java | 2 +- .../jenkins/tasks/SimpleBuildWrapper.java | 2 +- .../main/java/jenkins/util/DirectedGraph.java | 10 ++-- .../util/InterceptingExecutorService.java | 2 +- .../jenkins/util/JSONSignatureValidator.java | 4 +- .../jenkins/util/ProgressiveRendering.java | 2 +- .../main/java/jenkins/util/VirtualFile.java | 2 +- .../jenkins/util/groovy/GroovyHookScript.java | 2 +- .../util/xml/FilteredFunctionContext.java | 2 +- .../java/jenkins/util/xstream/XStreamDOM.java | 6 +-- .../widgets/RunListProgressiveRendering.java | 2 +- 200 files changed, 565 insertions(+), 563 deletions(-) diff --git a/core/src/main/java/hudson/AbstractMarkupText.java b/core/src/main/java/hudson/AbstractMarkupText.java index 1e78b3e10c..2398f6f744 100644 --- a/core/src/main/java/hudson/AbstractMarkupText.java +++ b/core/src/main/java/hudson/AbstractMarkupText.java @@ -141,7 +141,7 @@ public abstract class AbstractMarkupText { public List findTokens(Pattern pattern) { String text = getText(); Matcher m = pattern.matcher(text); - List r = new ArrayList(); + List r = new ArrayList<>(); while(m.find()) { int idx = m.start(); diff --git a/core/src/main/java/hudson/BulkChange.java b/core/src/main/java/hudson/BulkChange.java index 28b9fde426..e65fa4d3ac 100644 --- a/core/src/main/java/hudson/BulkChange.java +++ b/core/src/main/java/hudson/BulkChange.java @@ -132,7 +132,7 @@ public class BulkChange implements Closeable { /** * {@link BulkChange}s that are effective currently. */ - private static final ThreadLocal INSCOPE = new ThreadLocal(); + private static final ThreadLocal INSCOPE = new ThreadLocal<>(); /** * Gets the {@link BulkChange} instance currently in scope for the current thread. diff --git a/core/src/main/java/hudson/ClassicPluginStrategy.java b/core/src/main/java/hudson/ClassicPluginStrategy.java index fdd2e88dd1..1d93d3fb24 100644 --- a/core/src/main/java/hudson/ClassicPluginStrategy.java +++ b/core/src/main/java/hudson/ClassicPluginStrategy.java @@ -192,7 +192,7 @@ public class ClassicPluginStrategy implements PluginStrategy { // TODO: define a mechanism to hide classes // String export = manifest.getMainAttributes().getValue("Export"); - List paths = new ArrayList(); + List paths = new ArrayList<>(); if (isLinked) { parseClassPath(manifest, archive, paths, "Libraries", ","); parseClassPath(manifest, archive, paths, "Class-Path", " +"); // backward compatibility @@ -218,8 +218,8 @@ public class ClassicPluginStrategy implements PluginStrategy { } // compute dependencies - List dependencies = new ArrayList(); - List optionalDependencies = new ArrayList(); + List dependencies = new ArrayList<>(); + List optionalDependencies = new ArrayList<>(); String v = atts.getValue("Plugin-Dependencies"); if (v != null) { for (String s : v.split(",")) { @@ -336,7 +336,7 @@ public class ClassicPluginStrategy implements PluginStrategy { } catch (AbstractMethodError e) { // backward compatibility for (T t : finder.findExtensions(type, hudson)) - r.add(new ExtensionComponent(t)); + r.add(new ExtensionComponent<>(t)); } } @@ -578,7 +578,7 @@ public class ClassicPluginStrategy implements PluginStrategy { CyclicGraphDetector cgd = new CyclicGraphDetector() { @Override protected List getEdges(PluginWrapper pw) { - List dep = new ArrayList(); + List dep = new ArrayList<>(); for (Dependency d : pw.getDependencies()) { PluginWrapper p = pluginManager.getPlugin(d.shortName); if (p!=null && p.isActive()) @@ -644,7 +644,7 @@ public class ClassicPluginStrategy implements PluginStrategy { @SuppressFBWarnings(value = "DMI_COLLECTION_OF_URLS", justification = "Should not produce network overheads since the URL is local. JENKINS-53793 is a follow-up") protected Enumeration findResources(String name) throws IOException { - HashSet result = new HashSet(); + HashSet result = new HashSet<>(); if (PluginManager.FAST_LOOKUP) { for (PluginWrapper pw : getTransitiveDependencies()) { diff --git a/core/src/main/java/hudson/DNSMultiCast.java b/core/src/main/java/hudson/DNSMultiCast.java index aa71b2e23b..fcb3fe33bb 100644 --- a/core/src/main/java/hudson/DNSMultiCast.java +++ b/core/src/main/java/hudson/DNSMultiCast.java @@ -32,7 +32,7 @@ public class DNSMultiCast implements Closeable { try { jmdns = JmDNS.create(); - Map props = new HashMap(); + Map props = new HashMap<>(); String rootURL = jenkins.getRootUrl(); if (rootURL==null) return null; diff --git a/core/src/main/java/hudson/DescriptorExtensionList.java b/core/src/main/java/hudson/DescriptorExtensionList.java index 8452227e5e..5e9d35f7ec 100644 --- a/core/src/main/java/hudson/DescriptorExtensionList.java +++ b/core/src/main/java/hudson/DescriptorExtensionList.java @@ -76,7 +76,7 @@ public class DescriptorExtensionList, D extends Descrip if (describableType == (Class) Publisher.class) { return (DescriptorExtensionList) new Publisher.DescriptorExtensionListImpl(jenkins); } - return new DescriptorExtensionList(jenkins,describableType); + return new DescriptorExtensionList<>(jenkins, describableType); } /** @@ -199,7 +199,7 @@ public class DescriptorExtensionList, D extends Descrip } private List> _load(Iterable> set) { - List> r = new ArrayList>(); + List> r = new ArrayList<>(); for( ExtensionComponent c : set ) { Descriptor d = c.getInstance(); try { diff --git a/core/src/main/java/hudson/EnvVars.java b/core/src/main/java/hudson/EnvVars.java index 6d2f451071..8caaebf312 100644 --- a/core/src/main/java/hudson/EnvVars.java +++ b/core/src/main/java/hudson/EnvVars.java @@ -200,7 +200,7 @@ public class EnvVars extends TreeMap { } public void clear() { - referredVariables = new TreeSet(comparator); + referredVariables = new TreeSet<>(comparator); } public String resolve(String name) { @@ -288,8 +288,8 @@ public class EnvVars extends TreeMap { * Scan all variables and list all referring variables. */ public void scan() { - refereeSetMap = new TreeMap>(comparator); - List extendingVariableNames = new ArrayList(); + refereeSetMap = new TreeMap<>(comparator); + List extendingVariableNames = new ArrayList<>(); TraceResolver resolver = new TraceResolver(comparator); @@ -327,10 +327,10 @@ public class EnvVars extends TreeMap { // When A refers B, the last appearance of B always comes after // the last appearance of A. - List reversedDuplicatedOrder = new ArrayList(sorter.getSorted()); + List reversedDuplicatedOrder = new ArrayList<>(sorter.getSorted()); Collections.reverse(reversedDuplicatedOrder); - orderedVariableNames = new ArrayList(overrides.size()); + orderedVariableNames = new ArrayList<>(overrides.size()); for(String key: reversedDuplicatedOrder) { if(overrides.containsKey(key) && !orderedVariableNames.contains(key)) { orderedVariableNames.add(key); diff --git a/core/src/main/java/hudson/ExpressionFactory2.java b/core/src/main/java/hudson/ExpressionFactory2.java index 277858c933..c8704fccfd 100644 --- a/core/src/main/java/hudson/ExpressionFactory2.java +++ b/core/src/main/java/hudson/ExpressionFactory2.java @@ -168,5 +168,5 @@ final class ExpressionFactory2 implements ExpressionFactory { * * @see Functions#getCurrentJellyContext() */ - protected static final ThreadLocal CURRENT_CONTEXT = new ThreadLocal(); + protected static final ThreadLocal CURRENT_CONTEXT = new ThreadLocal<>(); } diff --git a/core/src/main/java/hudson/ExtensionList.java b/core/src/main/java/hudson/ExtensionList.java index b4d32bd06d..0417f1674c 100644 --- a/core/src/main/java/hudson/ExtensionList.java +++ b/core/src/main/java/hudson/ExtensionList.java @@ -86,7 +86,7 @@ public class ExtensionList extends AbstractList implements OnMaster { @CopyOnWrite private volatile List> extensions; - private final List listeners = new CopyOnWriteArrayList(); + private final List listeners = new CopyOnWriteArrayList<>(); /** * Place to store manually registered instances with the per-Hudson scope. @@ -104,7 +104,7 @@ public class ExtensionList extends AbstractList implements OnMaster { } protected ExtensionList(Jenkins jenkins, Class extensionType) { - this(jenkins,extensionType,new CopyOnWriteArrayList>()); + this(jenkins,extensionType, new CopyOnWriteArrayList<>()); } /** @@ -237,7 +237,7 @@ public class ExtensionList extends AbstractList implements OnMaster { private synchronized boolean removeSync(Object o) { boolean removed = removeComponent(legacyInstances, o); if(extensions!=null) { - List> r = new ArrayList>(extensions); + List> r = new ArrayList<>(extensions); removed |= removeComponent(r,o); extensions = sort(r); } @@ -279,11 +279,11 @@ public class ExtensionList extends AbstractList implements OnMaster { } private synchronized boolean addSync(T t) { - legacyInstances.add(new ExtensionComponent(t)); + legacyInstances.add(new ExtensionComponent<>(t)); // if we've already filled extensions, add it if(extensions!=null) { - List> r = new ArrayList>(extensions); - r.add(new ExtensionComponent(t)); + List> r = new ArrayList<>(extensions); + r.add(new ExtensionComponent<>(t)); extensions = sort(r); } return true; @@ -395,7 +395,7 @@ public class ExtensionList extends AbstractList implements OnMaster { * The implementation should copy a list, do a sort, and return the new instance. */ protected List> sort(List> r) { - r = new ArrayList>(r); + r = new ArrayList<>(r); Collections.sort(r); return r; } @@ -412,7 +412,7 @@ public class ExtensionList extends AbstractList implements OnMaster { @SuppressWarnings({"unchecked", "rawtypes"}) public static ExtensionList create(Jenkins jenkins, Class type) { if(type.getAnnotation(LegacyInstancesAreScopedToHudson.class)!=null) - return new ExtensionList(jenkins,type); + return new ExtensionList<>(jenkins, type); else { return new ExtensionList(jenkins, type, staticLegacyInstances.computeIfAbsent(type, key -> new CopyOnWriteArrayList())); } diff --git a/core/src/main/java/hudson/FilePath.java b/core/src/main/java/hudson/FilePath.java index 66d2ea9aae..13311e72b5 100644 --- a/core/src/main/java/hudson/FilePath.java +++ b/core/src/main/java/hudson/FilePath.java @@ -325,7 +325,7 @@ public final class FilePath implements Serializable { } boolean isAbsolute = buf.length() > 0; // Split remaining path into tokens, trimming any duplicate or trailing separators - List tokens = new ArrayList(); + List tokens = new ArrayList<>(); int s = 0, end = path.length(); for (int i = 0; i < end; i++) { char c = path.charAt(i); @@ -1061,7 +1061,7 @@ public final class FilePath implements Serializable { if(channel!=null) { // run this on a remote system try { - DelegatingCallable wrapper = new FileCallableWrapper(callable, cl); + DelegatingCallable wrapper = new FileCallableWrapper<>(callable, cl); for (FileCallableWrapperFactory factory : ExtensionList.lookup(FileCallableWrapperFactory.class)) { wrapper = factory.wrap(wrapper); } @@ -1136,7 +1136,7 @@ public final class FilePath implements Serializable { */ public Future actAsync(final FileCallable callable) throws IOException, InterruptedException { try { - DelegatingCallable wrapper = new FileCallableWrapper(callable); + DelegatingCallable wrapper = new FileCallableWrapper<>(callable); for (FileCallableWrapperFactory factory : ExtensionList.lookup(FileCallableWrapperFactory.class)) { wrapper = factory.wrap(wrapper); } @@ -1839,7 +1839,7 @@ public final class FilePath implements Serializable { return Collections.emptyList(); } - ArrayList r = new ArrayList(children.length); + ArrayList r = new ArrayList<>(children.length); for (File child : children) r.add(new FilePath(child)); diff --git a/core/src/main/java/hudson/Functions.java b/core/src/main/java/hudson/Functions.java index 118a1f70fa..76fdf2f813 100644 --- a/core/src/main/java/hudson/Functions.java +++ b/core/src/main/java/hudson/Functions.java @@ -465,7 +465,7 @@ public class Functions { } public static Map getSystemProperties() { - return new TreeMap(System.getProperties()); + return new TreeMap<>(System.getProperties()); } /** @@ -479,7 +479,7 @@ public class Functions { } public static Map getEnvVars() { - return new TreeMap(EnvVars.masterEnvVars); + return new TreeMap<>(EnvVars.masterEnvVars); } public static boolean isWindows() { @@ -544,7 +544,7 @@ public class Functions { * @since 1.525 */ public static Iterable reverse(Collection collection) { - List list = new ArrayList(collection); + List list = new ArrayList<>(collection); Collections.reverse(list); return list; } diff --git a/core/src/main/java/hudson/Launcher.java b/core/src/main/java/hudson/Launcher.java index f0f18b4f81..45fe90cab0 100644 --- a/core/src/main/java/hudson/Launcher.java +++ b/core/src/main/java/hudson/Launcher.java @@ -197,14 +197,14 @@ public abstract class Launcher { } public ProcStarter cmds(File program, String... args) { - commands = new ArrayList(args.length+1); + commands = new ArrayList<>(args.length + 1); commands.add(program.getPath()); commands.addAll(Arrays.asList(args)); return this; } public ProcStarter cmds(List args) { - commands = new ArrayList(args); + commands = new ArrayList<>(args); return this; } diff --git a/core/src/main/java/hudson/Lookup.java b/core/src/main/java/hudson/Lookup.java index 090f3eb284..b0b40ba891 100644 --- a/core/src/main/java/hudson/Lookup.java +++ b/core/src/main/java/hudson/Lookup.java @@ -32,7 +32,7 @@ import java.util.concurrent.ConcurrentHashMap; * @author Kohsuke Kawaguchi */ public class Lookup { - private final ConcurrentHashMap data = new ConcurrentHashMap(); + private final ConcurrentHashMap data = new ConcurrentHashMap<>(); public T get(Class type) { return type.cast(data.get(type)); diff --git a/core/src/main/java/hudson/Main.java b/core/src/main/java/hudson/Main.java index c4aa942755..55ee2fb9f0 100644 --- a/core/src/main/java/hudson/Main.java +++ b/core/src/main/java/hudson/Main.java @@ -152,7 +152,7 @@ public class Main { // run the command long start = System.currentTimeMillis(); - List cmd = new ArrayList(); + List cmd = new ArrayList<>(); for( int i=1; i tags = new ArrayList(); + private final List tags = new ArrayList<>(); /** * Represents one mark up inserted into text. diff --git a/core/src/main/java/hudson/PermalinkList.java b/core/src/main/java/hudson/PermalinkList.java index 0c4a3085a6..caffd8baf0 100644 --- a/core/src/main/java/hudson/PermalinkList.java +++ b/core/src/main/java/hudson/PermalinkList.java @@ -60,7 +60,7 @@ public final class PermalinkList extends ArrayList { * Finds the closest name match by its ID. */ public Permalink findNearest(String id) { - List ids = new ArrayList(); + List ids = new ArrayList<>(); for (Permalink p : this) ids.add(p.getId()); String nearest = EditDistance.findNearest(id, ids); diff --git a/core/src/main/java/hudson/PluginManager.java b/core/src/main/java/hudson/PluginManager.java index c26ca2439d..ba0648b7bc 100644 --- a/core/src/main/java/hudson/PluginManager.java +++ b/core/src/main/java/hudson/PluginManager.java @@ -284,9 +284,9 @@ public abstract class PluginManager extends AbstractModelObject implements OnMas /** * All active plugins, topologically sorted so that when X depends on Y, Y appears in the list before X does. */ - protected final List activePlugins = new CopyOnWriteArrayList(); + protected final List activePlugins = new CopyOnWriteArrayList<>(); - protected final List failedPlugins = new ArrayList(); + protected final List failedPlugins = new ArrayList<>(); /** * Plug-in root directory. @@ -422,7 +422,7 @@ public abstract class PluginManager extends AbstractModelObject implements OnMas // once we've listed plugins, we can fill in the reactor with plugin-specific initialization tasks TaskGraphBuilder g = new TaskGraphBuilder(); - final Map inspectedShortNames = new HashMap(); + final Map inspectedShortNames = new HashMap<>(); for( final File arc : archives ) { g.followedBy().notFatal().attains(PLUGINS_LISTED).add("Inspecting plugin " + arc, new Executable() { @@ -465,7 +465,7 @@ public abstract class PluginManager extends AbstractModelObject implements OnMas CyclicGraphDetector cgd = new CyclicGraphDetector() { @Override protected List getEdges(PluginWrapper p) { - List next = new ArrayList(); + List next = new ArrayList<>(); addTo(p.getDependencies(), next); addTo(p.getOptionalDependencies(), next); return next; @@ -1241,7 +1241,7 @@ public abstract class PluginManager extends AbstractModelObject implements OnMas * @return The list of plugins implementing the specified class. */ public List getPlugins(Class pluginSuperclass) { - List result = new ArrayList(); + List result = new ArrayList<>(); for (PluginWrapper p : getPlugins()) { if(pluginSuperclass.isInstance(p.getPlugin())) result.add(p); @@ -1264,7 +1264,7 @@ public abstract class PluginManager extends AbstractModelObject implements OnMas */ @Deprecated public Collection> discover( Class spi ) { - Set> result = new HashSet>(); + Set> result = new HashSet<>(); for (PluginWrapper p : activePlugins) { Service.load(spi, p.classLoader, result); @@ -1807,7 +1807,7 @@ public abstract class PluginManager extends AbstractModelObject implements OnMas */ public List> prevalidateConfig(InputStream configXml) throws IOException { Jenkins.getInstance().checkPermission(Jenkins.ADMINISTER); - List> jobs = new ArrayList>(); + List> jobs = new ArrayList<>(); UpdateCenter uc = Jenkins.getInstance().getUpdateCenter(); // TODO call uc.updateAllSites() when available? perhaps not, since we should not block on network here for (Map.Entry requestedPlugin : parseRequestedPlugins(configXml).entrySet()) { @@ -1901,7 +1901,7 @@ public abstract class PluginManager extends AbstractModelObject implements OnMas * Parses configuration XML files and picks up references to XML files. */ public Map parseRequestedPlugins(InputStream configXml) throws IOException { - final Map requestedPlugins = new TreeMap(); + final Map requestedPlugins = new TreeMap<>(); try { SAXParserFactory.newInstance().newSAXParser().parse(configXml, new DefaultHandler() { @Override public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException { @@ -1981,16 +1981,16 @@ public abstract class PluginManager extends AbstractModelObject implements OnMas * Make generated types visible. * Keyed by the generated class name. */ - private ConcurrentMap> generatedClasses = new ConcurrentHashMap>(); + private ConcurrentMap> generatedClasses = new ConcurrentHashMap<>(); /** Cache of loaded, or known to be unloadable, classes. */ - private final Map> loaded = new HashMap>(); + private final Map> loaded = new HashMap<>(); public UberClassLoader() { super(PluginManager.class.getClassLoader()); } public void addNamedClass(String className, Class c) { - generatedClasses.put(className,new WeakReference(c)); + generatedClasses.put(className, new WeakReference<>(c)); } @Override @@ -2071,7 +2071,7 @@ public abstract class PluginManager extends AbstractModelObject implements OnMas @Override protected Enumeration findResources(String name) throws IOException { - List resources = new ArrayList(); + List resources = new ArrayList<>(); if (FAST_LOOKUP) { for (PluginWrapper p : activePlugins) { resources.addAll(Collections.list(ClassLoaderReflectionToolkit._findResources(p.classLoader, name))); diff --git a/core/src/main/java/hudson/Util.java b/core/src/main/java/hudson/Util.java index 9699df02c8..dc3de475bf 100644 --- a/core/src/main/java/hudson/Util.java +++ b/core/src/main/java/hudson/Util.java @@ -114,7 +114,7 @@ public class Util { */ @Nonnull public static List filter( @Nonnull Iterable base, @Nonnull Class type ) { - List r = new ArrayList(); + List r = new ArrayList<>(); for (Object i : base) { if(type.isInstance(i)) r.add(type.cast(i)); @@ -144,7 +144,7 @@ public class Util { */ @Nullable public static String replaceMacro( @CheckForNull String s, @Nonnull Map properties) { - return replaceMacro(s,new VariableResolver.ByMap(properties)); + return replaceMacro(s, new VariableResolver.ByMap<>(properties)); } /** @@ -783,7 +783,7 @@ public class Util { */ @Nonnull public static List createSubList(@Nonnull Collection source, @Nonnull Class type ) { - List r = new ArrayList(); + List r = new ArrayList<>(); for (Object item : source) { if(type.isInstance(item)) r.add(type.cast(item)); @@ -1117,7 +1117,7 @@ public class Util { int size = 0; for (Collection item : items) size += item.size(); - List r = new ArrayList(size); + List r = new ArrayList<>(size); for (Collection item : items) r.addAll(item); return r; diff --git a/core/src/main/java/hudson/cli/CLICommand.java b/core/src/main/java/hudson/cli/CLICommand.java index 738c738a63..4a47ae973c 100644 --- a/core/src/main/java/hudson/cli/CLICommand.java +++ b/core/src/main/java/hudson/cli/CLICommand.java @@ -530,7 +530,7 @@ public abstract class CLICommand implements ExtensionPoint, Cloneable { private static final Logger LOGGER = Logger.getLogger(CLICommand.class.getName()); - private static final ThreadLocal CURRENT_COMMAND = new ThreadLocal(); + private static final ThreadLocal CURRENT_COMMAND = new ThreadLocal<>(); /*package*/ static CLICommand setCurrent(CLICommand cmd) { CLICommand old = getCurrent(); diff --git a/core/src/main/java/hudson/cli/InstallPluginCommand.java b/core/src/main/java/hudson/cli/InstallPluginCommand.java index 2bbabe09c6..5279a7fd3a 100644 --- a/core/src/main/java/hudson/cli/InstallPluginCommand.java +++ b/core/src/main/java/hudson/cli/InstallPluginCommand.java @@ -63,7 +63,7 @@ public class InstallPluginCommand extends CLICommand { "and the plugin will be installed from the update center. If the short name includes a minimum version number " + "(like ‘findbugs:1.4’), and there are multiple update centers publishing different versions, the update centers " + "will be searched in order for the first one publishing a version that is at least the specified version.") - public List sources = new ArrayList(); + public List sources = new ArrayList<>(); @Option(name="-name",usage="If specified, the plugin will be installed as this short name (whereas normally the name is inferred from the source name automatically).") public String name; // TODO better to parse out Short-Name from the manifest and deprecate this option diff --git a/core/src/main/java/hudson/console/ConsoleNote.java b/core/src/main/java/hudson/console/ConsoleNote.java index 39977a590e..3c18b65716 100644 --- a/core/src/main/java/hudson/console/ConsoleNote.java +++ b/core/src/main/java/hudson/console/ConsoleNote.java @@ -340,7 +340,7 @@ public abstract class ConsoleNote implements Serializable, Describable removeNotes(Collection logLines) { - List r = new ArrayList(logLines.size()); + List r = new ArrayList<>(logLines.size()); for (String l : logLines) r.add(removeNotes(l)); return r; diff --git a/core/src/main/java/hudson/diagnosis/MemoryUsageMonitor.java b/core/src/main/java/hudson/diagnosis/MemoryUsageMonitor.java index 1ba648eb38..eba9991aff 100644 --- a/core/src/main/java/hudson/diagnosis/MemoryUsageMonitor.java +++ b/core/src/main/java/hudson/diagnosis/MemoryUsageMonitor.java @@ -53,7 +53,7 @@ public final class MemoryUsageMonitor extends PeriodicWork { * A memory group is conceptually a set of memory pools. */ public final class MemoryGroup { - private final List pools = new ArrayList(); + private final List pools = new ArrayList<>(); /** * Trend of the memory usage, after GCs. diff --git a/core/src/main/java/hudson/diagnosis/NullIdDescriptorMonitor.java b/core/src/main/java/hudson/diagnosis/NullIdDescriptorMonitor.java index 8b3778262e..27a5685f1d 100644 --- a/core/src/main/java/hudson/diagnosis/NullIdDescriptorMonitor.java +++ b/core/src/main/java/hudson/diagnosis/NullIdDescriptorMonitor.java @@ -55,7 +55,7 @@ public class NullIdDescriptorMonitor extends AdministrativeMonitor { return Messages.NullIdDescriptorMonitor_DisplayName(); } - private final List problems = new ArrayList(); + private final List problems = new ArrayList<>(); @Override public boolean isActivated() { diff --git a/core/src/main/java/hudson/diagnosis/OldDataMonitor.java b/core/src/main/java/hudson/diagnosis/OldDataMonitor.java index 7fc185737c..c4317b4816 100644 --- a/core/src/main/java/hudson/diagnosis/OldDataMonitor.java +++ b/core/src/main/java/hudson/diagnosis/OldDataMonitor.java @@ -78,7 +78,7 @@ import org.kohsuke.stapler.interceptor.RequirePOST; public class OldDataMonitor extends AdministrativeMonitor { private static final Logger LOGGER = Logger.getLogger(OldDataMonitor.class.getName()); - private ConcurrentMap data = new ConcurrentHashMap(); + private ConcurrentMap data = new ConcurrentHashMap<>(); /** * Gets instance of the monitor. @@ -106,7 +106,7 @@ public class OldDataMonitor extends AdministrativeMonitor { } public Map getData() { - Map r = new HashMap(); + Map r = new HashMap<>(); for (Map.Entry entry : this.data.entrySet()) { Saveable s = entry.getKey().get(); if (s != null) { diff --git a/core/src/main/java/hudson/init/InitStrategy.java b/core/src/main/java/hudson/init/InitStrategy.java index 9d7d287c43..c6c5795e54 100644 --- a/core/src/main/java/hudson/init/InitStrategy.java +++ b/core/src/main/java/hudson/init/InitStrategy.java @@ -45,7 +45,7 @@ public class InitStrategy { * and when that happens, Jenkins will ignore all but the first one in the list. */ public List listPluginArchives(PluginManager pm) throws IOException { - List r = new ArrayList(); + List r = new ArrayList<>(); // the ordering makes sure that during the debugging we get proper precedence among duplicates. // for example, while doing "mvn jpi:run" or "mvn hpi:run" on a plugin that's bundled with Jenkins, we want to the diff --git a/core/src/main/java/hudson/init/TaskMethodFinder.java b/core/src/main/java/hudson/init/TaskMethodFinder.java index 0e09bfe267..bbd60a61bf 100644 --- a/core/src/main/java/hudson/init/TaskMethodFinder.java +++ b/core/src/main/java/hudson/init/TaskMethodFinder.java @@ -32,7 +32,7 @@ import static java.util.logging.Level.WARNING; abstract class TaskMethodFinder extends TaskBuilder { private static final Logger LOGGER = Logger.getLogger(TaskMethodFinder.class.getName()); protected final ClassLoader cl; - private final Set discovered = new HashSet(); + private final Set discovered = new HashSet<>(); private final Class type; private final Class milestoneType; @@ -52,7 +52,7 @@ abstract class TaskMethodFinder extends TaskBuilder { protected abstract boolean fatalOf(T i); public Collection discoverTasks(Reactor session) throws IOException { - List result = new ArrayList(); + List result = new ArrayList<>(); for (Method e : Index.list(type, cl, Method.class)) { if (filter(e)) continue; // already reported once @@ -180,7 +180,7 @@ abstract class TaskMethodFinder extends TaskBuilder { } private Collection toMilestones(String[] tokens, Milestone m) { - List r = new ArrayList(); + List r = new ArrayList<>(); for (String s : tokens) { try { r.add((Milestone)Enum.valueOf(milestoneType,s)); diff --git a/core/src/main/java/hudson/logging/LogRecorder.java b/core/src/main/java/hudson/logging/LogRecorder.java index 0ca0d57196..85de032387 100644 --- a/core/src/main/java/hudson/logging/LogRecorder.java +++ b/core/src/main/java/hudson/logging/LogRecorder.java @@ -75,7 +75,7 @@ import org.kohsuke.accmod.restrictions.NoExternalUse; public class LogRecorder extends AbstractModelObject implements Saveable { private volatile String name; - public final CopyOnWriteList targets = new CopyOnWriteList(); + public final CopyOnWriteList targets = new CopyOnWriteList<>(); private final static TargetComparator TARGET_COMPARATOR = new TargetComparator(); @Restricted(NoExternalUse.class) diff --git a/core/src/main/java/hudson/logging/LogRecorderManager.java b/core/src/main/java/hudson/logging/LogRecorderManager.java index 78c24c2a2e..a572900a55 100644 --- a/core/src/main/java/hudson/logging/LogRecorderManager.java +++ b/core/src/main/java/hudson/logging/LogRecorderManager.java @@ -68,7 +68,7 @@ public class LogRecorderManager extends AbstractModelObject implements ModelObje /** * {@link LogRecorder}s keyed by their {@linkplain LogRecorder#name name}. */ - public transient final Map logRecorders = new CopyOnWriteMap.Tree(); + public transient final Map logRecorders = new CopyOnWriteMap.Tree<>(); public String getDisplayName() { return Messages.LogRecorderManager_DisplayName(); @@ -160,7 +160,7 @@ public class LogRecorderManager extends AbstractModelObject implements ModelObje String level = req.getParameter("level"); if(level!=null) { Level threshold = Level.parse(level); - List filtered = new ArrayList(); + List filtered = new ArrayList<>(); for (LogRecord r : logs) { if(r.getLevel().intValue() >= threshold.intValue()) filtered.add(r); diff --git a/core/src/main/java/hudson/logging/WeakLogHandler.java b/core/src/main/java/hudson/logging/WeakLogHandler.java index 339c50ef64..9a51f279de 100644 --- a/core/src/main/java/hudson/logging/WeakLogHandler.java +++ b/core/src/main/java/hudson/logging/WeakLogHandler.java @@ -44,7 +44,7 @@ public final class WeakLogHandler extends Handler { public WeakLogHandler(Handler target, Logger logger) { this.logger = logger; logger.addHandler(this); - this.target = new WeakReference(target); + this.target = new WeakReference<>(target); } public void publish(LogRecord record) { diff --git a/core/src/main/java/hudson/model/AbstractBuild.java b/core/src/main/java/hudson/model/AbstractBuild.java index 2268f3dd99..a868edb9de 100644 --- a/core/src/main/java/hudson/model/AbstractBuild.java +++ b/core/src/main/java/hudson/model/AbstractBuild.java @@ -465,7 +465,7 @@ public abstract class AbstractBuild

,R extends Abs listener.getLogger().print(Messages.AbstractBuild_BuildingOnMaster()); } else { listener.getLogger().print(Messages.AbstractBuild_BuildingRemotely(ModelHyperlinkNote.encodeTo("/computer/" + builtOn, node.getDisplayName()))); - Set assignedLabels = new HashSet(node.getAssignedLabels()); + Set assignedLabels = new HashSet<>(node.getAssignedLabels()); assignedLabels.remove(node.getSelfLabel()); if (!assignedLabels.isEmpty()) { boolean first = true; @@ -536,7 +536,7 @@ public abstract class AbstractBuild

,R extends Abs l = bw.decorateLauncher(AbstractBuild.this,l,listener); } - buildEnvironments = new ArrayList(); + buildEnvironments = new ArrayList<>(); for (RunListener rl: RunListener.all()) { Environment environment = rl.setUpEnvironment(AbstractBuild.this, l, listener); @@ -583,7 +583,7 @@ public abstract class AbstractBuild

,R extends Abs } build.scm = scm.createChangeLogParser(); - build.changeSet = new WeakReference>(build.calcChangeSet()); + build.changeSet = new WeakReference<>(build.calcChangeSet()); for (SCMListener l : SCMListener.all()) try { @@ -635,7 +635,7 @@ public abstract class AbstractBuild

,R extends Abs post2(listener); } finally { // update the culprit list - HashSet r = new HashSet(); + HashSet r = new HashSet<>(); for (User u : getCulprits()) r.add(u.getId()); culprits = ImmutableSortedSet.copyOf(r); @@ -834,7 +834,7 @@ public abstract class AbstractBuild

,R extends Abs if (cs==null) cs = ChangeLogSet.createEmpty(this); - changeSet = new WeakReference>(cs); + changeSet = new WeakReference<>(cs); return cs; } @@ -903,7 +903,7 @@ public abstract class AbstractBuild

,R extends Abs public EnvironmentList getEnvironments() { Executor e = Executor.currentExecutor(); if (e!=null && e.getCurrentExecutable()==this) { - if (buildEnvironments==null) buildEnvironments = new ArrayList(); + if (buildEnvironments==null) buildEnvironments = new ArrayList<>(); return new EnvironmentList(buildEnvironments); } @@ -936,7 +936,7 @@ public abstract class AbstractBuild

,R extends Abs * @since 1.378 */ public Set getSensitiveBuildVariables() { - Set s = new HashSet(); + Set s = new HashSet<>(); ParametersAction parameters = getAction(ParametersAction.class); if (parameters != null) { @@ -973,7 +973,7 @@ public abstract class AbstractBuild

,R extends Abs * The returned map is mutable so that subtypes can put more values. */ public Map getBuildVariables() { - Map r = new HashMap(); + Map r = new HashMap<>(); ParametersAction parameters = getAction(ParametersAction.class); if (parameters!=null) { @@ -1000,7 +1000,7 @@ public abstract class AbstractBuild

,R extends Abs * Creates {@link VariableResolver} backed by {@link #getBuildVariables()}. */ public final VariableResolver getBuildVariableResolver() { - return new VariableResolver.ByMap(getBuildVariables()); + return new VariableResolver.ByMap<>(getBuildVariables()); } /** @@ -1173,7 +1173,7 @@ public abstract class AbstractBuild

,R extends Abs * of builds (which can be empty if no build uses the artifact from this build or downstream is not {@link AbstractProject#isFingerprintConfigured}.) */ public Map getDownstreamBuilds() { - Map r = new HashMap(); + Map r = new HashMap<>(); for (AbstractProject p : getParent().getDownstreamProjects()) { if (p.isFingerprintConfigured()) r.put(p,getDownstreamRelationship(p)); @@ -1200,7 +1200,7 @@ public abstract class AbstractBuild

,R extends Abs } private Map _getUpstreamBuilds(Collection projects) { - Map r = new HashMap(); + Map r = new HashMap<>(); for (AbstractProject p : projects) { int n = getUpstreamRelationship(p); if (n>=0) @@ -1222,7 +1222,7 @@ public abstract class AbstractBuild

,R extends Abs Map ndep = n.getDependencies(true); Map odep = o.getDependencies(true); - Map r = new HashMap(); + Map r = new HashMap<>(); for (Map.Entry entry : odep.entrySet()) { AbstractProject p = entry.getKey(); @@ -1274,7 +1274,7 @@ public abstract class AbstractBuild

,R extends Abs * of IDs, but due to log rotations, some builds may be already unavailable. */ public List getBuilds() { - List r = new ArrayList(); + List r = new ArrayList<>(); AbstractBuild b = project.getNearestBuild(fromId); if (b!=null && b.getNumber()==fromId) diff --git a/core/src/main/java/hudson/model/Actionable.java b/core/src/main/java/hudson/model/Actionable.java index 96eeda813a..496c2de286 100644 --- a/core/src/main/java/hudson/model/Actionable.java +++ b/core/src/main/java/hudson/model/Actionable.java @@ -78,7 +78,7 @@ public abstract class Actionable extends AbstractModelObject implements ModelObj if (actions == null) { synchronized (this) { if (actions == null) { - actions = new CopyOnWriteArrayList(); + actions = new CopyOnWriteArrayList<>(); } } } @@ -196,7 +196,7 @@ public abstract class Actionable extends AbstractModelObject implements ModelObj throw new IllegalArgumentException("Action must be non-null"); } // CopyOnWriteArrayList does not support Iterator.remove, so need to do it this way: - List old = new ArrayList(1); + List old = new ArrayList<>(1); List current = getActions(); boolean found = false; for (Action a2 : current) { @@ -255,7 +255,7 @@ public abstract class Actionable extends AbstractModelObject implements ModelObj throw new IllegalArgumentException("Action type must be non-null"); } // CopyOnWriteArrayList does not support Iterator.remove, so need to do it this way: - List old = new ArrayList(); + List old = new ArrayList<>(); List current = getActions(); for (Action a : current) { if (clazz.isInstance(a)) { @@ -290,7 +290,7 @@ public abstract class Actionable extends AbstractModelObject implements ModelObj throw new IllegalArgumentException("Action must be non-null"); } // CopyOnWriteArrayList does not support Iterator.remove, so need to do it this way: - List old = new ArrayList(); + List old = new ArrayList<>(); List current = getActions(); boolean found = false; for (Action a1 : current) { diff --git a/core/src/main/java/hudson/model/AutoCompletionCandidates.java b/core/src/main/java/hudson/model/AutoCompletionCandidates.java index 29ce16f4ca..e8e64b8e48 100644 --- a/core/src/main/java/hudson/model/AutoCompletionCandidates.java +++ b/core/src/main/java/hudson/model/AutoCompletionCandidates.java @@ -48,7 +48,7 @@ import org.apache.commons.lang.StringUtils; * @author Kohsuke Kawaguchi */ public class AutoCompletionCandidates implements HttpResponse { - private final List values = new ArrayList(); + private final List values = new ArrayList<>(); public AutoCompletionCandidates add(String v) { values.add(v); diff --git a/core/src/main/java/hudson/model/Build.java b/core/src/main/java/hudson/model/Build.java index 15aed23050..00f9c21d4e 100644 --- a/core/src/main/java/hudson/model/Build.java +++ b/core/src/main/java/hudson/model/Build.java @@ -147,7 +147,7 @@ public abstract class Build

,B extends Build> Result r = null; try { - List wrappers = new ArrayList(project.getBuildWrappers().values()); + List wrappers = new ArrayList<>(project.getBuildWrappers().values()); ParametersAction parameters = getAction(ParametersAction.class); if (parameters != null) diff --git a/core/src/main/java/hudson/model/Cause.java b/core/src/main/java/hudson/model/Cause.java index d05cd867b5..4758f17dd0 100644 --- a/core/src/main/java/hudson/model/Cause.java +++ b/core/src/main/java/hudson/model/Cause.java @@ -175,8 +175,8 @@ public abstract class Cause { upstreamBuild = up.getNumber(); upstreamProject = up.getParent().getFullName(); upstreamUrl = up.getParent().getUrl(); - upstreamCauses = new ArrayList(); - Set traversed = new HashSet(); + upstreamCauses = new ArrayList<>(); + Set traversed = new HashSet<>(); for (Cause c : up.getCauses()) { upstreamCauses.add(trim(c, MAX_DEPTH, traversed)); } @@ -234,7 +234,7 @@ public abstract class Cause { return c; } UpstreamCause uc = (UpstreamCause) c; - List cs = new ArrayList(); + List cs = new ArrayList<>(); if (depth > 0) { if (traversed.add(uc.upstreamUrl + uc.upstreamBuild)) { for (Cause c2 : uc.upstreamCauses) { @@ -333,7 +333,7 @@ public abstract class Cause { public ConverterImpl(XStream2 xstream) { super(xstream); } @Override protected void callback(UpstreamCause uc, UnmarshallingContext context) { if (uc.upstreamCause != null) { - if (uc.upstreamCauses == null) uc.upstreamCauses = new ArrayList(); + if (uc.upstreamCauses == null) uc.upstreamCauses = new ArrayList<>(); uc.upstreamCauses.add(uc.upstreamCause); uc.upstreamCause = null; OldDataMonitor.report(context, "1.288"); diff --git a/core/src/main/java/hudson/model/ChoiceParameterDefinition.java b/core/src/main/java/hudson/model/ChoiceParameterDefinition.java index 9ea1415362..ffe11cb3fd 100644 --- a/core/src/main/java/hudson/model/ChoiceParameterDefinition.java +++ b/core/src/main/java/hudson/model/ChoiceParameterDefinition.java @@ -45,7 +45,7 @@ public class ChoiceParameterDefinition extends SimpleParameterDefinition { public ChoiceParameterDefinition(String name, String[] choices, String description) { super(name, description); - this.choices = new ArrayList(Arrays.asList(choices)); + this.choices = new ArrayList<>(Arrays.asList(choices)); defaultValue = null; } diff --git a/core/src/main/java/hudson/model/Computer.java b/core/src/main/java/hudson/model/Computer.java index e4c3a661b8..9a271550a2 100644 --- a/core/src/main/java/hudson/model/Computer.java +++ b/core/src/main/java/hudson/model/Computer.java @@ -150,9 +150,9 @@ import static javax.servlet.http.HttpServletResponse.*; @ExportedBean public /*transient*/ abstract class Computer extends Actionable implements AccessControlled, ExecutorListener, DescriptorByNameOwner { - private final CopyOnWriteArrayList executors = new CopyOnWriteArrayList(); + private final CopyOnWriteArrayList executors = new CopyOnWriteArrayList<>(); // TODO: - private final CopyOnWriteArrayList oneOffExecutors = new CopyOnWriteArrayList(); + private final CopyOnWriteArrayList oneOffExecutors = new CopyOnWriteArrayList<>(); private int numExecutors; @@ -199,7 +199,7 @@ public /*transient*/ abstract class Computer extends Actionable implements Acces * @see Executor#resetWorkUnit(String) */ private transient final List terminatedBy = Collections.synchronizedList(new ArrayList - ()); + <>()); /** * This method captures the information of a request to terminate a computer instance. Method is public as @@ -241,7 +241,7 @@ public /*transient*/ abstract class Computer extends Actionable implements Acces * @since 1.607 */ public List getTerminatedBy() { - return new ArrayList(terminatedBy); + return new ArrayList<>(terminatedBy); } public Computer(Node node) { @@ -260,7 +260,7 @@ public /*transient*/ abstract class Computer extends Actionable implements Acces */ @SuppressWarnings("deprecation") public List getActions() { - List result = new ArrayList(); + List result = new ArrayList<>(); result.addAll(super.getActions()); synchronized (this) { if (transientActions == null) { @@ -327,7 +327,7 @@ public /*transient*/ abstract class Computer extends Actionable implements Acces */ public AnnotatedLargeText getLogText() { checkPermission(CONNECT); - return new AnnotatedLargeText(getLogFile(), Charset.defaultCharset(), false, this); + return new AnnotatedLargeText<>(getLogFile(), Charset.defaultCharset(), false, this); } public ACL getACL() { @@ -910,7 +910,7 @@ public /*transient*/ abstract class Computer extends Actionable implements Acces if (Jenkins.getInstanceOrNull() == null) { return; } - Set availableNumbers = new HashSet(); + Set availableNumbers = new HashSet<>(); for (int i = 0; i < numExecutors; i++) availableNumbers.add(i); @@ -965,7 +965,7 @@ public /*transient*/ abstract class Computer extends Actionable implements Acces @Exported @StaplerDispatchable public List getExecutors() { - return new ArrayList(executors); + return new ArrayList<>(executors); } /** @@ -974,7 +974,7 @@ public /*transient*/ abstract class Computer extends Actionable implements Acces @Exported @StaplerDispatchable public List getOneOffExecutors() { - return new ArrayList(oneOffExecutors); + return new ArrayList<>(oneOffExecutors); } /** @@ -998,7 +998,7 @@ public /*transient*/ abstract class Computer extends Actionable implements Acces @Restricted(NoExternalUse.class) public List getDisplayExecutors() { // The size may change while we are populating, but let's start with a reasonable guess to minimize resizing - List result = new ArrayList(executors.size()+oneOffExecutors.size()); + List result = new ArrayList<>(executors.size() + oneOffExecutors.size()); int index = 0; for (Executor e: executors) { if (e.isDisplayCell()) { @@ -1153,7 +1153,7 @@ public /*transient*/ abstract class Computer extends Actionable implements Acces */ @Exported(inline=true) public Map getMonitorData() { - Map r = new HashMap(); + Map r = new HashMap<>(); if (hasPermission(CONNECT)) { for (NodeMonitor monitor : NodeMonitor.getAll()) r.put(monitor.getClass().getName(), monitor.data(this)); @@ -1324,7 +1324,7 @@ public /*transient*/ abstract class Computer extends Actionable implements Acces private static final Logger LOGGER = Logger.getLogger(ListPossibleNames.class.getName()); public List call() throws IOException { - List names = new ArrayList(); + List names = new ArrayList<>(); Enumeration nis = NetworkInterface.getNetworkInterfaces(); while (nis.hasMoreElements()) { diff --git a/core/src/main/java/hudson/model/ComputerPanelBox.java b/core/src/main/java/hudson/model/ComputerPanelBox.java index 94ee1aaa3c..d5e7e45cba 100644 --- a/core/src/main/java/hudson/model/ComputerPanelBox.java +++ b/core/src/main/java/hudson/model/ComputerPanelBox.java @@ -37,7 +37,7 @@ public abstract class ComputerPanelBox implements ExtensionPoint{ * List of all the registered {@link ComputerPanelBox}s. */ public static List all(Computer computer) { - List boxs = new ArrayList(); + List boxs = new ArrayList<>(); for(ComputerPanelBox box: ExtensionList.lookup(ComputerPanelBox.class)){ box.setComputer(computer); boxs.add(box); diff --git a/core/src/main/java/hudson/model/ComputerSet.java b/core/src/main/java/hudson/model/ComputerSet.java index 5dbadb9219..1b618d0d50 100644 --- a/core/src/main/java/hudson/model/ComputerSet.java +++ b/core/src/main/java/hudson/model/ComputerSet.java @@ -85,7 +85,7 @@ public final class ComputerSet extends AbstractModelObject implements Describabl }; private static final DescribableList> monitors - = new DescribableList>(MONITORS_OWNER); + = new DescribableList<>(MONITORS_OWNER); @Exported public String getDisplayName() { @@ -129,7 +129,7 @@ public final class ComputerSet extends AbstractModelObject implements Describabl * Returns a subset pf {@link #getMonitors()} that are {@linkplain NodeMonitor#isIgnored() not ignored}. */ public static Map,NodeMonitor> getNonIgnoredMonitors() { - Map,NodeMonitor> r = new HashMap, NodeMonitor>(); + Map,NodeMonitor> r = new HashMap<>(); for (NodeMonitor m : monitors) { if(!m.isIgnored()) r.put(m.getDescriptor(),m); @@ -421,7 +421,7 @@ public final class ComputerSet extends AbstractModelObject implements Describabl */ @Nonnull public static List getComputerNames() { - final ArrayList names = new ArrayList(); + final ArrayList names = new ArrayList<>(); for (Computer c : Jenkins.getInstance().getComputers()) { if (!c.getName().isEmpty()) { names.add(c.getName()); @@ -435,14 +435,14 @@ public final class ComputerSet extends AbstractModelObject implements Describabl static { try { DescribableList> r - = new DescribableList>(Saveable.NOOP); + = new DescribableList<>(Saveable.NOOP); // load persisted monitors XmlFile xf = getConfigFile(); if(xf.exists()) { DescribableList> persisted = (DescribableList>) xf.read(); - List sanitized = new ArrayList(); + List sanitized = new ArrayList<>(); for (NodeMonitor nm : persisted) { try { nm.getDescriptor(); diff --git a/core/src/main/java/hudson/model/DependencyGraph.java b/core/src/main/java/hudson/model/DependencyGraph.java index 6c7469a302..bce830b4ee 100644 --- a/core/src/main/java/hudson/model/DependencyGraph.java +++ b/core/src/main/java/hudson/model/DependencyGraph.java @@ -70,8 +70,8 @@ import java.util.Stack; */ public class DependencyGraph implements Comparator { - private Map> forward = new HashMap>(); - private Map> backward = new HashMap>(); + private Map> forward = new HashMap<>(); + private Map> backward = new HashMap<>(); private transient Map, Object> computationalData; @@ -90,7 +90,7 @@ public class DependencyGraph implements Comparator { // Set full privileges while computing to avoid missing any projects the current user cannot see. SecurityContext saveCtx = ACL.impersonate(ACL.SYSTEM); try { - this.computationalData = new HashMap, Object>(); + this.computationalData = new HashMap<>(); for( AbstractProject p : Jenkins.getInstance().allItems(AbstractProject.class) ) p.buildDependencyGraph(this); @@ -113,7 +113,7 @@ public class DependencyGraph implements Comparator { DirectedGraph g = new DirectedGraph() { @Override protected Collection nodes() { - final Set nodes = new HashSet(); + final Set nodes = new HashSet<>(); nodes.addAll(forward.keySet()); nodes.addAll(backward.keySet()); return nodes; @@ -127,8 +127,8 @@ public class DependencyGraph implements Comparator { List> sccs = g.getStronglyConnectedComponents(); - final Map topoOrder = new HashMap(); - topologicallySorted = new ArrayList>(); + final Map topoOrder = new HashMap<>(); + topologicallySorted = new ArrayList<>(); int idx=0; for (SCC scc : sccs) { for (AbstractProject n : scc) { @@ -196,7 +196,7 @@ public class DependencyGraph implements Comparator { private List get(Map> map, AbstractProject src, boolean up) { List v = map.get(src); if(v==null) return Collections.emptyList(); - List result = new ArrayList(v.size()); + List result = new ArrayList<>(v.size()); for (DependencyGroup d : v) result.add(up ? d.getUpstreamProject() : d.getDownstreamProject()); return result; } @@ -284,8 +284,8 @@ public class DependencyGraph implements Comparator { * where the length is greater than 1. */ public boolean hasIndirectDependencies(AbstractProject src, AbstractProject dst) { - Set visited = new HashSet(); - Stack queue = new Stack(); + Set visited = new HashSet<>(); + Stack queue = new Stack<>(); queue.addAll(getDownstream(src)); queue.remove(dst); @@ -316,8 +316,8 @@ public class DependencyGraph implements Comparator { } private Set getTransitive(Map> direction, AbstractProject src, boolean up) { - Set visited = new HashSet(); - Stack queue = new Stack(); + Set visited = new HashSet<>(); + Stack queue = new Stack<>(); queue.add(src); @@ -336,7 +336,7 @@ public class DependencyGraph implements Comparator { private void add(Map> map, AbstractProject key, Dependency dep) { List set = map.get(key); if(set==null) { - set = new ArrayList(); + set = new ArrayList<>(); map.put(key,set); } for (DependencyGroup d : set) { @@ -457,7 +457,7 @@ public class DependencyGraph implements Comparator { * Collect multiple dependencies between the same two projects. */ private static class DependencyGroup { - private Set group = new LinkedHashSet(); + private Set group = new LinkedHashSet<>(); DependencyGroup(Dependency first) { this.upstream = first.getUpstreamProject(); diff --git a/core/src/main/java/hudson/model/Descriptor.java b/core/src/main/java/hudson/model/Descriptor.java index 3d941cd058..b00b60e4fb 100644 --- a/core/src/main/java/hudson/model/Descriptor.java +++ b/core/src/main/java/hudson/model/Descriptor.java @@ -137,7 +137,7 @@ public abstract class Descriptor> implements Saveable, */ public transient final Class clazz; - private transient final Map checkMethods = new ConcurrentHashMap(2); + private transient final Map checkMethods = new ConcurrentHashMap<>(2); /** * Lazily computed list of properties on {@link #clazz} and on the descriptor itself. @@ -233,7 +233,7 @@ public abstract class Descriptor> implements Saveable, * * @see #getHelpFile(String) */ - private transient final Map helpRedirect = new HashMap(2); + private transient final Map helpRedirect = new HashMap<>(2); private static class HelpRedirect { private final Class owner; @@ -416,7 +416,7 @@ public abstract class Descriptor> implements Saveable, throw new IllegalStateException(String.format("%s doesn't have the %s method for filling a drop-down list", getClass(), methodName)); // build query parameter line by figuring out what should be submitted - List depends = buildFillDependencies(method, new ArrayList()); + List depends = buildFillDependencies(method, new ArrayList<>()); if (!depends.isEmpty()) attributes.put("fillDependsOn",Util.join(depends," ")); @@ -506,7 +506,7 @@ public abstract class Descriptor> implements Saveable, * Given the class, list up its {@link PropertyType}s from its public fields/getters. */ private Map buildPropertyTypes(Class clazz) { - Map r = new HashMap(); + Map r = new HashMap<>(); for (Field f : clazz.getFields()) r.put(f.getName(),new PropertyType(f)); @@ -855,7 +855,7 @@ public abstract class Descriptor> implements Saveable, } protected List getPossibleViewNames(String baseName) { - List names = new ArrayList(); + List names = new ArrayList<>(); for (Facet f : WebApp.get(Jenkins.getInstance().servletContext).facets) { if (f instanceof JellyCompatibleFacet) { JellyCompatibleFacet jcf = (JellyCompatibleFacet) f; @@ -981,12 +981,12 @@ public abstract class Descriptor> implements Saveable, } public static List toList( T... values ) { - return new ArrayList(Arrays.asList(values)); + return new ArrayList<>(Arrays.asList(values)); } public static > Map,T> toMap(Iterable describables) { - Map,T> m = new LinkedHashMap,T>(); + Map,T> m = new LinkedHashMap<>(); for (T d : describables) { Descriptor descriptor; try { @@ -1025,7 +1025,7 @@ public abstract class Descriptor> implements Saveable, List newInstancesFromHeteroList(StaplerRequest req, Object formData, Collection> descriptors) throws FormException { - List items = new ArrayList(); + List items = new ArrayList<>(); if (formData!=null) { for (Object o : JSONArray.fromObject(formData)) { diff --git a/core/src/main/java/hudson/model/DescriptorVisibilityFilter.java b/core/src/main/java/hudson/model/DescriptorVisibilityFilter.java index e449569500..ef099a64dc 100644 --- a/core/src/main/java/hudson/model/DescriptorVisibilityFilter.java +++ b/core/src/main/java/hudson/model/DescriptorVisibilityFilter.java @@ -65,7 +65,7 @@ public abstract class DescriptorVisibilityFilter implements ExtensionPoint { public static List apply(Object context, Iterable source) { ExtensionList filters = all(); - List r = new ArrayList(); + List r = new ArrayList<>(); Class contextClass = context == null ? null : context.getClass(); if (source == null) { @@ -110,7 +110,7 @@ public abstract class DescriptorVisibilityFilter implements ExtensionPoint { public static List applyType(Class contextClass, Iterable source) { ExtensionList filters = all(); - List r = new ArrayList(); + List r = new ArrayList<>(); OUTER: for (T d : source) { diff --git a/core/src/main/java/hudson/model/DownloadService.java b/core/src/main/java/hudson/model/DownloadService.java index 125d58a394..1b0c4088fb 100644 --- a/core/src/main/java/hudson/model/DownloadService.java +++ b/core/src/main/java/hudson/model/DownloadService.java @@ -309,7 +309,7 @@ public class DownloadService extends PageDecorator { * URLs to download from. */ public List getUrls() { - List updateSites = new ArrayList(); + List updateSites = new ArrayList<>(); for (UpdateSite site : Jenkins.getActiveInstance().getUpdateCenter().getSiteList()) { String siteUrl = site.getUrl(); int baseUrlEnd = siteUrl.indexOf("update-center.json"); diff --git a/core/src/main/java/hudson/model/Executor.java b/core/src/main/java/hudson/model/Executor.java index 5f90ad1bfc..b466779e1a 100644 --- a/core/src/main/java/hudson/model/Executor.java +++ b/core/src/main/java/hudson/model/Executor.java @@ -139,7 +139,7 @@ public class Executor extends Thread implements ModelObject { * Cause of interruption. Access needs to be synchronized. */ @GuardedBy("lock") - private final List causes = new Vector(); + private final List causes = new Vector<>(); public Executor(@Nonnull Computer owner, int n) { super("Executor #"+n+" for "+owner.getDisplayName()); @@ -271,7 +271,7 @@ public class Executor extends Thread implements ModelObject { lock.writeLock().lock(); try { if (causes.isEmpty()) return; - r = new ArrayList(causes); + r = new ArrayList<>(causes); causes.clear(); } finally { lock.writeLock().unlock(); @@ -961,7 +961,7 @@ public class Executor extends Thread implements ModelObject { * Mechanism to allow threads (in particular the channel request handling threads) to * run on behalf of {@link Executor}. */ - private static final ThreadLocal IMPERSONATION = new ThreadLocal(); + private static final ThreadLocal IMPERSONATION = new ThreadLocal<>(); private static final Logger LOGGER = Logger.getLogger(Executor.class.getName()); } diff --git a/core/src/main/java/hudson/model/Fingerprint.java b/core/src/main/java/hudson/model/Fingerprint.java index cb33903bd1..2a06ca74cf 100644 --- a/core/src/main/java/hudson/model/Fingerprint.java +++ b/core/src/main/java/hudson/model/Fingerprint.java @@ -349,7 +349,7 @@ public class Fingerprint implements ModelObject, Saveable { private final List ranges; public RangeSet() { - this(new ArrayList()); + this(new ArrayList<>()); } private RangeSet(List data) { @@ -417,7 +417,7 @@ public class Fingerprint implements ModelObject, Saveable { */ @Exported public synchronized List getRanges() { - return new ArrayList(ranges); + return new ArrayList<>(ranges); } /** @@ -515,7 +515,7 @@ public class Fingerprint implements ModelObject, Saveable { * @return true if this range set was modified as a result. */ public synchronized boolean retainAll(RangeSet that) { - List intersection = new ArrayList(); + List intersection = new ArrayList<>(); int lhs=0,rhs=0; while(lhs sub = new ArrayList(); + List sub = new ArrayList<>(); int lhs=0,rhs=0; while(lhs usages = new Hashtable(); + private Hashtable usages = new Hashtable<>(); - PersistedList facets = new PersistedList(this); + PersistedList facets = new PersistedList<>(this); /** * Lazily computed immutable {@link FingerprintFacet}s created from {@link TransientFingerprintFacetFactory}. @@ -967,7 +967,7 @@ public class Fingerprint implements ModelObject, Saveable { * Gets the sorted list of job names where this jar is used. */ public @Nonnull List getJobs() { - List r = new ArrayList(); + List r = new ArrayList<>(); r.addAll(usages.keySet()); Collections.sort(r); return r; @@ -993,7 +993,7 @@ public class Fingerprint implements ModelObject, Saveable { // this is for remote API @Exported(name="usage") public @Nonnull List _getUsages() { - List r = new ArrayList(); + List r = new ArrayList<>(); final Jenkins instance = Jenkins.getInstance(); for (Entry e : usages.entrySet()) { final String itemName = e.getKey(); @@ -1032,7 +1032,7 @@ public class Fingerprint implements ModelObject, Saveable { // JENKINS-49588 protected Object readResolve() { if (usages == null) { - usages = new Hashtable(); + usages = new Hashtable<>(); } return this; } @@ -1087,7 +1087,7 @@ public class Fingerprint implements ModelObject, Saveable { public synchronized boolean trim() throws IOException { boolean modified = false; - for (Entry e : new Hashtable(usages).entrySet()) {// copy because we mutate + for (Entry e : new Hashtable<>(usages).entrySet()) {// copy because we mutate Job j = Jenkins.getInstance().getItemByFullName(e.getKey(),Job.class); if(j==null) {// no such job any more. recycle the record modified = true; @@ -1158,7 +1158,7 @@ public class Fingerprint implements ModelObject, Saveable { */ public @Nonnull Collection getFacets() { if (transientFacets==null) { - List transientFacets = new ArrayList(); + List transientFacets = new ArrayList<>(); for (TransientFingerprintFacetFactory fff : TransientFingerprintFacetFactory.all()) { fff.createFor(this,transientFacets); } @@ -1199,7 +1199,7 @@ public class Fingerprint implements ModelObject, Saveable { * @return Sorted list of {@link FingerprintFacet}s */ public @Nonnull Collection getSortedFacets() { - List r = new ArrayList(getFacets()); + List r = new ArrayList<>(getFacets()); Collections.sort(r,new Comparator() { public int compare(FingerprintFacet o1, FingerprintFacet o2) { long a = o1.getTimestamp(); @@ -1230,7 +1230,7 @@ public class Fingerprint implements ModelObject, Saveable { * Returns the actions contributed from {@link #getFacets()} */ public @Nonnull List getActions() { - List r = new ArrayList(); + List r = new ArrayList<>(); for (FingerprintFacet ff : getFacets()) ff.createActions(r); return Collections.unmodifiableList(r); @@ -1381,7 +1381,7 @@ public class Fingerprint implements ModelObject, Saveable { if(logger.isLoggable(Level.FINE)) logger.fine("Loading fingerprint "+file+" took "+(System.currentTimeMillis()-start)+"ms"); if (f.facets==null) - f.facets = new PersistedList(f); + f.facets = new PersistedList<>(f); for (FingerprintFacet facet : f.facets) facet._setOwner(f); return f; @@ -1420,7 +1420,7 @@ public class Fingerprint implements ModelObject, Saveable { } @Override public String toString() { - return "Fingerprint[original=" + original + ",hash=" + getHashString() + ",fileName=" + fileName + ",timestamp=" + DATE_CONVERTER.toString(timestamp) + ",usages=" + ((usages == null) ? "null" : new TreeMap(getUsages())) + ",facets=" + facets + "]"; + return "Fingerprint[original=" + original + ",hash=" + getHashString() + ",fileName=" + fileName + ",timestamp=" + DATE_CONVERTER.toString(timestamp) + ",usages=" + ((usages == null) ? "null" : new TreeMap<>(getUsages())) + ",facets=" + facets + "]"; } /** diff --git a/core/src/main/java/hudson/model/HealthReport.java b/core/src/main/java/hudson/model/HealthReport.java index ddcc1f9dec..7b67538272 100644 --- a/core/src/main/java/hudson/model/HealthReport.java +++ b/core/src/main/java/hudson/model/HealthReport.java @@ -62,7 +62,7 @@ public class HealthReport implements Serializable, Comparable { private static final String HEALTH_0_TO_20_IMG = "health-00to19.png"; private static final String HEALTH_UNKNOWN_IMG = "empty.png"; - private static final Map iconIMGToClassMap = new HashMap(); + private static final Map iconIMGToClassMap = new HashMap<>(); static { iconIMGToClassMap.put(HEALTH_OVER_80_IMG, HEALTH_OVER_80); iconIMGToClassMap.put(HEALTH_61_TO_80_IMG, HEALTH_61_TO_80); diff --git a/core/src/main/java/hudson/model/ItemGroupMixIn.java b/core/src/main/java/hudson/model/ItemGroupMixIn.java index 195d4d8c0c..3fb988afa3 100644 --- a/core/src/main/java/hudson/model/ItemGroupMixIn.java +++ b/core/src/main/java/hudson/model/ItemGroupMixIn.java @@ -107,7 +107,7 @@ public abstract class ItemGroupMixIn { return child.isDirectory(); } }); - CopyOnWriteMap.Tree configurations = new CopyOnWriteMap.Tree(); + CopyOnWriteMap.Tree configurations = new CopyOnWriteMap.Tree<>(); for (File subdir : subdirs) { try { // Try to retain the identity of an existing child object if we can. diff --git a/core/src/main/java/hudson/model/Items.java b/core/src/main/java/hudson/model/Items.java index d0a26238a3..12fce1434e 100644 --- a/core/src/main/java/hudson/model/Items.java +++ b/core/src/main/java/hudson/model/Items.java @@ -69,7 +69,7 @@ public class Items { * Use {@link #all()} for read access and {@link Extension} for registration. */ @Deprecated - public static final List LIST = (List)new DescriptorList(TopLevelItem.class); + public static final List LIST = (List) new DescriptorList<>(TopLevelItem.class); /** * Used to behave differently when loading posted configuration as opposed to persisted configuration. @@ -173,7 +173,7 @@ public class Items { * @since 1.607 */ public static List all(Authentication a, ItemGroup c) { - List result = new ArrayList(); + List result = new ArrayList<>(); ACL acl; if (c instanceof AccessControlled) { acl = ((AccessControlled) c).getACL(); @@ -224,7 +224,7 @@ public class Items { public static List fromNameList(ItemGroup context, @Nonnull String list, @Nonnull Class type) { final Jenkins jenkins = Jenkins.getInstance(); - List r = new ArrayList(); + List r = new ArrayList<>(); if (jenkins == null) { return r; } @@ -250,7 +250,7 @@ public class Items { String[] c = context.getFullName().split("/"); String[] p = path.split("/"); - Stack name = new Stack(); + Stack name = new Stack<>(); for (int i=0; i newValue = new ArrayList(); + List newValue = new ArrayList<>(); while(tokens.hasMoreTokens()) { String relativeName = tokens.nextToken().trim(); String canonicalName = getCanonicalName(context, relativeName); @@ -400,12 +400,12 @@ public class Items { * @since 1.512 */ public static List getAllItems(final ItemGroup root, Class type) { - List r = new ArrayList(); + List r = new ArrayList<>(); getAllItems(root, type, r); return r; } private static void getAllItems(final ItemGroup root, Class type, List r) { - List items = new ArrayList(((ItemGroup) root).getItems()); + List items = new ArrayList<>(((ItemGroup) root).getItems()); // because we add items depth first, we can use the quicker BY_NAME comparison Collections.sort(items, BY_NAME); for (Item i : items) { diff --git a/core/src/main/java/hudson/model/Job.java b/core/src/main/java/hudson/model/Job.java index 047e90a85f..820c85e8ae 100644 --- a/core/src/main/java/hudson/model/Job.java +++ b/core/src/main/java/hudson/model/Job.java @@ -175,7 +175,7 @@ public abstract class Job, RunT extends Run> properties = new CopyOnWriteList>(); + protected CopyOnWriteList> properties = new CopyOnWriteList<>(); @Restricted(NoExternalUse.class) public transient RunIdMigrator runIdMigrator; @@ -232,7 +232,7 @@ public abstract class Job, RunT extends Run>(); + properties = new CopyOnWriteList<>(); for (JobProperty p : properties) p.setOwner(this); @@ -595,14 +595,14 @@ public abstract class Job, RunT extends Run getOverrides() { - List r = new ArrayList(); + List r = new ArrayList<>(); for (JobProperty p : properties) r.addAll(p.getJobOverrides()); return r; } public List getWidgets() { - ArrayList r = new ArrayList(); + ArrayList r = new ArrayList<>(); r.add(createHistoryWidget()); return r; } @@ -741,7 +741,7 @@ public abstract class Job, RunT extends Run getBuilds(RangeSet rs) { - List builds = new LinkedList(); + List builds = new LinkedList<>(); for (Range r : rs.getRanges()) { for (RunT b = getNearestBuild(r.start); b!=null && b.getNumber(), RunT extends Run getLastBuildsOverThreshold(int numberOfBuilds, Result threshold) { - List result = new ArrayList(numberOfBuilds); + List result = new ArrayList<>(numberOfBuilds); RunT r = getLastBuild(); while (r != null && result.size() < numberOfBuilds) { @@ -1021,7 +1021,7 @@ public abstract class Job, RunT extends Run getEstimatedDurationCandidates() { - List candidates = new ArrayList(3); + List candidates = new ArrayList<>(3); RunT lastSuccessful = getLastSuccessfulBuild(); int lastSuccessfulNumber = -1; if (lastSuccessful != null) { @@ -1031,7 +1031,7 @@ public abstract class Job, RunT extends Run fallbackCandidates = new ArrayList(3); + List fallbackCandidates = new ArrayList<>(3); while (r != null && candidates.size() < 3 && i < 6) { if (!r.isBuilding() && r.getResult() != null && r.getNumber() != lastSuccessfulNumber) { Result result = r.getResult(); @@ -1103,7 +1103,7 @@ public abstract class Job, RunT extends Run entries = new ArrayList(); + List entries = new ArrayList<>(); String scmDisplayName = ""; if (this instanceof SCMTriggerItem) { SCMTriggerItem scmItem = (SCMTriggerItem) this; @@ -1199,7 +1199,7 @@ public abstract class Job, RunT extends Run getBuildHealthReports() { - List reports = new ArrayList(); + List reports = new ArrayList<>(); RunT lastBuild = getLastBuild(); if (lastBuild != null && lastBuild.isBuilding()) { @@ -1241,7 +1241,7 @@ public abstract class Job, RunT extends Run(reports); + cachedBuildHealthReports = new ArrayList<>(reports); } return reports; @@ -1332,7 +1332,7 @@ public abstract class Job, RunT extends Run, JobPropertyDescriptor> t = new DescribableList, JobPropertyDescriptor>(NOOP,getAllProperties()); + DescribableList, JobPropertyDescriptor> t = new DescribableList<>(NOOP, getAllProperties()); JSONObject jsonProperties = json.optJSONObject("properties"); if (jsonProperties != null) { t.rebuild(req,jsonProperties,JobPropertyDescriptor.getPropertyDescriptors(Job.this.getClass())); @@ -1469,7 +1469,7 @@ public abstract class Job, RunT extends Run data = new DataSetBuilder(); + DataSetBuilder data = new DataSetBuilder<>(); for (Run r : getNewBuilds()) { if (r.isBuilding()) continue; diff --git a/core/src/main/java/hudson/model/JobPropertyDescriptor.java b/core/src/main/java/hudson/model/JobPropertyDescriptor.java index 6955dff091..1a90cedf85 100644 --- a/core/src/main/java/hudson/model/JobPropertyDescriptor.java +++ b/core/src/main/java/hudson/model/JobPropertyDescriptor.java @@ -99,7 +99,7 @@ public abstract class JobPropertyDescriptor extends Descriptor> { * Gets the {@link JobPropertyDescriptor}s applicable for a given job type. */ public static List getPropertyDescriptors(Class clazz) { - List r = new ArrayList(); + List r = new ArrayList<>(); for (JobPropertyDescriptor p : all()) if(p.isApplicable(clazz)) r.add(p); diff --git a/core/src/main/java/hudson/model/Label.java b/core/src/main/java/hudson/model/Label.java index 049d0f89fc..7e9736078d 100644 --- a/core/src/main/java/hudson/model/Label.java +++ b/core/src/main/java/hudson/model/Label.java @@ -241,7 +241,7 @@ public abstract class Label extends Actionable implements Comparable