From f83a207360011e575046becb056f5f84104656b2 Mon Sep 17 00:00:00 2001 From: Arnaud Roques Date: Fri, 14 May 2021 10:42:57 +0200 Subject: [PATCH] Import version 1.2021.6 --- pom.xml | 2 +- src/gen/annotation/Comment.java | 18 + src/gen/annotation/Difficult.java | 18 + src/gen/annotation/Doc.java | 18 + src/gen/annotation/HasND_Rank.java | 18 + src/gen/annotation/Original.java | 18 + src/gen/annotation/Reviewed.java | 18 + src/gen/annotation/Todo.java | 18 + src/gen/annotation/Untraced.java | 18 + src/gen/annotation/Unused.java | 18 + src/net/sourceforge/plantuml/BackSlash.java | 2 +- src/net/sourceforge/plantuml/BlockUml.java | 10 +- .../sourceforge/plantuml/BlockUmlBuilder.java | 6 +- src/net/sourceforge/plantuml/CMapData.java | 2 +- src/net/sourceforge/plantuml/DirWatcher.java | 2 +- .../plantuml/EmptyImageBuilder.java | 2 +- .../plantuml/FileFormatOption.java | 3 +- src/net/sourceforge/plantuml/FileGroup.java | 2 +- src/net/sourceforge/plantuml/FileSystem.java | 2 +- .../plantuml/LineLocationImpl.java | 3 +- src/net/sourceforge/plantuml/Log.java | 2 +- .../sourceforge/plantuml/NewpagedDiagram.java | 2 +- src/net/sourceforge/plantuml/Option.java | 6 +- src/net/sourceforge/plantuml/OptionPrint.java | 8 +- .../sourceforge/plantuml/PSystemBuilder.java | 4 +- .../sourceforge/plantuml/PSystemUtils.java | 8 +- .../plantuml/PlainStringsDiagram.java | 2 +- src/net/sourceforge/plantuml/Run.java | 2 +- src/net/sourceforge/plantuml/SkinParam.java | 12 +- .../plantuml/SourceFileReaderAbstract.java | 2 +- .../sourceforge/plantuml/StringLocated.java | 3 +- src/net/sourceforge/plantuml/StringUtils.java | 6 +- .../sourceforge/plantuml/TitledDiagram.java | 15 +- src/net/sourceforge/plantuml/UseStyle.java | 2 +- .../acearth/PSystemXearthFactory.java | 2 +- .../activitydiagram/ActivityDiagram.java | 10 +- .../ActivityDiagramFactory.java | 2 +- .../ActivityDiagramFactory3.java | 2 +- .../activitydiagram3/InstructionFork.java | 6 +- .../activitydiagram3/InstructionIf.java | 6 +- .../activitydiagram3/InstructionList.java | 6 +- .../activitydiagram3/InstructionRepeat.java | 2 +- .../activitydiagram3/InstructionSplit.java | 4 +- .../activitydiagram3/InstructionSwitch.java | 6 +- .../plantuml/activitydiagram3/WithNote.java | 2 +- .../ftile/CollisionDetector.java | 4 +- .../ftile/FtileAssemblySimple.java | 4 +- .../ftile/FtileDecorateWelding.java | 2 +- .../activitydiagram3/ftile/FtileEmpty.java | 2 +- .../ftile/FtileWithConnection.java | 4 +- .../activitydiagram3/ftile/Snake.java | 4 +- .../activitydiagram3/ftile/Swimlanes.java | 6 +- .../activitydiagram3/ftile/WormMutation.java | 2 +- .../plantuml/activitydiagram3/ftile/Zad.java | 2 +- .../AbstractParallelFtilesBuilder.java | 4 +- .../vcompact/FtileFactoryDelegatorSwitch.java | 26 +- .../ftile/vcompact/FtileForkInner.java | 4 +- .../vcompact/FtileForkInnerOverlapped.java | 4 +- .../ftile/vcompact/FtileIfAndStop.java | 4 +- .../ftile/vcompact/FtileIfDown.java | 4 +- .../ftile/vcompact/FtileIfLongHorizontal.java | 24 +- .../ftile/vcompact/FtileIfLongVertical.java | 16 +- .../ftile/vcompact/FtileRepeat.java | 4 +- .../ftile/vcompact/FtileSplit1.java | 4 +- .../ftile/vcompact/FtileSwitch.java | 12 +- .../ftile/vcompact/FtileWhile.java | 4 +- .../ftile/vcompact/FtileWithNoteOpale.java | 2 +- .../ftile/vcompact/ParallelBuilderFork.java | 6 +- .../ftile/vcompact/ParallelBuilderMerge.java | 4 +- .../ftile/vcompact/ParallelBuilderSplit.java | 4 +- .../ftile/vcompact/VCompactFactory.java | 4 +- .../ftile/vcompact/cond/FtileIfNude.java | 2 +- .../ftile/vcompact/cond/FtileIfWithLinks.java | 4 +- .../ftile/vcompact/cond/FtileSwitchNude.java | 4 +- .../cond/FtileSwitchWithDiamonds.java | 12 +- .../cond/FtileSwitchWithManyLinks.java | 2 +- .../vcompact/cond/FtileSwitchWithOneLink.java | 16 +- .../sourceforge/plantuml/anim/Animation.java | 2 +- .../plantuml/anim/AnimationDecoder.java | 8 +- .../plantuml/anim/AnimationScript.java | 29 +- .../plantuml/ant/CheckZipTask.java | 6 +- .../plantuml/ant/PlantUmlTask.java | 4 +- .../plantuml/asciiart/BasicCharAreaImpl.java | 2 +- src/net/sourceforge/plantuml/board/BNode.java | 2 +- .../plantuml/board/BoardDiagram.java | 2 +- .../plantuml/board/BoardDiagramFactory.java | 2 +- .../sourceforge/plantuml/bpm/BpmDiagram.java | 4 +- .../plantuml/bpm/BpmDiagramFactory.java | 2 +- src/net/sourceforge/plantuml/bpm/Cell.java | 2 +- .../sourceforge/plantuml/bpm/ChainImpl.java | 8 +- .../sourceforge/plantuml/bpm/FootPrint.java | 2 +- src/net/sourceforge/plantuml/bpm/Grid.java | 14 +- .../sourceforge/plantuml/bpm/GridArray.java | 2 +- .../plantuml/braille/BrailleCharFactory.java | 2 +- .../plantuml/braille/BrailleGrid.java | 2 +- .../braille/DriverPolygonBraille.java | 2 +- .../plantuml/brotli/BitReader.java | 2 + .../plantuml/brotli/BrotliInputStream.java | 2 + .../brotli/BrotliRuntimeException.java | 2 + .../sourceforge/plantuml/brotli/Context.java | 2 + .../sourceforge/plantuml/brotli/Decode.java | 2 + .../plantuml/brotli/Dictionary.java | 2 + .../plantuml/brotli/DictionaryData.java | 2 + .../sourceforge/plantuml/brotli/Huffman.java | 2 + .../sourceforge/plantuml/brotli/State.java | 2 + .../plantuml/brotli/Transform.java | 2 + .../sourceforge/plantuml/brotli/Utils.java | 2 + .../classdiagram/AbstractEntityDiagram.java | 2 +- .../plantuml/classdiagram/ClassDiagram.java | 6 +- .../classdiagram/ClassDiagramFactory.java | 2 +- .../plantuml/classdiagram/FullLayout.java | 2 +- .../plantuml/classdiagram/RowLayout.java | 2 +- .../plantuml/code/CompressionZlib.java | 9 +- src/net/sourceforge/plantuml/code/Tokens.java | 4 +- .../code/deflate/OutputStreamProtected.java | 2 +- .../plantuml/command/BlocLines.java | 38 +- .../command/CommandExecutionResult.java | 2 +- .../command/PSystemCommandFactory.java | 2 +- .../plantuml/command/SkinLoader.java | 2 +- .../plantuml/command/regex/RegexComposed.java | 2 +- .../plantuml/command/regex/RegexConcat.java | 2 +- .../plantuml/command/regex/RegexLeaf.java | 2 +- .../command/regex/RegexPartialMatch.java | 2 +- .../compositediagram/CompositeDiagram.java | 4 +- .../CompositeDiagramFactory.java | 2 +- .../sourceforge/plantuml/core/UmlSource.java | 2 +- .../plantuml/creole/CreoleContext.java | 2 +- .../sourceforge/plantuml/creole/Fission.java | 4 +- .../sourceforge/plantuml/creole/Sheet.java | 2 +- .../plantuml/creole/SheetBlock1.java | 2 +- .../plantuml/creole/atom/AtomTable.java | 6 +- .../plantuml/creole/atom/AtomTree.java | 2 +- .../plantuml/creole/atom/AtomWithMargin.java | 2 +- .../plantuml/creole/legacy/AtomText.java | 4 +- .../plantuml/creole/legacy/AtomTextUtils.java | 4 +- .../plantuml/creole/legacy/PSystemCreole.java | 2 +- .../plantuml/creole/legacy/StripeCode.java | 2 +- .../plantuml/creole/legacy/StripeSimple.java | 4 +- .../plantuml/creole/legacy/StripeTable.java | 4 +- .../creole/rosetta/ReaderAbstractWiki.java | 2 +- .../plantuml/creole/rosetta/ReaderCreole.java | 2 +- .../creole/rosetta/ReaderDokuwiki.java | 6 +- .../plantuml/creole/rosetta/Rosetta.java | 6 +- .../plantuml/creole/rosetta/StripeRow.java | 2 +- .../plantuml/creole/rosetta/WriterWiki.java | 2 +- .../cucadiagram/BodierLikeClassOrObject.java | 14 +- .../plantuml/cucadiagram/BodierMap.java | 2 +- .../plantuml/cucadiagram/BodierSimple.java | 2 +- .../plantuml/cucadiagram/Body3.java | 2 +- .../plantuml/cucadiagram/BodyEnhanced1.java | 6 +- .../plantuml/cucadiagram/BodyEnhanced2.java | 2 +- .../plantuml/cucadiagram/CucaDiagram.java | 34 +- .../plantuml/cucadiagram/Display.java | 26 +- .../plantuml/cucadiagram/Election.java | 6 +- .../plantuml/cucadiagram/GroupRoot.java | 4 +- .../plantuml/cucadiagram/Ident.java | 14 +- .../plantuml/cucadiagram/MagmaList.java | 2 +- .../plantuml/cucadiagram/Stereotype.java | 6 +- .../plantuml/cucadiagram/SuperGroup.java | 2 +- .../plantuml/cucadiagram/TextBlockMap.java | 2 +- .../plantuml/cucadiagram/WithLinkType.java | 2 +- .../dot/CucaDiagramSimplifierActivity.java | 2 +- .../dot/CucaDiagramSimplifierState.java | 8 +- .../cucadiagram/dot/CucaDiagramTxtMaker.java | 2 +- .../plantuml/cucadiagram/dot/DotData.java | 6 +- .../cucadiagram/dot/GraphvizUtils.java | 2 +- .../cucadiagram/dot/GraphvizWindowsOld.java | 2 +- .../cucadiagram/dot/Neighborhood.java | 4 +- .../cucadiagram/entity/EntityFactory.java | 18 +- .../cucadiagram/entity/EntityImpl.java | 27 +- .../plantuml/dedication/Dedications.java | 2 +- .../plantuml/dedication/QBlocks.java | 2 +- .../plantuml/dedication/RBlocks.java | 2 +- .../definition/PSystemDefinition.java | 2 +- .../descdiagram/DescriptionDiagram.java | 4 +- .../DescriptionDiagramFactory.java | 2 +- .../plantuml/ditaa/PSystemDitaa.java | 2 +- .../plantuml/donors/PSystemDonors.java | 4 +- .../donors/PSystemSkinparameterList.java | 4 +- .../plantuml/eggs/PSystemColors.java | 2 +- .../plantuml/eggs/PSystemWelcome.java | 2 +- .../plantuml/elk/CucaDiagramFileMakerElk.java | 4 +- .../plantuml/elk/proxy/graph/ElkEdge.java | 4 +- .../elk/proxy/graph/ElkEdgeSection.java | 2 +- .../plantuml/elk/proxy/graph/ElkNode.java | 2 +- .../plantuml/eps/PostScriptData.java | 2 +- .../plantuml/error/PSystemError.java | 6 +- .../plantuml/error/PSystemErrorUtils.java | 6 +- .../plantuml/evalex/AbstractFunction.java | 95 - .../plantuml/evalex/AbstractLazyFunction.java | 96 - .../plantuml/evalex/AbstractLazyOperator.java | 102 - .../plantuml/evalex/AbstractOperator.java | 78 - .../evalex/AbstractUnaryOperator.java | 85 - .../plantuml/evalex/Expression.java | 1883 ----------------- .../sourceforge/plantuml/evalex/Function.java | 47 - .../plantuml/evalex/LazyFunction.java | 85 - .../plantuml/evalex/LazyOperator.java | 75 - .../sourceforge/plantuml/evalex/NString.java | 61 - .../sourceforge/plantuml/evalex/Operator.java | 44 - .../sourceforge/plantuml/evalex/Snipset1.java | 68 - .../sourceforge/plantuml/evalex/Snipset2.java | 50 - .../sourceforge/plantuml/evalex/Snipset3.java | 49 - .../flowdiagram/FlowDiagramFactory.java | 2 +- .../plantuml/ftp/FtpConnexion.java | 4 +- .../sourceforge/plantuml/fun/IconLoader.java | 2 +- .../plantuml/geom/AbstractFigure.java | 315 --- .../plantuml/geom/AbstractLineSegment.java | 281 --- .../plantuml/geom/AbstractPolyline.java | 200 -- src/net/sourceforge/plantuml/geom/Box.java | 240 --- .../sourceforge/plantuml/geom/ClosedArea.java | 295 --- .../plantuml/geom/CollectionUtils.java | 86 - .../sourceforge/plantuml/geom/Dijkstra.java | 130 -- .../plantuml/geom/InflateData.java | 67 - .../plantuml/geom/InflationTransform.java | 211 -- .../sourceforge/plantuml/geom/Kingdom.java | 123 -- .../plantuml/geom/LineSegmentDouble.java | 121 -- .../plantuml/geom/LineSegmentInt.java | 267 --- .../plantuml/geom/Neighborhood.java | 119 -- .../plantuml/geom/Orientation.java | 42 - .../sourceforge/plantuml/geom/Point2DInt.java | 122 -- .../sourceforge/plantuml/geom/Pointable.java | 40 - .../sourceforge/plantuml/geom/Polyline.java | 50 - .../plantuml/geom/PolylineBreakeable.java | 154 -- .../plantuml/geom/PolylineImpl.java | 100 - .../plantuml/geom/Singularity.java | 154 -- .../sourceforge/plantuml/geom/SpiderWeb.java | 183 -- .../sourceforge/plantuml/geom/XMoveable.java | 42 - .../plantuml/geom/kinetic/Frame.java | 118 -- .../plantuml/geom/kinetic/MoveObserver.java | 42 - .../plantuml/geom/kinetic/Path.java | 162 -- .../plantuml/geom/kinetic/Point2DCharge.java | 105 - .../plantuml/geom/kinetic/Quadrant.java | 82 - .../plantuml/geom/kinetic/QuadrantMapper.java | 106 - .../plantuml/geom/kinetic/SegmentCutter.java | 69 - .../plantuml/geom/kinetic/VectorForce.java | 102 - .../plantuml/geom/kinetic/World.java | 173 -- .../sourceforge/plantuml/gitlog/Commit.java | 4 +- .../sourceforge/plantuml/gitlog/GNode.java | 6 +- .../plantuml/gitlog/GNodeBuilder.java | 2 +- .../sourceforge/plantuml/gitlog/GitCurve.java | 2 +- .../plantuml/gitlog/GitTextArea.java | 4 +- .../plantuml/gitlog/SmetanaForGit.java | 2 +- src/net/sourceforge/plantuml/golem/Path.java | 2 +- .../plantuml/golem/TilesField.java | 4 +- src/net/sourceforge/plantuml/graph/ALink.java | 48 - .../sourceforge/plantuml/graph/ALinkImpl.java | 73 - src/net/sourceforge/plantuml/graph/ANode.java | 48 - .../sourceforge/plantuml/graph/ANodeImpl.java | 78 - .../plantuml/graph/AbstractEntityImage.java | 112 - src/net/sourceforge/plantuml/graph/Board.java | 265 --- .../plantuml/graph/BoardCollection.java | 128 -- .../plantuml/graph/BoardExplorer.java | 86 - .../plantuml/graph/CostComputer.java | 42 - .../plantuml/graph/ElectricCharge.java | 70 - .../plantuml/graph/ElectricWord.java | 68 - .../graph/EntityImageActivityBar.java | 66 - .../graph/EntityImageActivityBranch.java | 73 - .../graph/EntityImageActivityCircle.java | 70 - .../graph/EntityImageCircleInterface.java | 92 - .../sourceforge/plantuml/graph/Galaxy4.java | 94 - .../plantuml/graph/GeneralPathFactory.java | 158 -- .../sourceforge/plantuml/graph/Graph1.java | 81 - src/net/sourceforge/plantuml/graph/Heap.java | 242 --- .../plantuml/graph/KenavoCostComputer.java | 78 - .../plantuml/graph/LenghtLinkComparator.java | 61 - .../plantuml/graph/LinkString.java | 66 - .../plantuml/graph/MethodsOrFieldsArea.java | 96 - src/net/sourceforge/plantuml/graph/Move.java | 78 - src/net/sourceforge/plantuml/graph/Oven.java | 95 - .../plantuml/graph/SimpleCostComputer.java | 60 - .../plantuml/graph/SortedCollection.java | 46 - .../graph/SortedCollectionArrayList.java | 89 - .../graph/SortedCollectionLinked.java | 89 - src/net/sourceforge/plantuml/graph/Zoda1.java | 168 -- src/net/sourceforge/plantuml/graph/Zoda2.java | 126 -- .../plantuml/graph2/CubicCurveFactory.java | 97 - .../sourceforge/plantuml/graph2/Dijkstra.java | 154 -- .../plantuml/graph2/GeomUtils.java | 157 -- .../plantuml/graph2/IInflationTransform.java | 57 - .../graph2/IdentityInflationTransform.java | 70 - .../plantuml/graph2/InflateData2.java | 126 -- .../plantuml/graph2/InflationTransform2.java | 240 --- .../plantuml/graph2/MagicPointsFactory.java | 75 - .../plantuml/graph2/MagicPointsFactory2.java | 73 - .../sourceforge/plantuml/graph2/Measurer.java | 40 - .../sourceforge/plantuml/graph2/MyCurve.java | 173 -- .../plantuml/graph2/Neighborhood2.java | 190 -- src/net/sourceforge/plantuml/graph2/Plan.java | 250 --- .../plantuml/graph2/Polyline2.java | 111 - .../plantuml/graph2/RectanglesCollection.java | 200 -- .../plantuml/graph2/Singularity2.java | 164 -- .../plantuml/graph2/SortedList.java | 46 - .../plantuml/graph2/SortedListImpl.java | 129 -- .../plantuml/graphic/QuoteUtils.java | 2 +- .../sourceforge/plantuml/graphic/Rainbow.java | 2 +- .../plantuml/graphic/SingleLine.java | 2 +- .../plantuml/graphic/Splitter.java | 6 +- .../plantuml/graphic/TextBlockHorizontal.java | 2 +- .../plantuml/graphic/TextBlockRaw.java | 2 +- .../plantuml/graphic/TextBlockSimple.java | 2 +- .../plantuml/graphic/TextBlockVertical2.java | 2 +- .../plantuml/graphic/USymbolCloud.java | 2 +- .../plantuml/graphic/UnusedSpace.java | 2 +- .../plantuml/graphic/color/Colors.java | 3 +- .../sourceforge/plantuml/hector/Box2D.java | 81 - .../hector/CucaDiagramFileMakerHectorB1.java | 167 -- .../plantuml/hector/GrowingTree.java | 175 -- .../plantuml/hector/HectorPath.java | 71 - src/net/sourceforge/plantuml/hector/Pin.java | 78 - .../plantuml/hector/PinFactory.java | 68 - .../sourceforge/plantuml/hector/PinLink.java | 78 - .../hector/PinLinksContinuousSet.java | 104 - .../sourceforge/plantuml/hector/Skeleton.java | 85 - .../plantuml/hector/SkeletonBuilder.java | 85 - .../hector/SkeletonConfiguration.java | 256 --- .../SkeletonConfigurationComparator.java | 60 - .../SkeletonConfigurationEvaluator.java | 42 - ...letonConfigurationEvaluatorLineLenght.java | 48 - .../hector/SkeletonConfigurationSet.java | 90 - .../hector/SkeletonConfigurationUtils.java | 57 - .../hector/SkeletonConfigurations.java | 40 - .../plantuml/hector/SkeletonMutation.java | 42 - .../plantuml/hector/SmartConnection.java | 110 - .../hector/UnlinarCompressedPlan.java | 144 -- .../plantuml/hector/UnlinearCompression.java | 112 - .../sourceforge/plantuml/hector2/MinMax.java | 99 - .../plantuml/hector2/continuity/Skeleton.java | 189 -- .../hector2/continuity/SkeletonBuilder.java | 87 - .../plantuml/hector2/graphic/Foo1.java | 67 - .../plantuml/hector2/graphic/Foo2.java | 108 - .../plantuml/hector2/layering/Layer.java | 117 - .../hector2/layering/LayerFactory.java | 67 - .../plantuml/hector2/mpos/Distribution.java | 114 - .../plantuml/hector2/mpos/MutationLayer.java | 46 - .../hector2/mpos/MutationLayerMove.java | 67 - src/net/sourceforge/plantuml/help/Help.java | 2 +- .../plantuml/help/HelpFactory.java | 2 +- .../plantuml/html/CucaDiagramHtmlMaker.java | 4 +- src/net/sourceforge/plantuml/jasic/Jasic.java | 4 +- src/net/sourceforge/plantuml/json/Json.java | 5 +- .../sourceforge/plantuml/json/JsonArray.java | 9 +- .../plantuml/json/JsonHandler.java | 3 + .../plantuml/json/JsonLiteral.java | 5 +- .../sourceforge/plantuml/json/JsonNumber.java | 5 +- .../sourceforge/plantuml/json/JsonObject.java | 13 +- .../sourceforge/plantuml/json/JsonParser.java | 5 +- .../sourceforge/plantuml/json/JsonString.java | 5 +- .../sourceforge/plantuml/json/JsonValue.java | 5 +- .../sourceforge/plantuml/json/JsonWriter.java | 5 +- .../sourceforge/plantuml/json/Location.java | 3 + .../plantuml/json/ParseException.java | 5 +- .../plantuml/json/PrettyPrint.java | 5 +- .../plantuml/json/WriterConfig.java | 5 +- .../plantuml/json/WritingBuffer.java | 5 +- .../plantuml/jsondiagram/JsonCurve.java | 2 +- .../jsondiagram/JsonDiagramFactory.java | 2 +- .../plantuml/jsondiagram/SmetanaForJson.java | 6 +- .../plantuml/jsondiagram/StyleExtractor.java | 4 +- .../plantuml/jsondiagram/TextBlockJson.java | 6 +- .../plantuml/logo/PSystemLogo.java | 2 +- .../plantuml/logo/TurtleGraphicsPane.java | 2 +- .../plantuml/mda/MDADiagramImpl.java | 2 +- .../plantuml/mda/MDAPackageImpl.java | 2 +- .../plantuml/mindmap/FingerImpl.java | 2 +- .../sourceforge/plantuml/mindmap/Idea.java | 2 +- .../mindmap/MindMapDiagramFactory.java | 2 +- .../plantuml/mindmap/StripeFrontier.java | 4 +- .../sourceforge/plantuml/mindmap/Tetris.java | 2 +- .../plantuml/nwdiag/LinkedElement.java | 2 +- .../plantuml/nwdiag/NwDiagram.java | 4 +- .../plantuml/nwdiag/NwDiagramFactory.java | 2 +- .../sourceforge/plantuml/nwdiag/NwGroup.java | 2 +- .../AbstractClassOrObjectDiagram.java | 4 +- .../plantuml/openiconic/OpenIcon.java | 2 +- .../openiconic/PSystemListOpenIconic.java | 2 +- .../plantuml/openiconic/SvgCommandLetter.java | 2 +- .../plantuml/openiconic/SvgPath.java | 10 +- .../plantuml/oregon/MagicTable.java | 4 +- .../plantuml/oregon/PSystemOregon.java | 2 +- .../sourceforge/plantuml/oregon/Screen.java | 2 +- .../plantuml/oregon/SmartKeyboard.java | 2 +- .../sourceforge/plantuml/png/PngSplitter.java | 2 +- .../sourceforge/plantuml/posimo/Cluster.java | 6 +- .../sourceforge/plantuml/posimo/DotPath.java | 16 +- .../plantuml/preproc/DefineSignature.java | 2 +- .../sourceforge/plantuml/preproc/Defines.java | 4 +- .../plantuml/preproc/FileWithSuffix.java | 2 +- .../plantuml/preproc/ImportedFiles.java | 2 +- .../sourceforge/plantuml/preproc/Stdlib.java | 8 +- src/net/sourceforge/plantuml/preproc/Sub.java | 2 +- .../plantuml/preproc/Variables.java | 2 +- .../plantuml/preproc2/PreprocessorUtils.java | 29 +- .../plantuml/preproc2/ReadFilterAnd.java | 2 +- .../plantuml/project/Failable.java | 4 +- .../plantuml/project/GanttDiagram.java | 11 +- .../plantuml/project/GanttDiagramFactory.java | 4 +- .../plantuml/project/OpenClose.java | 4 +- .../plantuml/project/core/TaskImpl.java | 6 +- .../project/core3/TimeLineSimple.java | 2 +- .../plantuml/project/draw/RectangleTask.java | 2 +- .../project/draw/TaskDrawRegular.java | 4 +- .../plantuml/project/draw/TimeHeader.java | 3 +- .../sourceforge/plantuml/real/RealLine.java | 4 +- .../sourceforge/plantuml/real/RealMax.java | 2 +- .../sourceforge/plantuml/real/RealMin.java | 2 +- .../plantuml/salt/DataSourceImpl.java | 2 +- .../sourceforge/plantuml/salt/Dictionary.java | 3 +- .../plantuml/salt/PSystemSalt.java | 4 +- .../plantuml/salt/PSystemSaltFactory2.java | 2 +- .../sourceforge/plantuml/salt/Terminated.java | 3 +- .../salt/element/ElementDroplist.java | 2 +- .../plantuml/salt/element/ElementMenuBar.java | 2 +- .../salt/element/ElementMenuPopup.java | 2 +- .../plantuml/salt/element/ElementPyramid.java | 2 +- .../plantuml/salt/element/ElementTabBar.java | 2 +- .../plantuml/salt/element/ElementTree.java | 6 +- .../salt/element/ElementTreeEntry.java | 2 +- .../plantuml/salt/element/Grid.java | 4 +- .../plantuml/salt/element/ListWidth.java | 2 +- .../plantuml/salt/element/Skeleton.java | 2 +- .../plantuml/salt/element/Skeleton2.java | 2 +- .../AbstractElementFactoryComplex.java | 2 +- .../salt/factory/ElementFactoryImage.java | 2 +- .../ElementFactoryRetrieveFromDictonnary.java | 2 +- .../sdot/CucaDiagramFileMakerSmetana.java | 4 +- .../sourceforge/plantuml/security/SFile.java | 2 +- .../plantuml/security/SecurityUtils.java | 2 +- .../sequencediagram/AbstractMessage.java | 4 +- .../sequencediagram/DottedNumber.java | 4 +- .../plantuml/sequencediagram/Englober.java | 5 +- .../sequencediagram/GroupingLeaf.java | 5 +- .../sequencediagram/GroupingStart.java | 2 +- .../sequencediagram/InGroupableList.java | 4 +- .../plantuml/sequencediagram/Notes.java | 2 +- .../plantuml/sequencediagram/Participant.java | 10 +- .../sequencediagram/SequenceDiagram.java | 12 +- .../SequenceDiagramFactory.java | 2 +- .../sequencediagram/command/CommandArrow.java | 2 +- ...CommandReferenceMultilinesOverSeveral.java | 2 +- .../command/CommandReferenceOverSeveral.java | 2 +- .../graphic/ArrowAndNoteBox.java | 2 +- .../graphic/ConstraintSet.java | 8 +- .../sequencediagram/graphic/DrawableSet.java | 16 +- .../graphic/DrawableSetInitializer.java | 9 +- .../graphic/FrontierComplex.java | 3 +- .../graphic/FrontierStackImpl.java | 8 +- .../graphic/GroupingGraphicalElement.java | 3 +- .../GroupingGraphicalElementHeader.java | 2 +- .../graphic/InGroupablesStack.java | 2 +- .../sequencediagram/graphic/LifeLine.java | 2 +- .../sequencediagram/graphic/NoteBox.java | 3 +- .../sequencediagram/graphic/NotesBoxes.java | 6 +- .../sequencediagram/graphic/PageSplitter.java | 6 +- .../graphic/ParticipantBox.java | 2 +- .../sequencediagram/graphic/Segment.java | 4 +- .../SequenceDiagramFileMakerPuma2.java | 2 +- .../graphic/SequenceDiagramTxtMaker.java | 2 +- .../sequencediagram/graphic/Stairs.java | 6 +- .../graphic/Step1Abstract.java | 5 +- .../sequencediagram/graphic/Step1Message.java | 6 +- .../graphic/Step1MessageExo.java | 2 +- .../sequencediagram/puma/PUnivers.java | 4 +- .../sequencediagram/teoz/Englobers.java | 6 +- .../sequencediagram/teoz/GroupingTile.java | 16 +- .../sequencediagram/teoz/LiveBoxesDrawer.java | 2 +- .../sequencediagram/teoz/NotesTile.java | 4 +- .../sequencediagram/teoz/PlayingSpace.java | 12 +- .../teoz/PlayingSpaceWithParticipants.java | 3 +- .../plantuml/sequencediagram/teoz/Stairs.java | 2 +- .../sequencediagram/teoz/TileBuilder.java | 4 +- .../sequencediagram/teoz/TileParallel.java | 2 +- .../plantuml/sprite/ColorPalette.java | 3 +- .../plantuml/sprite/ColorPalette4096.java | 3 +- .../sprite/ListSpriteDiagramFactory.java | 2 +- .../sprite/PSystemListInternalSprites.java | 2 +- .../plantuml/sprite/RessourcesUtils.java | 6 +- .../plantuml/sprite/SpriteColorBuilder.java | 2 +- .../sprite/SpriteColorBuilder4096.java | 2 +- .../plantuml/sprite/SpriteGrayLevel.java | 8 +- .../plantuml/sprite/SpriteImage.java | 3 +- .../plantuml/sprite/StdlibDiagramFactory.java | 2 +- .../plantuml/statediagram/StateDiagram.java | 5 +- .../statediagram/StateDiagramFactory.java | 2 +- .../plantuml/stats/CreoleConverter.java | 2 +- .../plantuml/stats/HistoricalData.java | 4 +- .../sourceforge/plantuml/stats/StatsImpl.java | 2 +- .../plantuml/stats/StatsTableImpl.java | 2 +- .../sourceforge/plantuml/stats/TextTable.java | 2 +- .../plantuml/style/FromSkinparamToStyle.java | 4 +- .../plantuml/style/StyleBuilder.java | 2 +- .../plantuml/style/StyleLoader.java | 4 +- .../plantuml/style/StyleSignature.java | 18 +- .../sourceforge/plantuml/style/ValueImpl.java | 3 +- .../plantuml/sudoku/GraphicsSudoku.java | 2 +- .../plantuml/svek/Bibliotekon.java | 10 +- .../sourceforge/plantuml/svek/Cluster.java | 25 +- .../plantuml/svek/ConcurrentStateImage.java | 2 +- .../svek/CucaDiagramFileMakerSvek.java | 2 +- .../plantuml/svek/DotStringFactory.java | 6 +- .../plantuml/svek/GeneralImageBuilder.java | 4 +- .../plantuml/svek/GraphvizCrash.java | 6 +- .../plantuml/svek/GroupPngMakerActivity.java | 2 +- .../plantuml/svek/GroupPngMakerState.java | 4 +- src/net/sourceforge/plantuml/svek/Ports.java | 3 +- .../plantuml/svek/SingleStrategy.java | 2 +- .../sourceforge/plantuml/svek/SvekLine.java | 5 +- .../sourceforge/plantuml/svek/SvekResult.java | 2 +- .../plantuml/svek/image/ConnectedCircle.java | 4 +- .../svek/image/EntityImageDescription.java | 5 +- .../EntityImageLollipopInterfaceEye2.java | 5 +- .../plantuml/svek/image/EntityImageNote.java | 32 +- .../svek/image/SmallestEnclosingCircle.java | 4 +- .../sourceforge/plantuml/svg/SvgGraphics.java | 12 +- .../plantuml/swing/LicenseWindow.java | 2 +- .../plantuml/swing/MainWindow2.java | 10 +- .../plantuml/syntax/LanguageDescriptor.java | 6 +- .../plantuml/syntax/SyntaxResult.java | 2 +- .../plantuml/text/StyledString.java | 2 +- .../plantuml/theme/ThemeUtils.java | 16 +- .../plantuml/tikz/TikzGraphics.java | 8 +- src/net/sourceforge/plantuml/tim/Eater.java | 2 +- .../plantuml/tim/EaterExceptionLocated.java | 3 +- .../plantuml/tim/EaterFunctionCall.java | 2 +- .../sourceforge/plantuml/tim/EaterTheme.java | 57 +- .../plantuml/tim/ExecutionContexts.java | 6 +- .../plantuml/tim/FunctionsSet.java | 2 +- .../sourceforge/plantuml/tim/TContext.java | 32 +- .../plantuml/tim/TFunctionImpl.java | 4 +- .../plantuml/tim/TFunctionSignature.java | 3 +- .../expression/ReversePolishInterpretor.java | 4 +- .../plantuml/tim/expression/ShuntingYard.java | 2 +- .../plantuml/tim/expression/TValue.java | 3 +- .../plantuml/tim/expression/TokenStack.java | 2 +- .../plantuml/timingdiagram/PlayerBinary.java | 2 +- .../timingdiagram/PlayerRobustConcise.java | 6 +- .../plantuml/timingdiagram/TickInPlayer.java | 3 +- .../plantuml/timingdiagram/TimingDiagram.java | 4 +- .../timingdiagram/TimingDiagramFactory.java | 2 +- .../plantuml/timingdiagram/TimingRuler.java | 6 +- .../timingdiagram/graphic/Histogram.java | 6 +- .../timingdiagram/graphic/Ribbon.java | 4 +- .../plantuml/ugraphic/AbstractUGraphic.java | 3 +- .../plantuml/ugraphic/FontChecker.java | 2 +- .../plantuml/ugraphic/InflaterSet.java | 2 +- .../plantuml/ugraphic/PixelImage.java | 3 +- .../sourceforge/plantuml/ugraphic/UFont.java | 2 +- .../plantuml/ugraphic/UImageSvg.java | 3 +- .../sourceforge/plantuml/ugraphic/UMotif.java | 2 +- .../sourceforge/plantuml/ugraphic/UPath.java | 2 +- .../color/ColorMapperTransparentWrapper.java | 3 +- .../plantuml/ugraphic/color/HColorSet.java | 11 +- .../ugraphic/comp/ExpandTransform.java | 2 +- .../plantuml/ugraphic/comp/SlotSet.java | 4 +- .../ugraphic/debug/UGraphicDebug.java | 2 +- .../plantuml/ugraphic/eps/DriverTextEps.java | 4 +- .../plantuml/ugraphic/g2d/UGraphicG2d.java | 7 +- .../plantuml/ugraphic/hand/HandJiggle.java | 2 +- .../plantuml/ugraphic/html5/Html5Drawer.java | 2 +- .../ugraphic/visio/VisioGraphics.java | 2 +- .../sourceforge/plantuml/utils/Cypher.java | 4 +- .../version/IteratorCounter2Impl.java | 2 +- .../sourceforge/plantuml/version/License.java | 8 +- .../plantuml/version/LicenseInfo.java | 2 +- .../plantuml/version/PSystemKeycheck.java | 2 +- .../plantuml/version/PSystemKeygen.java | 2 +- .../plantuml/version/PSystemLicense.java | 6 +- .../plantuml/version/PSystemVersion.java | 14 +- .../sourceforge/plantuml/version/Version.java | 6 +- src/net/sourceforge/plantuml/wbs/Fork.java | 2 +- .../sourceforge/plantuml/wbs/ITFComposed.java | 4 +- .../plantuml/wbs/WBSDiagramFactory.java | 2 +- .../sourceforge/plantuml/wbs/WElement.java | 4 +- .../sourceforge/plantuml/webp/VP8Frame.java | 8 +- src/net/sourceforge/plantuml/wire/Block.java | 8 +- src/net/sourceforge/plantuml/wire/WBlock.java | 4 +- .../plantuml/wire/WireDiagram.java | 6 +- .../plantuml/wire/WireDiagramFactory.java | 2 +- .../plantuml/xmi/XmiClassDiagramAbstract.java | 2 +- .../plantuml/yaml/SimpleYamlParser.java | 2 +- .../plantuml/yaml/YamlDiagramFactory.java | 4 +- .../sourceforge/plantuml/yaml/YamlLines.java | 6 +- .../sourceforge/plantuml/zopfli/Cookie.java | 2 +- stdlib/c4-abx.repx | Bin 5844 -> 6951 bytes stdlib/logos-abx.repx | Bin 11327 -> 11357 bytes stdlib/logos-dex.repx | Bin 273188 -> 274235 bytes 585 files changed, 1257 insertions(+), 16361 deletions(-) delete mode 100644 src/net/sourceforge/plantuml/evalex/AbstractFunction.java delete mode 100644 src/net/sourceforge/plantuml/evalex/AbstractLazyFunction.java delete mode 100644 src/net/sourceforge/plantuml/evalex/AbstractLazyOperator.java delete mode 100644 src/net/sourceforge/plantuml/evalex/AbstractOperator.java delete mode 100644 src/net/sourceforge/plantuml/evalex/AbstractUnaryOperator.java delete mode 100644 src/net/sourceforge/plantuml/evalex/Expression.java delete mode 100644 src/net/sourceforge/plantuml/evalex/Function.java delete mode 100644 src/net/sourceforge/plantuml/evalex/LazyFunction.java delete mode 100644 src/net/sourceforge/plantuml/evalex/LazyOperator.java delete mode 100644 src/net/sourceforge/plantuml/evalex/NString.java delete mode 100644 src/net/sourceforge/plantuml/evalex/Operator.java delete mode 100644 src/net/sourceforge/plantuml/evalex/Snipset1.java delete mode 100644 src/net/sourceforge/plantuml/evalex/Snipset2.java delete mode 100644 src/net/sourceforge/plantuml/evalex/Snipset3.java delete mode 100644 src/net/sourceforge/plantuml/geom/AbstractFigure.java delete mode 100644 src/net/sourceforge/plantuml/geom/AbstractLineSegment.java delete mode 100644 src/net/sourceforge/plantuml/geom/AbstractPolyline.java delete mode 100644 src/net/sourceforge/plantuml/geom/Box.java delete mode 100644 src/net/sourceforge/plantuml/geom/ClosedArea.java delete mode 100644 src/net/sourceforge/plantuml/geom/CollectionUtils.java delete mode 100644 src/net/sourceforge/plantuml/geom/Dijkstra.java delete mode 100644 src/net/sourceforge/plantuml/geom/InflateData.java delete mode 100644 src/net/sourceforge/plantuml/geom/InflationTransform.java delete mode 100644 src/net/sourceforge/plantuml/geom/Kingdom.java delete mode 100644 src/net/sourceforge/plantuml/geom/LineSegmentDouble.java delete mode 100644 src/net/sourceforge/plantuml/geom/LineSegmentInt.java delete mode 100644 src/net/sourceforge/plantuml/geom/Neighborhood.java delete mode 100644 src/net/sourceforge/plantuml/geom/Orientation.java delete mode 100644 src/net/sourceforge/plantuml/geom/Point2DInt.java delete mode 100644 src/net/sourceforge/plantuml/geom/Pointable.java delete mode 100644 src/net/sourceforge/plantuml/geom/Polyline.java delete mode 100644 src/net/sourceforge/plantuml/geom/PolylineBreakeable.java delete mode 100644 src/net/sourceforge/plantuml/geom/PolylineImpl.java delete mode 100644 src/net/sourceforge/plantuml/geom/Singularity.java delete mode 100644 src/net/sourceforge/plantuml/geom/SpiderWeb.java delete mode 100644 src/net/sourceforge/plantuml/geom/XMoveable.java delete mode 100644 src/net/sourceforge/plantuml/geom/kinetic/Frame.java delete mode 100644 src/net/sourceforge/plantuml/geom/kinetic/MoveObserver.java delete mode 100644 src/net/sourceforge/plantuml/geom/kinetic/Path.java delete mode 100644 src/net/sourceforge/plantuml/geom/kinetic/Point2DCharge.java delete mode 100644 src/net/sourceforge/plantuml/geom/kinetic/Quadrant.java delete mode 100644 src/net/sourceforge/plantuml/geom/kinetic/QuadrantMapper.java delete mode 100644 src/net/sourceforge/plantuml/geom/kinetic/SegmentCutter.java delete mode 100644 src/net/sourceforge/plantuml/geom/kinetic/VectorForce.java delete mode 100644 src/net/sourceforge/plantuml/geom/kinetic/World.java delete mode 100644 src/net/sourceforge/plantuml/graph/ALink.java delete mode 100644 src/net/sourceforge/plantuml/graph/ALinkImpl.java delete mode 100644 src/net/sourceforge/plantuml/graph/ANode.java delete mode 100644 src/net/sourceforge/plantuml/graph/ANodeImpl.java delete mode 100644 src/net/sourceforge/plantuml/graph/AbstractEntityImage.java delete mode 100644 src/net/sourceforge/plantuml/graph/Board.java delete mode 100644 src/net/sourceforge/plantuml/graph/BoardCollection.java delete mode 100644 src/net/sourceforge/plantuml/graph/BoardExplorer.java delete mode 100644 src/net/sourceforge/plantuml/graph/CostComputer.java delete mode 100644 src/net/sourceforge/plantuml/graph/ElectricCharge.java delete mode 100644 src/net/sourceforge/plantuml/graph/ElectricWord.java delete mode 100644 src/net/sourceforge/plantuml/graph/EntityImageActivityBar.java delete mode 100644 src/net/sourceforge/plantuml/graph/EntityImageActivityBranch.java delete mode 100644 src/net/sourceforge/plantuml/graph/EntityImageActivityCircle.java delete mode 100644 src/net/sourceforge/plantuml/graph/EntityImageCircleInterface.java delete mode 100644 src/net/sourceforge/plantuml/graph/Galaxy4.java delete mode 100644 src/net/sourceforge/plantuml/graph/GeneralPathFactory.java delete mode 100644 src/net/sourceforge/plantuml/graph/Graph1.java delete mode 100644 src/net/sourceforge/plantuml/graph/Heap.java delete mode 100644 src/net/sourceforge/plantuml/graph/KenavoCostComputer.java delete mode 100644 src/net/sourceforge/plantuml/graph/LenghtLinkComparator.java delete mode 100644 src/net/sourceforge/plantuml/graph/LinkString.java delete mode 100644 src/net/sourceforge/plantuml/graph/MethodsOrFieldsArea.java delete mode 100644 src/net/sourceforge/plantuml/graph/Move.java delete mode 100644 src/net/sourceforge/plantuml/graph/Oven.java delete mode 100644 src/net/sourceforge/plantuml/graph/SimpleCostComputer.java delete mode 100644 src/net/sourceforge/plantuml/graph/SortedCollection.java delete mode 100644 src/net/sourceforge/plantuml/graph/SortedCollectionArrayList.java delete mode 100644 src/net/sourceforge/plantuml/graph/SortedCollectionLinked.java delete mode 100644 src/net/sourceforge/plantuml/graph/Zoda1.java delete mode 100644 src/net/sourceforge/plantuml/graph/Zoda2.java delete mode 100644 src/net/sourceforge/plantuml/graph2/CubicCurveFactory.java delete mode 100644 src/net/sourceforge/plantuml/graph2/Dijkstra.java delete mode 100644 src/net/sourceforge/plantuml/graph2/GeomUtils.java delete mode 100644 src/net/sourceforge/plantuml/graph2/IInflationTransform.java delete mode 100644 src/net/sourceforge/plantuml/graph2/IdentityInflationTransform.java delete mode 100644 src/net/sourceforge/plantuml/graph2/InflateData2.java delete mode 100644 src/net/sourceforge/plantuml/graph2/InflationTransform2.java delete mode 100644 src/net/sourceforge/plantuml/graph2/MagicPointsFactory.java delete mode 100644 src/net/sourceforge/plantuml/graph2/MagicPointsFactory2.java delete mode 100644 src/net/sourceforge/plantuml/graph2/Measurer.java delete mode 100644 src/net/sourceforge/plantuml/graph2/MyCurve.java delete mode 100644 src/net/sourceforge/plantuml/graph2/Neighborhood2.java delete mode 100644 src/net/sourceforge/plantuml/graph2/Plan.java delete mode 100644 src/net/sourceforge/plantuml/graph2/Polyline2.java delete mode 100644 src/net/sourceforge/plantuml/graph2/RectanglesCollection.java delete mode 100644 src/net/sourceforge/plantuml/graph2/Singularity2.java delete mode 100644 src/net/sourceforge/plantuml/graph2/SortedList.java delete mode 100644 src/net/sourceforge/plantuml/graph2/SortedListImpl.java delete mode 100644 src/net/sourceforge/plantuml/hector/Box2D.java delete mode 100644 src/net/sourceforge/plantuml/hector/CucaDiagramFileMakerHectorB1.java delete mode 100644 src/net/sourceforge/plantuml/hector/GrowingTree.java delete mode 100644 src/net/sourceforge/plantuml/hector/HectorPath.java delete mode 100644 src/net/sourceforge/plantuml/hector/Pin.java delete mode 100644 src/net/sourceforge/plantuml/hector/PinFactory.java delete mode 100644 src/net/sourceforge/plantuml/hector/PinLink.java delete mode 100644 src/net/sourceforge/plantuml/hector/PinLinksContinuousSet.java delete mode 100644 src/net/sourceforge/plantuml/hector/Skeleton.java delete mode 100644 src/net/sourceforge/plantuml/hector/SkeletonBuilder.java delete mode 100644 src/net/sourceforge/plantuml/hector/SkeletonConfiguration.java delete mode 100644 src/net/sourceforge/plantuml/hector/SkeletonConfigurationComparator.java delete mode 100644 src/net/sourceforge/plantuml/hector/SkeletonConfigurationEvaluator.java delete mode 100644 src/net/sourceforge/plantuml/hector/SkeletonConfigurationEvaluatorLineLenght.java delete mode 100644 src/net/sourceforge/plantuml/hector/SkeletonConfigurationSet.java delete mode 100644 src/net/sourceforge/plantuml/hector/SkeletonConfigurationUtils.java delete mode 100644 src/net/sourceforge/plantuml/hector/SkeletonConfigurations.java delete mode 100644 src/net/sourceforge/plantuml/hector/SkeletonMutation.java delete mode 100644 src/net/sourceforge/plantuml/hector/SmartConnection.java delete mode 100644 src/net/sourceforge/plantuml/hector/UnlinarCompressedPlan.java delete mode 100644 src/net/sourceforge/plantuml/hector/UnlinearCompression.java delete mode 100644 src/net/sourceforge/plantuml/hector2/MinMax.java delete mode 100644 src/net/sourceforge/plantuml/hector2/continuity/Skeleton.java delete mode 100644 src/net/sourceforge/plantuml/hector2/continuity/SkeletonBuilder.java delete mode 100644 src/net/sourceforge/plantuml/hector2/graphic/Foo1.java delete mode 100644 src/net/sourceforge/plantuml/hector2/graphic/Foo2.java delete mode 100644 src/net/sourceforge/plantuml/hector2/layering/Layer.java delete mode 100644 src/net/sourceforge/plantuml/hector2/layering/LayerFactory.java delete mode 100644 src/net/sourceforge/plantuml/hector2/mpos/Distribution.java delete mode 100644 src/net/sourceforge/plantuml/hector2/mpos/MutationLayer.java delete mode 100644 src/net/sourceforge/plantuml/hector2/mpos/MutationLayerMove.java diff --git a/pom.xml b/pom.xml index d89be7687..16e524c18 100644 --- a/pom.xml +++ b/pom.xml @@ -35,7 +35,7 @@ net.sourceforge.plantuml plantuml - 1.2021.5-SNAPSHOT + 1.2021.6-SNAPSHOT jar PlantUML diff --git a/src/gen/annotation/Comment.java b/src/gen/annotation/Comment.java index a97c4dc9b..61ba9974d 100644 --- a/src/gen/annotation/Comment.java +++ b/src/gen/annotation/Comment.java @@ -1,3 +1,21 @@ +/* ======================================================================== + * PlantUML : a free UML diagram generator + * ======================================================================== + * + * (C) Copyright 2009-2020, Arnaud Roques + * + * Project Info: http://plantuml.com + * + * If you like this project or if you find it useful, you can support us at: + * + * http://plantuml.com/patreon (only 1$ per month!) + * http://plantuml.com/paypal + * + * This file is part of PlantUML. + * + * Original Author: Arnaud Roques + * + */ package gen.annotation; import java.lang.annotation.ElementType; diff --git a/src/gen/annotation/Difficult.java b/src/gen/annotation/Difficult.java index 14343ed21..92f2f3a09 100644 --- a/src/gen/annotation/Difficult.java +++ b/src/gen/annotation/Difficult.java @@ -1,3 +1,21 @@ +/* ======================================================================== + * PlantUML : a free UML diagram generator + * ======================================================================== + * + * (C) Copyright 2009-2020, Arnaud Roques + * + * Project Info: http://plantuml.com + * + * If you like this project or if you find it useful, you can support us at: + * + * http://plantuml.com/patreon (only 1$ per month!) + * http://plantuml.com/paypal + * + * This file is part of PlantUML. + * + * Original Author: Arnaud Roques + * + */ package gen.annotation; import java.lang.annotation.ElementType; diff --git a/src/gen/annotation/Doc.java b/src/gen/annotation/Doc.java index b438528fa..2dac37d17 100644 --- a/src/gen/annotation/Doc.java +++ b/src/gen/annotation/Doc.java @@ -1,3 +1,21 @@ +/* ======================================================================== + * PlantUML : a free UML diagram generator + * ======================================================================== + * + * (C) Copyright 2009-2020, Arnaud Roques + * + * Project Info: http://plantuml.com + * + * If you like this project or if you find it useful, you can support us at: + * + * http://plantuml.com/patreon (only 1$ per month!) + * http://plantuml.com/paypal + * + * This file is part of PlantUML. + * + * Original Author: Arnaud Roques + * + */ package gen.annotation; import java.lang.annotation.ElementType; diff --git a/src/gen/annotation/HasND_Rank.java b/src/gen/annotation/HasND_Rank.java index 9dffa9129..1fc44c47e 100644 --- a/src/gen/annotation/HasND_Rank.java +++ b/src/gen/annotation/HasND_Rank.java @@ -1,3 +1,21 @@ +/* ======================================================================== + * PlantUML : a free UML diagram generator + * ======================================================================== + * + * (C) Copyright 2009-2020, Arnaud Roques + * + * Project Info: http://plantuml.com + * + * If you like this project or if you find it useful, you can support us at: + * + * http://plantuml.com/patreon (only 1$ per month!) + * http://plantuml.com/paypal + * + * This file is part of PlantUML. + * + * Original Author: Arnaud Roques + * + */ package gen.annotation; import java.lang.annotation.ElementType; diff --git a/src/gen/annotation/Original.java b/src/gen/annotation/Original.java index ef2ca789b..53c914f08 100644 --- a/src/gen/annotation/Original.java +++ b/src/gen/annotation/Original.java @@ -1,3 +1,21 @@ +/* ======================================================================== + * PlantUML : a free UML diagram generator + * ======================================================================== + * + * (C) Copyright 2009-2020, Arnaud Roques + * + * Project Info: http://plantuml.com + * + * If you like this project or if you find it useful, you can support us at: + * + * http://plantuml.com/patreon (only 1$ per month!) + * http://plantuml.com/paypal + * + * This file is part of PlantUML. + * + * Original Author: Arnaud Roques + * + */ package gen.annotation; import java.lang.annotation.ElementType; diff --git a/src/gen/annotation/Reviewed.java b/src/gen/annotation/Reviewed.java index 815c9823b..0c8644bb6 100644 --- a/src/gen/annotation/Reviewed.java +++ b/src/gen/annotation/Reviewed.java @@ -1,3 +1,21 @@ +/* ======================================================================== + * PlantUML : a free UML diagram generator + * ======================================================================== + * + * (C) Copyright 2009-2020, Arnaud Roques + * + * Project Info: http://plantuml.com + * + * If you like this project or if you find it useful, you can support us at: + * + * http://plantuml.com/patreon (only 1$ per month!) + * http://plantuml.com/paypal + * + * This file is part of PlantUML. + * + * Original Author: Arnaud Roques + * + */ package gen.annotation; import java.lang.annotation.ElementType; diff --git a/src/gen/annotation/Todo.java b/src/gen/annotation/Todo.java index 2f51cde69..ceb496b7a 100644 --- a/src/gen/annotation/Todo.java +++ b/src/gen/annotation/Todo.java @@ -1,3 +1,21 @@ +/* ======================================================================== + * PlantUML : a free UML diagram generator + * ======================================================================== + * + * (C) Copyright 2009-2020, Arnaud Roques + * + * Project Info: http://plantuml.com + * + * If you like this project or if you find it useful, you can support us at: + * + * http://plantuml.com/patreon (only 1$ per month!) + * http://plantuml.com/paypal + * + * This file is part of PlantUML. + * + * Original Author: Arnaud Roques + * + */ package gen.annotation; import java.lang.annotation.ElementType; diff --git a/src/gen/annotation/Untraced.java b/src/gen/annotation/Untraced.java index 90fcc4773..f838dbd1e 100644 --- a/src/gen/annotation/Untraced.java +++ b/src/gen/annotation/Untraced.java @@ -1,3 +1,21 @@ +/* ======================================================================== + * PlantUML : a free UML diagram generator + * ======================================================================== + * + * (C) Copyright 2009-2020, Arnaud Roques + * + * Project Info: http://plantuml.com + * + * If you like this project or if you find it useful, you can support us at: + * + * http://plantuml.com/patreon (only 1$ per month!) + * http://plantuml.com/paypal + * + * This file is part of PlantUML. + * + * Original Author: Arnaud Roques + * + */ package gen.annotation; import java.lang.annotation.ElementType; diff --git a/src/gen/annotation/Unused.java b/src/gen/annotation/Unused.java index 3f99cc8e2..5c7794b23 100644 --- a/src/gen/annotation/Unused.java +++ b/src/gen/annotation/Unused.java @@ -1,3 +1,21 @@ +/* ======================================================================== + * PlantUML : a free UML diagram generator + * ======================================================================== + * + * (C) Copyright 2009-2020, Arnaud Roques + * + * Project Info: http://plantuml.com + * + * If you like this project or if you find it useful, you can support us at: + * + * http://plantuml.com/patreon (only 1$ per month!) + * http://plantuml.com/paypal + * + * This file is part of PlantUML. + * + * Original Author: Arnaud Roques + * + */ package gen.annotation; import java.lang.annotation.ElementType; diff --git a/src/net/sourceforge/plantuml/BackSlash.java b/src/net/sourceforge/plantuml/BackSlash.java index 19f5a48db..a9671b578 100644 --- a/src/net/sourceforge/plantuml/BackSlash.java +++ b/src/net/sourceforge/plantuml/BackSlash.java @@ -68,7 +68,7 @@ public class BackSlash { if (s == null) { return null; } - final List result = new ArrayList(); + final List result = new ArrayList<>(); final StringBuilder current = new StringBuilder(); for (int i = 0; i < s.length(); i++) { final char c = s.charAt(i); diff --git a/src/net/sourceforge/plantuml/BlockUml.java b/src/net/sourceforge/plantuml/BlockUml.java index 65af8b9c1..e2c22e421 100644 --- a/src/net/sourceforge/plantuml/BlockUml.java +++ b/src/net/sourceforge/plantuml/BlockUml.java @@ -65,7 +65,7 @@ public class BlockUml { private Diagram system; private final Defines localDefines; private final ISkinSimple skinParam; - private final Set included = new HashSet(); + private final Set included = new HashSet<>(); public Set getIncluded() { return Collections.unmodifiableSet(included); @@ -97,7 +97,7 @@ public class BlockUml { } public static List convert(List strings) { - final List result = new ArrayList(); + final List result = new ArrayList<>(); LineLocationImpl location = new LineLocationImpl("block", null); for (String s : strings) { location = location.oneLineRead(); @@ -109,7 +109,7 @@ public class BlockUml { private boolean preprocessorError; public BlockUml(List strings, Defines defines, ISkinSimple skinParam, PreprocessorModeSet mode) { - this.rawSource = new ArrayList(strings); + this.rawSource = new ArrayList<>(strings); this.localDefines = defines; this.skinParam = skinParam; final String s0 = strings.get(0).getTrimmed().getString(); @@ -117,7 +117,7 @@ public class BlockUml { throw new IllegalArgumentException(); } if (mode == null) { - this.data = new ArrayList(strings); + this.data = new ArrayList<>(strings); } else { final TimLoader timLoader = new TimLoader(mode.getImportedFiles(), defines, mode.getCharset(), (DefinitionsContainer) mode); @@ -199,7 +199,7 @@ public class BlockUml { } public List getDefinition(boolean withHeader) { - final List result = new ArrayList(); + final List result = new ArrayList<>(); for (StringLocated s : data) { result.add(s.getString()); } diff --git a/src/net/sourceforge/plantuml/BlockUmlBuilder.java b/src/net/sourceforge/plantuml/BlockUmlBuilder.java index 2a45019de..a44ae8b81 100644 --- a/src/net/sourceforge/plantuml/BlockUmlBuilder.java +++ b/src/net/sourceforge/plantuml/BlockUmlBuilder.java @@ -55,8 +55,8 @@ import net.sourceforge.plantuml.utils.StartUtils; public final class BlockUmlBuilder implements DefinitionsContainer { - private final List blocks = new ArrayList(); - private Set usedFiles = new HashSet(); + private final List blocks = new ArrayList<>(); + private Set usedFiles = new HashSet<>(); private final UncommentReadLine reader; private final Defines defines; private final ImportedFiles importedFiles; @@ -92,7 +92,7 @@ public final class BlockUmlBuilder implements DefinitionsContainer { while ((s = includer.readLine()) != null) { if (StartUtils.isArobaseStartDiagram(s.getString())) { - current = new ArrayList(); + current = new ArrayList<>(); paused = false; } if (StartUtils.isArobasePauseDiagram(s.getString())) { diff --git a/src/net/sourceforge/plantuml/CMapData.java b/src/net/sourceforge/plantuml/CMapData.java index 1d2550199..4154e97b2 100644 --- a/src/net/sourceforge/plantuml/CMapData.java +++ b/src/net/sourceforge/plantuml/CMapData.java @@ -79,7 +79,7 @@ public class CMapData { public static CMapData cmapString(Set allUrlEncountered, double scale) { final CMapData cmapdata = new CMapData(); - final List all = new ArrayList(allUrlEncountered); + final List all = new ArrayList<>(allUrlEncountered); Collections.sort(all, Url.SURFACE_COMPARATOR); int seq = 1; diff --git a/src/net/sourceforge/plantuml/DirWatcher.java b/src/net/sourceforge/plantuml/DirWatcher.java index f4d7dac0c..7f5102359 100644 --- a/src/net/sourceforge/plantuml/DirWatcher.java +++ b/src/net/sourceforge/plantuml/DirWatcher.java @@ -64,7 +64,7 @@ public class DirWatcher { public List buildCreatedFiles() throws IOException, InterruptedException { boolean error = false; - final List result = new ArrayList(); + final List result = new ArrayList<>(); for (File f : dir.listFiles()) { if (error) { continue; diff --git a/src/net/sourceforge/plantuml/EmptyImageBuilder.java b/src/net/sourceforge/plantuml/EmptyImageBuilder.java index 2c1c4b5a8..f3fd01cfe 100644 --- a/src/net/sourceforge/plantuml/EmptyImageBuilder.java +++ b/src/net/sourceforge/plantuml/EmptyImageBuilder.java @@ -132,7 +132,7 @@ public class EmptyImageBuilder { private List withBreaks(String watermark, Font javaFont, FontMetrics fm, int maxWidth) { final String[] words = watermark.split("\\s+"); - final List result = new ArrayList(); + final List result = new ArrayList<>(); String pending = ""; for (String word : words) { final String candidate = pending.length() == 0 ? word : pending + " " + word; diff --git a/src/net/sourceforge/plantuml/FileFormatOption.java b/src/net/sourceforge/plantuml/FileFormatOption.java index 8ef85ce40..5217ba27f 100644 --- a/src/net/sourceforge/plantuml/FileFormatOption.java +++ b/src/net/sourceforge/plantuml/FileFormatOption.java @@ -83,10 +83,9 @@ public final class FileFormatOption implements Serializable { this.useRedForError = useRedForError; this.svgLinkTarget = svgLinkTarget; this.debugsvek = debugsvek; - this.tikzFontDistortion = tikzFontDistortion; + this.tikzFontDistortion = Objects.requireNonNull(tikzFontDistortion); this.scale = scale; this.preserveAspectRatio = preserveAspectRatio; - Objects.requireNonNull(tikzFontDistortion); } public StringBounder getDefaultStringBounder(SvgCharSizeHack charSizeHack) { diff --git a/src/net/sourceforge/plantuml/FileGroup.java b/src/net/sourceforge/plantuml/FileGroup.java index 6f1704f59..b10afe481 100644 --- a/src/net/sourceforge/plantuml/FileGroup.java +++ b/src/net/sourceforge/plantuml/FileGroup.java @@ -46,7 +46,7 @@ import net.sourceforge.plantuml.command.regex.Pattern2; public class FileGroup { - private final List result = new ArrayList(); + private final List result = new ArrayList<>(); private final String pattern; private final List excluded; private final Option option; diff --git a/src/net/sourceforge/plantuml/FileSystem.java b/src/net/sourceforge/plantuml/FileSystem.java index 69ad20c63..857b71213 100644 --- a/src/net/sourceforge/plantuml/FileSystem.java +++ b/src/net/sourceforge/plantuml/FileSystem.java @@ -44,7 +44,7 @@ public class FileSystem { private final static FileSystem singleton = new FileSystem(); - private ThreadLocal currentDir = new ThreadLocal(); + private ThreadLocal currentDir = new ThreadLocal<>(); private FileSystem() { reset(); diff --git a/src/net/sourceforge/plantuml/LineLocationImpl.java b/src/net/sourceforge/plantuml/LineLocationImpl.java index 09e0cc952..cbf71e1f8 100644 --- a/src/net/sourceforge/plantuml/LineLocationImpl.java +++ b/src/net/sourceforge/plantuml/LineLocationImpl.java @@ -53,9 +53,8 @@ public class LineLocationImpl implements LineLocation { } private LineLocationImpl(String desc, LineLocation parent, int position) { - Objects.requireNonNull(desc); this.parent = parent; - this.desc = desc; + this.desc = Objects.requireNonNull(desc); this.position = position; } diff --git a/src/net/sourceforge/plantuml/Log.java b/src/net/sourceforge/plantuml/Log.java index b69ed9a70..e967b92e3 100644 --- a/src/net/sourceforge/plantuml/Log.java +++ b/src/net/sourceforge/plantuml/Log.java @@ -104,7 +104,7 @@ public abstract class Log { // } } - // private static final ThreadLocal header2 = new ThreadLocal(); + // private static final ThreadLocal header2 = new ThreadLocal<>(); // public static void header(String s) { // header2.set(s); diff --git a/src/net/sourceforge/plantuml/NewpagedDiagram.java b/src/net/sourceforge/plantuml/NewpagedDiagram.java index 207113786..b3f90fcb4 100644 --- a/src/net/sourceforge/plantuml/NewpagedDiagram.java +++ b/src/net/sourceforge/plantuml/NewpagedDiagram.java @@ -51,7 +51,7 @@ import net.sourceforge.plantuml.ugraphic.color.NoSuchColorException; public class NewpagedDiagram extends AbstractPSystem { - private final List diagrams = new ArrayList(); + private final List diagrams = new ArrayList<>(); public NewpagedDiagram(AbstractPSystem diag1, AbstractPSystem diag2) { if (diag1 instanceof NewpagedDiagram) { diff --git a/src/net/sourceforge/plantuml/Option.java b/src/net/sourceforge/plantuml/Option.java index 48874e634..22d0fd6e1 100644 --- a/src/net/sourceforge/plantuml/Option.java +++ b/src/net/sourceforge/plantuml/Option.java @@ -57,8 +57,8 @@ import net.sourceforge.plantuml.stats.StatsUtils; public class Option { - private final List excludes = new ArrayList(); - private final List config = new ArrayList(); + private final List excludes = new ArrayList<>(); + private final List config = new ArrayList<>(); private final Map defines = new LinkedHashMap(); private String charset; private boolean computeurl = false; @@ -91,7 +91,7 @@ public class Option { private File outputFile = null; private String filename; - private final List result = new ArrayList(); + private final List result = new ArrayList<>(); public Option() { } diff --git a/src/net/sourceforge/plantuml/OptionPrint.java b/src/net/sourceforge/plantuml/OptionPrint.java index 2af474629..4fd574622 100644 --- a/src/net/sourceforge/plantuml/OptionPrint.java +++ b/src/net/sourceforge/plantuml/OptionPrint.java @@ -58,7 +58,7 @@ import net.sourceforge.plantuml.version.Version; public class OptionPrint { static public void printTestDot() throws InterruptedException { - final List result = new ArrayList(); + final List result = new ArrayList<>(); final int errorCode = GraphvizUtils.addDotStatus(result, false); for (String s : result) { if (errorCode == 0) { @@ -187,7 +187,7 @@ public class OptionPrint { System.out.println(v); } System.out.println(); - final List result = new ArrayList(); + final List result = new ArrayList<>(); final int errorCode = GraphvizUtils.addDotStatus(result, false); for (String s : result) { System.out.println(s); @@ -213,7 +213,7 @@ public class OptionPrint { all = Arrays.asList("java.runtime.name", "Java Runtime", "java.vm.name", "JVM", "file.encoding", "Default Encoding", "user.language", "Language", "user.country", "Country"); } - final List result = new ArrayList(); + final List result = new ArrayList<>(); for (int i = 0; i < all.size(); i += 2) { result.add(all.get(i + 1) + ": " + p.getProperty(all.get(i))); } @@ -221,7 +221,7 @@ public class OptionPrint { } public static Collection interestingValues() { - final List strings = new ArrayList(); + final List strings = new ArrayList<>(); // if (withIp() == false) { // strings.add("Machine: " + getHostName()); // } diff --git a/src/net/sourceforge/plantuml/PSystemBuilder.java b/src/net/sourceforge/plantuml/PSystemBuilder.java index 782c14eaa..5dff1b5b6 100644 --- a/src/net/sourceforge/plantuml/PSystemBuilder.java +++ b/src/net/sourceforge/plantuml/PSystemBuilder.java @@ -125,7 +125,7 @@ public class PSystemBuilder { } final DiagramType diagramType = umlSource.getDiagramType(); - final List errors = new ArrayList(); + final List errors = new ArrayList<>(); final List factories = getAllFactories(skinParam); for (PSystemFactory systemFactory : factories) { if (diagramType != systemFactory.getDiagramType()) { @@ -152,7 +152,7 @@ public class PSystemBuilder { } private static List getAllFactories(ISkinSimple skinParam) { - final List factories = new ArrayList(); + final List factories = new ArrayList<>(); factories.add(new PSystemWelcomeFactory()); factories.add(new PSystemColorsFactory()); factories.add(new SequenceDiagramFactory(skinParam)); diff --git a/src/net/sourceforge/plantuml/PSystemUtils.java b/src/net/sourceforge/plantuml/PSystemUtils.java index 83e0a0ae5..5689230e0 100644 --- a/src/net/sourceforge/plantuml/PSystemUtils.java +++ b/src/net/sourceforge/plantuml/PSystemUtils.java @@ -99,7 +99,7 @@ public class PSystemUtils { private static List exportDiagramsNewpaged(NewpagedDiagram system, SuggestedFile suggestedFile, FileFormatOption fileFormat) throws IOException { - final List result = new ArrayList(); + final List result = new ArrayList<>(); final int nbImages = system.getNbImages(); for (int i = 0; i < nbImages; i++) { @@ -187,7 +187,7 @@ public class PSystemUtils { private static List exportDiagramsSequence(SequenceDiagram system, SuggestedFile suggestedFile, FileFormatOption fileFormat) throws IOException { - final List result = new ArrayList(); + final List result = new ArrayList<>(); final int nbImages = system.getNbImages(); for (int i = 0; i < nbImages; i++) { @@ -248,7 +248,7 @@ public class PSystemUtils { system.getMetadata(), dpi, fileFormat.isWithMetadata(), system.getSkinParam().getSplitParam()) .getFiles(); } - final List result2 = new ArrayList(); + final List result2 = new ArrayList<>(); for (SFile f : result) { result2.add(new FileImageData(f, cmap)); } @@ -283,7 +283,7 @@ public class PSystemUtils { system.getMetadata(), system.getDpi(fileFormat), fileFormat.isWithMetadata(), splitParam) .getFiles(); } - final List result2 = new ArrayList(); + final List result2 = new ArrayList<>(); for (SFile f : result) { result2.add(new FileImageData(f, cmap)); } diff --git a/src/net/sourceforge/plantuml/PlainStringsDiagram.java b/src/net/sourceforge/plantuml/PlainStringsDiagram.java index 93f027671..86c91be66 100644 --- a/src/net/sourceforge/plantuml/PlainStringsDiagram.java +++ b/src/net/sourceforge/plantuml/PlainStringsDiagram.java @@ -48,7 +48,7 @@ public abstract class PlainStringsDiagram extends PlainDiagram { protected BufferedImage image = null; protected GraphicPosition imagePosition = null; - protected final List strings = new ArrayList(); + protected final List strings = new ArrayList<>(); @Override public UDrawable getRootDrawable(FileFormatOption fileFormatOption) { diff --git a/src/net/sourceforge/plantuml/Run.java b/src/net/sourceforge/plantuml/Run.java index b485f81b3..655b665f2 100644 --- a/src/net/sourceforge/plantuml/Run.java +++ b/src/net/sourceforge/plantuml/Run.java @@ -410,7 +410,7 @@ public class Run { multithread(option, error); return; } - final List files = new ArrayList(); + final List files = new ArrayList<>(); for (String s : option.getResult()) { if (option.isDecodeurl()) { error.goOk(); diff --git a/src/net/sourceforge/plantuml/SkinParam.java b/src/net/sourceforge/plantuml/SkinParam.java index e010ea12a..846465a79 100644 --- a/src/net/sourceforge/plantuml/SkinParam.java +++ b/src/net/sourceforge/plantuml/SkinParam.java @@ -254,7 +254,7 @@ public class SkinParam implements ISkinParam { key = key.replaceAll("sequencearrow", "arrow"); key = key.replaceAll("align$", "alignment"); final Matcher2 mm = stereoPattern.matcher(key); - final List result = new ArrayList(); + final List result = new ArrayList<>(); while (mm.find()) { final String s = mm.group(1); result.add(key.replaceAll(stereoPatternString, "") + "<<" + s + ">>"); @@ -357,8 +357,7 @@ public class SkinParam implements ISkinParam { } public char getCircledCharacter(Stereotype stereotype) { - Objects.requireNonNull(stereotype); - final String value2 = getValue("spotchar" + stereotype.getLabel(Guillemet.DOUBLE_COMPARATOR)); + final String value2 = getValue("spotchar" + Objects.requireNonNull(stereotype).getLabel(Guillemet.DOUBLE_COMPARATOR)); if (value2 != null && value2.length() > 0) { return value2.charAt(0); } @@ -517,7 +516,7 @@ public class SkinParam implements ISkinParam { } public static Collection getPossibleValues() { - final Set result = new TreeSet(); + final Set result = new TreeSet<>(); result.add("Monochrome"); // result.add("BackgroundColor"); result.add("CircledCharacterRadius"); @@ -760,8 +759,7 @@ public class SkinParam implements ISkinParam { } public boolean shadowing2(Stereotype stereotype, SkinParameter skinParameter) { - Objects.requireNonNull(skinParameter); - final String name = skinParameter.getUpperCaseName(); + final String name = Objects.requireNonNull(skinParameter).getUpperCaseName(); if (stereotype != null) { checkStereotype(stereotype); final String value2 = getValue(name + "shadowing" + stereotype.getLabel(Guillemet.DOUBLE_COMPARATOR)); @@ -789,7 +787,7 @@ public class SkinParam implements ISkinParam { private final Map sprites = new HashMap(); public Collection getAllSpriteNames() { - return Collections.unmodifiableCollection(new TreeSet(sprites.keySet())); + return Collections.unmodifiableCollection(new TreeSet<>(sprites.keySet())); } public void addSprite(String name, Sprite sprite) { diff --git a/src/net/sourceforge/plantuml/SourceFileReaderAbstract.java b/src/net/sourceforge/plantuml/SourceFileReaderAbstract.java index 1e01ebb8b..6e06d3240 100644 --- a/src/net/sourceforge/plantuml/SourceFileReaderAbstract.java +++ b/src/net/sourceforge/plantuml/SourceFileReaderAbstract.java @@ -139,7 +139,7 @@ public abstract class SourceFileReaderAbstract { Log.info("Reading file: " + file); cpt = 0; - final List result = new ArrayList(); + final List result = new ArrayList<>(); for (BlockUml blockUml : builder.getBlockUmls()) { final SuggestedFile suggested = getSuggestedFile(blockUml); diff --git a/src/net/sourceforge/plantuml/StringLocated.java b/src/net/sourceforge/plantuml/StringLocated.java index 2c8c1e055..678eb79a4 100644 --- a/src/net/sourceforge/plantuml/StringLocated.java +++ b/src/net/sourceforge/plantuml/StringLocated.java @@ -71,8 +71,7 @@ final public class StringLocated { } public StringLocated(String s, LineLocation location, String preprocessorError) { - Objects.requireNonNull(s); - this.s = s; + this.s = Objects.requireNonNull(s); this.location = location; this.preprocessorError = preprocessorError; } diff --git a/src/net/sourceforge/plantuml/StringUtils.java b/src/net/sourceforge/plantuml/StringUtils.java index 26e9c84da..59967bec2 100644 --- a/src/net/sourceforge/plantuml/StringUtils.java +++ b/src/net/sourceforge/plantuml/StringUtils.java @@ -112,7 +112,7 @@ public class StringUtils { if (m.find() == false) { return null; } - final List result = new ArrayList(); + final List result = new ArrayList<>(); for (int i = 1; i <= m.groupCount(); i++) { result.add(m.group(i)); } @@ -425,7 +425,7 @@ public class StringUtils { // == false) { // throw new IllegalArgumentException(); // } - final List result = new ArrayList(); + final List result = new ArrayList<>(); final Pattern2 p = MyPattern.cmpile("([\\p{L}0-9_.]+|[%g][^%g]+[%g])"); final Matcher2 m = p.matcher(s); while (m.find()) { @@ -439,7 +439,7 @@ public class StringUtils { } public static List merge(List l1, List l2) { - final List result = new ArrayList(l1); + final List result = new ArrayList<>(l1); result.addAll(l2); return Collections.unmodifiableList(result); } diff --git a/src/net/sourceforge/plantuml/TitledDiagram.java b/src/net/sourceforge/plantuml/TitledDiagram.java index f66fd1bb6..48a43b642 100644 --- a/src/net/sourceforge/plantuml/TitledDiagram.java +++ b/src/net/sourceforge/plantuml/TitledDiagram.java @@ -37,8 +37,6 @@ package net.sourceforge.plantuml; import java.io.IOException; -import javax.script.ScriptException; - import net.sourceforge.plantuml.anim.Animation; import net.sourceforge.plantuml.anim.AnimationDecoder; import net.sourceforge.plantuml.command.CommandExecutionResult; @@ -237,13 +235,12 @@ public abstract class TitledDiagram extends AbstractPSystem implements Diagram, } final public void setAnimation(Iterable animationData) { - try { - final AnimationDecoder animationDecoder = new AnimationDecoder(animationData); - this.animation = Animation.create(animationDecoder.decode()); - } catch (ScriptException e) { - e.printStackTrace(); - } - +// try { + final AnimationDecoder animationDecoder = new AnimationDecoder(animationData); + this.animation = Animation.create(animationDecoder.decode()); +// } catch (ScriptException e) { +// e.printStackTrace(); +// } } final public Animation getAnimation() { diff --git a/src/net/sourceforge/plantuml/UseStyle.java b/src/net/sourceforge/plantuml/UseStyle.java index bbc2e5726..23bef5966 100644 --- a/src/net/sourceforge/plantuml/UseStyle.java +++ b/src/net/sourceforge/plantuml/UseStyle.java @@ -37,7 +37,7 @@ package net.sourceforge.plantuml; public class UseStyle { - private static final ThreadLocal useBeta = new ThreadLocal(); + private static final ThreadLocal useBeta = new ThreadLocal<>(); static public boolean useBetaStyle() { final Boolean result = useBeta.get(); diff --git a/src/net/sourceforge/plantuml/acearth/PSystemXearthFactory.java b/src/net/sourceforge/plantuml/acearth/PSystemXearthFactory.java index 7166699ca..accf2b9e3 100644 --- a/src/net/sourceforge/plantuml/acearth/PSystemXearthFactory.java +++ b/src/net/sourceforge/plantuml/acearth/PSystemXearthFactory.java @@ -49,7 +49,7 @@ import net.sourceforge.plantuml.command.regex.Pattern2; public class PSystemXearthFactory extends PSystemBasicFactory { private final Map config = new LinkedHashMap(); - private final List markers = new ArrayList(); + private final List markers = new ArrayList<>(); private int width; private int height; diff --git a/src/net/sourceforge/plantuml/activitydiagram/ActivityDiagram.java b/src/net/sourceforge/plantuml/activitydiagram/ActivityDiagram.java index 922a20389..899918b37 100644 --- a/src/net/sourceforge/plantuml/activitydiagram/ActivityDiagram.java +++ b/src/net/sourceforge/plantuml/activitydiagram/ActivityDiagram.java @@ -37,6 +37,7 @@ package net.sourceforge.plantuml.activitydiagram; import java.util.Arrays; import java.util.List; +import java.util.Objects; import net.sourceforge.plantuml.Direction; import net.sourceforge.plantuml.ISkinSimple; @@ -66,8 +67,7 @@ public class ActivityDiagram extends CucaDiagram { } public ILeaf getOrCreateLeaf(Ident ident, Code code, LeafType type, USymbol symbol) { - checkNotNull(ident); - return getOrCreateLeafDefault(ident, code, type, symbol); + return getOrCreateLeafDefault(Objects.requireNonNull(ident), code, type, symbol); } private String getAutoBranch() { @@ -134,15 +134,13 @@ public class ActivityDiagram extends CucaDiagram { @Override public ILeaf createLeaf(Ident idNewLong, Code code, Display display, LeafType type, USymbol symbol) { - checkNotNull(idNewLong); - final ILeaf result = super.createLeaf(idNewLong, code, display, type, symbol); + final ILeaf result = super.createLeaf(Objects.requireNonNull(idNewLong), code, display, type, symbol); updateLasts(result); return result; } public IEntity createNote(Ident idNewLong, Code code, Display display) { - checkNotNull(idNewLong); - return super.createLeaf(idNewLong, code, display, LeafType.NOTE, null); + return super.createLeaf(Objects.requireNonNull(idNewLong), code, display, LeafType.NOTE, null); } final protected List getDotStrings() { diff --git a/src/net/sourceforge/plantuml/activitydiagram/ActivityDiagramFactory.java b/src/net/sourceforge/plantuml/activitydiagram/ActivityDiagramFactory.java index 2d41edda5..b6a602a1f 100644 --- a/src/net/sourceforge/plantuml/activitydiagram/ActivityDiagramFactory.java +++ b/src/net/sourceforge/plantuml/activitydiagram/ActivityDiagramFactory.java @@ -70,7 +70,7 @@ public class ActivityDiagramFactory extends PSystemCommandFactory { @Override protected List createCommands() { - final List cmds = new ArrayList(); + final List cmds = new ArrayList<>(); cmds.add(new CommandFootboxIgnored()); addCommonCommands1(cmds); cmds.add(new CommandRankDir()); diff --git a/src/net/sourceforge/plantuml/activitydiagram3/ActivityDiagramFactory3.java b/src/net/sourceforge/plantuml/activitydiagram3/ActivityDiagramFactory3.java index ac20baa83..b75839efc 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/ActivityDiagramFactory3.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/ActivityDiagramFactory3.java @@ -99,7 +99,7 @@ public class ActivityDiagramFactory3 extends PSystemCommandFactory { @Override protected List createCommands() { - final List cmds = new ArrayList(); + final List cmds = new ArrayList<>(); cmds.add(new CommandFootboxIgnored()); addCommonCommands1(cmds); diff --git a/src/net/sourceforge/plantuml/activitydiagram3/InstructionFork.java b/src/net/sourceforge/plantuml/activitydiagram3/InstructionFork.java index b75053b52..68635fece 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/InstructionFork.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/InstructionFork.java @@ -53,7 +53,7 @@ import net.sourceforge.plantuml.sequencediagram.NoteType; public class InstructionFork extends WithNote implements Instruction { - private final List forks = new ArrayList(); + private final List forks = new ArrayList<>(); private final Instruction parent; private final LinkRendering inlinkRendering; private final ISkinParam skinParam; @@ -90,7 +90,7 @@ public class InstructionFork extends WithNote implements Instruction { } public Ftile createFtile(FtileFactory factory) { - final List all = new ArrayList(); + final List all = new ArrayList<>(); for (InstructionList list : forks) { all.add(list.createFtile(factory)); } @@ -130,7 +130,7 @@ public class InstructionFork extends WithNote implements Instruction { } public Set getSwimlanes() { - final Set result = new HashSet(InstructionList.getSwimlanes2(forks)); + final Set result = new HashSet<>(InstructionList.getSwimlanes2(forks)); result.add(swimlaneIn); result.add(swimlaneOut); return result; diff --git a/src/net/sourceforge/plantuml/activitydiagram3/InstructionIf.java b/src/net/sourceforge/plantuml/activitydiagram3/InstructionIf.java index a3632eb27..ad908f6bc 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/InstructionIf.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/InstructionIf.java @@ -58,7 +58,7 @@ import net.sourceforge.plantuml.ugraphic.color.HColor; public class InstructionIf extends WithNote implements Instruction, InstructionCollection { - private final List thens = new ArrayList(); + private final List thens = new ArrayList<>(); private Branch elseBranch; private boolean endifCalled = false; private final ISkinParam skinParam; @@ -113,7 +113,7 @@ public class InstructionIf extends WithNote implements Instruction, InstructionC if (getPositionedNotes().size() > 0) { result = FtileWithNoteOpale.create(result, getPositionedNotes(), skinParam, false); } - final List weldingPoints = new ArrayList(); + final List weldingPoints = new ArrayList<>(); for (Branch branch : thens) { weldingPoints.addAll(branch.getWeldingPoints()); } @@ -191,7 +191,7 @@ public class InstructionIf extends WithNote implements Instruction, InstructionC } public Set getSwimlanes() { - final Set result = new HashSet(); + final Set result = new HashSet<>(); if (swimlane != null) { result.add(swimlane); } diff --git a/src/net/sourceforge/plantuml/activitydiagram3/InstructionList.java b/src/net/sourceforge/plantuml/activitydiagram3/InstructionList.java index 7448c350d..f30dcec79 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/InstructionList.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/InstructionList.java @@ -54,7 +54,7 @@ import net.sourceforge.plantuml.sequencediagram.NoteType; public class InstructionList extends WithNote implements Instruction, InstructionCollection { - private final List all = new ArrayList(); + private final List all = new ArrayList<>(); private final Swimlane defaultSwimlane; public boolean containsBreak() { @@ -96,7 +96,7 @@ public class InstructionList extends WithNote implements Instruction, Instructio if (all.size() == 0) { return new FtileEmpty(factory.skinParam(), defaultSwimlane); } - final List breaks = new ArrayList(); + final List breaks = new ArrayList<>(); Ftile result = eventuallyAddNote(factory, null, getSwimlaneIn()); for (Instruction ins : all) { Ftile cur = ins.createFtile(factory); @@ -169,7 +169,7 @@ public class InstructionList extends WithNote implements Instruction, Instructio } public static Set getSwimlanes2(List list) { - final Set result = new HashSet(); + final Set result = new HashSet<>(); for (Instruction ins : list) { result.addAll(ins.getSwimlanes()); } diff --git a/src/net/sourceforge/plantuml/activitydiagram3/InstructionRepeat.java b/src/net/sourceforge/plantuml/activitydiagram3/InstructionRepeat.java index 348bd9829..b66fbac06 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/InstructionRepeat.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/InstructionRepeat.java @@ -66,7 +66,7 @@ public class InstructionRepeat implements Instruction { private LinkRendering incoming1 = LinkRendering.none(); private LinkRendering incoming2 = LinkRendering.none(); - private List backwardNotes = new ArrayList(); + private List backwardNotes = new ArrayList<>(); private Display test = Display.NULL; private Display yes = Display.NULL; private Display out = Display.NULL; diff --git a/src/net/sourceforge/plantuml/activitydiagram3/InstructionSplit.java b/src/net/sourceforge/plantuml/activitydiagram3/InstructionSplit.java index 56ef0dbc8..e59b06970 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/InstructionSplit.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/InstructionSplit.java @@ -50,7 +50,7 @@ import net.sourceforge.plantuml.sequencediagram.NoteType; public class InstructionSplit implements Instruction { - private final List splits = new ArrayList(); + private final List splits = new ArrayList<>(); private final Instruction parent; private final LinkRendering inlinkRendering; private final Swimlane swimlaneIn; @@ -82,7 +82,7 @@ public class InstructionSplit implements Instruction { } public Ftile createFtile(FtileFactory factory) { - final List all = new ArrayList(); + final List all = new ArrayList<>(); for (InstructionList list : splits) { all.add(list.createFtile(factory)); } diff --git a/src/net/sourceforge/plantuml/activitydiagram3/InstructionSwitch.java b/src/net/sourceforge/plantuml/activitydiagram3/InstructionSwitch.java index 24cb3d333..8a39eb69d 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/InstructionSwitch.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/InstructionSwitch.java @@ -51,7 +51,7 @@ import net.sourceforge.plantuml.ugraphic.color.HColor; public class InstructionSwitch extends WithNote implements Instruction, InstructionCollection { - private final List branches = new ArrayList(); + private final List branches = new ArrayList<>(); private final ISkinParam skinParam; private final Instruction parent; @@ -94,7 +94,7 @@ public class InstructionSwitch extends WithNote implements Instruction, Instruct // result = FtileWithNoteOpale.create(result, getPositionedNotes(), skinParam, // false); // } - // final List weldingPoints = new ArrayList(); + // final List weldingPoints = new ArrayList<>(); // for (Branch branch : branches) { // weldingPoints.addAll(branch.getWeldingPoints()); // } @@ -113,7 +113,7 @@ public class InstructionSwitch extends WithNote implements Instruction, Instruct } public Set getSwimlanes() { - final Set result = new HashSet(); + final Set result = new HashSet<>(); if (swimlane != null) { result.add(swimlane); } diff --git a/src/net/sourceforge/plantuml/activitydiagram3/WithNote.java b/src/net/sourceforge/plantuml/activitydiagram3/WithNote.java index 4723f09c9..e5b7b7bf7 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/WithNote.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/WithNote.java @@ -49,7 +49,7 @@ import net.sourceforge.plantuml.sequencediagram.NoteType; public class WithNote { - private final Collection notes = new ArrayList(); + private final Collection notes = new ArrayList<>(); public boolean addNote(Display note, NotePosition position, NoteType type, Colors colors, Swimlane swimlaneNote) { this.notes.add(new PositionedNote(note, position, type, colors, swimlaneNote)); diff --git a/src/net/sourceforge/plantuml/activitydiagram3/ftile/CollisionDetector.java b/src/net/sourceforge/plantuml/activitydiagram3/ftile/CollisionDetector.java index afc3b892d..5308eaeae 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/ftile/CollisionDetector.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/ftile/CollisionDetector.java @@ -77,8 +77,8 @@ public class CollisionDetector extends UGraphicNo implements UGraphic { private final Context context; static class Context { - private final List rectangles = new ArrayList(); - private final List snakes = new ArrayList(); + private final List rectangles = new ArrayList<>(); + private final List snakes = new ArrayList<>(); private boolean manageSnakes; public void drawDebug(UGraphic ug) { diff --git a/src/net/sourceforge/plantuml/activitydiagram3/ftile/FtileAssemblySimple.java b/src/net/sourceforge/plantuml/activitydiagram3/ftile/FtileAssemblySimple.java index 8308ce7e7..0a44acdde 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/ftile/FtileAssemblySimple.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/ftile/FtileAssemblySimple.java @@ -147,7 +147,7 @@ public class FtileAssemblySimple extends AbstractTextBlock implements Ftile { } public Set getSwimlanes() { - final Set result = new HashSet(); + final Set result = new HashSet<>(); result.addAll(tile1.getSwimlanes()); result.addAll(tile2.getSwimlanes()); return Collections.unmodifiableSet(result); @@ -162,7 +162,7 @@ public class FtileAssemblySimple extends AbstractTextBlock implements Ftile { } public List getWeldingPoints() { - final List result = new ArrayList(tile1.getWeldingPoints()); + final List result = new ArrayList<>(tile1.getWeldingPoints()); result.addAll(tile2.getWeldingPoints()); return Collections.unmodifiableList(result); } diff --git a/src/net/sourceforge/plantuml/activitydiagram3/ftile/FtileDecorateWelding.java b/src/net/sourceforge/plantuml/activitydiagram3/ftile/FtileDecorateWelding.java index 9d0c98832..d3b5e0d9e 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/ftile/FtileDecorateWelding.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/ftile/FtileDecorateWelding.java @@ -47,7 +47,7 @@ public class FtileDecorateWelding extends FtileDecorate { public FtileDecorateWelding(final Ftile ftile, final List breaks) { super(ftile); - this.breaks = new ArrayList(breaks); + this.breaks = new ArrayList<>(breaks); } @Override diff --git a/src/net/sourceforge/plantuml/activitydiagram3/ftile/FtileEmpty.java b/src/net/sourceforge/plantuml/activitydiagram3/ftile/FtileEmpty.java index d636d0fb0..78e98455e 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/ftile/FtileEmpty.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/ftile/FtileEmpty.java @@ -103,7 +103,7 @@ public class FtileEmpty extends AbstractFtile { } public Set getSwimlanes() { - final Set result = new HashSet(); + final Set result = new HashSet<>(); if (swimlaneIn != null) { result.add(swimlaneIn); } diff --git a/src/net/sourceforge/plantuml/activitydiagram3/ftile/FtileWithConnection.java b/src/net/sourceforge/plantuml/activitydiagram3/ftile/FtileWithConnection.java index cdd3c847b..410e7c11d 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/ftile/FtileWithConnection.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/ftile/FtileWithConnection.java @@ -47,7 +47,7 @@ import net.sourceforge.plantuml.ugraphic.UGraphic; class FtileWithConnection extends FtileDecorate { - private final List connections = new ArrayList(); + private final List connections = new ArrayList<>(); FtileWithConnection(Ftile ftile, Collection connections) { super(ftile); @@ -74,7 +74,7 @@ class FtileWithConnection extends FtileDecorate { } public Collection getInnerConnections() { - final List result = new ArrayList(super.getInnerConnections()); + final List result = new ArrayList<>(super.getInnerConnections()); result.addAll(connections); return Collections.unmodifiableList(connections); } diff --git a/src/net/sourceforge/plantuml/activitydiagram3/ftile/Snake.java b/src/net/sourceforge/plantuml/activitydiagram3/ftile/Snake.java index 06e6abd36..70517c9f8 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/ftile/Snake.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/ftile/Snake.java @@ -205,7 +205,7 @@ public class Snake implements UShape { final double move = 2 + colorArrowSeparationSpace; final WormMutation mutation = WormMutation.create(worm, move); if (mutation.isDxNegative()) { - colors = new ArrayList(colors); + colors = new ArrayList<>(colors); Collections.reverse(colors); } final double globalMove = -1.0 * (colors.size() - 1) / 2.0; @@ -270,7 +270,7 @@ public class Snake implements UShape { } public List getHorizontalLines() { - final List result = new ArrayList(); + final List result = new ArrayList<>(); for (int i = 0; i < worm.size() - 1; i++) { final Point2D pt1 = worm.get(i); final Point2D pt2 = worm.get(i + 1); diff --git a/src/net/sourceforge/plantuml/activitydiagram3/ftile/Swimlanes.java b/src/net/sourceforge/plantuml/activitydiagram3/ftile/Swimlanes.java index 1111ccadb..511f8fb93 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/ftile/Swimlanes.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/ftile/Swimlanes.java @@ -93,9 +93,9 @@ public class Swimlanes extends AbstractTextBlock implements TextBlock, Styleable private final ISkinParam skinParam;; private final Pragma pragma; - private final List swimlanesRaw = new ArrayList(); - private final List swimlanesSpecial = new ArrayList(); - private final List dividers = new ArrayList(); + private final List swimlanesRaw = new ArrayList<>(); + private final List swimlanesSpecial = new ArrayList<>(); + private final List dividers = new ArrayList<>(); private Swimlane currentSwimlane = null; private final Instruction root = new InstructionList(); diff --git a/src/net/sourceforge/plantuml/activitydiagram3/ftile/WormMutation.java b/src/net/sourceforge/plantuml/activitydiagram3/ftile/WormMutation.java index 57d206364..47d64236c 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/ftile/WormMutation.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/ftile/WormMutation.java @@ -43,7 +43,7 @@ import net.sourceforge.plantuml.ugraphic.UTranslate; public class WormMutation { - private final List translations = new ArrayList(); + private final List translations = new ArrayList<>(); private WormMutation() { diff --git a/src/net/sourceforge/plantuml/activitydiagram3/ftile/Zad.java b/src/net/sourceforge/plantuml/activitydiagram3/ftile/Zad.java index 4228eaf4f..89cabfc25 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/ftile/Zad.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/ftile/Zad.java @@ -44,7 +44,7 @@ import net.sourceforge.plantuml.ugraphic.color.HColorUtils; public class Zad { - private final List rectangles = new ArrayList(); + private final List rectangles = new ArrayList<>(); public void add(MinMax rect) { // System.err.println("add " + rect); diff --git a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/AbstractParallelFtilesBuilder.java b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/AbstractParallelFtilesBuilder.java index ae3cd754d..877bd8eca 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/AbstractParallelFtilesBuilder.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/AbstractParallelFtilesBuilder.java @@ -65,7 +65,7 @@ public abstract class AbstractParallelFtilesBuilder { private final ISkinParam skinParam; private final StringBounder stringBounder; - protected final List list99 = new ArrayList(); + protected final List list99 = new ArrayList<>(); public StyleSignature getDefaultStyleDefinition() { return StyleSignature.of(SName.root, SName.element, SName.activityDiagram, SName.activity); @@ -83,7 +83,7 @@ public abstract class AbstractParallelFtilesBuilder { protected List getFoo2(List all) { final double maxHeight = computeMaxHeight(all); - final List result = new ArrayList(); + final List result = new ArrayList<>(); for (Ftile ftile : all) { final Ftile newFtile = computeNewFtile(ftile, maxHeight); result.add(newFtile); diff --git a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileFactoryDelegatorSwitch.java b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileFactoryDelegatorSwitch.java index b2af8b90e..cfa6f409c 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileFactoryDelegatorSwitch.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileFactoryDelegatorSwitch.java @@ -75,7 +75,7 @@ public class FtileFactoryDelegatorSwitch extends FtileFactoryDelegator { } private Ftile createNude(Swimlane swimlane, List branches) { - final List ftiles = new ArrayList(); + final List ftiles = new ArrayList<>(); for (Branch branch : branches) { ftiles.add(new FtileMinWidthCentered(branch.getFtile(), 30)); } @@ -83,7 +83,7 @@ public class FtileFactoryDelegatorSwitch extends FtileFactoryDelegator { } private Ftile createWithDiamonds(Swimlane swimlane, List branches, Display labelTest) { - final List ftiles = new ArrayList(); + final List ftiles = new ArrayList<>(); for (Branch branch : branches) { ftiles.add(new FtileMinWidthCentered(branch.getFtile(), 30)); } @@ -94,7 +94,7 @@ public class FtileFactoryDelegatorSwitch extends FtileFactoryDelegator { } private Ftile createWithLinks(Swimlane swimlane, List branches, Display labelTest) { - final List ftiles = new ArrayList(); + final List ftiles = new ArrayList<>(); final Ftile diamond1 = getDiamond1(swimlane, branches.get(0), labelTest); final Ftile diamond2 = getDiamond2(swimlane, branches.get(0)); for (Branch branch : branches) { @@ -104,7 +104,7 @@ public class FtileFactoryDelegatorSwitch extends FtileFactoryDelegator { if (ftiles.size() == 1) { final FtileSwitchWithOneLink result = new FtileSwitchWithOneLink(ftiles, branches, swimlane, diamond1, diamond2, getStringBounder(), arrowColor); - return result.addLinks(); + return result.addLinks(getStringBounder()); } final FtileSwitchWithManyLinks result = new FtileSwitchWithManyLinks(ftiles, branches, swimlane, diamond1, diamond2, getStringBounder(), arrowColor); @@ -114,23 +114,27 @@ public class FtileFactoryDelegatorSwitch extends FtileFactoryDelegator { private Ftile getDiamond1(Swimlane swimlane, Branch branch0, Display test) { final HColor borderColor = getRose().getHtmlColor(skinParam(), ColorParam.activityDiamondBorder); - final HColor backColor = branch0.getColor() == null ? getRose().getHtmlColor(skinParam(), - ColorParam.activityDiamondBackground) : branch0.getColor(); + final HColor backColor = branch0.getColor() == null + ? getRose().getHtmlColor(skinParam(), ColorParam.activityDiamondBackground) + : branch0.getColor(); final FontConfiguration fcDiamond = new FontConfiguration(skinParam(), FontParam.ACTIVITY_DIAMOND, null); - final TextBlock tbTest = (Display.isNull(test) || test.isWhite()) ? TextBlockUtils.empty(0, 0) : test.create( - fcDiamond, branch0.skinParam().getDefaultTextAlignment(HorizontalAlignment.LEFT), branch0.skinParam()); + final TextBlock tbTest = (Display.isNull(test) || test.isWhite()) ? TextBlockUtils.empty(0, 0) + : test.create(fcDiamond, branch0.skinParam().getDefaultTextAlignment(HorizontalAlignment.LEFT), + branch0.skinParam()); return new FtileDiamondInside(branch0.skinParam(), backColor, borderColor, swimlane, tbTest); } private Ftile getDiamond2(Swimlane swimlane, Branch branch0) { final HColor borderColor = getRose().getHtmlColor(skinParam(), ColorParam.activityDiamondBorder); - final HColor backColor = branch0.getColor() == null ? getRose().getHtmlColor(skinParam(), - ColorParam.activityDiamondBackground) : branch0.getColor(); + final HColor backColor = branch0.getColor() == null + ? getRose().getHtmlColor(skinParam(), ColorParam.activityDiamondBackground) + : branch0.getColor(); - return new FtileDiamondInside(branch0.skinParam(), backColor, borderColor, swimlane, TextBlockUtils.empty(0, 0)); + return new FtileDiamondInside(branch0.skinParam(), backColor, borderColor, swimlane, + TextBlockUtils.empty(0, 0)); } private HColor fontColor(FontParam param) { diff --git a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileForkInner.java b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileForkInner.java index 8f7dfa0fb..ad4ed72e7 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileForkInner.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileForkInner.java @@ -54,7 +54,7 @@ import net.sourceforge.plantuml.ugraphic.UTranslate; class FtileForkInner extends AbstractFtile { - private final List forks = new ArrayList(); + private final List forks = new ArrayList<>(); public FtileForkInner(List forks) { super(forks.get(0).skinParam()); @@ -82,7 +82,7 @@ class FtileForkInner extends AbstractFtile { } public static Set mergeSwimlanes(List tiles) { - final Set result = new HashSet(); + final Set result = new HashSet<>(); for (Ftile tile : tiles) { result.addAll(tile.getSwimlanes()); } diff --git a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileForkInnerOverlapped.java b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileForkInnerOverlapped.java index 5076cf749..157fe510a 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileForkInnerOverlapped.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileForkInnerOverlapped.java @@ -53,7 +53,7 @@ import net.sourceforge.plantuml.ugraphic.UTranslate; class FtileForkInnerOverlapped extends AbstractFtile { - private final List forks = new ArrayList(); + private final List forks = new ArrayList<>(); public FtileForkInnerOverlapped(List forks) { super(forks.get(0).skinParam()); @@ -75,7 +75,7 @@ class FtileForkInnerOverlapped extends AbstractFtile { } public static Set mergeSwimlanes(List tiles) { - final Set result = new HashSet(); + final Set result = new HashSet<>(); for (Ftile tile : tiles) { result.addAll(tile.getSwimlanes()); } diff --git a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileIfAndStop.java b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileIfAndStop.java index 320247a12..02af5fe27 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileIfAndStop.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileIfAndStop.java @@ -95,7 +95,7 @@ class FtileIfAndStop extends AbstractFtile { } public Set getSwimlanes() { - final Set result = new HashSet(); + final Set result = new HashSet<>(); if (getSwimlaneIn() != null) { result.add(getSwimlaneIn()); } @@ -160,7 +160,7 @@ class FtileIfAndStop extends AbstractFtile { // } final FtileIfAndStop result = new FtileIfAndStop(diamond1, tileNonStop, arrowColor, stopFtile); - final List conns = new ArrayList(); + final List conns = new ArrayList<>(); conns.add(result.new ConnectionHorizontal(arrowColor)); // conns.add(result.new ConnectionHorizontalThenVertical(tile2)); // if (tile1.calculateDimension(stringBounder).hasPointOut() diff --git a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileIfDown.java b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileIfDown.java index 3cddc5592..4f29cd953 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileIfDown.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileIfDown.java @@ -85,7 +85,7 @@ public class FtileIfDown extends AbstractFtile { } public Set getSwimlanes() { - final Set result = new HashSet(thenBlock.getSwimlanes()); + final Set result = new HashSet<>(thenBlock.getSwimlanes()); result.add(getSwimlaneIn()); return result; } @@ -119,7 +119,7 @@ public class FtileIfDown extends AbstractFtile { optionalStop == null ? diamond2 : new FtileEmpty(ftileFactory.skinParam()), optionalStop, conditionEndStyle); - final List conns = new ArrayList(); + final List conns = new ArrayList<>(); conns.add(result.new ConnectionIn(thenBlock.getInLinkRendering().getRainbow(arrowColor))); final boolean hasPointOut1 = thenBlock.calculateDimension(ftileFactory.getStringBounder()).hasPointOut(); if (optionalStop == null) { diff --git a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileIfLongHorizontal.java b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileIfLongHorizontal.java index dd6575040..23b79357b 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileIfLongHorizontal.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileIfLongHorizontal.java @@ -81,7 +81,7 @@ class FtileIfLongHorizontal extends AbstractFtile { private final List tiles; private final Ftile tile2; private final List diamonds; - private final List couples = new ArrayList(); + private final List couples = new ArrayList<>(); private final Rainbow arrowColor; @@ -97,8 +97,8 @@ class FtileIfLongHorizontal extends AbstractFtile { couples.add(FtileUtils.addHorizontalMargin(tmp, inlabelSizes.get(i), 0)); } this.tile2 = tile2; - this.diamonds = new ArrayList(diamonds); - this.tiles = new ArrayList(tiles); + this.diamonds = new ArrayList<>(diamonds); + this.tiles = new ArrayList<>(tiles); this.arrowColor = arrowColor; @@ -109,7 +109,7 @@ class FtileIfLongHorizontal extends AbstractFtile { for (Ftile diamond : diamonds) { maxOutY = Math.max(maxOutY, diamond.calculateDimension(stringBounder).getOutY()); } - final List result = new ArrayList(); + final List result = new ArrayList<>(); for (int i = 0; i < diamonds.size(); i++) { Ftile diamond = diamonds.get(i); final double missing = maxOutY - diamond.calculateDimension(stringBounder).getOutY(); @@ -121,7 +121,7 @@ class FtileIfLongHorizontal extends AbstractFtile { } public Set getSwimlanes() { - final Set result = new HashSet(); + final Set result = new HashSet<>(); if (getSwimlaneIn() != null) { result.add(getSwimlaneIn()); } @@ -145,7 +145,7 @@ class FtileIfLongHorizontal extends AbstractFtile { FontConfiguration fcArrow, LinkRendering topInlinkRendering, LinkRendering afterEndwhile, FontConfiguration fcTest) { Objects.requireNonNull(afterEndwhile); - final List tiles = new ArrayList(); + final List tiles = new ArrayList<>(); for (Branch branch : thens) { tiles.add(new FtileMinWidthCentered(branch.getFtile(), 30)); @@ -153,8 +153,8 @@ class FtileIfLongHorizontal extends AbstractFtile { final Ftile tile2 = new FtileMinWidthCentered(branch2.getFtile(), 30); - List diamonds = new ArrayList(); - List inlabelSizes = new ArrayList(); + List diamonds = new ArrayList<>(); + List inlabelSizes = new ArrayList<>(); for (Branch branch : thens) { final TextBlock tb1 = branch.getLabelPositive().create(fcArrow, HorizontalAlignment.LEFT, ftileFactory.skinParam()); @@ -186,7 +186,7 @@ class FtileIfLongHorizontal extends AbstractFtile { final FtileIfLongHorizontal result = new FtileIfLongHorizontal(diamonds, inlabelSizes, tiles, tile2, arrowColor); - final List conns = new ArrayList(); + final List conns = new ArrayList<>(); int nbOut = 0; @@ -470,7 +470,7 @@ class FtileIfLongHorizontal extends AbstractFtile { final StringBounder stringBounder = ug.getStringBounder(); final Dimension2D totalDim = calculateDimensionInternal(stringBounder); - final List allTiles = new ArrayList(couples); + final List allTiles = new ArrayList<>(couples); allTiles.add(tile2); final double[] minmax; @@ -589,7 +589,7 @@ class FtileIfLongHorizontal extends AbstractFtile { @Override public Collection getMyChildren() { - final List result = new ArrayList(tiles); + final List result = new ArrayList<>(tiles); result.add(tile2); return Collections.unmodifiableList(result); } @@ -689,7 +689,7 @@ class FtileIfLongHorizontal extends AbstractFtile { protected FtileGeometry calculateDimensionFtile(StringBounder stringBounder) { final Dimension2D dimTotal = calculateDimensionInternal(stringBounder); - final List all = new ArrayList(tiles); + final List all = new ArrayList<>(tiles); all.add(tile2); for (Ftile tmp : all) { if (tmp.calculateDimension(stringBounder).hasPointOut()) { diff --git a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileIfLongVertical.java b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileIfLongVertical.java index 2c353cf35..59ec89099 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileIfLongVertical.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileIfLongVertical.java @@ -85,7 +85,7 @@ class FtileIfLongVertical extends AbstractFtile { @Override public Collection getMyChildren() { - final List result = new ArrayList(tiles); + final List result = new ArrayList<>(tiles); result.add(tile2); return Collections.unmodifiableList(result); } @@ -98,15 +98,15 @@ class FtileIfLongVertical extends AbstractFtile { } this.lastDiamond = lastDiamond; this.tile2 = tile2; - this.diamonds = new ArrayList(diamonds); - this.tiles = new ArrayList(tiles); + this.diamonds = new ArrayList<>(diamonds); + this.tiles = new ArrayList<>(tiles); this.arrowColor = arrowColor; } public Set getSwimlanes() { - final Set result = new HashSet(); + final Set result = new HashSet<>(); if (getSwimlaneIn() != null) { result.add(getSwimlaneIn()); } @@ -128,7 +128,7 @@ class FtileIfLongVertical extends AbstractFtile { static Ftile create(Swimlane swimlane, HColor borderColor, HColor backColor, Rainbow arrowColor, FtileFactory ftileFactory, ConditionStyle conditionStyle, List thens, Branch branch2, FontConfiguration fc, LinkRendering topInlinkRendering, LinkRendering afterEndwhile) { - final List tiles = new ArrayList(); + final List tiles = new ArrayList<>(); for (Branch branch : thens) { tiles.add(new FtileMinWidthCentered(branch.getFtile(), 30)); @@ -136,7 +136,7 @@ class FtileIfLongVertical extends AbstractFtile { final Ftile tile2 = new FtileMinWidthCentered(branch2.getFtile(), 30); - List diamonds = new ArrayList(); + List diamonds = new ArrayList<>(); for (Branch branch : thens) { final TextBlock tb1 = branch.getLabelPositive().create(fc, HorizontalAlignment.LEFT, ftileFactory.skinParam()); @@ -159,7 +159,7 @@ class FtileIfLongVertical extends AbstractFtile { final FtileIfLongVertical result = new FtileIfLongVertical(diamonds, tiles, tile2, arrowColor, lastDiamond); - final List conns = new ArrayList(); + final List conns = new ArrayList<>(); for (int i = 0; i < thens.size(); i++) { final Ftile ftile = tiles.get(i); final Ftile diam = diamonds.get(i); @@ -518,7 +518,7 @@ class FtileIfLongVertical extends AbstractFtile { protected FtileGeometry calculateDimensionFtile(StringBounder stringBounder) { final Dimension2D dimTotal = calculateDimensionInternal(stringBounder); - final List all = new ArrayList(tiles); + final List all = new ArrayList<>(tiles); all.add(tile2); for (Ftile tmp : all) { if (tmp.calculateDimension(stringBounder).hasPointOut()) { diff --git a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileRepeat.java b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileRepeat.java index 39051c4a6..1e4c9d734 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileRepeat.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileRepeat.java @@ -109,7 +109,7 @@ class FtileRepeat extends AbstractFtile { } public Set getSwimlanes() { - final Set result = new HashSet(repeat.getSwimlanes()); + final Set result = new HashSet<>(repeat.getSwimlanes()); result.addAll(diamond1.getSwimlanes()); result.addAll(diamond2.getSwimlanes()); return Collections.unmodifiableSet(result); @@ -158,7 +158,7 @@ class FtileRepeat extends AbstractFtile { throw new IllegalStateException(); } - final List conns = new ArrayList(); + final List conns = new ArrayList<>(); final Display in1 = repeat.getInLinkRendering().getDisplay(); final TextBlock tbin1 = in1 == null ? null : in1.create7(fcArrow, HorizontalAlignment.LEFT, spriteContainer, CreoleMode.SIMPLE_LINE); diff --git a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileSplit1.java b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileSplit1.java index bfede99f6..3d86b64c6 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileSplit1.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileSplit1.java @@ -53,7 +53,7 @@ import net.sourceforge.plantuml.ugraphic.UTranslate; class FtileSplit1 extends AbstractFtile { - private final List forks = new ArrayList(); + private final List forks = new ArrayList<>(); public FtileSplit1(List forks) { super(forks.get(0).skinParam()); @@ -76,7 +76,7 @@ class FtileSplit1 extends AbstractFtile { } public static Set mergeSwimlanes(List tiles) { - final Set result = new HashSet(); + final Set result = new HashSet<>(); for (Ftile tile : tiles) { result.addAll(tile.getSwimlanes()); } diff --git a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileSwitch.java b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileSwitch.java index 8ee3347e6..92164a709 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileSwitch.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileSwitch.java @@ -75,13 +75,13 @@ class FtileSwitch extends AbstractFtile { private FtileSwitch(List inlabelSizes, List tiles, Rainbow arrowColor) { super(tiles.get(0).skinParam()); - this.tiles = new ArrayList(tiles); + this.tiles = new ArrayList<>(tiles); this.arrowColor = arrowColor; } public Set getSwimlanes() { - final Set result = new HashSet(); + final Set result = new HashSet<>(); if (getSwimlaneIn() != null) { result.add(getSwimlaneIn()); } @@ -100,13 +100,13 @@ class FtileSwitch extends AbstractFtile { FtileFactory ftileFactory, ConditionStyle conditionStyle, List thens, FontConfiguration fcArrow, LinkRendering topInlinkRendering, LinkRendering afterEndwhile, FontConfiguration fcTest) { Objects.requireNonNull(afterEndwhile); - final List tiles = new ArrayList(); + final List tiles = new ArrayList<>(); for (Branch branch : thens) { tiles.add(new FtileMinWidthCentered(branch.getFtile(), 30)); } - List inlabelSizes = new ArrayList(); + List inlabelSizes = new ArrayList<>(); for (Branch branch : thens) { final TextBlock tb1 = branch.getLabelPositive().create(fcArrow, HorizontalAlignment.LEFT, ftileFactory.skinParam()); @@ -134,7 +134,7 @@ class FtileSwitch extends AbstractFtile { @Override public Collection getMyChildren() { - final List result = new ArrayList(tiles); + final List result = new ArrayList<>(tiles); return Collections.unmodifiableList(result); } @@ -179,7 +179,7 @@ class FtileSwitch extends AbstractFtile { protected FtileGeometry calculateDimensionFtile(StringBounder stringBounder) { final Dimension2D dimTotal = calculateDimensionInternal(stringBounder); - final List all = new ArrayList(tiles); + final List all = new ArrayList<>(tiles); for (Ftile tmp : all) { if (tmp.calculateDimension(stringBounder).hasPointOut()) { return new FtileGeometry(dimTotal, dimTotal.getWidth() / 2, 0, dimTotal.getHeight()); diff --git a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileWhile.java b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileWhile.java index b2a04d8d3..ae02c0ecf 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileWhile.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileWhile.java @@ -92,7 +92,7 @@ class FtileWhile extends AbstractFtile { } public Set getSwimlanes() { - final Set result = new HashSet(whileBlock.getSwimlanes()); + final Set result = new HashSet<>(whileBlock.getSwimlanes()); result.add(getSwimlaneIn()); return result; } @@ -146,7 +146,7 @@ class FtileWhile extends AbstractFtile { final TextBlock back1 = incoming1.getDisplay().create(fontArrow, HorizontalAlignment.LEFT, ftileFactory.skinParam()); - final List conns = new ArrayList(); + final List conns = new ArrayList<>(); if (dim.getWidth() == 0 || dim.getHeight() == 0) { conns.add(result.new ConnectionBackEmpty(incoming1.getRainbow())); } else { diff --git a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileWithNoteOpale.java b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileWithNoteOpale.java index 4d13cad56..9b4dd14ee 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileWithNoteOpale.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileWithNoteOpale.java @@ -95,7 +95,7 @@ public class FtileWithNoteOpale extends AbstractFtile implements Stencil, Stylea public Set getSwimlanes() { if (swimlaneNote != null) { - final Set result = new HashSet(tile.getSwimlanes()); + final Set result = new HashSet<>(tile.getSwimlanes()); result.add(swimlaneNote); return Collections.unmodifiableSet(result); } diff --git a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/ParallelBuilderFork.java b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/ParallelBuilderFork.java index 376af9d35..13e69899e 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/ParallelBuilderFork.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/ParallelBuilderFork.java @@ -82,7 +82,7 @@ public class ParallelBuilderFork extends AbstractParallelFtilesBuilder { final double maxHeight = computeMaxHeight(all); final double ymargin1 = getSuppSpace1(all, getStringBounder()); final double ymargin2 = getSuppSpace2(all, getStringBounder()); - final List result = new ArrayList(); + final List result = new ArrayList<>(); for (Ftile ftile : all) { final Ftile newFtile = computeNewFtile(ftile, maxHeight, ymargin1, ymargin2); result.add(newFtile); @@ -128,7 +128,7 @@ public class ParallelBuilderFork extends AbstractParallelFtilesBuilder { @Override protected Ftile doStep1(Ftile middle) { Ftile result = middle; - final List conns = new ArrayList(); + final List conns = new ArrayList<>(); final Swimlane swimlaneBlack = in; final Ftile black = new FtileBlackBlock(skinParam(), getRose().getHtmlColor(skinParam(), ColorParam.activityBar), swimlaneBlack); @@ -196,7 +196,7 @@ public class ParallelBuilderFork extends AbstractParallelFtilesBuilder { ((FtileBlackBlock) out).setLabel(getTextBlock(Display.getWithNewlines(label))); } result = new FtileAssemblySimple(result, out); - final List conns = new ArrayList(); + final List conns = new ArrayList<>(); double x = 0; for (Ftile tmp : list99) { final Dimension2D dim = tmp.calculateDimension(getStringBounder()); diff --git a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/ParallelBuilderMerge.java b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/ParallelBuilderMerge.java index 7202e2d8b..d3406eae7 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/ParallelBuilderMerge.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/ParallelBuilderMerge.java @@ -72,7 +72,7 @@ public class ParallelBuilderMerge extends AbstractParallelFtilesBuilder { @Override protected Ftile doStep1(Ftile inner) { Ftile result = inner; - final List conns = new ArrayList(); + final List conns = new ArrayList<>(); final HColor colorBar = getRose().getHtmlColor(skinParam(), ColorParam.activityBar); final Ftile black = new FtileBlackBlock(skinParam(), colorBar, list99.get(0).getSwimlaneIn()); @@ -104,7 +104,7 @@ public class ParallelBuilderMerge extends AbstractParallelFtilesBuilder { final HColor backColor = getRose().getHtmlColor(skinParam(), ColorParam.activityDiamondBackground); final Ftile out = new FtileDiamond(skinParam(), backColor, borderColor, swimlaneOutForStep2()); result = new FtileAssemblySimple(result, out); - final List conns = new ArrayList(); + final List conns = new ArrayList<>(); final UTranslate diamondTranslate = result.getTranslateFor(out, getStringBounder()); int i = 0; double x = 0; diff --git a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/ParallelBuilderSplit.java b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/ParallelBuilderSplit.java index d27aa477b..b87d29136 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/ParallelBuilderSplit.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/ParallelBuilderSplit.java @@ -77,7 +77,7 @@ public class ParallelBuilderSplit extends AbstractParallelFtilesBuilder { @Override protected Ftile doStep1(Ftile inner) { Ftile result = inner; - final List conns = new ArrayList(); + final List conns = new ArrayList<>(); final Rainbow thinColor; if (UseStyle.useBetaStyle()) { Style style = getDefaultStyleDefinition().getMergedStyle(skinParam().getCurrentStyleBuilder()); @@ -171,7 +171,7 @@ public class ParallelBuilderSplit extends AbstractParallelFtilesBuilder { final Ftile out = new FtileThinSplit(skinParam(), thinColor.getColor(), swimlaneOutForStep2()); result = new FtileAssemblySimple(result, out); - final List conns = new ArrayList(); + final List conns = new ArrayList<>(); double x = 0; double first = 0; double last = 0; diff --git a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/VCompactFactory.java b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/VCompactFactory.java index e7f0abe61..9648567a3 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/VCompactFactory.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/VCompactFactory.java @@ -181,7 +181,7 @@ public class VCompactFactory implements FtileFactory { public Ftile createIf(Swimlane swimlane, List thens, Branch elseBranch, LinkRendering afterEndwhile, LinkRendering topInlinkRendering, Url url) { - final List ftiles = new ArrayList(); + final List ftiles = new ArrayList<>(); for (Branch branch : thens) { ftiles.add(branch.getFtile()); } @@ -191,7 +191,7 @@ public class VCompactFactory implements FtileFactory { public Ftile createSwitch(Swimlane swimlane, List branches, LinkRendering afterEndwhile, LinkRendering topInlinkRendering, Display labelTest) { - final List ftiles = new ArrayList(); + final List ftiles = new ArrayList<>(); for (Branch branch : branches) { ftiles.add(branch.getFtile()); } diff --git a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/cond/FtileIfNude.java b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/cond/FtileIfNude.java index 7644c3997..1e2261cbe 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/cond/FtileIfNude.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/cond/FtileIfNude.java @@ -74,7 +74,7 @@ public class FtileIfNude extends FtileDimensionMemoize { } public Set getSwimlanes() { - final Set result = new HashSet(); + final Set result = new HashSet<>(); if (getSwimlaneIn() != null) { result.add(getSwimlaneIn()); } diff --git a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/cond/FtileIfWithLinks.java b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/cond/FtileIfWithLinks.java index fe3916ec2..74bec1163 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/cond/FtileIfWithLinks.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/cond/FtileIfWithLinks.java @@ -421,7 +421,7 @@ public class FtileIfWithLinks extends FtileIfWithDiamonds { final StringBounder stringBounder = ug.getStringBounder(); final Dimension2D totalDim = calculateDimensionInternal(stringBounder); - final List allTiles = new ArrayList(); + final List allTiles = new ArrayList<>(); allTiles.add(tile1); allTiles.add(tile2); @@ -533,7 +533,7 @@ public class FtileIfWithLinks extends FtileIfWithDiamonds { } public Ftile addLinks(Branch branch1, Branch branch2, StringBounder stringBounder) { - final List conns = new ArrayList(); + final List conns = new ArrayList<>(); conns.add(new ConnectionHorizontalThenVertical(tile1, branch1)); conns.add(new ConnectionHorizontalThenVertical(tile2, branch2)); final boolean hasPointOut1 = tile1.calculateDimension(stringBounder).hasPointOut(); diff --git a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/cond/FtileSwitchNude.java b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/cond/FtileSwitchNude.java index e18c640df..63e6414a8 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/cond/FtileSwitchNude.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/cond/FtileSwitchNude.java @@ -69,7 +69,7 @@ public class FtileSwitchNude extends FtileDimensionMemoize { } public Set getSwimlanes() { - final Set result = new HashSet(); + final Set result = new HashSet<>(); if (getSwimlaneIn() != null) { result.add(getSwimlaneIn()); } @@ -115,7 +115,7 @@ public class FtileSwitchNude extends FtileDimensionMemoize { } @Override - protected FtileGeometry calculateDimensionFtile(StringBounder stringBounder) { + final protected FtileGeometry calculateDimensionFtile(StringBounder stringBounder) { final FtileGeometry dimTotal = calculateDimensionInternal(stringBounder); for (Ftile tile : tiles) if (tile.calculateDimension(stringBounder).hasPointOut()) { diff --git a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/cond/FtileSwitchWithDiamonds.java b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/cond/FtileSwitchWithDiamonds.java index 23241fde0..49ceb1854 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/cond/FtileSwitchWithDiamonds.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/cond/FtileSwitchWithDiamonds.java @@ -96,7 +96,7 @@ public class FtileSwitchWithDiamonds extends FtileSwitchNude { @Override public Collection getMyChildren() { - final Collection result = new ArrayList(super.getMyChildren()); + final Collection result = new ArrayList<>(super.getMyChildren()); result.add(diamond1); result.add(diamond2); return Collections.unmodifiableCollection(result); @@ -111,7 +111,7 @@ public class FtileSwitchWithDiamonds extends FtileSwitchNude { } @Override - protected FtileGeometry calculateDimensionInternalSlow(StringBounder stringBounder) { + final protected FtileGeometry calculateDimensionInternalSlow(StringBounder stringBounder) { final FtileGeometry dim1 = diamond1.calculateDimension(stringBounder); final FtileGeometry dim2 = diamond2.calculateDimension(stringBounder); @@ -145,7 +145,10 @@ public class FtileSwitchWithDiamonds extends FtileSwitchNude { } else { super.drawU(ug.apply(getTranslateMain(stringBounder))); } - ug.apply(getTranslateDiamond2(stringBounder)).draw(diamond2); + + if (calculateDimension(stringBounder).hasPointOut()) { + ug.apply(getTranslateDiamond2(stringBounder)).draw(diamond2); + } } protected UTranslate getTranslateOf(Ftile tile, StringBounder stringBounder) { @@ -194,7 +197,8 @@ public class FtileSwitchWithDiamonds extends FtileSwitchNude { protected TextBlock getLabelPositive(Branch branch) { final FontConfiguration fcArrow = new FontConfiguration(skinParam(), FontParam.ARROW, null); - return branch.getLabelPositive().create7(fcArrow, HorizontalAlignment.LEFT, skinParam(), CreoleMode.SIMPLE_LINE); + return branch.getLabelPositive().create7(fcArrow, HorizontalAlignment.LEFT, skinParam(), + CreoleMode.SIMPLE_LINE); } } diff --git a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/cond/FtileSwitchWithManyLinks.java b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/cond/FtileSwitchWithManyLinks.java index 0a9d7bb35..247ed95ac 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/cond/FtileSwitchWithManyLinks.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/cond/FtileSwitchWithManyLinks.java @@ -275,7 +275,7 @@ public class FtileSwitchWithManyLinks extends FtileSwitchWithDiamonds { } public Ftile addLinks() { - final List conns = new ArrayList(); + final List conns = new ArrayList<>(); conns.add(new ConnectionHorizontalThenVertical(tiles.get(0), branches.get(0))); conns.add(new ConnectionHorizontalThenVertical(tiles.get(tiles.size() - 1), branches.get(tiles.size() - 1))); conns.add(new ConnectionVerticalThenHorizontal(tiles.get(0))); diff --git a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/cond/FtileSwitchWithOneLink.java b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/cond/FtileSwitchWithOneLink.java index 0c7fcfedd..3d942bf2c 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/cond/FtileSwitchWithOneLink.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/cond/FtileSwitchWithOneLink.java @@ -80,8 +80,8 @@ public class FtileSwitchWithOneLink extends FtileSwitchWithDiamonds { final double x2 = p2.getX(); final double y2 = p2.getY(); - final Snake snake = Snake.create(null, arrowColor, Arrows.asToDown()) - .withLabel(getLabelPositive(branch), arrowHorizontalAlignment()); + final Snake snake = Snake.create(null, arrowColor, Arrows.asToDown()).withLabel(getLabelPositive(branch), + arrowHorizontalAlignment()); // snake.addPoint(x1, y1); snake.addPoint(x2, y1); snake.addPoint(x2, y2); @@ -134,10 +134,14 @@ public class FtileSwitchWithOneLink extends FtileSwitchWithDiamonds { } } - public Ftile addLinks() { - final List conns = new ArrayList(); - conns.add(new ConnectionVerticalTop(tiles.get(0), branches.get(0))); - conns.add(new ConnectionVerticalBottom(tiles.get(0))); + public Ftile addLinks(StringBounder stringBounder) { + final List conns = new ArrayList<>(); + final Ftile single = tiles.get(0); + conns.add(new ConnectionVerticalTop(single, branches.get(0))); + + if (single.calculateDimension(stringBounder).hasPointOut()) { + conns.add(new ConnectionVerticalBottom(single)); + } return FtileUtils.addConnection(this, conns); } diff --git a/src/net/sourceforge/plantuml/anim/Animation.java b/src/net/sourceforge/plantuml/anim/Animation.java index f0ca08de0..38211f182 100644 --- a/src/net/sourceforge/plantuml/anim/Animation.java +++ b/src/net/sourceforge/plantuml/anim/Animation.java @@ -62,7 +62,7 @@ public class Animation { } public static Animation create(List descriptions) { - final List all = new ArrayList(); + final List all = new ArrayList<>(); for (String s : descriptions) { final AffineTransformation tmp = AffineTransformation.create(s); if (tmp != null) { diff --git a/src/net/sourceforge/plantuml/anim/AnimationDecoder.java b/src/net/sourceforge/plantuml/anim/AnimationDecoder.java index 12457fbb8..474368235 100644 --- a/src/net/sourceforge/plantuml/anim/AnimationDecoder.java +++ b/src/net/sourceforge/plantuml/anim/AnimationDecoder.java @@ -41,14 +41,12 @@ import java.util.Iterator; import java.util.List; import java.util.StringTokenizer; -import javax.script.ScriptException; - public class AnimationDecoder { - private final List result = new ArrayList(); + private final List result = new ArrayList<>(); + + public AnimationDecoder(Iterable data) { - public AnimationDecoder(Iterable data) throws ScriptException { - for (final Iterator it = data.iterator(); it.hasNext();) { String line = it.next().toString(); if (line.matches("^\\s*\\[script\\]\\s*$")) { diff --git a/src/net/sourceforge/plantuml/anim/AnimationScript.java b/src/net/sourceforge/plantuml/anim/AnimationScript.java index 37f1d8862..7575e5eb3 100644 --- a/src/net/sourceforge/plantuml/anim/AnimationScript.java +++ b/src/net/sourceforge/plantuml/anim/AnimationScript.java @@ -35,22 +35,14 @@ */ package net.sourceforge.plantuml.anim; -import java.io.PrintWriter; -import java.io.StringWriter; - -import javax.script.ScriptContext; -import javax.script.ScriptEngine; -import javax.script.ScriptEngineManager; -import javax.script.ScriptException; - public class AnimationScript { - private final ScriptEngine engine; +// private final ScriptEngine engine; public AnimationScript() { - final ScriptEngineManager manager = new ScriptEngineManager(); - engine = manager.getEngineByName("js"); +// final ScriptEngineManager manager = new ScriptEngineManager(); +// engine = manager.getEngineByName("js"); // ScriptEngineManager manager = new ScriptEngineManager(); // List factories = manager.getEngineFactories(); @@ -67,12 +59,13 @@ public class AnimationScript { } - public String eval(String line) throws ScriptException { - final ScriptContext context = engine.getContext(); - final StringWriter sw = new StringWriter(); - context.setWriter(new PrintWriter(sw)); - engine.eval(line, context); - final String result = sw.toString(); - return result; + public String eval(String line) { + throw new UnsupportedOperationException(); +// final ScriptContext context = engine.getContext(); +// final StringWriter sw = new StringWriter(); +// context.setWriter(new PrintWriter(sw)); +// engine.eval(line, context); +// final String result = sw.toString(); +// return result; } } diff --git a/src/net/sourceforge/plantuml/ant/CheckZipTask.java b/src/net/sourceforge/plantuml/ant/CheckZipTask.java index cce711336..c9d4fac7a 100644 --- a/src/net/sourceforge/plantuml/ant/CheckZipTask.java +++ b/src/net/sourceforge/plantuml/ant/CheckZipTask.java @@ -55,8 +55,8 @@ import net.sourceforge.plantuml.security.SecurityUtils; public class CheckZipTask extends Task { private String zipfile = null; - private List filesets = new ArrayList(); - private List filelists = new ArrayList(); + private List filesets = new ArrayList<>(); + private List filelists = new ArrayList<>(); /** * Add a set of files to touch @@ -107,7 +107,7 @@ public class CheckZipTask extends Task { return entries.contains(s); } - private final List entries = new ArrayList(); + private final List entries = new ArrayList<>(); private void loadZipFile(SFile file) throws IOException { diff --git a/src/net/sourceforge/plantuml/ant/PlantUmlTask.java b/src/net/sourceforge/plantuml/ant/PlantUmlTask.java index f2e208244..4181d9aca 100644 --- a/src/net/sourceforge/plantuml/ant/PlantUmlTask.java +++ b/src/net/sourceforge/plantuml/ant/PlantUmlTask.java @@ -79,8 +79,8 @@ public class PlantUmlTask extends Task { private String dir = null; private final Option option = new Option(); - private List filesets = new ArrayList(); - private List filelists = new ArrayList(); + private List filesets = new ArrayList<>(); + private List filelists = new ArrayList<>(); private AtomicInteger nbFiles = new AtomicInteger(0); private ExecutorService executorService; diff --git a/src/net/sourceforge/plantuml/asciiart/BasicCharAreaImpl.java b/src/net/sourceforge/plantuml/asciiart/BasicCharAreaImpl.java index f1ae23504..35ef5ea44 100644 --- a/src/net/sourceforge/plantuml/asciiart/BasicCharAreaImpl.java +++ b/src/net/sourceforge/plantuml/asciiart/BasicCharAreaImpl.java @@ -156,7 +156,7 @@ public class BasicCharAreaImpl implements BasicCharArea { } public List getLines() { - final List result = new ArrayList(height); + final List result = new ArrayList<>(height); for (int y = 0; y < height; y++) { result.add(getLine(y)); } diff --git a/src/net/sourceforge/plantuml/board/BNode.java b/src/net/sourceforge/plantuml/board/BNode.java index f9f5c904d..ab2fe9245 100644 --- a/src/net/sourceforge/plantuml/board/BNode.java +++ b/src/net/sourceforge/plantuml/board/BNode.java @@ -45,7 +45,7 @@ public class BNode { private final int stage; private int x = -1; private BNode parent; - private final List children = new ArrayList(); + private final List children = new ArrayList<>(); public BNode(int stage, String name) { this.name = name; diff --git a/src/net/sourceforge/plantuml/board/BoardDiagram.java b/src/net/sourceforge/plantuml/board/BoardDiagram.java index 364451731..666e5f698 100644 --- a/src/net/sourceforge/plantuml/board/BoardDiagram.java +++ b/src/net/sourceforge/plantuml/board/BoardDiagram.java @@ -62,7 +62,7 @@ import net.sourceforge.plantuml.ugraphic.color.HColorUtils; public class BoardDiagram extends UmlDiagram { - private final List activities = new ArrayList(); + private final List activities = new ArrayList<>(); public DiagramDescription getDescription() { return new DiagramDescription("Board"); diff --git a/src/net/sourceforge/plantuml/board/BoardDiagramFactory.java b/src/net/sourceforge/plantuml/board/BoardDiagramFactory.java index 5ab3ba7b6..4da8b718d 100644 --- a/src/net/sourceforge/plantuml/board/BoardDiagramFactory.java +++ b/src/net/sourceforge/plantuml/board/BoardDiagramFactory.java @@ -51,7 +51,7 @@ public class BoardDiagramFactory extends PSystemCommandFactory { @Override protected List createCommands() { - final List cmds = new ArrayList(); + final List cmds = new ArrayList<>(); addCommonCommands1(cmds); cmds.add(new CommandBoardPlus()); // cmds.add(new CommandMindMapTabulation()); diff --git a/src/net/sourceforge/plantuml/bpm/BpmDiagram.java b/src/net/sourceforge/plantuml/bpm/BpmDiagram.java index 691dbe0d7..f26b12ff6 100644 --- a/src/net/sourceforge/plantuml/bpm/BpmDiagram.java +++ b/src/net/sourceforge/plantuml/bpm/BpmDiagram.java @@ -66,8 +66,8 @@ public class BpmDiagram extends UmlDiagram { private final BpmElement start = new BpmElement(null, BpmElementType.START); - private List events = new ArrayList(); - private Deque branches = new ArrayDeque(); + private List events = new ArrayList<>(); + private Deque branches = new ArrayDeque<>(); public DiagramDescription getDescription() { return new DiagramDescription("(Bpm Diagram)"); diff --git a/src/net/sourceforge/plantuml/bpm/BpmDiagramFactory.java b/src/net/sourceforge/plantuml/bpm/BpmDiagramFactory.java index 53373b871..53c27b640 100644 --- a/src/net/sourceforge/plantuml/bpm/BpmDiagramFactory.java +++ b/src/net/sourceforge/plantuml/bpm/BpmDiagramFactory.java @@ -51,7 +51,7 @@ public class BpmDiagramFactory extends PSystemCommandFactory { @Override protected List createCommands() { - final List result = new ArrayList(); + final List result = new ArrayList<>(); result.add(new CommandDockedEvent()); result.add(new CommandMerge()); result.add(new CommandResume()); diff --git a/src/net/sourceforge/plantuml/bpm/Cell.java b/src/net/sourceforge/plantuml/bpm/Cell.java index 2573353b2..10c7310f8 100644 --- a/src/net/sourceforge/plantuml/bpm/Cell.java +++ b/src/net/sourceforge/plantuml/bpm/Cell.java @@ -42,7 +42,7 @@ import java.util.List; public class Cell { private Placeable data; - private final List destinations = new ArrayList(); + private final List destinations = new ArrayList<>(); public final Placeable getData() { return data; diff --git a/src/net/sourceforge/plantuml/bpm/ChainImpl.java b/src/net/sourceforge/plantuml/bpm/ChainImpl.java index 67423c034..f832e0cd3 100644 --- a/src/net/sourceforge/plantuml/bpm/ChainImpl.java +++ b/src/net/sourceforge/plantuml/bpm/ChainImpl.java @@ -43,8 +43,8 @@ import java.util.Objects; public class ChainImpl implements Chain { - private final List positive = new ArrayList(); - private final List negative = new ArrayList(); + private final List positive = new ArrayList<>(); + private final List negative = new ArrayList<>(); private int currentVersion; public boolean remove(O data) { @@ -57,7 +57,7 @@ public class ChainImpl implements Chain { } public ChainImpl cloneMe() { - final ChainImpl result = new ChainImpl(); + final ChainImpl result = new ChainImpl<>(); result.currentVersion = this.currentVersion; result.positive.addAll(this.positive); result.negative.addAll(this.negative); @@ -88,7 +88,7 @@ public class ChainImpl implements Chain { } public List toList() { - final List result = new ArrayList(); + final List result = new ArrayList<>(); for (O element : negative) { if (element != null) { result.add(0, element); diff --git a/src/net/sourceforge/plantuml/bpm/FootPrint.java b/src/net/sourceforge/plantuml/bpm/FootPrint.java index 794380d2e..9e571b613 100644 --- a/src/net/sourceforge/plantuml/bpm/FootPrint.java +++ b/src/net/sourceforge/plantuml/bpm/FootPrint.java @@ -40,6 +40,6 @@ import java.util.Set; public class FootPrint { - private final Set cells = new HashSet(); + private final Set cells = new HashSet<>(); } diff --git a/src/net/sourceforge/plantuml/bpm/Grid.java b/src/net/sourceforge/plantuml/bpm/Grid.java index 970069559..80b2237c7 100644 --- a/src/net/sourceforge/plantuml/bpm/Grid.java +++ b/src/net/sourceforge/plantuml/bpm/Grid.java @@ -55,8 +55,8 @@ public class Grid { public Grid() { this.root = new Coord(new Line(), new Col()); - this.lines = new ChainImpl(root.getLine()); - this.cols = new ChainImpl(root.getCol()); + this.lines = new ChainImpl<>(root.getLine()); + this.cols = new ChainImpl<>(root.getCol()); this.cells.put(root, new Cell()); } @@ -92,7 +92,7 @@ public class Grid { } // private Set edgeWith(Cell someCell) { - // // final Set result = new HashSet(); + // // final Set result = new HashSet<>(); // // for (GridEdge edge : edges) { // // if (edge.match(someCell)) { // // result.add(edge); @@ -104,7 +104,7 @@ public class Grid { // } // // private Collection getCellsConnectedTo(Cell someCell) { - // final Set result = new HashSet(); + // final Set result = new HashSet<>(); // final Set myEdges = edgeWith(someCell); // for (Cell cell : cells.values()) { // for (GridEdge edge : myEdges) { @@ -118,7 +118,7 @@ public class Grid { // } // // private SortedSet getColsConnectedTo(Cell someCell) { - // final SortedSet result = new TreeSet(cols); + // final SortedSet result = new TreeSet<>(cols); // final Set myEdges = edgeWith(someCell); // for (Map.Entry ent : cells.entrySet()) { // for (GridEdge edge : myEdges) { @@ -132,7 +132,7 @@ public class Grid { // } // public SortedSet colsConnectedTo(Line line) { - // final SortedSet result = new TreeSet(cols); + // final SortedSet result = new TreeSet<>(cols); // for (Map.Entry ent : cells.entrySet()) { // final Cell cell = ent.getValue(); // if (cell == null || cell.getData() == null) { @@ -254,7 +254,7 @@ public class Grid { // } public Set usedColsOf(Line line) { - final Set result = new HashSet(); + final Set result = new HashSet<>(); for (Map.Entry ent : cells.entrySet()) { final Cell cell = ent.getValue(); if (cell == null || cell.getData() == null) { diff --git a/src/net/sourceforge/plantuml/bpm/GridArray.java b/src/net/sourceforge/plantuml/bpm/GridArray.java index c96f25273..192ec6ccb 100644 --- a/src/net/sourceforge/plantuml/bpm/GridArray.java +++ b/src/net/sourceforge/plantuml/bpm/GridArray.java @@ -53,7 +53,7 @@ public class GridArray implements UDrawable { private final Placeable data[][]; private final ISkinParam skinParam; - // private final List edges = new ArrayList(); + // private final List edges = new ArrayList<>(); public GridArray(ISkinParam skinParam, int lines, int cols) { this.skinParam = skinParam; diff --git a/src/net/sourceforge/plantuml/braille/BrailleCharFactory.java b/src/net/sourceforge/plantuml/braille/BrailleCharFactory.java index 9a53d517b..6afa82570 100644 --- a/src/net/sourceforge/plantuml/braille/BrailleCharFactory.java +++ b/src/net/sourceforge/plantuml/braille/BrailleCharFactory.java @@ -42,7 +42,7 @@ import java.util.List; public class BrailleCharFactory { public static List build(String s) { - final List result = new ArrayList(); + final List result = new ArrayList<>(); for (int i = 0; i < s.length(); i++) { result.add(BrailleChar.fromChar(s.charAt(i))); } diff --git a/src/net/sourceforge/plantuml/braille/BrailleGrid.java b/src/net/sourceforge/plantuml/braille/BrailleGrid.java index 2613242e6..cefa3d90d 100644 --- a/src/net/sourceforge/plantuml/braille/BrailleGrid.java +++ b/src/net/sourceforge/plantuml/braille/BrailleGrid.java @@ -51,7 +51,7 @@ public class BrailleGrid { private int maxY; private final double quanta; - private final Set on = new HashSet(); + private final Set on = new HashSet<>(); public BrailleGrid(double quanta) { this.quanta = quanta; diff --git a/src/net/sourceforge/plantuml/braille/DriverPolygonBraille.java b/src/net/sourceforge/plantuml/braille/DriverPolygonBraille.java index fe9024712..7b5bdea2b 100644 --- a/src/net/sourceforge/plantuml/braille/DriverPolygonBraille.java +++ b/src/net/sourceforge/plantuml/braille/DriverPolygonBraille.java @@ -58,7 +58,7 @@ public class DriverPolygonBraille implements UDriver { public void draw(UShape ushape, double x, double y, ColorMapper mapper, UParam param, BrailleGrid grid) { final UPolygon shape = (UPolygon) ushape; - final List points = new ArrayList(); + final List points = new ArrayList<>(); int i = 0; for (Point2D pt : shape.getPoints()) { diff --git a/src/net/sourceforge/plantuml/brotli/BitReader.java b/src/net/sourceforge/plantuml/brotli/BitReader.java index 9e48e525a..35d4ba1f6 100644 --- a/src/net/sourceforge/plantuml/brotli/BitReader.java +++ b/src/net/sourceforge/plantuml/brotli/BitReader.java @@ -1,5 +1,7 @@ /* Copyright 2015 Google Inc. All Rights Reserved. + https://github.com/google/brotli/blob/master/LICENSE + Distributed under MIT license. See file LICENSE for detail or copy at https://opensource.org/licenses/MIT */ diff --git a/src/net/sourceforge/plantuml/brotli/BrotliInputStream.java b/src/net/sourceforge/plantuml/brotli/BrotliInputStream.java index 8debc6c79..0868ec4bb 100644 --- a/src/net/sourceforge/plantuml/brotli/BrotliInputStream.java +++ b/src/net/sourceforge/plantuml/brotli/BrotliInputStream.java @@ -1,5 +1,7 @@ /* Copyright 2015 Google Inc. All Rights Reserved. + https://github.com/google/brotli/blob/master/LICENSE + Distributed under MIT license. See file LICENSE for detail or copy at https://opensource.org/licenses/MIT */ diff --git a/src/net/sourceforge/plantuml/brotli/BrotliRuntimeException.java b/src/net/sourceforge/plantuml/brotli/BrotliRuntimeException.java index 7cf20d7d4..1689846d2 100644 --- a/src/net/sourceforge/plantuml/brotli/BrotliRuntimeException.java +++ b/src/net/sourceforge/plantuml/brotli/BrotliRuntimeException.java @@ -1,5 +1,7 @@ /* Copyright 2015 Google Inc. All Rights Reserved. + https://github.com/google/brotli/blob/master/LICENSE + Distributed under MIT license. See file LICENSE for detail or copy at https://opensource.org/licenses/MIT */ diff --git a/src/net/sourceforge/plantuml/brotli/Context.java b/src/net/sourceforge/plantuml/brotli/Context.java index 96083e40a..4207f3605 100644 --- a/src/net/sourceforge/plantuml/brotli/Context.java +++ b/src/net/sourceforge/plantuml/brotli/Context.java @@ -1,5 +1,7 @@ /* Copyright 2015 Google Inc. All Rights Reserved. + https://github.com/google/brotli/blob/master/LICENSE + Distributed under MIT license. See file LICENSE for detail or copy at https://opensource.org/licenses/MIT */ diff --git a/src/net/sourceforge/plantuml/brotli/Decode.java b/src/net/sourceforge/plantuml/brotli/Decode.java index 7fc3525c3..38b03fac2 100644 --- a/src/net/sourceforge/plantuml/brotli/Decode.java +++ b/src/net/sourceforge/plantuml/brotli/Decode.java @@ -1,5 +1,7 @@ /* Copyright 2015 Google Inc. All Rights Reserved. + https://github.com/google/brotli/blob/master/LICENSE + Distributed under MIT license. See file LICENSE for detail or copy at https://opensource.org/licenses/MIT */ diff --git a/src/net/sourceforge/plantuml/brotli/Dictionary.java b/src/net/sourceforge/plantuml/brotli/Dictionary.java index 53f484ff6..cb7dd21fc 100644 --- a/src/net/sourceforge/plantuml/brotli/Dictionary.java +++ b/src/net/sourceforge/plantuml/brotli/Dictionary.java @@ -1,5 +1,7 @@ /* Copyright 2015 Google Inc. All Rights Reserved. + https://github.com/google/brotli/blob/master/LICENSE + Distributed under MIT license. See file LICENSE for detail or copy at https://opensource.org/licenses/MIT */ diff --git a/src/net/sourceforge/plantuml/brotli/DictionaryData.java b/src/net/sourceforge/plantuml/brotli/DictionaryData.java index 1aab2c676..f2dd59dca 100644 --- a/src/net/sourceforge/plantuml/brotli/DictionaryData.java +++ b/src/net/sourceforge/plantuml/brotli/DictionaryData.java @@ -1,5 +1,7 @@ /* Copyright 2015 Google Inc. All Rights Reserved. + https://github.com/google/brotli/blob/master/LICENSE + Distributed under MIT license. See file LICENSE for detail or copy at https://opensource.org/licenses/MIT */ diff --git a/src/net/sourceforge/plantuml/brotli/Huffman.java b/src/net/sourceforge/plantuml/brotli/Huffman.java index 17ac1b553..086b750f9 100644 --- a/src/net/sourceforge/plantuml/brotli/Huffman.java +++ b/src/net/sourceforge/plantuml/brotli/Huffman.java @@ -1,5 +1,7 @@ /* Copyright 2015 Google Inc. All Rights Reserved. + https://github.com/google/brotli/blob/master/LICENSE + Distributed under MIT license. See file LICENSE for detail or copy at https://opensource.org/licenses/MIT */ diff --git a/src/net/sourceforge/plantuml/brotli/State.java b/src/net/sourceforge/plantuml/brotli/State.java index db670bcd6..00181a6d5 100644 --- a/src/net/sourceforge/plantuml/brotli/State.java +++ b/src/net/sourceforge/plantuml/brotli/State.java @@ -1,5 +1,7 @@ /* Copyright 2015 Google Inc. All Rights Reserved. + https://github.com/google/brotli/blob/master/LICENSE + Distributed under MIT license. See file LICENSE for detail or copy at https://opensource.org/licenses/MIT */ diff --git a/src/net/sourceforge/plantuml/brotli/Transform.java b/src/net/sourceforge/plantuml/brotli/Transform.java index b582b8411..331ee943c 100644 --- a/src/net/sourceforge/plantuml/brotli/Transform.java +++ b/src/net/sourceforge/plantuml/brotli/Transform.java @@ -1,5 +1,7 @@ /* Copyright 2015 Google Inc. All Rights Reserved. + https://github.com/google/brotli/blob/master/LICENSE + Distributed under MIT license. See file LICENSE for detail or copy at https://opensource.org/licenses/MIT */ diff --git a/src/net/sourceforge/plantuml/brotli/Utils.java b/src/net/sourceforge/plantuml/brotli/Utils.java index 35034d867..ea98dbf29 100644 --- a/src/net/sourceforge/plantuml/brotli/Utils.java +++ b/src/net/sourceforge/plantuml/brotli/Utils.java @@ -1,5 +1,7 @@ /* Copyright 2015 Google Inc. All Rights Reserved. + https://github.com/google/brotli/blob/master/LICENSE + Distributed under MIT license. See file LICENSE for detail or copy at https://opensource.org/licenses/MIT */ diff --git a/src/net/sourceforge/plantuml/classdiagram/AbstractEntityDiagram.java b/src/net/sourceforge/plantuml/classdiagram/AbstractEntityDiagram.java index 0baa074ed..5056596af 100644 --- a/src/net/sourceforge/plantuml/classdiagram/AbstractEntityDiagram.java +++ b/src/net/sourceforge/plantuml/classdiagram/AbstractEntityDiagram.java @@ -58,7 +58,7 @@ public abstract class AbstractEntityDiagram extends CucaDiagram { return def; } final String attribute = getPragma().getValue("graphattributes"); - final List result = new ArrayList(def); + final List result = new ArrayList<>(def); result.add(attribute); return Collections.unmodifiableList(result); } diff --git a/src/net/sourceforge/plantuml/classdiagram/ClassDiagram.java b/src/net/sourceforge/plantuml/classdiagram/ClassDiagram.java index 5b7734824..0be7bacd0 100644 --- a/src/net/sourceforge/plantuml/classdiagram/ClassDiagram.java +++ b/src/net/sourceforge/plantuml/classdiagram/ClassDiagram.java @@ -76,7 +76,7 @@ public class ClassDiagram extends AbstractClassOrObjectDiagram { @Override public ILeaf getOrCreateLeaf(Ident ident, Code code, LeafType type, USymbol symbol) { - checkNotNull(ident); + Objects.requireNonNull(ident); if (this.V1972()) { if (type == null) { type = LeafType.CLASS; @@ -107,7 +107,7 @@ public class ClassDiagram extends AbstractClassOrObjectDiagram { @Override public ILeaf createLeaf(Ident idNewLong, Code code, Display display, LeafType type, USymbol symbol) { - checkNotNull(idNewLong); + Objects.requireNonNull(idNewLong); if (type != LeafType.ABSTRACT_CLASS && type != LeafType.ANNOTATION && type != LeafType.CLASS && type != LeafType.INTERFACE && type != LeafType.ENUM && type != LeafType.LOLLIPOP_FULL && type != LeafType.LOLLIPOP_HALF && type != LeafType.NOTE) { @@ -130,7 +130,7 @@ public class ClassDiagram extends AbstractClassOrObjectDiagram { USymbol symbol) { if (this.V1972()) throw new UnsupportedOperationException(); - checkNotNull(id); + Objects.requireNonNull(id); final IGroup backupCurrentGroup = getCurrentGroup(); final IGroup group = backupCurrentGroup; final String namespaceString = getNamespace1972(fullyCode, getNamespaceSeparator()); diff --git a/src/net/sourceforge/plantuml/classdiagram/ClassDiagramFactory.java b/src/net/sourceforge/plantuml/classdiagram/ClassDiagramFactory.java index 279d66bc2..39ac1cc0f 100644 --- a/src/net/sourceforge/plantuml/classdiagram/ClassDiagramFactory.java +++ b/src/net/sourceforge/plantuml/classdiagram/ClassDiagramFactory.java @@ -95,7 +95,7 @@ public class ClassDiagramFactory extends PSystemCommandFactory { @Override protected List createCommands() { - final List cmds = new ArrayList(); + final List cmds = new ArrayList<>(); cmds.add(new CommandFootboxIgnored()); cmds.add(new CommandRankDir()); diff --git a/src/net/sourceforge/plantuml/classdiagram/FullLayout.java b/src/net/sourceforge/plantuml/classdiagram/FullLayout.java index e05db0af4..b1356f7e1 100644 --- a/src/net/sourceforge/plantuml/classdiagram/FullLayout.java +++ b/src/net/sourceforge/plantuml/classdiagram/FullLayout.java @@ -44,7 +44,7 @@ import net.sourceforge.plantuml.ugraphic.UTranslate; public class FullLayout implements UDrawable { - private final List all = new ArrayList(); + private final List all = new ArrayList<>(); public void addRowLayout(RowLayout rawLayout) { this.all.add(rawLayout); diff --git a/src/net/sourceforge/plantuml/classdiagram/RowLayout.java b/src/net/sourceforge/plantuml/classdiagram/RowLayout.java index 92e26d285..cbb8ffe71 100644 --- a/src/net/sourceforge/plantuml/classdiagram/RowLayout.java +++ b/src/net/sourceforge/plantuml/classdiagram/RowLayout.java @@ -46,7 +46,7 @@ import net.sourceforge.plantuml.ugraphic.UTranslate; public class RowLayout implements UDrawable { - private final List all = new ArrayList(); + private final List all = new ArrayList<>(); public void addLeaf(TextBlock entityImageClass) { this.all.add(entityImageClass); diff --git a/src/net/sourceforge/plantuml/code/CompressionZlib.java b/src/net/sourceforge/plantuml/code/CompressionZlib.java index d1e9c8548..4b09b0779 100644 --- a/src/net/sourceforge/plantuml/code/CompressionZlib.java +++ b/src/net/sourceforge/plantuml/code/CompressionZlib.java @@ -70,10 +70,13 @@ public class CompressionZlib implements Compression { return copyArray(output, compressedDataLength); } - public ByteArray decompress(byte[] in) throws NoPlantumlCompressionException { - final ByteBitInputStream in2 = new ByteBitInputStream(new ByteArrayInputStream(in)); + public ByteArray decompress(byte[] input) throws NoPlantumlCompressionException { + final byte padded[] = new byte[input.length + 256]; + System.arraycopy(input, 0, padded, 0, input.length); + + final ByteBitInputStream inputStream = new ByteBitInputStream(new ByteArrayInputStream(padded)); try { - return ByteArray.from(Decompressor.decompress(in2)); + return ByteArray.from(Decompressor.decompress(inputStream)); } catch (Exception e) { throw new NoPlantumlCompressionException(e); } diff --git a/src/net/sourceforge/plantuml/code/Tokens.java b/src/net/sourceforge/plantuml/code/Tokens.java index 5b12fd165..a01ee45e3 100644 --- a/src/net/sourceforge/plantuml/code/Tokens.java +++ b/src/net/sourceforge/plantuml/code/Tokens.java @@ -42,11 +42,11 @@ import java.util.TreeSet; public class Tokens { - private final List keywords = new ArrayList(); + private final List keywords = new ArrayList<>(); public static void main(String[] args) { System.err.println("keywords=" + new Tokens().keywords.size()); - final Set sorted = new TreeSet(new Tokens().keywords); + final Set sorted = new TreeSet<>(new Tokens().keywords); for (String s : sorted) { System.err.println(s); } diff --git a/src/net/sourceforge/plantuml/code/deflate/OutputStreamProtected.java b/src/net/sourceforge/plantuml/code/deflate/OutputStreamProtected.java index 66f34e7a4..8bdc71062 100644 --- a/src/net/sourceforge/plantuml/code/deflate/OutputStreamProtected.java +++ b/src/net/sourceforge/plantuml/code/deflate/OutputStreamProtected.java @@ -15,7 +15,7 @@ import java.io.IOException; public class OutputStreamProtected implements Closeable { - public static final int MAX_OUTPUT_SIZE = 5 * 1024 * 1024; + public static final int MAX_OUTPUT_SIZE = 1 * 1024 * 1024; private final ByteArrayOutputStream baos = new ByteArrayOutputStream(); private int counter = 0; diff --git a/src/net/sourceforge/plantuml/command/BlocLines.java b/src/net/sourceforge/plantuml/command/BlocLines.java index e6ab2a8f8..427e1054c 100644 --- a/src/net/sourceforge/plantuml/command/BlocLines.java +++ b/src/net/sourceforge/plantuml/command/BlocLines.java @@ -84,7 +84,7 @@ public class BlocLines implements Iterable { } private static BlocLines loadInternal(final BufferedReader br, LineLocation location) throws IOException { - final List result = new ArrayList(); + final List result = new ArrayList<>(); String s; try { while ((s = br.readLine()) != null) { @@ -105,19 +105,19 @@ public class BlocLines implements Iterable { } public static BlocLines single(StringLocated single) { - final List result = new ArrayList(); + final List result = new ArrayList<>(); result.add(single); return new BlocLines(result); } public static BlocLines singleString(String single) { - final List result = new ArrayList(); + final List result = new ArrayList<>(); result.add(new StringLocated(single, null)); return new BlocLines(result); } public static BlocLines fromArray(String[] array) { - final List result = new ArrayList(); + final List result = new ArrayList<>(); for (String single : array) { result.add(new StringLocated(single, null)); } @@ -125,7 +125,7 @@ public class BlocLines implements Iterable { } public static BlocLines getWithNewlines(String s) { - final List result = new ArrayList(); + final List result = new ArrayList<>(); for (String cs : BackSlash.getWithNewlines(s)) { result.add(new StringLocated(cs, null)); } @@ -137,19 +137,19 @@ public class BlocLines implements Iterable { } public BlocLines add(StringLocated s) { - final List copy = new ArrayList(lines); + final List copy = new ArrayList<>(lines); copy.add(s); return new BlocLines(copy); } public BlocLines addString(String s) { - final List copy = new ArrayList(lines); + final List copy = new ArrayList<>(lines); copy.add(new StringLocated(s, null)); return new BlocLines(copy); } public List getLinesAsStringForSprite() { - final List result = new ArrayList(); + final List result = new ArrayList<>(); for (StringLocated s : lines) { result.add(s.getString()); } @@ -176,13 +176,13 @@ public class BlocLines implements Iterable { } public BlocLines cleanList(MultilinesStrategy strategy) { - final List copy = new ArrayList(lines); + final List copy = new ArrayList<>(lines); strategy.cleanList(copy); return new BlocLines(copy); } public BlocLines trim() { - final List copy = new ArrayList(lines); + final List copy = new ArrayList<>(lines); for (int i = 0; i < copy.size(); i++) { final StringLocated s = copy.get(i); copy.set(i, s.getTrimmed()); @@ -191,7 +191,7 @@ public class BlocLines implements Iterable { } public BlocLines removeEmptyLines() { - final List copy = new ArrayList(lines); + final List copy = new ArrayList<>(lines); for (final Iterator it = copy.iterator(); it.hasNext();) { if (it.next().getString().length() == 0) { it.remove(); @@ -201,7 +201,7 @@ public class BlocLines implements Iterable { } // public BlocLines trimRight() { -// final List copy = new ArrayList(lines); +// final List copy = new ArrayList<>(lines); // for (int i = 0; i < copy.size(); i++) { // final StringLocated s = copy.get(i); // copy.set(i, s.getTrimmedRight()); @@ -213,7 +213,7 @@ public class BlocLines implements Iterable { if (firstColumnRemovable(lines) == false) { return this; } - final List copy = new ArrayList(lines); + final List copy = new ArrayList<>(lines); do { for (int i = 0; i < copy.size(); i++) { final StringLocated s = copy.get(i); @@ -249,7 +249,7 @@ public class BlocLines implements Iterable { if (lines.size() == 0) { return this; } - final List copy = new ArrayList(lines); + final List copy = new ArrayList<>(lines); copy.set(0, new StringLocated(data, null)); final int n = copy.size() - 1; final StringLocated s = copy.get(n); @@ -261,7 +261,7 @@ public class BlocLines implements Iterable { if (lines.size() == 0) { return this; } - final List copy = new ArrayList(lines); + final List copy = new ArrayList<>(lines); final int n = copy.size() - 1; final StringLocated currentLast = copy.get(n); copy.set(n, new StringLocated(last, currentLast.getLocation())); @@ -281,7 +281,7 @@ public class BlocLines implements Iterable { if (lines.size() <= referenceLine) { return this; } - final List copy = new ArrayList(lines); + final List copy = new ArrayList<>(lines); final int nbStartingSpace = nbStartingSpace(copy.get(referenceLine).getString()); for (int i = referenceLine; i < copy.size(); i++) { final StringLocated s = copy.get(i); @@ -317,7 +317,7 @@ public class BlocLines implements Iterable { } public BlocLines subExtract(int margeStart, int margeEnd) { - List copy = new ArrayList(lines); + List copy = new ArrayList<>(lines); copy = copy.subList(margeStart, copy.size() - margeEnd); return new BlocLines(copy); } @@ -338,7 +338,7 @@ public class BlocLines implements Iterable { final String second = getAt(1).getTrimmed().getString(); if (first.endsWith("{") == false && second.equals("{")) { final StringLocated vline = getFirst().append(" {"); - final List result = new ArrayList(); + final List result = new ArrayList<>(); result.add(vline); result.addAll(this.lines.subList(2, this.lines.size())); return new BlocLines(result); @@ -347,7 +347,7 @@ public class BlocLines implements Iterable { } public BlocLines eventuallyMoveAllEmptyBracket() { - final List result = new ArrayList(); + final List result = new ArrayList<>(); for (StringLocated line : lines) { if (line.getTrimmed().toString().equals("{")) { if (result.size() > 0) { diff --git a/src/net/sourceforge/plantuml/command/CommandExecutionResult.java b/src/net/sourceforge/plantuml/command/CommandExecutionResult.java index e4f6aaae9..f039cf00a 100644 --- a/src/net/sourceforge/plantuml/command/CommandExecutionResult.java +++ b/src/net/sourceforge/plantuml/command/CommandExecutionResult.java @@ -85,7 +85,7 @@ public class CommandExecutionResult { } public static List getStackTrace(Throwable exception) { - final List result = new ArrayList(); + final List result = new ArrayList<>(); result.add(exception.toString()); for (StackTraceElement ste : exception.getStackTrace()) { result.add(" " + ste.toString()); diff --git a/src/net/sourceforge/plantuml/command/PSystemCommandFactory.java b/src/net/sourceforge/plantuml/command/PSystemCommandFactory.java index c288f7dda..a478fb3d8 100644 --- a/src/net/sourceforge/plantuml/command/PSystemCommandFactory.java +++ b/src/net/sourceforge/plantuml/command/PSystemCommandFactory.java @@ -274,7 +274,7 @@ public abstract class PSystemCommandFactory extends PSystemAbstractFactory { } final public List getDescription() { - final List result = new ArrayList(); + final List result = new ArrayList<>(); for (Command cmd : createCommands()) { result.addAll(Arrays.asList(cmd.getDescription())); } diff --git a/src/net/sourceforge/plantuml/command/SkinLoader.java b/src/net/sourceforge/plantuml/command/SkinLoader.java index 5e2f419e7..98fe0aeb8 100644 --- a/src/net/sourceforge/plantuml/command/SkinLoader.java +++ b/src/net/sourceforge/plantuml/command/SkinLoader.java @@ -50,7 +50,7 @@ public class SkinLoader { public final static Pattern2 p1 = MyPattern .cmpile("^([\\w.]*(?:\\<\\<.*\\>\\>)?[\\w.]*)[%s]+(?:(\\{)|(.*))$|^\\}?$"); - final private List context = new ArrayList(); + final private List context = new ArrayList<>(); final private TitledDiagram diagram; public SkinLoader(TitledDiagram diagram) { diff --git a/src/net/sourceforge/plantuml/command/regex/RegexComposed.java b/src/net/sourceforge/plantuml/command/regex/RegexComposed.java index 00634e98e..2fec23e0d 100644 --- a/src/net/sourceforge/plantuml/command/regex/RegexComposed.java +++ b/src/net/sourceforge/plantuml/command/regex/RegexComposed.java @@ -58,7 +58,7 @@ public abstract class RegexComposed implements IRegex { abstract protected String getFullSlow(); - private final AtomicReference fullCached = new AtomicReference(); + private final AtomicReference fullCached = new AtomicReference<>(); private Pattern2 getPattern2() { Pattern2 result = fullCached.get(); diff --git a/src/net/sourceforge/plantuml/command/regex/RegexConcat.java b/src/net/sourceforge/plantuml/command/regex/RegexConcat.java index 243ae6d42..3ff1ae774 100644 --- a/src/net/sourceforge/plantuml/command/regex/RegexConcat.java +++ b/src/net/sourceforge/plantuml/command/regex/RegexConcat.java @@ -47,7 +47,7 @@ public final class RegexConcat extends RegexComposed implements IRegex { private static final ConcurrentMap cache = new ConcurrentHashMap(); private final AtomicLong foxRegex = new AtomicLong(-1L); - // private static final Set PRINTED2 = new HashSet(); + // private static final Set PRINTED2 = new HashSet<>(); public static void printCacheInfo() { int nbCompiled = 0; diff --git a/src/net/sourceforge/plantuml/command/regex/RegexLeaf.java b/src/net/sourceforge/plantuml/command/regex/RegexLeaf.java index 70ce43632..7fc3808f1 100644 --- a/src/net/sourceforge/plantuml/command/regex/RegexLeaf.java +++ b/src/net/sourceforge/plantuml/command/regex/RegexLeaf.java @@ -119,7 +119,7 @@ public class RegexLeaf implements IRegex { throw new UnsupportedOperationException(); } - static private final Set UNKNOWN = new HashSet(); + static private final Set UNKNOWN = new HashSet<>(); static private final Pattern p1 = Pattern.compile("^[-0A-Za-z_!:@;/=,\"]+$"); static private final Pattern p2 = Pattern.compile("^[-0A-Za-z_!:@;/=,\"]+\\?$"); diff --git a/src/net/sourceforge/plantuml/command/regex/RegexPartialMatch.java b/src/net/sourceforge/plantuml/command/regex/RegexPartialMatch.java index 931a6ec78..be441777f 100644 --- a/src/net/sourceforge/plantuml/command/regex/RegexPartialMatch.java +++ b/src/net/sourceforge/plantuml/command/regex/RegexPartialMatch.java @@ -42,7 +42,7 @@ import java.util.List; public class RegexPartialMatch implements Iterable { - private final List data = new ArrayList(); + private final List data = new ArrayList<>(); public RegexPartialMatch(String name) { diff --git a/src/net/sourceforge/plantuml/compositediagram/CompositeDiagram.java b/src/net/sourceforge/plantuml/compositediagram/CompositeDiagram.java index b438035f8..6e34e1c6f 100644 --- a/src/net/sourceforge/plantuml/compositediagram/CompositeDiagram.java +++ b/src/net/sourceforge/plantuml/compositediagram/CompositeDiagram.java @@ -35,6 +35,8 @@ */ package net.sourceforge.plantuml.compositediagram; +import java.util.Objects; + import net.sourceforge.plantuml.ISkinSimple; import net.sourceforge.plantuml.UmlDiagramType; import net.sourceforge.plantuml.classdiagram.AbstractEntityDiagram; @@ -52,7 +54,7 @@ public class CompositeDiagram extends AbstractEntityDiagram { @Override public IEntity getOrCreateLeaf(Ident ident, Code code, LeafType type, USymbol symbol) { - checkNotNull(ident); + Objects.requireNonNull(ident); // final Ident idNewLong = buildLeafIdent(id); if (type == null) { if (isGroup(code)) { diff --git a/src/net/sourceforge/plantuml/compositediagram/CompositeDiagramFactory.java b/src/net/sourceforge/plantuml/compositediagram/CompositeDiagramFactory.java index 7b855debf..e05082184 100644 --- a/src/net/sourceforge/plantuml/compositediagram/CompositeDiagramFactory.java +++ b/src/net/sourceforge/plantuml/compositediagram/CompositeDiagramFactory.java @@ -56,7 +56,7 @@ public class CompositeDiagramFactory extends PSystemCommandFactory { @Override protected List createCommands() { - final List cmds = new ArrayList(); + final List cmds = new ArrayList<>(); cmds.add(new CommandCreateBlock()); cmds.add(new CommandLinkBlock()); cmds.add(new CommandCreatePackageBlock()); diff --git a/src/net/sourceforge/plantuml/core/UmlSource.java b/src/net/sourceforge/plantuml/core/UmlSource.java index 0d5e7a377..848d208d9 100644 --- a/src/net/sourceforge/plantuml/core/UmlSource.java +++ b/src/net/sourceforge/plantuml/core/UmlSource.java @@ -70,7 +70,7 @@ final public class UmlSource { if (hasInitialSkinparam(source) == false) { return this; } - final List copy = new ArrayList(source); + final List copy = new ArrayList<>(source); while (hasInitialSkinparam(copy)) { copy.remove(1); } diff --git a/src/net/sourceforge/plantuml/creole/CreoleContext.java b/src/net/sourceforge/plantuml/creole/CreoleContext.java index 3fb1effdd..16934f418 100644 --- a/src/net/sourceforge/plantuml/creole/CreoleContext.java +++ b/src/net/sourceforge/plantuml/creole/CreoleContext.java @@ -40,7 +40,7 @@ import java.util.List; public class CreoleContext { - private final List stack = new ArrayList(); + private final List stack = new ArrayList<>(); public int getLocalNumber(int order) { ensureStackOk(order); diff --git a/src/net/sourceforge/plantuml/creole/Fission.java b/src/net/sourceforge/plantuml/creole/Fission.java index 5f3ba377c..b81d45a10 100644 --- a/src/net/sourceforge/plantuml/creole/Fission.java +++ b/src/net/sourceforge/plantuml/creole/Fission.java @@ -65,7 +65,7 @@ public class Fission { if (valueMaxWidth == 0) { return Arrays.asList(stripe); } - final List result = new ArrayList(); + final List result = new ArrayList<>(); StripeSimpleInternal current = new StripeSimpleInternal(stripe.getLHeader()); double remainingSpace = valueMaxWidth; for (Atom atom : noHeader()) { @@ -135,7 +135,7 @@ public class Fission { static class StripeSimpleInternal implements Stripe { - private final List atoms = new ArrayList(); + private final List atoms = new ArrayList<>(); private double totalWidth; private StripeSimpleInternal(Atom header) { diff --git a/src/net/sourceforge/plantuml/creole/Sheet.java b/src/net/sourceforge/plantuml/creole/Sheet.java index 2451ed8e4..2d46b6ef6 100644 --- a/src/net/sourceforge/plantuml/creole/Sheet.java +++ b/src/net/sourceforge/plantuml/creole/Sheet.java @@ -43,7 +43,7 @@ import net.sourceforge.plantuml.graphic.HorizontalAlignment; public class Sheet implements Iterable { - private final List stripes = new ArrayList(); + private final List stripes = new ArrayList<>(); private final HorizontalAlignment horizontalAlignment; public Sheet(HorizontalAlignment horizontalAlignment) { diff --git a/src/net/sourceforge/plantuml/creole/SheetBlock1.java b/src/net/sourceforge/plantuml/creole/SheetBlock1.java index d56a8a1ea..6b6c5b211 100644 --- a/src/net/sourceforge/plantuml/creole/SheetBlock1.java +++ b/src/net/sourceforge/plantuml/creole/SheetBlock1.java @@ -97,7 +97,7 @@ public class SheetBlock1 extends AbstractTextBlock implements TextBlock, Atom, S if (positions != null) { return; } - stripes = new ArrayList(); + stripes = new ArrayList<>(); for (Stripe stripe : sheet) { stripes.addAll(new Fission(stripe, maxWidth).getSplitted(stringBounder)); } diff --git a/src/net/sourceforge/plantuml/creole/atom/AtomTable.java b/src/net/sourceforge/plantuml/creole/atom/AtomTable.java index 2e811d842..5be0a9895 100644 --- a/src/net/sourceforge/plantuml/creole/atom/AtomTable.java +++ b/src/net/sourceforge/plantuml/creole/atom/AtomTable.java @@ -56,8 +56,8 @@ import net.sourceforge.plantuml.ugraphic.color.HColorNone; public class AtomTable extends AbstractAtom implements Atom { class Line { - private final List cells = new ArrayList(); - private final List cellsBackColor = new ArrayList(); + private final List cells = new ArrayList<>(); + private final List cellsBackColor = new ArrayList<>(); private final HColor lineBackColor; private Line(HColor lineBackColor) { @@ -79,7 +79,7 @@ public class AtomTable extends AbstractAtom implements Atom { } } - private final List lines = new ArrayList(); + private final List lines = new ArrayList<>(); private final Map positions = new HashMap(); private final HColor lineColor; diff --git a/src/net/sourceforge/plantuml/creole/atom/AtomTree.java b/src/net/sourceforge/plantuml/creole/atom/AtomTree.java index a2a0dc86f..ffa59c787 100644 --- a/src/net/sourceforge/plantuml/creole/atom/AtomTree.java +++ b/src/net/sourceforge/plantuml/creole/atom/AtomTree.java @@ -51,7 +51,7 @@ import net.sourceforge.plantuml.ugraphic.color.HColor; public class AtomTree extends AbstractAtom implements Atom { private final HColor lineColor; - private final List cells = new ArrayList(); + private final List cells = new ArrayList<>(); private final Map levels = new HashMap(); private final double margin = 2; diff --git a/src/net/sourceforge/plantuml/creole/atom/AtomWithMargin.java b/src/net/sourceforge/plantuml/creole/atom/AtomWithMargin.java index 7fe4e2d84..7480816d7 100644 --- a/src/net/sourceforge/plantuml/creole/atom/AtomWithMargin.java +++ b/src/net/sourceforge/plantuml/creole/atom/AtomWithMargin.java @@ -59,7 +59,7 @@ public class AtomWithMargin extends AbstractAtom implements Atom { @Override public List splitInTwo(StringBounder stringBounder, double width) { - final List result = new ArrayList(); + final List result = new ArrayList<>(); final List list = atom.splitInTwo(stringBounder, width); for (Atom a : list) { double y1 = marginY1; diff --git a/src/net/sourceforge/plantuml/creole/legacy/AtomText.java b/src/net/sourceforge/plantuml/creole/legacy/AtomText.java index 99e44b207..f14e606ea 100644 --- a/src/net/sourceforge/plantuml/creole/legacy/AtomText.java +++ b/src/net/sourceforge/plantuml/creole/legacy/AtomText.java @@ -225,7 +225,7 @@ public final class AtomText extends AbstractAtom implements Atom { } private final Collection splitted() { - final List result = new ArrayList(); + final List result = new ArrayList<>(); for (int i = 0; i < text.length(); i++) { final char ch = text.charAt(i); if (isOfWord(ch)) { @@ -248,7 +248,7 @@ public final class AtomText extends AbstractAtom implements Atom { if (maxWidth == 0) { throw new IllegalStateException(); } - final List result = new ArrayList(); + final List result = new ArrayList<>(); final StringTokenizer st = new StringTokenizer(text, " ", true); final StringBuilder currentLine = new StringBuilder(); while (st.hasMoreTokens()) { diff --git a/src/net/sourceforge/plantuml/creole/legacy/AtomTextUtils.java b/src/net/sourceforge/plantuml/creole/legacy/AtomTextUtils.java index d056e4d9b..02bde3bb9 100644 --- a/src/net/sourceforge/plantuml/creole/legacy/AtomTextUtils.java +++ b/src/net/sourceforge/plantuml/creole/legacy/AtomTextUtils.java @@ -79,7 +79,7 @@ public class AtomTextUtils { fontConfiguration = fontConfiguration.hyperlink(); final Display display = Display.getWithNewlines(url.getLabel()); if (display.size() > 1) { - final List all = new ArrayList(); + final List all = new ArrayList<>(); for (CharSequence s : display.asList()) { all.add(createAtomText(s.toString(), url, fontConfiguration, skinSimple)); } @@ -94,7 +94,7 @@ public class AtomTextUtils { final Pattern p = Pattern.compile( Splitter.openiconPattern + "|" + Splitter.spritePattern2 + "|" + Splitter.imgPatternNoSrcColon); final Matcher m = p.matcher(text); - final List result = new ArrayList(); + final List result = new ArrayList<>(); while (m.find()) { final StringBuffer sb = new StringBuffer(); m.appendReplacement(sb, ""); diff --git a/src/net/sourceforge/plantuml/creole/legacy/PSystemCreole.java b/src/net/sourceforge/plantuml/creole/legacy/PSystemCreole.java index f5c85f69a..91afb3f2b 100644 --- a/src/net/sourceforge/plantuml/creole/legacy/PSystemCreole.java +++ b/src/net/sourceforge/plantuml/creole/legacy/PSystemCreole.java @@ -56,7 +56,7 @@ import net.sourceforge.plantuml.ugraphic.UFont; public class PSystemCreole extends PlainDiagram { - private final List lines = new ArrayList(); + private final List lines = new ArrayList<>(); public PSystemCreole() { } diff --git a/src/net/sourceforge/plantuml/creole/legacy/StripeCode.java b/src/net/sourceforge/plantuml/creole/legacy/StripeCode.java index a62cd6542..177b278b2 100644 --- a/src/net/sourceforge/plantuml/creole/legacy/StripeCode.java +++ b/src/net/sourceforge/plantuml/creole/legacy/StripeCode.java @@ -54,7 +54,7 @@ import net.sourceforge.plantuml.ugraphic.UTranslate; public class StripeCode implements Stripe, Atom { final private FontConfiguration fontConfiguration; - private final List raw = new ArrayList(); + private final List raw = new ArrayList<>(); private boolean terminated; diff --git a/src/net/sourceforge/plantuml/creole/legacy/StripeSimple.java b/src/net/sourceforge/plantuml/creole/legacy/StripeSimple.java index f43849296..7fcda7703 100644 --- a/src/net/sourceforge/plantuml/creole/legacy/StripeSimple.java +++ b/src/net/sourceforge/plantuml/creole/legacy/StripeSimple.java @@ -89,8 +89,8 @@ public class StripeSimple implements Stripe { final private Atom header; - final private List atoms = new ArrayList(); - final private List commands = new ArrayList(); + final private List atoms = new ArrayList<>(); + final private List commands = new ArrayList<>(); private HorizontalAlignment align = HorizontalAlignment.LEFT; public void setCellAlignment(HorizontalAlignment align) { diff --git a/src/net/sourceforge/plantuml/creole/legacy/StripeTable.java b/src/net/sourceforge/plantuml/creole/legacy/StripeTable.java index d7ed850b9..2b2910b41 100644 --- a/src/net/sourceforge/plantuml/creole/legacy/StripeTable.java +++ b/src/net/sourceforge/plantuml/creole/legacy/StripeTable.java @@ -142,7 +142,7 @@ public class StripeTable implements Stripe { v = withouBackColor(v); } final List lines = getWithNewlinesInternal(v); - final List cells = new ArrayList(); + final List cells = new ArrayList<>(); for (String s : lines) { final StripeSimple cell = new StripeSimple(getFontConfiguration(mode), stripeStyle, new CreoleContext(), skinParam, CreoleMode.FULL); @@ -158,7 +158,7 @@ public class StripeTable implements Stripe { } static List getWithNewlinesInternal(String s) { - final List result = new ArrayList(); + final List result = new ArrayList<>(); final StringBuilder current = new StringBuilder(); for (int i = 0; i < s.length(); i++) { final char c = s.charAt(i); diff --git a/src/net/sourceforge/plantuml/creole/rosetta/ReaderAbstractWiki.java b/src/net/sourceforge/plantuml/creole/rosetta/ReaderAbstractWiki.java index f263e5862..9b2979309 100644 --- a/src/net/sourceforge/plantuml/creole/rosetta/ReaderAbstractWiki.java +++ b/src/net/sourceforge/plantuml/creole/rosetta/ReaderAbstractWiki.java @@ -96,7 +96,7 @@ public abstract class ReaderAbstractWiki implements ReaderWiki { if (first.startsWith("@start")) { return lines; } - final List copy = new ArrayList(lines); + final List copy = new ArrayList<>(lines); copy.add(0, "@startuml"); copy.add("@enduml"); return copy; diff --git a/src/net/sourceforge/plantuml/creole/rosetta/ReaderCreole.java b/src/net/sourceforge/plantuml/creole/rosetta/ReaderCreole.java index f8d7fb3c3..ee48960be 100644 --- a/src/net/sourceforge/plantuml/creole/rosetta/ReaderCreole.java +++ b/src/net/sourceforge/plantuml/creole/rosetta/ReaderCreole.java @@ -29,7 +29,7 @@ public class ReaderCreole extends ReaderAbstractWiki implements ReaderWiki { } public List transform(List raw) { - final List uhtml = new ArrayList(); + final List uhtml = new ArrayList<>(); for (int i = 0; i < raw.size(); i++) { String current = raw.get(i); uhtml.add(singleLineFormat(current)); diff --git a/src/net/sourceforge/plantuml/creole/rosetta/ReaderDokuwiki.java b/src/net/sourceforge/plantuml/creole/rosetta/ReaderDokuwiki.java index 977ee2c99..dfda9ee5c 100644 --- a/src/net/sourceforge/plantuml/creole/rosetta/ReaderDokuwiki.java +++ b/src/net/sourceforge/plantuml/creole/rosetta/ReaderDokuwiki.java @@ -64,7 +64,7 @@ public class ReaderDokuwiki extends ReaderAbstractWiki implements ReaderWiki { } public List transform(List raw) { - final List uhtml = new ArrayList(); + final List uhtml = new ArrayList<>(); for (int i = 0; i < raw.size(); i++) { String current = raw.get(i); @@ -157,7 +157,7 @@ public class ReaderDokuwiki extends ReaderAbstractWiki implements ReaderWiki { class AutoGroup { - private final List lines = new ArrayList(); + private final List lines = new ArrayList<>(); private int skip = 0; private final String[] headers; @@ -290,7 +290,7 @@ public class ReaderDokuwiki extends ReaderAbstractWiki implements ReaderWiki { class StartEndGroup { - private final List lines = new ArrayList(); + private final List lines = new ArrayList<>(); private int skip = 0; private final String first; diff --git a/src/net/sourceforge/plantuml/creole/rosetta/Rosetta.java b/src/net/sourceforge/plantuml/creole/rosetta/Rosetta.java index bd3a69237..cfca2b045 100644 --- a/src/net/sourceforge/plantuml/creole/rosetta/Rosetta.java +++ b/src/net/sourceforge/plantuml/creole/rosetta/Rosetta.java @@ -28,7 +28,7 @@ public class Rosetta { } private static List from(Display display) { - final List result = new ArrayList(); + final List result = new ArrayList<>(); for (CharSequence cs : display) { result.add(cs.toString()); } @@ -36,7 +36,7 @@ public class Rosetta { } private Rosetta(List lines) { - this.unicodeHtml = new ArrayList(lines); + this.unicodeHtml = new ArrayList<>(lines); } private Rosetta(WikiLanguage syntaxSource, List wiki) { @@ -56,7 +56,7 @@ public class Rosetta { } public List translateTo(WikiLanguage syntaxDestination) { - final List html = new ArrayList(); + final List html = new ArrayList<>(); final WriterWiki writer = new WriterWiki(syntaxDestination); html.addAll(writer.transform(unicodeHtml)); return Collections.unmodifiableList(html); diff --git a/src/net/sourceforge/plantuml/creole/rosetta/StripeRow.java b/src/net/sourceforge/plantuml/creole/rosetta/StripeRow.java index 3b7420b65..3cfaa7ec3 100644 --- a/src/net/sourceforge/plantuml/creole/rosetta/StripeRow.java +++ b/src/net/sourceforge/plantuml/creole/rosetta/StripeRow.java @@ -49,7 +49,7 @@ import net.sourceforge.plantuml.graphic.FontStyle; public class StripeRow implements Stripe { - private final List atoms = new ArrayList(); + private final List atoms = new ArrayList<>(); public Atom getLHeader() { return null; diff --git a/src/net/sourceforge/plantuml/creole/rosetta/WriterWiki.java b/src/net/sourceforge/plantuml/creole/rosetta/WriterWiki.java index cdcb27c3c..e7fe31ae3 100644 --- a/src/net/sourceforge/plantuml/creole/rosetta/WriterWiki.java +++ b/src/net/sourceforge/plantuml/creole/rosetta/WriterWiki.java @@ -18,7 +18,7 @@ public class WriterWiki { if (syntaxDestination == WikiLanguage.UNICODE) { return data; } - final List result = new ArrayList(); + final List result = new ArrayList<>(); for (String s : data) { result.add(WikiLanguage.toHtmlDebug(s)); } diff --git a/src/net/sourceforge/plantuml/cucadiagram/BodierLikeClassOrObject.java b/src/net/sourceforge/plantuml/cucadiagram/BodierLikeClassOrObject.java index 4ad8d45c8..b01796a84 100644 --- a/src/net/sourceforge/plantuml/cucadiagram/BodierLikeClassOrObject.java +++ b/src/net/sourceforge/plantuml/cucadiagram/BodierLikeClassOrObject.java @@ -55,7 +55,7 @@ import net.sourceforge.plantuml.style.Style; public class BodierLikeClassOrObject implements Bodier { - private final List rawBody = new ArrayList(); + private final List rawBody = new ArrayList<>(); private final Set hides; private LeafType type; private List methodsToDisplay; @@ -72,15 +72,13 @@ public class BodierLikeClassOrObject implements Bodier { if (type == LeafType.MAP) { throw new IllegalArgumentException(); } - Objects.requireNonNull(type); + this.type = Objects.requireNonNull(type); assert type.isLikeClass() || type == LeafType.OBJECT; this.hides = hides; - this.type = type; } public void setLeaf(ILeaf leaf) { - Objects.requireNonNull(leaf); - this.leaf = leaf; + this.leaf = Objects.requireNonNull(leaf); } @@ -113,7 +111,7 @@ public class BodierLikeClassOrObject implements Bodier { public Display getMethodsToDisplay() { if (methodsToDisplay == null) { - methodsToDisplay = new ArrayList(); + methodsToDisplay = new ArrayList<>(); for (int i = 0; i < rawBody.size(); i++) { final CharSequence s = rawBody.get(i); if (isMethod(i, rawBody) == false) { @@ -142,7 +140,7 @@ public class BodierLikeClassOrObject implements Bodier { public Display getFieldsToDisplay() { if (fieldsToDisplay == null) { - fieldsToDisplay = new ArrayList(); + fieldsToDisplay = new ArrayList<>(); for (CharSequence s : rawBody) { if (isMethod(s) == true) { continue; @@ -183,7 +181,7 @@ public class BodierLikeClassOrObject implements Bodier { } private List rawBodyWithoutHidden() { - final List result = new ArrayList(); + final List result = new ArrayList<>(); for (CharSequence s : rawBody) { final Member m; if (isMethod(s)) { diff --git a/src/net/sourceforge/plantuml/cucadiagram/BodierMap.java b/src/net/sourceforge/plantuml/cucadiagram/BodierMap.java index 1ac8d0ac0..5b1c60b1f 100644 --- a/src/net/sourceforge/plantuml/cucadiagram/BodierMap.java +++ b/src/net/sourceforge/plantuml/cucadiagram/BodierMap.java @@ -51,7 +51,7 @@ import net.sourceforge.plantuml.style.Style; public class BodierMap implements Bodier { - private final List rawBody = new ArrayList(); + private final List rawBody = new ArrayList<>(); private final Map map = new LinkedHashMap(); private ILeaf leaf; diff --git a/src/net/sourceforge/plantuml/cucadiagram/BodierSimple.java b/src/net/sourceforge/plantuml/cucadiagram/BodierSimple.java index 06dfb40b3..b86e67785 100644 --- a/src/net/sourceforge/plantuml/cucadiagram/BodierSimple.java +++ b/src/net/sourceforge/plantuml/cucadiagram/BodierSimple.java @@ -49,7 +49,7 @@ import net.sourceforge.plantuml.ugraphic.color.NoSuchColorException; public class BodierSimple implements Bodier { - private final List rawBody = new ArrayList(); + private final List rawBody = new ArrayList<>(); private ILeaf leaf; public void muteClassToObject() { diff --git a/src/net/sourceforge/plantuml/cucadiagram/Body3.java b/src/net/sourceforge/plantuml/cucadiagram/Body3.java index 658b8054d..3be2d4141 100644 --- a/src/net/sourceforge/plantuml/cucadiagram/Body3.java +++ b/src/net/sourceforge/plantuml/cucadiagram/Body3.java @@ -54,7 +54,7 @@ import net.sourceforge.plantuml.ugraphic.UGraphic; public class Body3 extends AbstractTextBlock implements TextBlock, WithPorts { - private final List rawBody = new ArrayList(); + private final List rawBody = new ArrayList<>(); private final FontParam fontParam; private final ISkinParam skinParam; private final Stereotype stereotype; diff --git a/src/net/sourceforge/plantuml/cucadiagram/BodyEnhanced1.java b/src/net/sourceforge/plantuml/cucadiagram/BodyEnhanced1.java index 8f646927e..c123a3693 100644 --- a/src/net/sourceforge/plantuml/cucadiagram/BodyEnhanced1.java +++ b/src/net/sourceforge/plantuml/cucadiagram/BodyEnhanced1.java @@ -68,7 +68,7 @@ public class BodyEnhanced1 extends BodyEnhancedAbstract implements TextBlock, Wi private final FontParam fontParam; private final ISkinParam skinParam; private final boolean lineFirst; - private final List urls = new ArrayList(); + private final List urls = new ArrayList<>(); private final Stereotype stereotype; private final ILeaf entity; private final boolean inEllipse; @@ -127,7 +127,7 @@ public class BodyEnhanced1 extends BodyEnhancedAbstract implements TextBlock, Wi return area; } urls.clear(); - final List blocks = new ArrayList(); + final List blocks = new ArrayList<>(); char separator = lineFirst ? '_' : 0; TextBlock title = null; @@ -198,7 +198,7 @@ public class BodyEnhanced1 extends BodyEnhancedAbstract implements TextBlock, Wi } private static List buildTreeOrTable(String init, ListIterator it) { - final List result = new ArrayList(); + final List result = new ArrayList<>(); final Pattern p = Pattern.compile("^(\\s+)"); final Matcher m = p.matcher(init); String start = ""; diff --git a/src/net/sourceforge/plantuml/cucadiagram/BodyEnhanced2.java b/src/net/sourceforge/plantuml/cucadiagram/BodyEnhanced2.java index e0f72ddda..4d6e24b17 100644 --- a/src/net/sourceforge/plantuml/cucadiagram/BodyEnhanced2.java +++ b/src/net/sourceforge/plantuml/cucadiagram/BodyEnhanced2.java @@ -76,7 +76,7 @@ public class BodyEnhanced2 extends BodyEnhancedAbstract { return area; } // urls.clear(); - final List blocks = new ArrayList(); + final List blocks = new ArrayList<>(); char separator = 0; TextBlock title = null; diff --git a/src/net/sourceforge/plantuml/cucadiagram/CucaDiagram.java b/src/net/sourceforge/plantuml/cucadiagram/CucaDiagram.java index b57ef9cb5..16993ad1f 100644 --- a/src/net/sourceforge/plantuml/cucadiagram/CucaDiagram.java +++ b/src/net/sourceforge/plantuml/cucadiagram/CucaDiagram.java @@ -106,12 +106,12 @@ public abstract class CucaDiagram extends UmlDiagram implements GroupHierarchy, private int horizontalPages = 1; private int verticalPages = 1; - private final List hides2 = new ArrayList(); - private final List removed = new ArrayList(); + private final List hides2 = new ArrayList<>(); + private final List removed = new ArrayList<>(); protected final EntityFactory entityFactory = new EntityFactory(hides2, removed, this); private IGroup currentGroup = entityFactory.getRootGroup(); - private List stacks2 = new ArrayList(); - private List stacks = new ArrayList(); + private List stacks2 = new ArrayList<>(); + private List stacks = new ArrayList<>(); private boolean visibilityModifierPresent; @@ -172,7 +172,7 @@ public abstract class CucaDiagram extends UmlDiagram implements GroupHierarchy, } final protected ILeaf getOrCreateLeafDefault(Ident idNewLong, Code code, LeafType type, USymbol symbol) { - checkNotNull(idNewLong); + Objects.requireNonNull(idNewLong); Objects.requireNonNull(type); ILeaf result; if (this.V1972()) @@ -193,7 +193,7 @@ public abstract class CucaDiagram extends UmlDiagram implements GroupHierarchy, } public ILeaf createLeaf(Ident idNewLong, Code code, Display display, LeafType type, USymbol symbol) { - checkNotNull(idNewLong); + Objects.requireNonNull(idNewLong); if (entityFactory.getLeafStrict(idNewLong) != null) { return null; // throw new IllegalArgumentException("Already known: " + code); @@ -203,7 +203,7 @@ public abstract class CucaDiagram extends UmlDiagram implements GroupHierarchy, final protected ILeaf createLeafInternal(Ident newIdent, Code code, Display display, LeafType type, USymbol symbol) { - checkNotNull(newIdent); + Objects.requireNonNull(newIdent); if (Display.isNull(display)) { display = Display.getWithNewlines(code).withCreoleMode(CreoleMode.SIMPLE_LINE); } @@ -242,10 +242,6 @@ public abstract class CucaDiagram extends UmlDiagram implements GroupHierarchy, return CodeImpl.of(s); } - protected final void checkNotNull(Object id) { - Objects.requireNonNull(id); - } - public boolean leafExist(Code code) { if (this.V1972()) throw new UnsupportedOperationException(); @@ -263,7 +259,7 @@ public abstract class CucaDiagram extends UmlDiagram implements GroupHierarchy, final public Collection getChildrenGroups(IGroup parent) { if (this.V1972()) return getChildrenGroupsIdent1972(parent); - final Collection result = new ArrayList(); + final Collection result = new ArrayList<>(); for (IGroup gg : getGroups(false)) { if (gg.getParentContainer() == parent) { result.add(gg); @@ -273,7 +269,7 @@ public abstract class CucaDiagram extends UmlDiagram implements GroupHierarchy, } private Collection getChildrenGroupsIdent1972(IGroup parent) { - final Collection result = new ArrayList(); + final Collection result = new ArrayList<>(); for (IGroup gg : entityFactory.groups2()) { if (gg.getIdent().parent().equals(parent.getIdent())) { result.add(gg); @@ -499,7 +495,7 @@ public abstract class CucaDiagram extends UmlDiagram implements GroupHierarchy, if (withRootGroup == false) { return entityFactory.groups(); } - final Collection result = new ArrayList(); + final Collection result = new ArrayList<>(); result.add(getRootGroup()); result.addAll(entityFactory.groups()); return Collections.unmodifiableCollection(result); @@ -573,7 +569,7 @@ public abstract class CucaDiagram extends UmlDiagram implements GroupHierarchy, abstract protected List getDotStrings(); final public String[] getDotStringSkek() { - final List result = new ArrayList(); + final List result = new ArrayList<>(); for (String s : getDotStrings()) { if (s.startsWith("nodesep") || s.startsWith("ranksep")) { result.add(s); @@ -794,8 +790,8 @@ public abstract class CucaDiagram extends UmlDiagram implements GroupHierarchy, this.removed.add(new HideOrShow2(what, show)); } - private final List hideOrShows = new ArrayList(); - private final Set hides = new HashSet(); + private final List hideOrShows = new ArrayList<>(); + private final Set hides = new HashSet<>(); static class HideOrShow { private final EntityGender gender; @@ -838,7 +834,7 @@ public abstract class CucaDiagram extends UmlDiagram implements GroupHierarchy, } final public List getTwoLastLinks() { - final List result = new ArrayList(); + final List result = new ArrayList<>(); final List links = getLinks(); for (int i = links.size() - 1; i >= 0; i--) { final Link link = links.get(i); @@ -866,7 +862,7 @@ public abstract class CucaDiagram extends UmlDiagram implements GroupHierarchy, final MagmaList magmaList = new MagmaList(); for (IGroup g : getGroups(true)) { - final List standalones = new ArrayList(); + final List standalones = new ArrayList<>(); for (ILeaf ent : g.getLeafsDirect()) { if (isStandalone(ent)) { diff --git a/src/net/sourceforge/plantuml/cucadiagram/Display.java b/src/net/sourceforge/plantuml/cucadiagram/Display.java index 27cf63a3a..25c8b7cde 100644 --- a/src/net/sourceforge/plantuml/cucadiagram/Display.java +++ b/src/net/sourceforge/plantuml/cucadiagram/Display.java @@ -96,7 +96,7 @@ public class Display implements Iterable { if (showStereotype) { return this; } - final List copy = new ArrayList(displayData); + final List copy = new ArrayList<>(displayData); final Display result = new Display(naturalHorizontalAlignment, isNull, defaultCreoleMode); for (Iterator it = copy.iterator(); it.hasNext();) { final CharSequence cs = it.next(); @@ -130,7 +130,7 @@ public class Display implements Iterable { } public Display replace(String src, String dest) { - final List newDisplay = new ArrayList(); + final List newDisplay = new ArrayList<>(); for (CharSequence cs : displayData) { if (cs.toString().contains(src)) { cs = cs.toString().replace(src, dest); @@ -154,7 +154,7 @@ public class Display implements Iterable { } public static Display createFoo(List data) throws NoSuchColorException { - final List tmp = new ArrayList(); + final List tmp = new ArrayList<>(); for (StringLocated s : data) { tmp.add(s.getString()); } @@ -182,7 +182,7 @@ public class Display implements Iterable { // Thread.dumpStack(); return NULL; } - final List result = new ArrayList(); + final List result = new ArrayList<>(); final StringBuilder current = new StringBuilder(); HorizontalAlignment naturalHorizontalAlignment = null; boolean rawMode = false; @@ -245,13 +245,13 @@ public class Display implements Iterable { } private static List manageEmbeddedDiagrams(final Collection strings) { - final List result = new ArrayList(); + final List result = new ArrayList<>(); final Iterator it = strings.iterator(); while (it.hasNext()) { CharSequence s = it.next(); final String type = EmbeddedDiagram.getEmbeddedType(s); if (type != null) { - final List other = new ArrayList(); + final List other = new ArrayList<>(); other.add("@start" + type); while (it.hasNext()) { final CharSequence s2 = it.next(); @@ -269,7 +269,7 @@ public class Display implements Iterable { } public Display manageGuillemet() { - final List result = new ArrayList(); + final List result = new ArrayList<>(); boolean first = true; for (CharSequence line : displayData) { if (line instanceof EmbeddedDiagram) { @@ -291,7 +291,7 @@ public class Display implements Iterable { if (displayData == null) { return this; } - final List result = new ArrayList(); + final List result = new ArrayList<>(); for (CharSequence line : displayData) { line = line.toString().replace("%page%", "" + page); line = line.toString().replace("%lastpage%", "" + lastpage); @@ -303,7 +303,7 @@ public class Display implements Iterable { public Display removeEndingStereotype() { final Matcher2 m = patternStereotype.matcher(displayData.get(displayData.size() - 1)); if (m.matches()) { - final List result = new ArrayList(this.displayData); + final List result = new ArrayList<>(this.displayData); result.set(result.size() - 1, m.group(1)); return new Display(result, this.naturalHorizontalAlignment, this.isNull, this.defaultCreoleMode); } @@ -321,7 +321,7 @@ public class Display implements Iterable { } public Display underlined() { - final List result = new ArrayList(); + final List result = new ArrayList<>(); for (CharSequence line : displayData) { result.add("" + line); } @@ -330,7 +330,7 @@ public class Display implements Iterable { public Display underlinedName() { final Pattern p = Pattern.compile("^([^:]+?)(\\s*:.+)$"); - final List result = new ArrayList(); + final List result = new ArrayList<>(); for (CharSequence line : displayData) { if (result.size() == 0) { final Matcher m = p.matcher(line); @@ -424,7 +424,7 @@ public class Display implements Iterable { } public List as2() { - final List result = new ArrayList(); + final List result = new ArrayList<>(); LineLocationImpl location = new LineLocationImpl("inner", null); for (CharSequence cs : displayData) { location = location.oneLineRead(); @@ -448,7 +448,7 @@ public class Display implements Iterable { } public List splitMultiline(Pattern2 separator) { - final List result = new ArrayList(); + final List result = new ArrayList<>(); Display pending = new Display(this.naturalHorizontalAlignment, this.isNull, this.defaultCreoleMode); result.add(pending); for (CharSequence line : displayData) { diff --git a/src/net/sourceforge/plantuml/cucadiagram/Election.java b/src/net/sourceforge/plantuml/cucadiagram/Election.java index 22fa97606..76270ad8f 100644 --- a/src/net/sourceforge/plantuml/cucadiagram/Election.java +++ b/src/net/sourceforge/plantuml/cucadiagram/Election.java @@ -65,7 +65,7 @@ class Election { } private List getAllCandidateContains(String shortName) { - final List result = new ArrayList(); + final List result = new ArrayList<>(); for (Map.Entry ent : all.entrySet()) { if (ent.getKey().contains(shortName)) { result.add(ent.getValue()); @@ -75,7 +75,7 @@ class Election { } private List getAllCandidateContainsStrict(String shortName) { - final List result = new ArrayList(); + final List result = new ArrayList<>(); for (Map.Entry ent : all.entrySet()) { final String key = ent.getKey(); if (key.matches(".*\\b" + shortName + "\\b.*")) { @@ -87,7 +87,7 @@ class Election { public Map getAllElected(Collection shortNames) { final Map memberWithPort = new HashMap(); - for (String shortName : new HashSet(shortNames)) { + for (String shortName : new HashSet<>(shortNames)) { final CharSequence m = getCandidate(shortName); if (m != null) { memberWithPort.put(m, shortName); diff --git a/src/net/sourceforge/plantuml/cucadiagram/GroupRoot.java b/src/net/sourceforge/plantuml/cucadiagram/GroupRoot.java index 8195b9bfb..56cdad0f9 100644 --- a/src/net/sourceforge/plantuml/cucadiagram/GroupRoot.java +++ b/src/net/sourceforge/plantuml/cucadiagram/GroupRoot.java @@ -67,7 +67,7 @@ public class GroupRoot implements IGroup { } public Collection getLeafsDirect() { - final List result = new ArrayList(); + final List result = new ArrayList<>(); for (ILeaf ent : entityFactory.leafs()) { if (ent.getParentContainer() == this) { result.add(ent); @@ -148,7 +148,7 @@ public class GroupRoot implements IGroup { } public Collection getChildren() { - final List result = new ArrayList(); + final List result = new ArrayList<>(); if (entityFactory.namespaceSeparator.V1972()) { for (IGroup ent : entityFactory.groups()) { if (ent.getIdent().size() == 1) { diff --git a/src/net/sourceforge/plantuml/cucadiagram/Ident.java b/src/net/sourceforge/plantuml/cucadiagram/Ident.java index 07c003408..f245f14e8 100644 --- a/src/net/sourceforge/plantuml/cucadiagram/Ident.java +++ b/src/net/sourceforge/plantuml/cucadiagram/Ident.java @@ -79,7 +79,7 @@ public class Ident implements Code { } public Ident add(Ident added) { - final List copy = new ArrayList(parts); + final List copy = new ArrayList<>(parts); copy.addAll(added.parts); return new Ident(copy); } @@ -102,14 +102,14 @@ public class Ident implements Code { } public Ident eventuallyRemoveStartingAndEndingDoubleQuote(String format) { - final List copy = new ArrayList(parts); + final List copy = new ArrayList<>(parts); final int pos = copy.size() - 1; copy.set(pos, StringUtils.eventuallyRemoveStartingAndEndingDoubleQuote(copy.get(pos), format)); return new Ident(copy); } public Ident removeStartingParenthesis() { - final List copy = new ArrayList(parts); + final List copy = new ArrayList<>(parts); final int pos = copy.size() - 1; final String last = copy.get(pos); if (last.startsWith("()") == false) { @@ -120,7 +120,7 @@ public class Ident implements Code { } public Ident addSuffix(String suffix) { - final List copy = new ArrayList(parts); + final List copy = new ArrayList<>(parts); final int pos = copy.size() - 1; copy.set(pos, copy.get(pos) + suffix); return new Ident(copy); @@ -133,7 +133,7 @@ public class Ident implements Code { if (x == -1) { return null; } - final List copy = new ArrayList(parts); + final List copy = new ArrayList<>(parts); final int pos = copy.size() - 1; copy.set(pos, last.substring(0, x)); return new Ident(copy); @@ -187,7 +187,7 @@ public class Ident implements Code { public Ident add(String sup, String separator) { this.checkResult(separator); final Ident added = from(sup, separator); - final List list = new ArrayList(this.parts.size() + added.parts.size()); + final List list = new ArrayList<>(this.parts.size() + added.parts.size()); list.addAll(this.parts); list.addAll(added.parts); final Ident result = new Ident(list); @@ -275,7 +275,7 @@ public class Ident implements Code { if (this.startsWith(from) == false) { throw new IllegalArgumentException(); } - final List result = new ArrayList(to.parts); + final List result = new ArrayList<>(to.parts); for (int i = from.parts.size(); i < this.parts.size(); i++) { result.add(this.parts.get(i)); } diff --git a/src/net/sourceforge/plantuml/cucadiagram/MagmaList.java b/src/net/sourceforge/plantuml/cucadiagram/MagmaList.java index 07ebe4ca2..f4b02efb6 100644 --- a/src/net/sourceforge/plantuml/cucadiagram/MagmaList.java +++ b/src/net/sourceforge/plantuml/cucadiagram/MagmaList.java @@ -40,7 +40,7 @@ import java.util.List; class MagmaList { - private final List all = new ArrayList(); + private final List all = new ArrayList<>(); public void add(Magma magma) { all.add(magma); diff --git a/src/net/sourceforge/plantuml/cucadiagram/Stereotype.java b/src/net/sourceforge/plantuml/cucadiagram/Stereotype.java index d61be745c..14a39fbd1 100644 --- a/src/net/sourceforge/plantuml/cucadiagram/Stereotype.java +++ b/src/net/sourceforge/plantuml/cucadiagram/Stereotype.java @@ -206,7 +206,7 @@ public class Stereotype implements CharSequence { } public List getMultipleLabels() { - final List result = new ArrayList(); + final List result = new ArrayList<>(); if (label != null) { final Pattern p = Pattern.compile("\\<\\<\\s?((?:\\<&\\w+\\>|[^<>])+?)\\s?\\>\\>"); final Matcher m = p.matcher(label); @@ -272,7 +272,7 @@ public class Stereotype implements CharSequence { } public List