@@ -427,9 +427,9 @@ private static void cleanOldPlatformDependencies(JsonNode packageJson) {
427427 for (String vaadinDependency : JacksonUtils
428428 .getKeys (vaadinDependencies )) {
429429 String version = vaadinDependencies .get (vaadinDependency )
430- .textValue ();
430+ .asString ();
431431 if (dependencies .has (vaadinDependency ) && version
432- .equals (dependencies .get (vaadinDependency ).textValue ())) {
432+ .equals (dependencies .get (vaadinDependency ).asString ())) {
433433 dependencies .remove (vaadinDependency );
434434 getLogger ().debug (
435435 "Old Vaadin provided dependency '{}':'{}' has been removed from package.json" ,
@@ -505,16 +505,16 @@ public static boolean hashAndBundleModulesEqual(JsonNode statsJson,
505505 // We know here that all dependencies exist
506506 missingFromBundle = dependenciesList .stream ()
507507 .filter (pkg -> !versionAccepted (
508- dependencies .get (pkg ).textValue (),
509- bundleModules .get (pkg ).textValue ()))
508+ dependencies .get (pkg ).asString (),
509+ bundleModules .get (pkg ).asString ()))
510510 .collect (Collectors .toList ());
511511
512512 if (!missingFromBundle .isEmpty ()) {
513513 for (String pkg : missingFromBundle ) {
514514 getLogger ().info (
515515 "Dependency {}:{} has the wrong version {} in the bundle" ,
516- pkg , dependencies .get (pkg ).textValue (),
517- bundleModules .get (pkg ).textValue ());
516+ pkg , dependencies .get (pkg ).asString (),
517+ bundleModules .get (pkg ).asString ());
518518 }
519519 return false ;
520520 }
@@ -581,7 +581,7 @@ private static boolean dependenciesContainsAllPackages(
581581 Map <String , String > npmPackages , JsonNode dependencies ) {
582582 final List <String > collect = npmPackages .keySet ().stream ()
583583 .filter (pkg -> !(dependencies .has (pkg )
584- && versionAccepted (dependencies .get (pkg ).textValue (),
584+ && versionAccepted (dependencies .get (pkg ).asString (),
585585 npmPackages .get (pkg ))))
586586 .collect (Collectors .toList ());
587587 if (!collect .isEmpty ()) {
@@ -622,7 +622,7 @@ public static boolean exportedWebComponents(JsonNode statsJson,
622622 for (int index = 0 ; index < webComponentsInStats
623623 .size (); index ++) {
624624 String webComponentInStats = webComponentsInStats .get (index )
625- .textValue ();
625+ .asString ();
626626 webComponents .remove (webComponentInStats );
627627 }
628628 }
@@ -854,7 +854,7 @@ private static Map<String, String> getRemainingImports(
854854 if (!remainingKeys .isEmpty ()) {
855855 for (String key : remainingKeys ) {
856856 remainingImportEntries .put (key ,
857- frontendHashes .get (key ).textValue ());
857+ frontendHashes .get (key ).asString ());
858858 }
859859 return remainingImportEntries ;
860860 }
@@ -905,7 +905,7 @@ private static String compareFrontendHashes(JsonNode frontendHashes,
905905 String frontendFileContent ) {
906906 final String contentHash = calculateHash (frontendFileContent );
907907 if (frontendHashes .has (frontendFilePath ) && !frontendHashes
908- .get (frontendFilePath ).textValue ().equals (contentHash )) {
908+ .get (frontendFilePath ).asString ().equals (contentHash )) {
909909 faultyContent .add (frontendFilePath );
910910 } else if (!frontendHashes .has (frontendFilePath )) {
911911 getLogger ().info ("No hash info for '{}'" , frontendFilePath );
@@ -923,7 +923,7 @@ private static boolean arrayContainsString(ArrayNode array, String string) {
923923 string = string .replace ("Frontend/" , "./" );
924924 for (int i = 0 ; i < array .size (); i ++) {
925925 if (string .equals (
926- array .get (i ).textValue ().replace ("Frontend/" , "./" ))) {
926+ array .get (i ).asString ().replace ("Frontend/" , "./" ))) {
927927 return true ;
928928 }
929929 }
@@ -932,7 +932,7 @@ private static boolean arrayContainsString(ArrayNode array, String string) {
932932
933933 public static String getStatsHash (JsonNode statsJson ) {
934934 if (statsJson .has ("packageJsonHash" )) {
935- return statsJson .get ("packageJsonHash" ).textValue ();
935+ return statsJson .get ("packageJsonHash" ).asString ();
936936 }
937937
938938 return null ;
@@ -941,7 +941,7 @@ public static String getStatsHash(JsonNode statsJson) {
941941 public static String getPackageJsonHash (JsonNode packageJson ) {
942942 if (packageJson != null && packageJson .has ("vaadin" )
943943 && packageJson .get ("vaadin" ).has ("hash" )) {
944- return packageJson .get ("vaadin" ).get ("hash" ).textValue ();
944+ return packageJson .get ("vaadin" ).get ("hash" ).asString ();
945945 }
946946
947947 return null ;
0 commit comments